| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/sync/glue/sync_backend_host.h" | 9 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 10 #include "chrome/browser/sync/internal_api/change_record.h" | 10 #include "chrome/browser/sync/internal_api/change_record.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ScopedStopObserving() {} | 68 ScopedStopObserving() {} |
| 69 T* processor_; | 69 T* processor_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 // These methods are invoked by Start() and Stop() to do | 73 // These methods are invoked by Start() and Stop() to do |
| 74 // implementation-specific work. | 74 // implementation-specific work. |
| 75 virtual void StartImpl(Profile* profile) = 0; | 75 virtual void StartImpl(Profile* profile) = 0; |
| 76 virtual void StopImpl() = 0; | 76 virtual void StopImpl() = 0; |
| 77 | 77 |
| 78 bool running() { return running_; } | 78 bool running() const { return running_; } |
| 79 UnrecoverableErrorHandler* error_handler(); | 79 UnrecoverableErrorHandler* error_handler() const; |
| 80 virtual sync_api::UserShare* share_handle(); | 80 virtual sync_api::UserShare* share_handle() const; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 bool running_; // True if we have been told it is safe to process changes. | 83 bool running_; // True if we have been told it is safe to process changes. |
| 84 UnrecoverableErrorHandler* error_handler_; // Guaranteed to outlive us. | 84 UnrecoverableErrorHandler* error_handler_; // Guaranteed to outlive us. |
| 85 | 85 |
| 86 // The sync model we are processing changes from. Non-NULL when |running_| is | 86 // The sync model we are processing changes from. Non-NULL when |running_| is |
| 87 // true. | 87 // true. |
| 88 sync_api::UserShare* share_handle_; | 88 sync_api::UserShare* share_handle_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor); | 90 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace browser_sync | 93 } // namespace browser_sync |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ | 95 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ |
| OLD | NEW |