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/options_util.h" | 5 #include "chrome/browser/options_util.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
9 #include "chrome/browser/download/download_manager.h" | 9 #include "chrome/browser/download/download_manager.h" |
10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 prefs::kURLsToRestoreOnStartup, | 59 prefs::kURLsToRestoreOnStartup, |
60 prefs::kWebKitDefaultFixedFontSize, | 60 prefs::kWebKitDefaultFixedFontSize, |
61 prefs::kWebKitDefaultFontSize, | 61 prefs::kWebKitDefaultFontSize, |
62 prefs::kWebKitFixedFontFamily, | 62 prefs::kWebKitFixedFontFamily, |
63 prefs::kWebKitJavaEnabled, | 63 prefs::kWebKitJavaEnabled, |
64 prefs::kWebKitJavascriptEnabled, | 64 prefs::kWebKitJavascriptEnabled, |
65 prefs::kWebKitLoadsImagesAutomatically, | 65 prefs::kWebKitLoadsImagesAutomatically, |
66 prefs::kWebKitPluginsEnabled, | 66 prefs::kWebKitPluginsEnabled, |
67 prefs::kWebKitSansSerifFontFamily, | 67 prefs::kWebKitSansSerifFontFamily, |
68 prefs::kWebKitSerifFontFamily, | 68 prefs::kWebKitSerifFontFamily, |
| 69 prefs::kWebkitTabsToLinks, |
69 }; | 70 }; |
70 profile->GetDownloadManager()->ResetAutoOpenFiles(); | 71 profile->GetDownloadManager()->ResetAutoOpenFiles(); |
71 profile->GetHostContentSettingsMap()->ResetToDefaults(); | 72 profile->GetHostContentSettingsMap()->ResetToDefaults(); |
72 profile->GetGeolocationContentSettingsMap()->ResetToDefault(); | 73 profile->GetGeolocationContentSettingsMap()->ResetToDefault(); |
73 profile->GetHostZoomMap()->ResetToDefaults(); | 74 profile->GetHostZoomMap()->ResetToDefaults(); |
74 for (size_t i = 0; i < arraysize(kUserPrefs); ++i) | 75 for (size_t i = 0; i < arraysize(kUserPrefs); ++i) |
75 prefs->ClearPref(kUserPrefs[i]); | 76 prefs->ClearPref(kUserPrefs[i]); |
76 | 77 |
77 PrefService* local_state = g_browser_process->local_state(); | 78 PrefService* local_state = g_browser_process->local_state(); |
78 // Note that we don't reset the kMetricsReportingEnabled preference here | 79 // Note that we don't reset the kMetricsReportingEnabled preference here |
(...skipping 30 matching lines...) Expand all Loading... |
109 if (metrics) { | 110 if (metrics) { |
110 metrics->SetUserPermitsUpload(enabled); | 111 metrics->SetUserPermitsUpload(enabled); |
111 if (enabled) | 112 if (enabled) |
112 metrics->Start(); | 113 metrics->Start(); |
113 else | 114 else |
114 metrics->Stop(); | 115 metrics->Stop(); |
115 } | 116 } |
116 | 117 |
117 return enabled; | 118 return enabled; |
118 } | 119 } |
OLD | NEW |