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

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

Issue 5278001: Add a preference to clear Flash LSO data in the Clear Browsing Data dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: formatting 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
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 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); 1978 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false);
1979 } 1979 }
1980 1980
1981 // static 1981 // static
1982 void Browser::RegisterPrefs(PrefService* prefs) { 1982 void Browser::RegisterPrefs(PrefService* prefs) {
1983 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); 1983 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
1984 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 1984 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
1985 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); 1985 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1);
1986 prefs->RegisterDictionaryPref(prefs::kPreferencesWindowPlacement); 1986 prefs->RegisterDictionaryPref(prefs::kPreferencesWindowPlacement);
1987 prefs->RegisterIntegerPref(prefs::kExtensionSidebarWidth, -1); 1987 prefs->RegisterIntegerPref(prefs::kExtensionSidebarWidth, -1);
1988 // Educated guess: Chrome has a bundled Flash version supporting
1989 // clearing LSO data, Chromium hasn't.
1990 #if defined(GOOGLE_CHROME_BUILD)
1991 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true);
1992 #else
1993 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, false);
1994 #endif
1988 } 1995 }
1989 1996
1990 // static 1997 // static
1991 void Browser::RegisterUserPrefs(PrefService* prefs) { 1998 void Browser::RegisterUserPrefs(PrefService* prefs) {
1992 prefs->RegisterStringPref(prefs::kHomePage, 1999 prefs->RegisterStringPref(prefs::kHomePage,
1993 chrome::kChromeUINewTabURL); 2000 chrome::kChromeUINewTabURL);
1994 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); 2001 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
1995 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); 2002 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false);
2003 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataOnExit, false);
1996 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); 2004 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false);
1997 #if defined(OS_MACOSX) 2005 #if defined(OS_MACOSX)
1998 // This really belongs in platform code, but there's no good place to 2006 // This really belongs in platform code, but there's no good place to
1999 // initialize it between the time when the AppController is created 2007 // initialize it between the time when the AppController is created
2000 // (where there's no profile) and the time the controller gets another 2008 // (where there's no profile) and the time the controller gets another
2001 // crack at the start of the main event loop. By that time, BrowserInit 2009 // crack at the start of the main event loop. By that time, BrowserInit
2002 // has already created the browser window, and it's too late: we need the 2010 // has already created the browser window, and it's too late: we need the
2003 // pref to be already initialized. Doing it here also saves us from having 2011 // pref to be already initialized. Doing it here also saves us from having
2004 // to hard-code pref registration in the several unit tests that use 2012 // to hard-code pref registration in the several unit tests that use
2005 // this preference. 2013 // this preference.
2006 prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false); 2014 prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false);
2007 prefs->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true); 2015 prefs->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true);
2008 #endif 2016 #endif
2009 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, ""); 2017 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, "");
2010 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true); 2018 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true);
2011 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true); 2019 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true);
2012 prefs->RegisterBooleanPref(prefs::kDeleteCache, true); 2020 prefs->RegisterBooleanPref(prefs::kDeleteCache, true);
2013 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true); 2021 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true);
2014 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false); 2022 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false);
2015 prefs->RegisterBooleanPref(prefs::kDeleteFormData, false); 2023 prefs->RegisterBooleanPref(prefs::kDeleteFormData, false);
2024 prefs->RegisterBooleanPref(prefs::kDeleteLSOData, false);
2016 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); 2025 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0);
2017 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); 2026 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true);
2018 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); 2027 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true);
2019 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); 2028 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
2020 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); 2029 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
2021 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); 2030 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
2022 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); 2031 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false);
2023 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); 2032 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true);
2024 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false); 2033 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false);
2025 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); 2034 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 NOTREACHED(); 4144 NOTREACHED();
4136 return false; 4145 return false;
4137 } 4146 }
4138 4147
4139 void Browser::CreateInstantIfNecessary() { 4148 void Browser::CreateInstantIfNecessary() {
4140 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) && 4149 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) &&
4141 !profile()->IsOffTheRecord()) { 4150 !profile()->IsOffTheRecord()) {
4142 instant_.reset(new InstantController(profile_, this)); 4151 instant_.reset(new InstantController(profile_, this));
4143 } 4152 }
4144 } 4153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698