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

Side by Side Diff: chrome/browser/profiles/profile_keyed_service_factory.cc

Issue 14967003: Drop more dependencies of ProfileKeyedService infrastructure on chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 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 | 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/profiles/profile_keyed_service_factory.h" 5 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_dependency_manager.h" 11 #include "chrome/browser/profiles/profile_dependency_manager.h"
13 #include "chrome/browser/profiles/profile_keyed_service.h" 12 #include "chrome/browser/profiles/profile_keyed_service.h"
13 #include "content/public/browser/browser_context.h"
14 14
15 void ProfileKeyedServiceFactory::SetTestingFactory( 15 void ProfileKeyedServiceFactory::SetTestingFactory(
16 content::BrowserContext* profile, FactoryFunction factory) { 16 content::BrowserContext* profile, FactoryFunction factory) {
17 // Destroying the profile may cause us to lose data about whether |profile| 17 // Destroying the profile may cause us to lose data about whether |profile|
18 // has our preferences registered on it (since the profile object itself 18 // has our preferences registered on it (since the profile object itself
19 // isn't dead). See if we need to readd it once we've gone through normal 19 // isn't dead). See if we need to readd it once we've gone through normal
20 // destruction. 20 // destruction.
21 bool add_profile = ArePreferencesSetOn(profile); 21 bool add_profile = ArePreferencesSetOn(profile);
22 22
23 // We have to go through the shutdown and destroy mechanisms because there 23 // We have to go through the shutdown and destroy mechanisms because there
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 void ProfileKeyedServiceFactory::SetEmptyTestingFactory( 118 void ProfileKeyedServiceFactory::SetEmptyTestingFactory(
119 content::BrowserContext* profile) { 119 content::BrowserContext* profile) {
120 SetTestingFactory(profile, NULL); 120 SetTestingFactory(profile, NULL);
121 } 121 }
122 122
123 void ProfileKeyedServiceFactory::CreateServiceNow( 123 void ProfileKeyedServiceFactory::CreateServiceNow(
124 content::BrowserContext* profile) { 124 content::BrowserContext* profile) {
125 GetServiceForProfile(profile, true); 125 GetServiceForProfile(profile, true);
126 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_keyed_service_factory.h ('k') | chrome/browser/speech/chrome_speech_recognition_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698