Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 13991017: Commit InvalidationService implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another attempt to fix Android Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 class Profile; 37 class Profile;
38 38
39 namespace base { 39 namespace base {
40 class MessageLoop; 40 class MessageLoop;
41 } 41 }
42 42
43 namespace syncer { 43 namespace syncer {
44 class SyncManagerFactory; 44 class SyncManagerFactory;
45 } 45 }
46 46
47 namespace invalidation {
48 class InvalidatorStorage;
49 }
50
47 namespace browser_sync { 51 namespace browser_sync {
48 52
49 class AndroidInvalidatorBridge; 53 class AndroidInvalidatorBridge;
50 class ChangeProcessor; 54 class ChangeProcessor;
51 class InvalidatorStorage;
52 class SyncBackendRegistrar; 55 class SyncBackendRegistrar;
53 class SyncPrefs; 56 class SyncPrefs;
54 class SyncedDeviceTracker; 57 class SyncedDeviceTracker;
55 struct Experiments; 58 struct Experiments;
56 59
57 // SyncFrontend is the interface used by SyncBackendHost to communicate with 60 // SyncFrontend is the interface used by SyncBackendHost to communicate with
58 // the entity that created it and, presumably, is interested in sync-related 61 // the entity that created it and, presumably, is interested in sync-related
59 // activity. 62 // activity.
60 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread 63 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread
61 // used to create that SyncBackendHost. 64 // used to create that SyncBackendHost.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 159
157 // Create a SyncBackendHost with a reference to the |frontend| that 160 // Create a SyncBackendHost with a reference to the |frontend| that
158 // it serves and communicates to via the SyncFrontend interface (on 161 // it serves and communicates to via the SyncFrontend interface (on
159 // the same thread it used to call the constructor). Must outlive 162 // the same thread it used to call the constructor). Must outlive
160 // |sync_prefs| and |invalidator_storage|. 163 // |sync_prefs| and |invalidator_storage|.
161 SyncBackendHost( 164 SyncBackendHost(
162 const std::string& name, 165 const std::string& name,
163 Profile* profile, 166 Profile* profile,
164 const base::WeakPtr<SyncPrefs>& sync_prefs, 167 const base::WeakPtr<SyncPrefs>& sync_prefs,
165 // TODO(tim): Temporary, remove when bug 124137 finished. 168 // TODO(tim): Temporary, remove when bug 124137 finished.
166 const base::WeakPtr<InvalidatorStorage>& invalidator_storage); 169 const base::WeakPtr<invalidation::InvalidatorStorage>&
170 invalidator_storage);
167 171
168 // For testing. 172 // For testing.
169 // TODO(skrul): Extract an interface so this is not needed. 173 // TODO(skrul): Extract an interface so this is not needed.
170 explicit SyncBackendHost(Profile* profile); 174 explicit SyncBackendHost(Profile* profile);
171 virtual ~SyncBackendHost(); 175 virtual ~SyncBackendHost();
172 176
173 // Called on |frontend_loop_| to kick off asynchronous initialization. 177 // Called on |frontend_loop_| to kick off asynchronous initialization.
174 // As a fallback when no cached auth information is available, try to 178 // As a fallback when no cached auth information is available, try to
175 // bootstrap authentication using |lsid|, if it isn't empty. 179 // bootstrap authentication using |lsid|, if it isn't empty.
176 // Optionally delete the Sync Data folder (if it's corrupt). 180 // Optionally delete the Sync Data folder (if it's corrupt).
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // HandleInitializationCompletedOnFrontendLoop. 570 // HandleInitializationCompletedOnFrontendLoop.
567 syncer::WeakHandle<syncer::JsBackend> js_backend_; 571 syncer::WeakHandle<syncer::JsBackend> js_backend_;
568 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_; 572 syncer::WeakHandle<syncer::DataTypeDebugInfoListener> debug_info_listener_;
569 573
570 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 574 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
571 }; 575 };
572 576
573 } // namespace browser_sync 577 } // namespace browser_sync
574 578
575 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 579 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698