| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); | 69 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); |
| 70 } | 70 } |
| 71 | 71 |
| 72 TestingProfile* Profile::AsTestingProfile() { | 72 TestingProfile* Profile::AsTestingProfile() { |
| 73 return NULL; | 73 return NULL; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 const char* const Profile::kProfileKey = "__PROFILE__"; | 77 const char* const Profile::kProfileKey = "__PROFILE__"; |
| 78 | 78 |
| 79 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) | |
| 80 // static | |
| 81 const LocalProfileId Profile::kInvalidLocalProfileId = | |
| 82 static_cast<LocalProfileId>(0); | |
| 83 #endif | |
| 84 | |
| 85 // static | 79 // static |
| 86 void Profile::RegisterUserPrefs(PrefService* prefs) { | 80 void Profile::RegisterUserPrefs(PrefService* prefs) { |
| 87 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, | 81 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, |
| 88 true, | 82 true, |
| 89 PrefService::SYNCABLE_PREF); | 83 PrefService::SYNCABLE_PREF); |
| 90 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, | 84 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, |
| 91 true, | 85 true, |
| 92 PrefService::UNSYNCABLE_PREF); | 86 PrefService::UNSYNCABLE_PREF); |
| 93 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, | 87 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, |
| 94 true, | 88 true, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 return is_guest_session; | 151 return is_guest_session; |
| 158 #else | 152 #else |
| 159 return false; | 153 return false; |
| 160 #endif | 154 #endif |
| 161 } | 155 } |
| 162 | 156 |
| 163 bool Profile::IsSyncAccessible() { | 157 bool Profile::IsSyncAccessible() { |
| 164 browser_sync::SyncPrefs prefs(GetPrefs()); | 158 browser_sync::SyncPrefs prefs(GetPrefs()); |
| 165 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); | 159 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); |
| 166 } | 160 } |
| OLD | NEW |