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