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

Side by Side Diff: chrome/browser/prefs/pref_service.cc

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (file_util::GetFileSystemType(pref_filename.DirName(), &fstype)) { 125 if (file_util::GetFileSystemType(pref_filename.DirName(), &fstype)) {
126 UMA_HISTOGRAM_ENUMERATION("PrefService.FileSystemType", 126 UMA_HISTOGRAM_ENUMERATION("PrefService.FileSystemType",
127 static_cast<int>(fstype), 127 static_cast<int>(fstype),
128 file_util::FILE_SYSTEM_TYPE_COUNT); 128 file_util::FILE_SYSTEM_TYPE_COUNT);
129 } 129 }
130 #endif 130 #endif
131 131
132 ConfigurationPolicyPrefStore* managed_platform = 132 ConfigurationPolicyPrefStore* managed_platform =
133 ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore(); 133 ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore();
134 ConfigurationPolicyPrefStore* managed_cloud = 134 ConfigurationPolicyPrefStore* managed_cloud =
135 ConfigurationPolicyPrefStore::CreateManagedCloudPolicyPrefStore(profile); 135 ConfigurationPolicyPrefStore::CreateManagedCloudPolicyPrefStore(profile);
Mattias Nissler (ping if slow) 2011/05/31 14:14:19 Why does this still need the profile?
136 CommandLinePrefStore* command_line = 136 CommandLinePrefStore* command_line =
137 new CommandLinePrefStore(CommandLine::ForCurrentProcess()); 137 new CommandLinePrefStore(CommandLine::ForCurrentProcess());
138 JsonPrefStore* user = new JsonPrefStore( 138 JsonPrefStore* user = new JsonPrefStore(
139 pref_filename, 139 pref_filename,
140 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); 140 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
141 ConfigurationPolicyPrefStore* recommended_platform = 141 ConfigurationPolicyPrefStore* recommended_platform =
142 ConfigurationPolicyPrefStore::CreateRecommendedPlatformPolicyPrefStore(); 142 ConfigurationPolicyPrefStore::CreateRecommendedPlatformPolicyPrefStore();
143 ConfigurationPolicyPrefStore* recommended_cloud = 143 ConfigurationPolicyPrefStore* recommended_cloud =
144 ConfigurationPolicyPrefStore::CreateRecommendedCloudPolicyPrefStore( 144 ConfigurationPolicyPrefStore::CreateRecommendedCloudPolicyPrefStore();
145 profile);
146 DefaultPrefStore* default_pref_store = new DefaultPrefStore(); 145 DefaultPrefStore* default_pref_store = new DefaultPrefStore();
147 146
148 return new PrefService( 147 return new PrefService(
149 managed_platform, managed_cloud, extension_prefs, 148 managed_platform, managed_cloud, extension_prefs,
150 command_line, user, recommended_platform, 149 command_line, user, recommended_platform,
151 recommended_cloud, default_pref_store, async); 150 recommended_cloud, default_pref_store, async);
152 } 151 }
153 152
154 PrefService* PrefService::CreateIncognitoPrefService( 153 PrefService* PrefService::CreateIncognitoPrefService(
155 PrefStore* incognito_extension_prefs) { 154 PrefStore* incognito_extension_prefs) {
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); 893 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str());
895 } 894 }
896 895
897 bool PrefService::Preference::IsUserModifiable() const { 896 bool PrefService::Preference::IsUserModifiable() const {
898 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); 897 return pref_value_store()->PrefValueUserModifiable(name_.c_str());
899 } 898 }
900 899
901 bool PrefService::Preference::IsExtensionModifiable() const { 900 bool PrefService::Preference::IsExtensionModifiable() const {
902 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); 901 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str());
903 } 902 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698