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/engine/syncapi.h" | 9 #include "chrome/browser/sync/engine/syncapi.h" |
10 #include "chrome/browser/sync/glue/sync_backend_host.h" | 10 #include "chrome/browser/sync/glue/sync_backend_host.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 virtual void CommitChangesFromSyncModel(); | 53 virtual void CommitChangesFromSyncModel(); |
54 | 54 |
55 protected: | 55 protected: |
56 // These methods are invoked by Start() and Stop() to do | 56 // These methods are invoked by Start() and Stop() to do |
57 // implementation-specific work. | 57 // implementation-specific work. |
58 virtual void StartImpl(Profile* profile) = 0; | 58 virtual void StartImpl(Profile* profile) = 0; |
59 virtual void StopImpl() = 0; | 59 virtual void StopImpl() = 0; |
60 | 60 |
61 bool running() { return running_; } | 61 bool running() { return running_; } |
62 UnrecoverableErrorHandler* error_handler(); | 62 UnrecoverableErrorHandler* error_handler(); |
63 sync_api::UserShare* share_handle(); | 63 virtual sync_api::UserShare* share_handle(); |
64 | 64 |
65 private: | 65 private: |
66 bool running_; // True if we have been told it is safe to process changes. | 66 bool running_; // True if we have been told it is safe to process changes. |
67 UnrecoverableErrorHandler* error_handler_; // Guaranteed to outlive us. | 67 UnrecoverableErrorHandler* error_handler_; // Guaranteed to outlive us. |
68 | 68 |
69 // The sync model we are processing changes from. Non-NULL when |running_| is | 69 // The sync model we are processing changes from. Non-NULL when |running_| is |
70 // true. | 70 // true. |
71 sync_api::UserShare* share_handle_; | 71 sync_api::UserShare* share_handle_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor); | 73 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace browser_sync | 76 } // namespace browser_sync |
77 | 77 |
78 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ | 78 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ |
OLD | NEW |