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 "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 void Profile::RegisterUserPrefs(PrefService* prefs) { | 148 void Profile::RegisterUserPrefs(PrefService* prefs) { |
149 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true); | 149 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true); |
150 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); | 150 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); |
151 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, true); | 151 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, true); |
152 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. | 152 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. |
153 prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary, | 153 prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary, |
154 IDS_SPELLCHECK_DICTIONARY); | 154 IDS_SPELLCHECK_DICTIONARY); |
155 prefs->RegisterBooleanPref(prefs::kEnableSpellCheck, true); | 155 prefs->RegisterBooleanPref(prefs::kEnableSpellCheck, true); |
156 prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, true); | 156 prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, true); |
157 #if defined(TOOLKIT_USES_GTK) | 157 #if defined(TOOLKIT_USES_GTK) |
158 prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, false); | 158 prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, |
| 159 GtkThemeProvider::DefaultUsesSystemTheme()); |
159 #endif | 160 #endif |
160 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath()); | 161 prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath()); |
161 prefs->RegisterStringPref(prefs::kCurrentThemeID, | 162 prefs->RegisterStringPref(prefs::kCurrentThemeID, |
162 UTF8ToWide(BrowserThemeProvider::kDefaultThemeID)); | 163 UTF8ToWide(BrowserThemeProvider::kDefaultThemeID)); |
163 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages); | 164 prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages); |
164 prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors); | 165 prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors); |
165 prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints); | 166 prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints); |
166 prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties); | 167 prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties); |
167 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); | 168 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); |
168 } | 169 } |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 } | 1358 } |
1358 | 1359 |
1359 void ProfileImpl::InitSyncService() { | 1360 void ProfileImpl::InitSyncService() { |
1360 profile_sync_factory_.reset( | 1361 profile_sync_factory_.reset( |
1361 new ProfileSyncFactoryImpl(this, | 1362 new ProfileSyncFactoryImpl(this, |
1362 CommandLine::ForCurrentProcess())); | 1363 CommandLine::ForCurrentProcess())); |
1363 sync_service_.reset( | 1364 sync_service_.reset( |
1364 profile_sync_factory_->CreateProfileSyncService()); | 1365 profile_sync_factory_->CreateProfileSyncService()); |
1365 sync_service_->Initialize(); | 1366 sync_service_->Initialize(); |
1366 } | 1367 } |
OLD | NEW |