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

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

Issue 1310553005: [Sync] Replace ProfileSyncComponentsFactory with SyncClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix GN Created 5 years, 3 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_PROFILE_SYNC_SERVICE_MOCK_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "chrome/browser/sync/profile_sync_service.h" 14 #include "chrome/browser/sync/profile_sync_service.h"
15 #include "chrome/test/base/testing_profile.h" 15 #include "chrome/test/base/testing_profile.h"
16 #include "components/sync_driver/change_processor.h" 16 #include "components/sync_driver/change_processor.h"
17 #include "components/sync_driver/data_type_controller.h" 17 #include "components/sync_driver/data_type_controller.h"
18 #include "components/sync_driver/device_info.h" 18 #include "components/sync_driver/device_info.h"
19 #include "google_apis/gaia/google_service_auth_error.h" 19 #include "google_apis/gaia/google_service_auth_error.h"
20 #include "sync/internal_api/public/base/model_type.h" 20 #include "sync/internal_api/public/base/model_type.h"
21 #include "sync/protocol/sync_protocol_error.h" 21 #include "sync/protocol/sync_protocol_error.h"
22 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
23 23
24 using ::testing::Invoke; 24 using ::testing::Invoke;
25 25
26 class ProfileSyncServiceMock : public ProfileSyncService { 26 class ProfileSyncServiceMock : public ProfileSyncService {
27 public: 27 public:
28 explicit ProfileSyncServiceMock(Profile* profile); 28 explicit ProfileSyncServiceMock(Profile* profile);
29 ProfileSyncServiceMock( 29 ProfileSyncServiceMock(
30 scoped_ptr<ProfileSyncComponentsFactory> factory, Profile* profile); 30 scoped_ptr<sync_driver::SyncApiComponentFactory> factory,
31 Profile* profile);
31 virtual ~ProfileSyncServiceMock(); 32 virtual ~ProfileSyncServiceMock();
32 33
33 // A utility used by sync tests to create a TestingProfile with a Google 34 // A utility used by sync tests to create a TestingProfile with a Google
34 // Services username stored in a (Testing)PrefService. 35 // Services username stored in a (Testing)PrefService.
35 static TestingProfile* MakeSignedInTestingProfile(); 36 static TestingProfile* MakeSignedInTestingProfile();
36 37
37 // Helper routine to be used in conjunction with 38 // Helper routine to be used in conjunction with
38 // BrowserContextKeyedServiceFactory::SetTestingFactory(). 39 // BrowserContextKeyedServiceFactory::SetTestingFactory().
39 static scoped_ptr<KeyedService> BuildMockProfileSyncService( 40 static scoped_ptr<KeyedService> BuildMockProfileSyncService(
40 content::BrowserContext* profile); 41 content::BrowserContext* profile);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 MOCK_CONST_METHOD0(GetExplicitPassphraseTime, base::Time()); 116 MOCK_CONST_METHOD0(GetExplicitPassphraseTime, base::Time());
116 117
117 MOCK_METHOD1(SetDecryptionPassphrase, bool(const std::string& passphrase)); 118 MOCK_METHOD1(SetDecryptionPassphrase, bool(const std::string& passphrase));
118 MOCK_METHOD2(SetEncryptionPassphrase, void(const std::string& passphrase, 119 MOCK_METHOD2(SetEncryptionPassphrase, void(const std::string& passphrase,
119 PassphraseType type)); 120 PassphraseType type));
120 121
121 MOCK_METHOD1(StartUpSlowBackendComponents, void(BackendMode)); 122 MOCK_METHOD1(StartUpSlowBackendComponents, void(BackendMode));
122 }; 123 };
123 124
124 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ 125 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/sync/profile_sync_service_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698