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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.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_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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/invalidation/invalidator_storage.h"
13 #include "chrome/browser/sync/glue/data_type_manager_impl.h" 14 #include "chrome/browser/sync/glue/data_type_manager_impl.h"
14 #include "chrome/browser/sync/invalidations/invalidator_storage.h"
15 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 15 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
16 #include "chrome/browser/sync/profile_sync_service.h" 16 #include "chrome/browser/sync/profile_sync_service.h"
17 #include "chrome/browser/sync/sync_prefs.h" 17 #include "chrome/browser/sync/sync_prefs.h"
18 #include "chrome/test/base/profile_mock.h" 18 #include "chrome/test/base/profile_mock.h"
19 #include "sync/internal_api/public/test/test_internal_components_factory.h" 19 #include "sync/internal_api/public/test/test_internal_components_factory.h"
20 #include "sync/test/engine/test_id_factory.h" 20 #include "sync/test/engine/test_id_factory.h"
21 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
22 22
23 class Profile; 23 class Profile;
24 class Task; 24 class Task;
25 class TestProfileSyncService; 25 class TestProfileSyncService;
26 26
27 ACTION(ReturnNewDataTypeManager) { 27 ACTION(ReturnNewDataTypeManager) {
28 return new browser_sync::DataTypeManagerImpl(arg0, arg1, arg2, arg3, arg4); 28 return new browser_sync::DataTypeManagerImpl(arg0, arg1, arg2, arg3, arg4);
29 } 29 }
30 30
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<InvalidatorStorage>& invalidator_storage, 41 const base::WeakPtr<invalidation::InvalidatorStorage>&
42 invalidator_storage,
42 syncer::TestIdFactory& id_factory, 43 syncer::TestIdFactory& id_factory,
43 base::Closure& callback, 44 base::Closure& callback,
44 bool set_initial_sync_ended_on_init, 45 bool set_initial_sync_ended_on_init,
45 bool synchronous_init, 46 bool synchronous_init,
46 bool fail_initial_download, 47 bool fail_initial_download,
47 syncer::StorageOption storage_option); 48 syncer::StorageOption storage_option);
48 virtual ~SyncBackendHostForProfileSyncTest(); 49 virtual ~SyncBackendHostForProfileSyncTest();
49 50
50 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); 51 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&));
51 52
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool synchronous_sync_configuration_; 174 bool synchronous_sync_configuration_;
174 175
175 base::Closure callback_; 176 base::Closure callback_;
176 bool set_initial_sync_ended_on_init_; 177 bool set_initial_sync_ended_on_init_;
177 178
178 bool fail_initial_download_; 179 bool fail_initial_download_;
179 syncer::StorageOption storage_option_; 180 syncer::StorageOption storage_option_;
180 }; 181 };
181 182
182 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 183 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698