| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 TestingProfile* Profile::AsTestingProfile() { | 59 TestingProfile* Profile::AsTestingProfile() { |
| 60 return NULL; | 60 return NULL; |
| 61 } | 61 } |
| 62 | 62 |
| 63 Profile::Delegate::~Delegate() { | 63 Profile::Delegate::~Delegate() { |
| 64 } | 64 } |
| 65 | 65 |
| 66 // static | 66 // static |
| 67 const char Profile::kProfileKey[] = "__PROFILE__"; | 67 const char Profile::kProfileKey[] = "__PROFILE__"; |
| 68 // This must be a string which can never be a valid domain. |
| 69 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; |
| 68 | 70 |
| 69 // static | 71 // static |
| 70 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 72 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 71 registry->RegisterBooleanPref( | 73 registry->RegisterBooleanPref( |
| 72 prefs::kSearchSuggestEnabled, | 74 prefs::kSearchSuggestEnabled, |
| 73 true, | 75 true, |
| 74 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 76 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 75 #if defined(OS_ANDROID) | 77 #if defined(OS_ANDROID) |
| 76 registry->RegisterStringPref( | 78 registry->RegisterStringPref( |
| 77 prefs::kContextualSearchEnabled, | 79 prefs::kContextualSearchEnabled, |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 content::NotificationService::NoDetails()); | 245 content::NotificationService::NoDetails()); |
| 244 } | 246 } |
| 245 } | 247 } |
| 246 | 248 |
| 247 bool ProfileCompare::operator()(Profile* a, Profile* b) const { | 249 bool ProfileCompare::operator()(Profile* a, Profile* b) const { |
| 248 DCHECK(a && b); | 250 DCHECK(a && b); |
| 249 if (a->IsSameProfile(b)) | 251 if (a->IsSameProfile(b)) |
| 250 return false; | 252 return false; |
| 251 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 253 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
| 252 } | 254 } |
| OLD | NEW |