| Index: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| index ba7d3b297327fc197ad20430a0571832eb63180b..ec6d1a32aa19923c9d5160b895db1939f2ed4e43 100644
|
| --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
| @@ -96,7 +96,7 @@ class StartupBrowserCreatorTest : public ExtensionBrowserTest {
|
| return ExtensionBrowserTest::SetUpUserDataDirectory();
|
| }
|
|
|
| - void SetUpCommandLine(CommandLine* command_line) override {
|
| + void SetUpCommandLine(base::CommandLine* command_line) override {
|
| ExtensionBrowserTest::SetUpCommandLine(command_line);
|
| command_line->AppendSwitch(switches::kEnablePanels);
|
| command_line->AppendSwitchASCII(switches::kHomePage, url::kAboutBlankURL);
|
| @@ -186,7 +186,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenURLsPopup) {
|
| ASSERT_TRUE(popup->is_type_popup());
|
| ASSERT_EQ(popup, observer.added_browser_);
|
|
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run);
|
| @@ -221,7 +221,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| browser()->window()->Close();
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run);
|
| @@ -266,7 +266,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| SessionStartupPref::SetStartupPref(browser()->profile(), pref);
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run);
|
| @@ -290,7 +290,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ActivateExistingBrowser) {
|
|
|
| // Add --activate-existing-profile-browser to the command line and
|
| // start a new process.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| dummy.AppendSwitch(switches::kActivateExistingProfileBrowser);
|
|
|
| StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
| @@ -311,7 +311,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenAppShortcutNoPref) {
|
| ASSERT_NO_FATAL_FAILURE(LoadApp("app_with_tab_container", &extension_app));
|
|
|
| // Add --app-id=<extension->id()> to the command line.
|
| - CommandLine command_line(CommandLine::NO_PROGRAM);
|
| + base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
| command_line.AppendSwitchASCII(switches::kAppId, extension_app->id());
|
|
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| @@ -337,7 +337,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenAppShortcutWindowPref) {
|
| // Set a pref indicating that the user wants to open this app in a window.
|
| SetAppLaunchPref(extension_app->id(), extensions::LAUNCH_TYPE_WINDOW);
|
|
|
| - CommandLine command_line(CommandLine::NO_PROGRAM);
|
| + base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
| command_line.AppendSwitchASCII(switches::kAppId, extension_app->id());
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
| @@ -368,7 +368,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenAppShortcutTabPref) {
|
| // Set a pref indicating that the user wants to open this app in a window.
|
| SetAppLaunchPref(extension_app->id(), extensions::LAUNCH_TYPE_REGULAR);
|
|
|
| - CommandLine command_line(CommandLine::NO_PROGRAM);
|
| + base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
| command_line.AppendSwitchASCII(switches::kAppId, extension_app->id());
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
| @@ -434,7 +434,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, MAYBE_AddFirstRunTab) {
|
| browser_creator.AddFirstRunTab(test_server()->GetURL("files/title2.html"));
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -469,7 +469,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, MAYBE_AddCustomFirstRunTab) {
|
| browser_creator.AddFirstRunTab(GURL("http://welcome_page"));
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -494,7 +494,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, MAYBE_AddCustomFirstRunTab) {
|
|
|
| IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoNoWelcomePage) {
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -520,7 +520,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithWelcomePage) {
|
| first_run::SetShouldShowWelcomePage();
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -554,7 +554,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, SyncPromoWithFirstRunTabs) {
|
| first_run::SetShouldShowWelcomePage();
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -587,7 +587,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| browser_creator.AddFirstRunTab(GURL("http://welcome_page"));
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false,
|
| @@ -619,7 +619,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, StartupURLsForTwoProfiles) {
|
| #if defined(OS_WIN) && defined(USE_ASH)
|
| // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAshBrowserTests))
|
| return;
|
| #endif
|
|
|
| @@ -655,7 +656,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, StartupURLsForTwoProfiles) {
|
| browser()->window()->Close();
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
|
|
| int return_code;
|
| StartupBrowserCreator browser_creator;
|
| @@ -749,7 +750,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| DISABLED_UpdateWithTwoProfiles) {
|
| #if defined(OS_WIN) && defined(USE_ASH)
|
| // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAshBrowserTests))
|
| return;
|
| #endif
|
|
|
| @@ -772,7 +774,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| ASSERT_TRUE(profile2);
|
|
|
| // Simulate a launch after a browser update.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| int return_code;
|
| StartupBrowserCreator browser_creator;
|
| std::vector<Profile*> last_opened_profiles;
|
| @@ -814,7 +816,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| ProfilesWithoutPagesNotLaunched) {
|
| #if defined(OS_WIN) && defined(USE_ASH)
|
| // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAshBrowserTests))
|
| return;
|
| #endif
|
|
|
| @@ -874,7 +877,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| browser()->window()->Close();
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
|
|
| int return_code;
|
| StartupBrowserCreator browser_creator;
|
| @@ -928,7 +931,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
|
| IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| #if defined(OS_WIN) && defined(USE_ASH)
|
| // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAshBrowserTests))
|
| return;
|
| #endif
|
|
|
| @@ -990,7 +994,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
| base::HistogramTester histogram_tester;
|
| #endif // !defined(OS_MACOSX) && !defined(GOOGLE_CHROME_BUILD)
|
|
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| dummy.AppendSwitchASCII(switches::kTestType, "browser");
|
| int return_code;
|
| StartupBrowserCreator browser_creator;
|
| @@ -1050,7 +1054,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
|
|
|
| class SupervisedUserBrowserCreatorTest : public InProcessBrowserTest {
|
| protected:
|
| - void SetUpCommandLine(CommandLine* command_line) override {
|
| + void SetUpCommandLine(base::CommandLine* command_line) override {
|
| InProcessBrowserTest::SetUpCommandLine(command_line);
|
| command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf");
|
| }
|
| @@ -1061,7 +1065,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserBrowserCreatorTest,
|
| StartupBrowserCreator browser_creator;
|
|
|
| // Do a simple non-process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| content::WindowedNotificationObserver observer(
|
| @@ -1092,7 +1096,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserBrowserCreatorTest,
|
|
|
| class StartupBrowserCreatorFirstRunTest : public InProcessBrowserTest {
|
| protected:
|
| - void SetUpCommandLine(CommandLine* command_line) override;
|
| + void SetUpCommandLine(base::CommandLine* command_line) override;
|
| void SetUpInProcessBrowserTestFixture() override;
|
|
|
| #if defined(ENABLE_CONFIGURATION_POLICY)
|
| @@ -1102,7 +1106,7 @@ class StartupBrowserCreatorFirstRunTest : public InProcessBrowserTest {
|
| };
|
|
|
| void StartupBrowserCreatorFirstRunTest::SetUpCommandLine(
|
| - CommandLine* command_line) {
|
| + base::CommandLine* command_line) {
|
| command_line->AppendSwitch(switches::kForceFirstRun);
|
| }
|
|
|
| @@ -1146,7 +1150,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, false);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1187,7 +1191,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, true);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1229,7 +1233,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, true);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1276,7 +1280,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, true);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1323,7 +1327,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, true);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1370,7 +1374,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, false);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1414,7 +1418,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| prefs::kSignInPromoShowOnFirstRunAllowed, false);
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
| @@ -1471,7 +1475,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorFirstRunTest,
|
| base::RunLoop().RunUntilIdle();
|
|
|
| // Do a process-startup browser launch.
|
| - CommandLine dummy(CommandLine::NO_PROGRAM);
|
| + base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
|
| StartupBrowserCreatorImpl launch(base::FilePath(), dummy, &browser_creator,
|
| chrome::startup::IS_FIRST_RUN);
|
| ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), true,
|
|
|