OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNC_BACKEND_HOST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "sync/util/report_unrecoverable_error_function.h" | 31 #include "sync/util/report_unrecoverable_error_function.h" |
32 #include "sync/util/unrecoverable_error_handler.h" | 32 #include "sync/util/unrecoverable_error_handler.h" |
33 #include "sync/util/weak_handle.h" | 33 #include "sync/util/weak_handle.h" |
34 | 34 |
35 class MessageLoop; | 35 class MessageLoop; |
36 class Profile; | 36 class Profile; |
37 | 37 |
38 namespace browser_sync { | 38 namespace browser_sync { |
39 | 39 |
40 class ChangeProcessor; | 40 class ChangeProcessor; |
| 41 struct Experiments; |
41 class JsBackend; | 42 class JsBackend; |
42 class JsEventHandler; | 43 class JsEventHandler; |
43 class SyncBackendRegistrar; | 44 class SyncBackendRegistrar; |
44 class SyncPrefs; | 45 class SyncPrefs; |
45 | 46 |
46 // SyncFrontend is the interface used by SyncBackendHost to communicate with | 47 // SyncFrontend is the interface used by SyncBackendHost to communicate with |
47 // the entity that created it and, presumably, is interested in sync-related | 48 // the entity that created it and, presumably, is interested in sync-related |
48 // activity. | 49 // activity. |
49 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread | 50 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread |
50 // used to create that SyncBackendHost. | 51 // used to create that SyncBackendHost. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 115 |
115 // Called after we finish encrypting the current set of encrypted | 116 // Called after we finish encrypting the current set of encrypted |
116 // types. | 117 // types. |
117 virtual void OnEncryptionComplete() = 0; | 118 virtual void OnEncryptionComplete() = 0; |
118 | 119 |
119 // Called to perform migration of |types|. | 120 // Called to perform migration of |types|. |
120 virtual void OnMigrationNeededForTypes( | 121 virtual void OnMigrationNeededForTypes( |
121 syncable::ModelTypeSet types) = 0; | 122 syncable::ModelTypeSet types) = 0; |
122 | 123 |
123 // Inform the Frontend that new datatypes are available for registration. | 124 // Inform the Frontend that new datatypes are available for registration. |
124 virtual void OnDataTypesChanged(syncable::ModelTypeSet to_add) = 0; | 125 virtual void OnExperimentsChanged( |
| 126 const browser_sync::Experiments& experiments) = 0; |
125 | 127 |
126 // Called when the sync cycle returns there is an user actionable error. | 128 // Called when the sync cycle returns there is an user actionable error. |
127 virtual void OnActionableError( | 129 virtual void OnActionableError( |
128 const browser_sync::SyncProtocolError& error) = 0; | 130 const browser_sync::SyncProtocolError& error) = 0; |
129 | 131 |
130 protected: | 132 protected: |
131 // Don't delete through SyncFrontend interface. | 133 // Don't delete through SyncFrontend interface. |
132 virtual ~SyncFrontend() { | 134 virtual ~SyncFrontend() { |
133 } | 135 } |
134 private: | 136 private: |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 | 515 |
514 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. | 516 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. |
515 sessions::SyncSessionSnapshot last_snapshot_; | 517 sessions::SyncSessionSnapshot last_snapshot_; |
516 | 518 |
517 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 519 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
518 }; | 520 }; |
519 | 521 |
520 } // namespace browser_sync | 522 } // namespace browser_sync |
521 | 523 |
522 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 524 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
OLD | NEW |