diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 03:36:31 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 03:36:31 +0000 |
commit | 947446bd2c19777f7f20b9b14085dc31cdb73d1a (patch) | |
tree | a5a6965d00cd420035ccf80cf1498f7a2f1ca90a /chrome | |
parent | 1f6228c2bfc056e876cbfd5b585f6d07d8f7313c (diff) | |
download | chromium_src-947446bd2c19777f7f20b9b14085dc31cdb73d1a.zip chromium_src-947446bd2c19777f7f20b9b14085dc31cdb73d1a.tar.gz chromium_src-947446bd2c19777f7f20b9b14085dc31cdb73d1a.tar.bz2 |
Rename CommandLine::ARGUMENTS_ONLY to NO_PROGRAM.
ARGUMENTS_ONLY was misleading since CommandLine has methods for handling "switches" and "arguments", but that constructor still allows both.
BUG=none
TEST=still builds
Review URL: http://codereview.chromium.org/3935001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
19 files changed, 36 insertions, 36 deletions
diff --git a/chrome/app/chrome_main_uitest.cc b/chrome/app/chrome_main_uitest.cc index 8b77fb7..6f115d6 100644 --- a/chrome/app/chrome_main_uitest.cc +++ b/chrome/app/chrome_main_uitest.cc @@ -19,7 +19,7 @@ TEST_F(ChromeMainTest, SecondLaunch) { include_testing_id_ = false; ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed( - CommandLine(CommandLine::ARGUMENTS_ONLY))); + CommandLine(CommandLine::NO_PROGRAM))); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); } @@ -29,7 +29,7 @@ TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { FilePath test_file = test_data_directory_.AppendASCII("empty.html"); - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendArgPath(test_file); ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(command_line)); diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc index 4372f48..3122cc9 100644 --- a/chrome/browser/about_flags_unittest.cc +++ b/chrome/browser/about_flags_unittest.cc @@ -81,7 +81,7 @@ TEST_F(AboutFlagsTest, AddTwoFlagsRemoveBoth) { TEST_F(AboutFlagsTest, ConvertFlagsToSwitches) { SetExperimentEnabled(&prefs_, kFlags1, true); - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch("foo"); EXPECT_TRUE(command_line.HasSwitch("foo")); @@ -113,7 +113,7 @@ TEST_F(AboutFlagsTest, RemoveFlagSwitches) { EXPECT_TRUE(switch_list.find("foo") != switch_list.end()); // Call ConvertFlagsToSwitches(), then RemoveFlagsSwitches() again. - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch("foo"); ConvertFlagsToSwitches(&prefs_, &command_line); RemoveFlagsSwitches(&switch_list); diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 8ce821d..22de42f 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -938,7 +938,7 @@ void RecordLastRunAppBundlePath() { browser->window()->Show(); } - CommandLine dummy(CommandLine::ARGUMENTS_ONLY); + CommandLine dummy(CommandLine::NO_PROGRAM); BrowserInit::LaunchWithProfile launch(FilePath(), dummy); launch.OpenURLsInBrowser(browser, false, urls); } diff --git a/chrome/browser/background_contents_service_unittest.cc b/chrome/browser/background_contents_service_unittest.cc index 84c78ac..23ba929 100644 --- a/chrome/browser/background_contents_service_unittest.cc +++ b/chrome/browser/background_contents_service_unittest.cc @@ -24,7 +24,7 @@ class BackgroundContentsServiceTest : public testing::Test { BackgroundContentsServiceTest() {} ~BackgroundContentsServiceTest() {} void SetUp() { - command_line_.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); } DictionaryValue* GetPrefs(Profile* profile) { diff --git a/chrome/browser/background_mode_manager_unittest.cc b/chrome/browser/background_mode_manager_unittest.cc index 4c43610..cd87ce5 100644 --- a/chrome/browser/background_mode_manager_unittest.cc +++ b/chrome/browser/background_mode_manager_unittest.cc @@ -20,7 +20,7 @@ class BackgroundModeManagerTest : public testing::Test { BackgroundModeManagerTest() {} ~BackgroundModeManagerTest() {} void SetUp() { - command_line_.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); command_line_->AppendSwitch(switches::kEnableBackgroundMode); } scoped_ptr<CommandLine> command_line_; diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc index 0e2aaf1..981d07c 100644 --- a/chrome/browser/browser_browsertest.cc +++ b/chrome/browser/browser_browsertest.cc @@ -530,7 +530,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RestorePinnedTabs) { PinnedTabCodec::WritePinnedTabs(browser()->profile()); // Simulate launching again. - CommandLine dummy(CommandLine::ARGUMENTS_ONLY); + CommandLine dummy(CommandLine::NO_PROGRAM); BrowserInit::LaunchWithProfile launch(FilePath(), dummy); launch.profile_ = browser()->profile(); launch.ProcessStartupURLs(std::vector<GURL>()); diff --git a/chrome/browser/browser_init_browsertest.cc b/chrome/browser/browser_init_browsertest.cc index deac3e2..ec52cae 100644 --- a/chrome/browser/browser_init_browsertest.cc +++ b/chrome/browser/browser_init_browsertest.cc @@ -51,7 +51,7 @@ IN_PROC_BROWSER_TEST_F(BrowserInitTest, OpenURLsPopup) { ASSERT_EQ(popup->type(), Browser::TYPE_POPUP); ASSERT_EQ(popup, observer.added_browser_); - CommandLine dummy(CommandLine::ARGUMENTS_ONLY); + CommandLine dummy(CommandLine::NO_PROGRAM); BrowserInit::LaunchWithProfile launch(FilePath(), dummy); // This should create a new window, but re-use the profile from |popup|. If // it used a NULL or invalid profile, it would crash. @@ -68,7 +68,7 @@ IN_PROC_BROWSER_TEST_F(BrowserInitTest, OpenURLsPopup) { IN_PROC_BROWSER_TEST_F(BrowserInitTest, FLAKY_BlockBadURLs) { const char* testurlstr = "http://localhost/"; const GURL testurl(testurlstr); - CommandLine cmdline(CommandLine::ARGUMENTS_ONLY); + CommandLine cmdline(CommandLine::NO_PROGRAM); cmdline.AppendArg(testurlstr); cmdline.AppendArg("javascript:alert('boo')"); cmdline.AppendArg(testurlstr); diff --git a/chrome/browser/diagnostics/diagnostics_model_unittest.cc b/chrome/browser/diagnostics/diagnostics_model_unittest.cc index 58717bf..ee80a09 100644 --- a/chrome/browser/diagnostics/diagnostics_model_unittest.cc +++ b/chrome/browser/diagnostics/diagnostics_model_unittest.cc @@ -12,7 +12,7 @@ class DiagnosticsModelTest : public testing::Test { protected: DiagnosticsModelTest() : model_(NULL), - cmdline_(CommandLine::ARGUMENTS_ONLY) { + cmdline_(CommandLine::NO_PROGRAM) { } virtual ~DiagnosticsModelTest() { } diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 849b209..df29995 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -2532,7 +2532,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { .AppendASCII(ExtensionsService::kInstallDirectoryName); // By default, we are enabled. - command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); service = profile->CreateExtensionsService(command_line.get(), install_dir); EXPECT_TRUE(service->extensions_enabled()); @@ -2564,7 +2564,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { recorder.set_ready(false); profile.reset(new TestingProfile()); profile->GetPrefs()->SetBoolean(prefs::kDisableExtensions, true); - command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); service = profile->CreateExtensionsService(command_line.get(), install_dir); EXPECT_FALSE(service->extensions_enabled()); diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc index 3614b9c..ddea51c 100644 --- a/chrome/browser/jumplist_win.cc +++ b/chrome/browser/jumplist_win.cc @@ -421,7 +421,7 @@ bool UpdateJumpList(const wchar_t* app_id, return false; // Retrieve the command-line switches of this process. - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); FilePath user_data_dir = CommandLine::ForCurrentProcess()-> GetSwitchValuePath(switches::kUserDataDir); if (!user_data_dir.empty()) diff --git a/chrome/browser/prefs/command_line_pref_store_unittest.cc b/chrome/browser/prefs/command_line_pref_store_unittest.cc index c6d2bd2..064c7e6 100644 --- a/chrome/browser/prefs/command_line_pref_store_unittest.cc +++ b/chrome/browser/prefs/command_line_pref_store_unittest.cc @@ -31,7 +31,7 @@ const char unknown_string[] = "unknown_other_switch"; // Tests a simple string pref on the command line. TEST(CommandLinePrefStoreTest, SimpleStringPref) { - CommandLine cl(CommandLine::ARGUMENTS_ONLY); + CommandLine cl(CommandLine::NO_PROGRAM); cl.AppendSwitchASCII(switches::kLang, "hi-MOM"); CommandLinePrefStore store(&cl); EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE); @@ -43,7 +43,7 @@ TEST(CommandLinePrefStoreTest, SimpleStringPref) { // Tests a simple boolean pref on the command line. TEST(CommandLinePrefStoreTest, SimpleBooleanPref) { - CommandLine cl(CommandLine::ARGUMENTS_ONLY); + CommandLine cl(CommandLine::NO_PROGRAM); cl.AppendSwitch(switches::kNoProxyServer); CommandLinePrefStore store(&cl); EXPECT_EQ(store.ReadPrefs(), PrefStore::PREF_READ_ERROR_NONE); @@ -55,7 +55,7 @@ TEST(CommandLinePrefStoreTest, SimpleBooleanPref) { // Tests a command line with no recognized prefs. TEST(CommandLinePrefStoreTest, NoPrefs) { - CommandLine cl(CommandLine::ARGUMENTS_ONLY); + CommandLine cl(CommandLine::NO_PROGRAM); cl.AppendSwitch(unknown_string); cl.AppendSwitchASCII(unknown_bool, "a value"); CommandLinePrefStore store(&cl); @@ -72,7 +72,7 @@ TEST(CommandLinePrefStoreTest, NoPrefs) { // Tests a complex command line with multiple known and unknown switches. TEST(CommandLinePrefStoreTest, MultipleSwitches) { - CommandLine cl(CommandLine::ARGUMENTS_ONLY); + CommandLine cl(CommandLine::NO_PROGRAM); cl.AppendSwitch(unknown_string); cl.AppendSwitch(switches::kProxyAutoDetect); cl.AppendSwitchASCII(switches::kProxyServer, "proxy"); @@ -99,7 +99,7 @@ TEST(CommandLinePrefStoreTest, MultipleSwitches) { // Tests proxy switch validation. TEST(CommandLinePrefStoreTest, ProxySwitchValidation) { - CommandLine cl(CommandLine::ARGUMENTS_ONLY); + CommandLine cl(CommandLine::NO_PROGRAM); // No switches. TestCommandLinePrefStore store(&cl); @@ -119,7 +119,7 @@ TEST(CommandLinePrefStoreTest, ProxySwitchValidation) { EXPECT_FALSE(store3.ProxySwitchesAreValid()); // All proxy switches except no-proxy. - CommandLine cl2(CommandLine::ARGUMENTS_ONLY); + CommandLine cl2(CommandLine::NO_PROGRAM); cl2.AppendSwitch(switches::kProxyAutoDetect); cl2.AppendSwitchASCII(switches::kProxyServer, "server"); cl2.AppendSwitchASCII(switches::kProxyPacUrl, "url"); diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc index 44161d7..ce2f91c 100644 --- a/chrome/browser/prefs/pref_service_unittest.cc +++ b/chrome/browser/prefs/pref_service_unittest.cc @@ -186,7 +186,7 @@ TEST(PrefServiceTest, Observers) { } TEST(PrefServiceTest, ProxyFromCommandLineNotPolicy) { - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch(switches::kProxyAutoDetect); TestingPrefService prefs(NULL, &command_line); browser::RegisterUserPrefs(&prefs); @@ -198,7 +198,7 @@ TEST(PrefServiceTest, ProxyFromCommandLineNotPolicy) { } TEST(PrefServiceTest, ProxyPolicyOverridesCommandLineOptions) { - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitchASCII(switches::kProxyBypassList, "123"); command_line.AppendSwitchASCII(switches::kProxyPacUrl, "456"); command_line.AppendSwitchASCII(switches::kProxyServer, "789"); @@ -242,7 +242,7 @@ TEST(PrefServiceTest, ProxyPolicyOverridesCommandLineOptions) { } TEST(PrefServiceTest, ProxyPolicyOverridesUnrelatedCommandLineOptions) { - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitchASCII(switches::kProxyBypassList, "123"); command_line.AppendSwitchASCII(switches::kProxyPacUrl, "456"); command_line.AppendSwitchASCII(switches::kProxyServer, "789"); @@ -278,7 +278,7 @@ TEST(PrefServiceTest, ProxyPolicyOverridesUnrelatedCommandLineOptions) { } TEST(PrefServiceTest, ProxyPolicyOverridesCommandLineNoProxy) { - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch(switches::kNoProxyServer); scoped_ptr<policy::MockConfigurationPolicyProvider> provider( new policy::MockConfigurationPolicyProvider()); @@ -311,7 +311,7 @@ TEST(PrefServiceTest, ProxyPolicyOverridesCommandLineNoProxy) { } TEST(PrefServiceTest, ProxyPolicyOverridesCommandLineAutoDetect) { - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); command_line.AppendSwitch(switches::kProxyAutoDetect); scoped_ptr<policy::MockConfigurationPolicyProvider> provider( new policy::MockConfigurationPolicyProvider()); diff --git a/chrome/browser/process_singleton_uitest.cc b/chrome/browser/process_singleton_uitest.cc index c1f8cd9..57656c2 100644 --- a/chrome/browser/process_singleton_uitest.cc +++ b/chrome/browser/process_singleton_uitest.cc @@ -72,7 +72,7 @@ class ChromeStarter : public base::RefCountedThreadSafe<ChromeStarter> { // Add the normal test-mode switches, except for the ones we're adding // ourselves. - CommandLine standard_switches(CommandLine::ARGUMENTS_ONLY); + CommandLine standard_switches(CommandLine::NO_PROGRAM); test_launcher_utils::PrepareBrowserCommandLineForTests(&standard_switches); const CommandLine::SwitchMap& switch_map = standard_switches.GetSwitches(); for (CommandLine::SwitchMap::const_iterator i = switch_map.begin(); diff --git a/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc b/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc index 478f470..3673e24 100644 --- a/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc +++ b/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc @@ -58,7 +58,7 @@ void RenderViewFakeResourcesTest::SetUp() { // to fetch network resources. These are then served canned content // in OnRequestResource(). sandbox_init_wrapper_.reset(new SandboxInitWrapper); - command_line_.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); params_.reset(new MainFunctionParams(*command_line_, *sandbox_init_wrapper_, NULL)); platform_.reset(new RendererMainPlatformDelegate(*params_)); diff --git a/chrome/service/service_process_unittest.cc b/chrome/service/service_process_unittest.cc index 884da04..1de1492 100644 --- a/chrome/service/service_process_unittest.cc +++ b/chrome/service/service_process_unittest.cc @@ -17,7 +17,7 @@ TEST(ServiceProcessTest, DISABLED_Run) { MessageLoopForUI main_message_loop; ServiceProcess process; - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); EXPECT_TRUE(process.Initialize(&main_message_loop, command_line)); EXPECT_TRUE(process.Teardown()); } @@ -27,7 +27,7 @@ TEST(ServiceProcessTest, DISABLED_Run) { TEST(ServiceProcessTest, DISABLED_RunChromoting) { MessageLoopForUI main_message_loop; ServiceProcess process; - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); EXPECT_TRUE(process.Initialize(&main_message_loop, command_line)); // Then config the chromoting host and start it. @@ -52,7 +52,7 @@ ACTION_P(QuitMessageLoop, message_loop) { TEST(ServiceProcessTest, DISABLED_RunChromotingUntilShutdown) { MessageLoopForUI main_message_loop; MockServiceProcess process; - CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + CommandLine command_line(CommandLine::NO_PROGRAM); EXPECT_TRUE(process.Initialize(&main_message_loop, command_line)); // Expect chromoting shutdown be called because the login token is invalid. diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 0ce8bcb..374229d 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -343,7 +343,7 @@ class AutomationProxyTest2 : public AutomationProxyVisibleTest { document1_= test_data_directory_.AppendASCII("title1.html"); document2_ = test_data_directory_.AppendASCII("title2.html"); - launch_arguments_ = CommandLine(CommandLine::ARGUMENTS_ONLY); + launch_arguments_ = CommandLine(CommandLine::NO_PROGRAM); launch_arguments_.AppendArgPath(document1_); launch_arguments_.AppendArgPath(document2_); } @@ -560,7 +560,7 @@ class AutomationProxyTest3 : public UITest { document1_ = document1_.AppendASCII("frame_dom_access.html"); dom_automation_enabled_ = true; - launch_arguments_ = CommandLine(CommandLine::ARGUMENTS_ONLY); + launch_arguments_ = CommandLine(CommandLine::NO_PROGRAM); launch_arguments_.AppendArgPath(document1_); } diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index cd0fccd..c17c25f 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -75,7 +75,7 @@ void RenderViewTest::LoadHTML(const char* html) { void RenderViewTest::SetUp() { sandbox_init_wrapper_.reset(new SandboxInitWrapper()); - command_line_.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); + command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); params_.reset(new MainFunctionParams(*command_line_, *sandbox_init_wrapper_, NULL)); platform_.reset(new RendererMainPlatformDelegate(*params_)); diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc index b94316a..31bdaf9 100644 --- a/chrome/test/startup/startup_test.cc +++ b/chrome/test/startup/startup_test.cc @@ -277,7 +277,7 @@ void StartupTest::RunPerfTestWithManyTabs(const char* graph, const char* trace, UITest::TearDown(); // Clear all arguments for session restore, or the number of open tabs // will grow with each restore. - launch_arguments_ = CommandLine(CommandLine::ARGUMENTS_ONLY); + launch_arguments_ = CommandLine(CommandLine::NO_PROGRAM); // The session will be restored once per cycle for numCycles test cycles, // and each time, UITest::SetUp will wait for |tab_count| tabs to // finish loading. diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 958eb62..8c72435 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -90,7 +90,7 @@ std::string UITestBase::log_level_ = ""; // #define WAIT_FOR_DEBUGGER_ON_OPEN 1 UITestBase::UITestBase() - : launch_arguments_(CommandLine::ARGUMENTS_ONLY), + : launch_arguments_(CommandLine::NO_PROGRAM), expected_errors_(0), expected_crashes_(0), homepage_(chrome::kAboutBlankURL), @@ -110,7 +110,7 @@ UITestBase::UITestBase() } UITestBase::UITestBase(MessageLoop::Type msg_loop_type) - : launch_arguments_(CommandLine::ARGUMENTS_ONLY), + : launch_arguments_(CommandLine::NO_PROGRAM), expected_errors_(0), expected_crashes_(0), homepage_(chrome::kAboutBlankURL), |