summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 03:36:31 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 03:36:31 +0000
commit947446bd2c19777f7f20b9b14085dc31cdb73d1a (patch)
treea5a6965d00cd420035ccf80cf1498f7a2f1ca90a /chrome/browser
parent1f6228c2bfc056e876cbfd5b585f6d07d8f7313c (diff)
downloadchromium_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/browser')
-rw-r--r--chrome/browser/about_flags_unittest.cc4
-rw-r--r--chrome/browser/app_controller_mac.mm2
-rw-r--r--chrome/browser/background_contents_service_unittest.cc2
-rw-r--r--chrome/browser/background_mode_manager_unittest.cc2
-rw-r--r--chrome/browser/browser_browsertest.cc2
-rw-r--r--chrome/browser/browser_init_browsertest.cc4
-rw-r--r--chrome/browser/diagnostics/diagnostics_model_unittest.cc2
-rw-r--r--chrome/browser/extensions/extensions_service_unittest.cc4
-rw-r--r--chrome/browser/jumplist_win.cc2
-rw-r--r--chrome/browser/prefs/command_line_pref_store_unittest.cc12
-rw-r--r--chrome/browser/prefs/pref_service_unittest.cc10
-rw-r--r--chrome/browser/process_singleton_uitest.cc2
12 files changed, 24 insertions, 24 deletions
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();