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

Side by Side Diff: chrome/browser/background/background_contents_service_factory.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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/background/background_contents_service_factory.h" 5 #include "chrome/browser/background/background_contents_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/background/background_contents_service.h" 9 #include "chrome/browser/background/background_contents_service.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 23 matching lines...) Expand all
34 BackgroundContentsServiceFactory::~BackgroundContentsServiceFactory() { 34 BackgroundContentsServiceFactory::~BackgroundContentsServiceFactory() {
35 } 35 }
36 36
37 ProfileKeyedService* BackgroundContentsServiceFactory::BuildServiceInstanceFor( 37 ProfileKeyedService* BackgroundContentsServiceFactory::BuildServiceInstanceFor(
38 content::BrowserContext* profile) const { 38 content::BrowserContext* profile) const {
39 return new BackgroundContentsService(static_cast<Profile*>(profile), 39 return new BackgroundContentsService(static_cast<Profile*>(profile),
40 CommandLine::ForCurrentProcess()); 40 CommandLine::ForCurrentProcess());
41 } 41 }
42 42
43 void BackgroundContentsServiceFactory::RegisterUserPrefs( 43 void BackgroundContentsServiceFactory::RegisterUserPrefs(
44 PrefRegistrySyncable* user_prefs) { 44 user_prefs::PrefRegistrySyncable* user_prefs) {
45 user_prefs->RegisterDictionaryPref(prefs::kRegisteredBackgroundContents, 45 user_prefs->RegisterDictionaryPref(
46 PrefRegistrySyncable::UNSYNCABLE_PREF); 46 prefs::kRegisteredBackgroundContents,
47 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
47 } 48 }
48 49
49 content::BrowserContext* 50 content::BrowserContext*
50 BackgroundContentsServiceFactory::GetBrowserContextToUse( 51 BackgroundContentsServiceFactory::GetBrowserContextToUse(
51 content::BrowserContext* context) const { 52 content::BrowserContext* context) const {
52 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 53 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
53 } 54 }
54 55
55 bool BackgroundContentsServiceFactory::ServiceIsCreatedWithProfile() const { 56 bool BackgroundContentsServiceFactory::ServiceIsCreatedWithProfile() const {
56 return true; 57 return true;
57 } 58 }
58 59
59 bool BackgroundContentsServiceFactory::ServiceIsNULLWhileTesting() const { 60 bool BackgroundContentsServiceFactory::ServiceIsNULLWhileTesting() const {
60 return true; 61 return true;
61 } 62 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service_factory.h ('k') | chrome/browser/bookmarks/bookmark_model_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698