Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2550)

Unified Diff: base/command_line.cc

Issue 11184050: [content shell] add support for getting tests from the command line. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/command_line_unittest.cc » ('j') | content/shell/shell_browser_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line.cc
diff --git a/base/command_line.cc b/base/command_line.cc
index 983181fc7a613edd133905a4759369ac61fee3a0..763abeb9983922d607a3b42dd15fc485dfc7b292 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -50,7 +50,8 @@ bool IsSwitch(const CommandLine::StringType& string,
CommandLine::StringType* switch_value) {
switch_string->clear();
switch_value->clear();
- if (GetSwitchPrefixLength(string) == 0)
+ size_t prefix_length = GetSwitchPrefixLength(string);
+ if (prefix_length == 0 || prefix_length == string.length())
marja 2012/10/18 20:53:57 nit: extra space here
jochen (gone - plz use gerrit) 2012/10/18 21:06:42 Done.
return false;
const size_t equals_position = string.find(kSwitchValueSeparator);
« no previous file with comments | « no previous file | base/command_line_unittest.cc » ('j') | content/shell/shell_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698