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

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

Issue 12209091: Add a policy and pref to control whether deleting browsing and download history is allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Renamed policy and pref Created 7 years, 10 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
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 int ProfileImpl::create_readme_delay_ms = 60000; 269 int ProfileImpl::create_readme_delay_ms = 60000;
270 270
271 // static 271 // static
272 const char* const ProfileImpl::kPrefExitTypeNormal = "Normal"; 272 const char* const ProfileImpl::kPrefExitTypeNormal = "Normal";
273 273
274 // static 274 // static
275 void ProfileImpl::RegisterUserPrefs(PrefRegistrySyncable* registry) { 275 void ProfileImpl::RegisterUserPrefs(PrefRegistrySyncable* registry) {
276 registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, 276 registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled,
277 false, 277 false,
278 PrefRegistrySyncable::UNSYNCABLE_PREF); 278 PrefRegistrySyncable::UNSYNCABLE_PREF);
279 registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory,
280 true,
281 PrefRegistrySyncable::UNSYNCABLE_PREF);
279 registry->RegisterBooleanPref(prefs::kForceSafeSearch, 282 registry->RegisterBooleanPref(prefs::kForceSafeSearch,
280 false, 283 false,
281 PrefRegistrySyncable::UNSYNCABLE_PREF); 284 PrefRegistrySyncable::UNSYNCABLE_PREF);
282 registry->RegisterIntegerPref(prefs::kProfileAvatarIndex, 285 registry->RegisterIntegerPref(prefs::kProfileAvatarIndex,
283 -1, 286 -1,
284 PrefRegistrySyncable::SYNCABLE_PREF); 287 PrefRegistrySyncable::SYNCABLE_PREF);
285 registry->RegisterStringPref(prefs::kProfileName, 288 registry->RegisterStringPref(prefs::kProfileName,
286 "", 289 "",
287 PrefRegistrySyncable::SYNCABLE_PREF); 290 PrefRegistrySyncable::SYNCABLE_PREF);
288 registry->RegisterBooleanPref(prefs::kProfileIsManaged, 291 registry->RegisterBooleanPref(prefs::kProfileIsManaged,
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 base::FilePath* cache_path, 1184 base::FilePath* cache_path,
1182 int* max_size) { 1185 int* max_size) {
1183 DCHECK(cache_path); 1186 DCHECK(cache_path);
1184 DCHECK(max_size); 1187 DCHECK(max_size);
1185 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1188 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1186 if (!path.empty()) 1189 if (!path.empty())
1187 *cache_path = path; 1190 *cache_path = path;
1188 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1191 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1189 prefs_->GetInteger(prefs::kDiskCacheSize); 1192 prefs_->GetInteger(prefs::kDiskCacheSize);
1190 } 1193 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698