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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 const char Profile::kProfileKey[] = "__PROFILE__"; | 71 const char Profile::kProfileKey[] = "__PROFILE__"; |
72 // This must be a string which can never be a valid domain. | 72 // This must be a string which can never be a valid domain. |
73 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; | 73 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; |
74 | 74 |
75 // static | 75 // static |
76 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 76 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
77 registry->RegisterBooleanPref( | 77 registry->RegisterBooleanPref( |
78 prefs::kSearchSuggestEnabled, | 78 prefs::kSearchSuggestEnabled, |
79 true, | 79 true, |
80 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 80 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
81 #if defined(OS_ANDROID) | 81 #if defined(ANDROID_JAVA_UI) |
82 registry->RegisterStringPref( | 82 registry->RegisterStringPref( |
83 prefs::kContextualSearchEnabled, | 83 prefs::kContextualSearchEnabled, |
84 std::string(), | 84 std::string(), |
85 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 85 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
86 #endif | 86 #endif |
87 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); | 87 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); |
88 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); | 88 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); |
89 registry->RegisterBooleanPref( | 89 registry->RegisterBooleanPref( |
90 prefs::kSafeBrowsingEnabled, | 90 prefs::kSafeBrowsingEnabled, |
91 true, | 91 true, |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 if (a->IsSameProfile(b)) | 206 if (a->IsSameProfile(b)) |
207 return false; | 207 return false; |
208 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 208 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
209 } | 209 } |
210 | 210 |
211 double Profile::GetDefaultZoomLevelForProfile() { | 211 double Profile::GetDefaultZoomLevelForProfile() { |
212 return GetDefaultStoragePartition(this) | 212 return GetDefaultStoragePartition(this) |
213 ->GetHostZoomMap() | 213 ->GetHostZoomMap() |
214 ->GetDefaultZoomLevel(); | 214 ->GetDefaultZoomLevel(); |
215 } | 215 } |
OLD | NEW |