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

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

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 #include "chrome/browser/prefs/pref_service_mock_builder.h" 5 #include "chrome/browser/prefs/pref_service_mock_builder.h"
6 #include "chrome/browser/prefs/testing_pref_store.h" 6 #include "chrome/browser/prefs/testing_pref_store.h"
7 #include "chrome/browser/signin/signin_manager_factory.h" 7 #include "chrome/browser/signin/signin_manager_factory.h"
8 #include "chrome/browser/sync/profile_sync_service_mock.h" 8 #include "chrome/browser/sync/profile_sync_service_mock.h"
9 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 9 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 25 matching lines...) Expand all
36 .WithUserPrefs(user_prefs) 36 .WithUserPrefs(user_prefs)
37 .Create(); 37 .Create();
38 profile->SetPrefService(prefs); 38 profile->SetPrefService(prefs);
39 // We just blew away our prefs, so reregister them. 39 // We just blew away our prefs, so reregister them.
40 SigninManagerFactory::GetInstance()->RegisterUserPrefs(prefs); 40 SigninManagerFactory::GetInstance()->RegisterUserPrefs(prefs);
41 user_prefs->SetString(prefs::kGoogleServicesUsername, "foo"); 41 user_prefs->SetString(prefs::kGoogleServicesUsername, "foo");
42 return profile; 42 return profile;
43 } 43 }
44 44
45 // static 45 // static
46 ProfileKeyedBase* ProfileSyncServiceMock::BuildMockProfileSyncService( 46 ProfileKeyedService* ProfileSyncServiceMock::BuildMockProfileSyncService(
47 Profile* profile) { 47 Profile* profile) {
48 return new ProfileSyncServiceMock(profile); 48 return new ProfileSyncServiceMock(profile);
49 } 49 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/sync/profile_sync_service_password_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698