summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 00:32:40 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 00:32:40 +0000
commitf9a0684728f020c4f08c87ed5a2349832381a23a (patch)
treed49db009de18651bf71edcc73dbc55f358995317 /chrome
parent6ddc4148d9596208e2397e959eec676df7e236b5 (diff)
downloadchromium_src-f9a0684728f020c4f08c87ed5a2349832381a23a.zip
chromium_src-f9a0684728f020c4f08c87ed5a2349832381a23a.tar.gz
chromium_src-f9a0684728f020c4f08c87ed5a2349832381a23a.tar.bz2
Fix to change the sense (and name) of kRestoreBackgroundContents to be kDisableRestoreBackgroundContents
BUG=52793 TEST=none Review URL: http://codereview.chromium.org/3202004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/background_contents_service.cc2
-rw-r--r--chrome/browser/background_contents_service_unittest.cc1
-rw-r--r--chrome/browser/browser_process_impl.cc3
-rw-r--r--chrome/common/chrome_switches.cc9
-rw-r--r--chrome/common/chrome_switches.h2
5 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index edd3219..1f173ee 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -44,7 +44,7 @@ BackgroundContentsService::BackgroundContentsService(
// Don't load/store preferences if the proper switch is not enabled, or if
// the parent profile is off the record.
if (!profile->IsOffTheRecord() &&
- command_line->HasSwitch(switches::kRestoreBackgroundContents))
+ !command_line->HasSwitch(switches::kDisableRestoreBackgroundContents))
prefs_ = profile->GetPrefs();
// Listen for events to tell us when to load/unload persisted background
diff --git a/chrome/browser/background_contents_service_unittest.cc b/chrome/browser/background_contents_service_unittest.cc
index 5a0819d..6e028ba 100644
--- a/chrome/browser/background_contents_service_unittest.cc
+++ b/chrome/browser/background_contents_service_unittest.cc
@@ -25,7 +25,6 @@ class BackgroundContentsServiceTest : public testing::Test {
~BackgroundContentsServiceTest() {}
void SetUp() {
command_line_.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY));
- command_line_->AppendSwitch(switches::kRestoreBackgroundContents);
}
DictionaryValue* GetPrefs(Profile* profile) {
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index ff43685..2ca9f62 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -734,8 +734,7 @@ const char* const kSwitchesToRemoveOnAutorestart[] = {
};
const char* const kSwitchesToAddOnAutorestart[] = {
- switches::kNoStartupWindow,
- switches::kRestoreBackgroundContents
+ switches::kNoStartupWindow
};
void BrowserProcessImpl::RestartPersistentInstance() {
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 529e7a4..5e8d3b7 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -223,6 +223,11 @@ const char kDisableRemoteFonts[] = "disable-remote-fonts";
// Turns off the accessibility in the renderer.
const char kDisableRendererAccessibility[] = "disable-renderer-accessibility";
+// Prevents the URLs of BackgroundContents from being remembered and re-launched
+// when the browser restarts.
+const char kDisableRestoreBackgroundContents[] =
+ "disable-restore-background-contents";
+
// Disable session storage.
const char kDisableSessionStorage[] = "disable-session-storage";
@@ -861,10 +866,6 @@ const char kRendererProcess[] = "renderer";
// Causes the renderer process to display a dialog on launch.
const char kRendererStartupDialog[] = "renderer-startup-dialog";
-// Causes the URLs of BackgroundContents to be remembered and re-launched when
-// the browser restarts.
-const char kRestoreBackgroundContents[] = "restore-background-contents";
-
// Indicates the last session should be restored on startup. This overrides
// the preferences value and is primarily intended for testing. The value of
// this switch is the number of tabs to wait until loaded before
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 86eba94..9fab8e0 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -77,6 +77,7 @@ extern const char kDisablePreconnect[];
extern const char kDisablePromptOnRepost[];
extern const char kDisableRemoteFonts[];
extern const char kDisableRendererAccessibility[];
+extern const char kDisableRestoreBackgroundContents[];
extern const char kDisableSessionStorage[];
extern const char kDisableSharedWorkers[];
extern const char kDisableSiteSpecificQuirks[];
@@ -249,7 +250,6 @@ extern const char kRendererCmdPrefix[];
extern const char kRendererCrashTest[];
extern const char kRendererProcess[];
extern const char kRendererStartupDialog[];
-extern const char kRestoreBackgroundContents[];
extern const char kRestoreLastSession[];
extern const char kSafePlugins[];
extern const char kSafeBrowsingDatabaseStore[];