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

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: More review fixes 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_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 20 matching lines...) Expand all
31 namespace browser_sync { 31 namespace browser_sync {
32 32
33 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { 33 class SyncBackendHostForProfileSyncTest : public SyncBackendHost {
34 public: 34 public:
35 // |synchronous_init| causes initialization to block until the syncapi has 35 // |synchronous_init| causes initialization to block until the syncapi has
36 // completed setting itself up and called us back. 36 // completed setting itself up and called us back.
37 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). 37 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354).
38 SyncBackendHostForProfileSyncTest( 38 SyncBackendHostForProfileSyncTest(
39 Profile* profile, 39 Profile* profile,
40 const base::WeakPtr<SyncPrefs>& sync_prefs, 40 const base::WeakPtr<SyncPrefs>& sync_prefs,
41 const base::WeakPtr<invalidation::InvalidatorStorage>&
42 invalidator_storage,
43 syncer::TestIdFactory& id_factory, 41 syncer::TestIdFactory& id_factory,
44 base::Closure& callback, 42 base::Closure& callback,
45 bool set_initial_sync_ended_on_init, 43 bool set_initial_sync_ended_on_init,
46 bool synchronous_init, 44 bool synchronous_init,
47 bool fail_initial_download, 45 bool fail_initial_download,
48 syncer::StorageOption storage_option); 46 syncer::StorageOption storage_option);
49 virtual ~SyncBackendHostForProfileSyncTest(); 47 virtual ~SyncBackendHostForProfileSyncTest();
50 48
51 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); 49 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&));
52 50
(...skipping 10 matching lines...) Expand all
63 const base::Closure& retry_callback) OVERRIDE; 61 const base::Closure& retry_callback) OVERRIDE;
64 62
65 virtual void HandleSyncManagerInitializationOnFrontendLoop( 63 virtual void HandleSyncManagerInitializationOnFrontendLoop(
66 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 64 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
67 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 65 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
68 debug_info_listener, 66 debug_info_listener,
69 syncer::ModelTypeSet restored_types) OVERRIDE; 67 syncer::ModelTypeSet restored_types) OVERRIDE;
70 68
71 static void SetHistoryServiceExpectations(ProfileMock* profile); 69 static void SetHistoryServiceExpectations(ProfileMock* profile);
72 70
73 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state);
74 void EmitOnIncomingInvalidation(
75 const syncer::ObjectIdInvalidationMap& invalidation_map);
76
77 protected: 71 protected:
78 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; 72 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE;
79 73
80 private: 74 private:
81 void ContinueInitialization( 75 void ContinueInitialization(
82 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 76 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
83 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 77 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
84 debug_info_listener, 78 debug_info_listener,
85 syncer::ModelTypeSet restored_types); 79 syncer::ModelTypeSet restored_types);
86 80
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool synchronous_sync_configuration_; 169 bool synchronous_sync_configuration_;
176 170
177 base::Closure callback_; 171 base::Closure callback_;
178 bool set_initial_sync_ended_on_init_; 172 bool set_initial_sync_ended_on_init_;
179 173
180 bool fail_initial_download_; 174 bool fail_initial_download_;
181 syncer::StorageOption storage_option_; 175 syncer::StorageOption storage_option_;
182 }; 176 };
183 177
184 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 178 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698