OLD | NEW |
---|---|
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/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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 | 203 |
204 // static | 204 // static |
205 void ProfileImpl::RegisterUserPrefs(PrefService* prefs) { | 205 void ProfileImpl::RegisterUserPrefs(PrefService* prefs) { |
206 prefs->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, | 206 prefs->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, |
207 false, | 207 false, |
208 PrefService::UNSYNCABLE_PREF); | 208 PrefService::UNSYNCABLE_PREF); |
209 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, | 209 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, |
210 false, | 210 false, |
211 PrefService::SYNCABLE_PREF); | 211 PrefService::SYNCABLE_PREF); |
212 prefs->RegisterIntegerPref(prefs::kProfileAvatarIndex, | 212 prefs->RegisterIntegerPref(prefs::kProfileAvatarIndex, |
213 -1, | 213 0, |
sky
2011/12/05 23:35:30
This is a temporary workaround so sync tests work.
| |
214 PrefService::SYNCABLE_PREF); | 214 PrefService::SYNCABLE_PREF); |
215 prefs->RegisterStringPref(prefs::kProfileName, | 215 prefs->RegisterStringPref(prefs::kProfileName, |
216 "", | 216 "", |
217 PrefService::SYNCABLE_PREF); | 217 PrefService::SYNCABLE_PREF); |
218 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) | 218 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) |
219 prefs->RegisterIntegerPref(prefs::kLocalProfileId, | 219 prefs->RegisterIntegerPref(prefs::kLocalProfileId, |
220 kInvalidLocalProfileId, | 220 kInvalidLocalProfileId, |
221 PrefService::UNSYNCABLE_PREF); | 221 PrefService::UNSYNCABLE_PREF); |
222 // Notice that the preprocessor conditions above are exactly those that will | 222 // Notice that the preprocessor conditions above are exactly those that will |
223 // result in using PasswordStoreX in CreatePasswordStore() below. | 223 // result in using PasswordStoreX in CreatePasswordStore() below. |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1650 FilePath* cache_path, | 1650 FilePath* cache_path, |
1651 int* max_size) { | 1651 int* max_size) { |
1652 DCHECK(cache_path); | 1652 DCHECK(cache_path); |
1653 DCHECK(max_size); | 1653 DCHECK(max_size); |
1654 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1654 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
1655 if (!path.empty()) | 1655 if (!path.empty()) |
1656 *cache_path = path; | 1656 *cache_path = path; |
1657 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1657 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1658 prefs_->GetInteger(prefs::kDiskCacheSize); | 1658 prefs_->GetInteger(prefs::kDiskCacheSize); |
1659 } | 1659 } |
OLD | NEW |