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

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

Issue 61183003: Refactor SyncBackendHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix patch upload + fix some other issues Created 7 years, 1 month 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"
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/invalidation/invalidator_storage.h"
14 #include "chrome/browser/signin/profile_oauth2_token_service.h" 14 #include "chrome/browser/signin/profile_oauth2_token_service.h"
15 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 15 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
16 #include "chrome/browser/sync/glue/data_type_manager_impl.h" 16 #include "chrome/browser/sync/glue/data_type_manager_impl.h"
17 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
17 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 18 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
18 #include "chrome/browser/sync/profile_sync_service.h" 19 #include "chrome/browser/sync/profile_sync_service.h"
19 #include "chrome/browser/sync/sync_prefs.h" 20 #include "chrome/browser/sync/sync_prefs.h"
20 #include "chrome/test/base/profile_mock.h" 21 #include "chrome/test/base/profile_mock.h"
21 #include "google_apis/gaia/oauth2_token_service.h" 22 #include "google_apis/gaia/oauth2_token_service.h"
22 #include "sync/internal_api/public/test/test_internal_components_factory.h" 23 #include "sync/internal_api/public/test/test_internal_components_factory.h"
23 #include "sync/test/engine/test_id_factory.h" 24 #include "sync/test/engine/test_id_factory.h"
24 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
25 26
26 class Profile; 27 class Profile;
27 28
28 ACTION(ReturnNewDataTypeManager) { 29 ACTION(ReturnNewDataTypeManager) {
29 return new browser_sync::DataTypeManagerImpl(arg0, 30 return new browser_sync::DataTypeManagerImpl(arg0,
30 arg1, 31 arg1,
31 arg2, 32 arg2,
32 arg3, 33 arg3,
33 arg4, 34 arg4,
34 arg5); 35 arg5);
35 } 36 }
36 37
37 namespace browser_sync { 38 namespace browser_sync {
38 39
39 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { 40 class SyncBackendHostForProfileSyncTest : public SyncBackendHostImpl {
40 public: 41 public:
41 // |synchronous_init| causes initialization to block until the syncapi has 42 // |synchronous_init| causes initialization to block until the syncapi has
42 // completed setting itself up and called us back. 43 // completed setting itself up and called us back.
43 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). 44 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354).
44 SyncBackendHostForProfileSyncTest( 45 SyncBackendHostForProfileSyncTest(
45 Profile* profile, 46 Profile* profile,
46 const base::WeakPtr<SyncPrefs>& sync_prefs, 47 const base::WeakPtr<SyncPrefs>& sync_prefs,
47 base::Closure& callback, 48 base::Closure& callback,
48 bool set_initial_sync_ended_on_init, 49 bool set_initial_sync_ended_on_init,
49 bool synchronous_init, 50 bool synchronous_init,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 const OAuth2TokenService::ScopeSet& scopes) OVERRIDE; 202 const OAuth2TokenService::ScopeSet& scopes) OVERRIDE;
202 203
203 virtual void PersistCredentials(const std::string& account_id, 204 virtual void PersistCredentials(const std::string& account_id,
204 const std::string& refresh_token) OVERRIDE; 205 const std::string& refresh_token) OVERRIDE;
205 206
206 virtual void ClearPersistedCredentials( 207 virtual void ClearPersistedCredentials(
207 const std::string& account_id) OVERRIDE; 208 const std::string& account_id) OVERRIDE;
208 }; 209 };
209 210
210 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 211 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.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