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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 years, 8 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 | 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_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 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 13 matching lines...) Expand all
24 ProfileSyncServiceMock(); 24 ProfileSyncServiceMock();
25 explicit ProfileSyncServiceMock(Profile* profile); 25 explicit ProfileSyncServiceMock(Profile* profile);
26 virtual ~ProfileSyncServiceMock(); 26 virtual ~ProfileSyncServiceMock();
27 27
28 // A utility used by sync tests to create a TestingProfile with a Google 28 // A utility used by sync tests to create a TestingProfile with a Google
29 // Services username stored in a (Testing)PrefService. 29 // Services username stored in a (Testing)PrefService.
30 static TestingProfile* MakeSignedInTestingProfile(); 30 static TestingProfile* MakeSignedInTestingProfile();
31 31
32 // Helper routine to be used in conjunction with 32 // Helper routine to be used in conjunction with
33 // ProfileKeyedServiceFactory::SetTestingFactory(). 33 // ProfileKeyedServiceFactory::SetTestingFactory().
34 static ProfileKeyedService* BuildMockProfileSyncService(Profile* profile); 34 static ProfileKeyedService* BuildMockProfileSyncService(
35 content::BrowserContext* profile);
35 36
36 MOCK_METHOD0(DisableForUser, void()); 37 MOCK_METHOD0(DisableForUser, void());
37 MOCK_METHOD3(OnBackendInitialized, 38 MOCK_METHOD3(OnBackendInitialized,
38 void(const syncer::WeakHandle<syncer::JsBackend>&, 39 void(const syncer::WeakHandle<syncer::JsBackend>&,
39 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&, 40 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&,
40 bool)); 41 bool));
41 MOCK_METHOD0(OnSyncCycleCompleted, void()); 42 MOCK_METHOD0(OnSyncCycleCompleted, void());
42 MOCK_METHOD0(OnAuthError, void()); 43 MOCK_METHOD0(OnAuthError, void());
43 MOCK_METHOD4(OnUserSubmittedAuth, 44 MOCK_METHOD4(OnUserSubmittedAuth,
44 void(const std::string& username, 45 void(const std::string& username,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 MOCK_CONST_METHOD0(GetPassphraseType, syncer::PassphraseType()); 110 MOCK_CONST_METHOD0(GetPassphraseType, syncer::PassphraseType());
110 MOCK_CONST_METHOD0(GetPassphraseTime, base::Time()); 111 MOCK_CONST_METHOD0(GetPassphraseTime, base::Time());
111 MOCK_CONST_METHOD0(GetExplicitPassphraseTime, base::Time()); 112 MOCK_CONST_METHOD0(GetExplicitPassphraseTime, base::Time());
112 113
113 MOCK_METHOD1(SetDecryptionPassphrase, bool(const std::string& passphrase)); 114 MOCK_METHOD1(SetDecryptionPassphrase, bool(const std::string& passphrase));
114 MOCK_METHOD2(SetEncryptionPassphrase, void(const std::string& passphrase, 115 MOCK_METHOD2(SetEncryptionPassphrase, void(const std::string& passphrase,
115 PassphraseType type)); 116 PassphraseType type));
116 }; 117 };
117 118
118 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ 119 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698