Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

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

Issue 5579002: Add a preference to clear plugin data on browser shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugin_data_remover_helper.cc ('k') | chrome/browser/ui/options/options_util.cc » ('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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, false); 2003 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, false);
2004 #endif 2004 #endif
2005 } 2005 }
2006 2006
2007 // static 2007 // static
2008 void Browser::RegisterUserPrefs(PrefService* prefs) { 2008 void Browser::RegisterUserPrefs(PrefService* prefs) {
2009 prefs->RegisterStringPref(prefs::kHomePage, 2009 prefs->RegisterStringPref(prefs::kHomePage,
2010 chrome::kChromeUINewTabURL); 2010 chrome::kChromeUINewTabURL);
2011 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); 2011 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
2012 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); 2012 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false);
2013 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataOnExit, false);
2013 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); 2014 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false);
2014 #if defined(OS_MACOSX) 2015 #if defined(OS_MACOSX)
2015 // This really belongs in platform code, but there's no good place to 2016 // This really belongs in platform code, but there's no good place to
2016 // initialize it between the time when the AppController is created 2017 // initialize it between the time when the AppController is created
2017 // (where there's no profile) and the time the controller gets another 2018 // (where there's no profile) and the time the controller gets another
2018 // crack at the start of the main event loop. By that time, BrowserInit 2019 // crack at the start of the main event loop. By that time, BrowserInit
2019 // has already created the browser window, and it's too late: we need the 2020 // has already created the browser window, and it's too late: we need the
2020 // pref to be already initialized. Doing it here also saves us from having 2021 // pref to be already initialized. Doing it here also saves us from having
2021 // to hard-code pref registration in the several unit tests that use 2022 // to hard-code pref registration in the several unit tests that use
2022 // this preference. 2023 // this preference.
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after
4194 // The page transition below is only for the purpose of inserting the tab. 4195 // The page transition below is only for the purpose of inserting the tab.
4195 browser->AddTab(contents_dupe, PageTransition::LINK); 4196 browser->AddTab(contents_dupe, PageTransition::LINK);
4196 } 4197 }
4197 4198
4198 if (profile_->HasSessionService()) { 4199 if (profile_->HasSessionService()) {
4199 SessionService* session_service = profile_->GetSessionService(); 4200 SessionService* session_service = profile_->GetSessionService();
4200 if (session_service) 4201 if (session_service)
4201 session_service->TabRestored(&new_contents->controller(), pinned); 4202 session_service->TabRestored(&new_contents->controller(), pinned);
4202 } 4203 }
4203 } 4204 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_data_remover_helper.cc ('k') | chrome/browser/ui/options/options_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698