| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/common/json_pref_store.h" | 44 #include "chrome/common/json_pref_store.h" |
| 45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
| 46 #include "chrome/common/render_messages.h" | 46 #include "chrome/common/render_messages.h" |
| 47 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/browser/download_manager.h" | 48 #include "content/public/browser/download_manager.h" |
| 49 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 #include "content/public/browser/web_ui.h" | 50 #include "content/public/browser/web_ui.h" |
| 51 #include "ui/base/resource/resource_bundle.h" | 51 #include "ui/base/resource/resource_bundle.h" |
| 52 | 52 |
| 53 #if defined(TOOLKIT_USES_GTK) | 53 #if defined(TOOLKIT_USES_GTK) |
| 54 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 54 #include "chrome/browser/ui/gtk/theme_service_gtk.h" |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 using base::Time; | 57 using base::Time; |
| 58 using base::TimeDelta; | 58 using base::TimeDelta; |
| 59 | 59 |
| 60 // A pointer to the request context for the default profile. See comments on | 60 // A pointer to the request context for the default profile. See comments on |
| 61 // Profile::GetDefaultRequestContext. | 61 // Profile::GetDefaultRequestContext. |
| 62 net::URLRequestContextGetter* Profile::default_request_context_; | 62 net::URLRequestContextGetter* Profile::default_request_context_; |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 false, | 114 false, |
| 115 PrefService::UNSYNCABLE_PREF); | 115 PrefService::UNSYNCABLE_PREF); |
| 116 prefs->RegisterBooleanPref(prefs::kSpeechInputFilterProfanities, | 116 prefs->RegisterBooleanPref(prefs::kSpeechInputFilterProfanities, |
| 117 true, | 117 true, |
| 118 PrefService::UNSYNCABLE_PREF); | 118 PrefService::UNSYNCABLE_PREF); |
| 119 prefs->RegisterBooleanPref(prefs::kSpeechInputTrayNotificationShown, | 119 prefs->RegisterBooleanPref(prefs::kSpeechInputTrayNotificationShown, |
| 120 false, | 120 false, |
| 121 PrefService::UNSYNCABLE_PREF); | 121 PrefService::UNSYNCABLE_PREF); |
| 122 #if defined(TOOLKIT_USES_GTK) | 122 #if defined(TOOLKIT_USES_GTK) |
| 123 prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, | 123 prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, |
| 124 GtkThemeService::DefaultUsesSystemTheme(), | 124 ThemeServiceGtk::DefaultUsesSystemTheme(), |
| 125 PrefService::UNSYNCABLE_PREF); | 125 PrefService::UNSYNCABLE_PREF); |
| 126 #endif | 126 #endif |
| 127 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, | 127 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, |
| 128 FilePath(), | 128 FilePath(), |
| 129 PrefService::UNSYNCABLE_PREF); | 129 PrefService::UNSYNCABLE_PREF); |
| 130 prefs->RegisterStringPref(prefs::kCurrentThemeID, | 130 prefs->RegisterStringPref(prefs::kCurrentThemeID, |
| 131 ThemeService::kDefaultThemeID, | 131 ThemeService::kDefaultThemeID, |
| 132 PrefService::UNSYNCABLE_PREF); | 132 PrefService::UNSYNCABLE_PREF); |
| 133 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages, | 133 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages, |
| 134 PrefService::UNSYNCABLE_PREF); | 134 PrefService::UNSYNCABLE_PREF); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 return is_guest_session; | 193 return is_guest_session; |
| 194 #else | 194 #else |
| 195 return false; | 195 return false; |
| 196 #endif | 196 #endif |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool Profile::IsSyncAccessible() { | 199 bool Profile::IsSyncAccessible() { |
| 200 browser_sync::SyncPrefs prefs(GetPrefs()); | 200 browser_sync::SyncPrefs prefs(GetPrefs()); |
| 201 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); | 201 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); |
| 202 } | 202 } |
| OLD | NEW |