OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #endif | 89 #endif |
90 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath()); | 90 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath()); |
91 prefs->RegisterStringPref(prefs::kCurrentThemeID, | 91 prefs->RegisterStringPref(prefs::kCurrentThemeID, |
92 BrowserThemeProvider::kDefaultThemeID); | 92 BrowserThemeProvider::kDefaultThemeID); |
93 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages); | 93 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages); |
94 prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors); | 94 prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors); |
95 prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints); | 95 prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints); |
96 prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties); | 96 prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties); |
97 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); | 97 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); |
98 prefs->RegisterStringPref(prefs::kSelectFileLastDirectory, ""); | 98 prefs->RegisterStringPref(prefs::kSelectFileLastDirectory, ""); |
| 99 #if defined(OS_CHROMEOS) |
| 100 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both |
| 101 // local state and user's profile. For other platforms we maintain |
| 102 // kApplicationLocale only in local state. |
| 103 // In the future we may want to maintain kApplicationLocale |
| 104 // in user's profile for other platforms as well. |
| 105 prefs->RegisterStringPref(prefs::kApplicationLocale, ""); |
| 106 #endif |
99 } | 107 } |
100 | 108 |
101 // static | 109 // static |
102 URLRequestContextGetter* Profile::GetDefaultRequestContext() { | 110 URLRequestContextGetter* Profile::GetDefaultRequestContext() { |
103 return default_request_context_; | 111 return default_request_context_; |
104 } | 112 } |
105 | 113 |
106 bool Profile::IsSyncAccessible() { | 114 bool Profile::IsSyncAccessible() { |
107 ProfileSyncService* syncService = GetProfileSyncService(); | 115 ProfileSyncService* syncService = GetProfileSyncService(); |
108 return syncService && !syncService->IsManaged(); | 116 return syncService && !syncService->IsManaged(); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 | 641 |
634 // The file_system context for this profile. | 642 // The file_system context for this profile. |
635 scoped_refptr<BrowserFileSystemContext> browser_file_system_context_; | 643 scoped_refptr<BrowserFileSystemContext> browser_file_system_context_; |
636 | 644 |
637 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 645 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
638 }; | 646 }; |
639 | 647 |
640 Profile* Profile::CreateOffTheRecordProfile() { | 648 Profile* Profile::CreateOffTheRecordProfile() { |
641 return new OffTheRecordProfileImpl(this); | 649 return new OffTheRecordProfileImpl(this); |
642 } | 650 } |
OLD | NEW |