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()10ChangeProcessor::~ChangeProcessor() { 11 DCHECK(!running_) << "ChangeProcessor dtor while running"; 12 } 13 Start(Profile * profile,sync_api::UserShare * share_handle)14void 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()22void ChangeProcessor::Stop() { 23 if (!running_) 24 return; 25 StopImpl(); 26 share_handle_ = NULL; 27 running_ = false; 28 } 29 IsRunning() const30bool ChangeProcessor::IsRunning() const { 31 return running_; 32 } 33 34 } // namespace browser_sync 35