summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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[];