OLD | NEW |
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 PrefRegistrySyncable::UNSYNCABLE_PREF); | 282 PrefRegistrySyncable::UNSYNCABLE_PREF); |
283 registry->RegisterBooleanPref(prefs::kSigninAllowed, | 283 registry->RegisterBooleanPref(prefs::kSigninAllowed, |
284 true, | 284 true, |
285 PrefRegistrySyncable::UNSYNCABLE_PREF); | 285 PrefRegistrySyncable::UNSYNCABLE_PREF); |
286 registry->RegisterBooleanPref(prefs::kForceSafeSearch, | 286 registry->RegisterBooleanPref(prefs::kForceSafeSearch, |
287 false, | 287 false, |
288 PrefRegistrySyncable::UNSYNCABLE_PREF); | 288 PrefRegistrySyncable::UNSYNCABLE_PREF); |
289 registry->RegisterIntegerPref(prefs::kProfileAvatarIndex, | 289 registry->RegisterIntegerPref(prefs::kProfileAvatarIndex, |
290 -1, | 290 -1, |
291 PrefRegistrySyncable::SYNCABLE_PREF); | 291 PrefRegistrySyncable::SYNCABLE_PREF); |
292 registry->RegisterStringPref(prefs::kProfileName, | 292 registry->RegisterStringPref( |
293 "", | 293 prefs::kProfileName, std::string(), PrefRegistrySyncable::SYNCABLE_PREF); |
294 PrefRegistrySyncable::SYNCABLE_PREF); | |
295 registry->RegisterBooleanPref(prefs::kProfileIsManaged, | 294 registry->RegisterBooleanPref(prefs::kProfileIsManaged, |
296 false, | 295 false, |
297 PrefRegistrySyncable::SYNCABLE_PREF); | 296 PrefRegistrySyncable::SYNCABLE_PREF); |
298 registry->RegisterStringPref(prefs::kHomePage, | 297 registry->RegisterStringPref(prefs::kHomePage, |
299 std::string(), | 298 std::string(), |
300 PrefRegistrySyncable::SYNCABLE_PREF); | 299 PrefRegistrySyncable::SYNCABLE_PREF); |
301 #if defined(ENABLE_PRINTING) | 300 #if defined(ENABLE_PRINTING) |
302 registry->RegisterBooleanPref(prefs::kPrintingEnabled, | 301 registry->RegisterBooleanPref(prefs::kPrintingEnabled, |
303 true, | 302 true, |
304 PrefRegistrySyncable::UNSYNCABLE_PREF); | 303 PrefRegistrySyncable::UNSYNCABLE_PREF); |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 base::FilePath* cache_path, | 1155 base::FilePath* cache_path, |
1157 int* max_size) { | 1156 int* max_size) { |
1158 DCHECK(cache_path); | 1157 DCHECK(cache_path); |
1159 DCHECK(max_size); | 1158 DCHECK(max_size); |
1160 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1159 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
1161 if (!path.empty()) | 1160 if (!path.empty()) |
1162 *cache_path = path; | 1161 *cache_path = path; |
1163 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1162 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1164 prefs_->GetInteger(prefs::kDiskCacheSize); | 1163 prefs_->GetInteger(prefs::kDiskCacheSize); |
1165 } | 1164 } |
OLD | NEW |