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" |
11 #include "chrome/browser/host_content_settings_map.h" | 11 #include "chrome/browser/host_content_settings_map.h" |
12 #include "chrome/browser/host_zoom_map.h" | 12 #include "chrome/browser/host_zoom_map.h" |
13 #include "chrome/browser/metrics/metrics_service.h" | 13 #include "chrome/browser/metrics/metrics_service.h" |
14 #include "chrome/browser/pref_service.h" | 14 #include "chrome/browser/pref_service.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/installer/util/google_update_settings.h" | 16 #include "chrome/installer/util/google_update_settings.h" |
17 | 17 |
18 // static | 18 // static |
19 void OptionsUtil::ResetToDefaults(Profile* profile) { | 19 void OptionsUtil::ResetToDefaults(Profile* profile) { |
20 // TODO(tc): It would be nice if we could generate this list automatically so | 20 // TODO(tc): It would be nice if we could generate this list automatically so |
21 // changes to any of the options pages doesn't require updating this list | 21 // changes to any of the options pages doesn't require updating this list |
22 // manually. | 22 // manually. |
23 PrefService* prefs = profile->GetPrefs(); | 23 PrefService* prefs = profile->GetPrefs(); |
24 const char* kUserPrefs[] = { | 24 const char* kUserPrefs[] = { |
25 prefs::kAcceptLanguages, | 25 prefs::kAcceptLanguages, |
26 prefs::kAlternateErrorPagesEnabled, | 26 prefs::kAlternateErrorPagesEnabled, |
| 27 prefs::kBackgroundModeEnabled, |
27 prefs::kClearSiteDataOnExit, | 28 prefs::kClearSiteDataOnExit, |
28 prefs::kCookieBehavior, | 29 prefs::kCookieBehavior, |
29 prefs::kDefaultCharset, | 30 prefs::kDefaultCharset, |
30 prefs::kDnsPrefetchingEnabled, | 31 prefs::kDnsPrefetchingEnabled, |
31 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) | 32 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) |
32 prefs::kCertRevocationCheckingEnabled, | 33 prefs::kCertRevocationCheckingEnabled, |
33 prefs::kSSL2Enabled, | 34 prefs::kSSL2Enabled, |
34 prefs::kSSL3Enabled, | 35 prefs::kSSL3Enabled, |
35 prefs::kTLS1Enabled, | 36 prefs::kTLS1Enabled, |
36 #endif | 37 #endif |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |