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

Side by Side Diff: trunk/src/chrome/browser/sync/test_profile_sync_service.h

Issue 17610004: Revert 208315 "Make use of InvalidationService" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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_TEST_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 28 matching lines...) Expand all
39 namespace browser_sync { 39 namespace browser_sync {
40 40
41 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { 41 class SyncBackendHostForProfileSyncTest : public SyncBackendHost {
42 public: 42 public:
43 // |synchronous_init| causes initialization to block until the syncapi has 43 // |synchronous_init| causes initialization to block until the syncapi has
44 // completed setting itself up and called us back. 44 // completed setting itself up and called us back.
45 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). 45 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354).
46 SyncBackendHostForProfileSyncTest( 46 SyncBackendHostForProfileSyncTest(
47 Profile* profile, 47 Profile* profile,
48 const base::WeakPtr<SyncPrefs>& sync_prefs, 48 const base::WeakPtr<SyncPrefs>& sync_prefs,
49 const base::WeakPtr<invalidation::InvalidatorStorage>&
50 invalidator_storage,
49 syncer::TestIdFactory& id_factory, 51 syncer::TestIdFactory& id_factory,
50 base::Closure& callback, 52 base::Closure& callback,
51 bool set_initial_sync_ended_on_init, 53 bool set_initial_sync_ended_on_init,
52 bool synchronous_init, 54 bool synchronous_init,
53 bool fail_initial_download, 55 bool fail_initial_download,
54 syncer::StorageOption storage_option); 56 syncer::StorageOption storage_option);
55 virtual ~SyncBackendHostForProfileSyncTest(); 57 virtual ~SyncBackendHostForProfileSyncTest();
56 58
57 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); 59 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&));
58 60
(...skipping 13 matching lines...) Expand all
72 const base::Closure& retry_callback) OVERRIDE; 74 const base::Closure& retry_callback) OVERRIDE;
73 75
74 virtual void HandleSyncManagerInitializationOnFrontendLoop( 76 virtual void HandleSyncManagerInitializationOnFrontendLoop(
75 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 77 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
76 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 78 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
77 debug_info_listener, 79 debug_info_listener,
78 syncer::ModelTypeSet restored_types) OVERRIDE; 80 syncer::ModelTypeSet restored_types) OVERRIDE;
79 81
80 static void SetHistoryServiceExpectations(ProfileMock* profile); 82 static void SetHistoryServiceExpectations(ProfileMock* profile);
81 83
84 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state);
85 void EmitOnIncomingInvalidation(
86 const syncer::ObjectIdInvalidationMap& invalidation_map);
87
82 protected: 88 protected:
83 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; 89 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE;
84 90
85 private: 91 private:
86 void ContinueInitialization( 92 void ContinueInitialization(
87 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 93 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
88 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 94 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
89 debug_info_listener, 95 debug_info_listener,
90 syncer::ModelTypeSet restored_types); 96 syncer::ModelTypeSet restored_types);
91 97
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 204
199 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest( 205 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest(
200 const OAuth2TokenService::ScopeSet& scopes, 206 const OAuth2TokenService::ScopeSet& scopes,
201 OAuth2TokenService::Consumer* consumer) OVERRIDE; 207 OAuth2TokenService::Consumer* consumer) OVERRIDE;
202 208
203 static BrowserContextKeyedService* BuildTokenService( 209 static BrowserContextKeyedService* BuildTokenService(
204 content::BrowserContext* context); 210 content::BrowserContext* context);
205 }; 211 };
206 212
207 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 213 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698