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.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // static | 54 // static |
55 Profile* Profile::FromWebUI(content::WebUI* web_ui) { | 55 Profile* Profile::FromWebUI(content::WebUI* web_ui) { |
56 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); | 56 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); |
57 } | 57 } |
58 | 58 |
59 TestingProfile* Profile::AsTestingProfile() { | 59 TestingProfile* Profile::AsTestingProfile() { |
60 return NULL; | 60 return NULL; |
61 } | 61 } |
62 | 62 |
| 63 PrefService* Profile::GetZoomLevelPrefs() { |
| 64 return NULL; |
| 65 } |
| 66 |
63 Profile::Delegate::~Delegate() { | 67 Profile::Delegate::~Delegate() { |
64 } | 68 } |
65 | 69 |
66 // static | 70 // static |
67 const char Profile::kProfileKey[] = "__PROFILE__"; | 71 const char Profile::kProfileKey[] = "__PROFILE__"; |
68 | 72 |
69 // static | 73 // static |
70 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 74 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
71 registry->RegisterBooleanPref( | 75 registry->RegisterBooleanPref( |
72 prefs::kSearchSuggestEnabled, | 76 prefs::kSearchSuggestEnabled, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 registry->RegisterBooleanPref( | 134 registry->RegisterBooleanPref( |
131 extensions::pref_names::kAlertsInitialized, | 135 extensions::pref_names::kAlertsInitialized, |
132 false, | 136 false, |
133 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 137 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
134 #endif | 138 #endif |
135 registry->RegisterStringPref( | 139 registry->RegisterStringPref( |
136 prefs::kSelectFileLastDirectory, | 140 prefs::kSelectFileLastDirectory, |
137 std::string(), | 141 std::string(), |
138 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 142 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
139 registry->RegisterDoublePref( | 143 registry->RegisterDoublePref( |
140 prefs::kDefaultZoomLevel, | 144 prefs::kProfileDefaultZoomLevel, |
141 0.0, | 145 0.0, |
142 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 146 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
143 registry->RegisterDictionaryPref( | 147 registry->RegisterDictionaryPref( |
144 prefs::kPerHostZoomLevels, | 148 prefs::kProfilePerHostZoomLevels, |
145 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
146 registry->RegisterStringPref( | 150 registry->RegisterStringPref( |
147 prefs::kDefaultApps, | 151 prefs::kDefaultApps, |
148 "install", | 152 "install", |
149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
150 registry->RegisterBooleanPref( | 154 registry->RegisterBooleanPref( |
151 prefs::kSpeechRecognitionFilterProfanities, | 155 prefs::kSpeechRecognitionFilterProfanities, |
152 true, | 156 true, |
153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 157 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
154 registry->RegisterIntegerPref( | 158 registry->RegisterIntegerPref( |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 content::NotificationService::NoDetails()); | 247 content::NotificationService::NoDetails()); |
244 } | 248 } |
245 } | 249 } |
246 | 250 |
247 bool ProfileCompare::operator()(Profile* a, Profile* b) const { | 251 bool ProfileCompare::operator()(Profile* a, Profile* b) const { |
248 DCHECK(a && b); | 252 DCHECK(a && b); |
249 if (a->IsSameProfile(b)) | 253 if (a->IsSameProfile(b)) |
250 return false; | 254 return false; |
251 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 255 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
252 } | 256 } |
OLD | NEW |