• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "chrome/browser/sync/glue/change_processor.h"
6 #include "chrome/browser/profiles/profile.h"
7 
8 namespace browser_sync {
9 
~ChangeProcessor()10 ChangeProcessor::~ChangeProcessor() {
11   DCHECK(!running_) << "ChangeProcessor dtor while running";
12 }
13 
Start(Profile * profile,sync_api::UserShare * share_handle)14 void ChangeProcessor::Start(Profile* profile,
15                             sync_api::UserShare* share_handle) {
16   DCHECK(error_handler_ && !share_handle_);
17   share_handle_ = share_handle;
18   StartImpl(profile);
19   running_ = true;
20 }
21 
Stop()22 void ChangeProcessor::Stop() {
23   if (!running_)
24     return;
25   StopImpl();
26   share_handle_ = NULL;
27   running_ = false;
28 }
29 
IsRunning() const30 bool ChangeProcessor::IsRunning() const {
31   return running_;
32 }
33 
34 }  // namespace browser_sync
35