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

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

Issue 15580002: Make use of InvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
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,
51 syncer::TestIdFactory& id_factory, 49 syncer::TestIdFactory& id_factory,
52 base::Closure& callback, 50 base::Closure& callback,
53 bool set_initial_sync_ended_on_init, 51 bool set_initial_sync_ended_on_init,
54 bool synchronous_init, 52 bool synchronous_init,
55 bool fail_initial_download, 53 bool fail_initial_download,
56 syncer::StorageOption storage_option); 54 syncer::StorageOption storage_option);
57 virtual ~SyncBackendHostForProfileSyncTest(); 55 virtual ~SyncBackendHostForProfileSyncTest();
58 56
59 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); 57 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&));
60 58
(...skipping 13 matching lines...) Expand all
74 const base::Closure& retry_callback) OVERRIDE; 72 const base::Closure& retry_callback) OVERRIDE;
75 73
76 virtual void HandleSyncManagerInitializationOnFrontendLoop( 74 virtual void HandleSyncManagerInitializationOnFrontendLoop(
77 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 75 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
78 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 76 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
79 debug_info_listener, 77 debug_info_listener,
80 syncer::ModelTypeSet restored_types) OVERRIDE; 78 syncer::ModelTypeSet restored_types) OVERRIDE;
81 79
82 static void SetHistoryServiceExpectations(ProfileMock* profile); 80 static void SetHistoryServiceExpectations(ProfileMock* profile);
83 81
84 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state);
85 void EmitOnIncomingInvalidation(
86 const syncer::ObjectIdInvalidationMap& invalidation_map);
87
88 protected: 82 protected:
89 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; 83 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE;
90 84
91 private: 85 private:
92 void ContinueInitialization( 86 void ContinueInitialization(
93 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 87 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
94 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 88 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
95 debug_info_listener, 89 debug_info_listener,
96 syncer::ModelTypeSet restored_types); 90 syncer::ModelTypeSet restored_types);
97 91
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 198
205 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest( 199 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest(
206 const OAuth2TokenService::ScopeSet& scopes, 200 const OAuth2TokenService::ScopeSet& scopes,
207 OAuth2TokenService::Consumer* consumer) OVERRIDE; 201 OAuth2TokenService::Consumer* consumer) OVERRIDE;
208 202
209 static BrowserContextKeyedService* BuildTokenService( 203 static BrowserContextKeyedService* BuildTokenService(
210 content::BrowserContext* context); 204 content::BrowserContext* context);
211 }; 205 };
212 206
213 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 207 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698