Chromium Code Reviews

Side by Side Diff: chrome/browser/ui/options/options_util.cc

Issue 6260003: Clear plugin data together with cookies on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update copyright date Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui/options/options_util.h" 5 #include "chrome/browser/ui/options/options_util.h"
6 6
7 #include "base/threading/thread_restrictions.h" 7 #include "base/threading/thread_restrictions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/download/download_manager.h" 9 #include "chrome/browser/download/download_manager.h"
10 #include "chrome/browser/download/download_prefs.h" 10 #include "chrome/browser/download/download_prefs.h"
11 #include "chrome/browser/content_settings/host_content_settings_map.h" 11 #include "chrome/browser/content_settings/host_content_settings_map.h"
12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
13 #include "chrome/browser/host_zoom_map.h" 13 #include "chrome/browser/host_zoom_map.h"
14 #include "chrome/browser/metrics/metrics_service.h" 14 #include "chrome/browser/metrics/metrics_service.h"
15 #include "chrome/browser/notifications/desktop_notification_service.h" 15 #include "chrome/browser/notifications/desktop_notification_service.h"
16 #include "chrome/browser/prefs/pref_service.h" 16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "chrome/installer/util/google_update_settings.h" 19 #include "chrome/installer/util/google_update_settings.h"
20 20
21 // static 21 // static
22 void OptionsUtil::ResetToDefaults(Profile* profile) { 22 void OptionsUtil::ResetToDefaults(Profile* profile) {
23 // TODO(tc): It would be nice if we could generate this list automatically so 23 // TODO(tc): It would be nice if we could generate this list automatically so
24 // changes to any of the options pages doesn't require updating this list 24 // changes to any of the options pages doesn't require updating this list
25 // manually. 25 // manually.
26 PrefService* prefs = profile->GetPrefs(); 26 PrefService* prefs = profile->GetPrefs();
27 const char* kUserPrefs[] = { 27 const char* kUserPrefs[] = {
28 prefs::kAcceptLanguages, 28 prefs::kAcceptLanguages,
29 prefs::kAlternateErrorPagesEnabled, 29 prefs::kAlternateErrorPagesEnabled,
30 prefs::kClearPluginLSODataOnExit,
31 prefs::kClearSiteDataOnExit, 30 prefs::kClearSiteDataOnExit,
32 prefs::kCookieBehavior, 31 prefs::kCookieBehavior,
33 prefs::kDefaultCharset, 32 prefs::kDefaultCharset,
34 prefs::kDefaultZoomLevel, 33 prefs::kDefaultZoomLevel,
35 prefs::kDeleteBrowsingHistory, 34 prefs::kDeleteBrowsingHistory,
36 prefs::kDeleteCache, 35 prefs::kDeleteCache,
37 prefs::kDeleteCookies, 36 prefs::kDeleteCookies,
38 prefs::kDeleteDownloadHistory, 37 prefs::kDeleteDownloadHistory,
39 prefs::kDeleteFormData, 38 prefs::kDeleteFormData,
40 prefs::kDeletePasswords, 39 prefs::kDeletePasswords,
(...skipping 83 matching lines...)
124 if (metrics) { 123 if (metrics) {
125 metrics->SetUserPermitsUpload(enabled); 124 metrics->SetUserPermitsUpload(enabled);
126 if (enabled) 125 if (enabled)
127 metrics->Start(); 126 metrics->Start();
128 else 127 else
129 metrics->Stop(); 128 metrics->Stop();
130 } 129 }
131 130
132 return enabled; 131 return enabled;
133 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine