summaryrefslogtreecommitdiffstats
path: root/base/command_line.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:36:21 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:36:21 +0000
commit0380184c27eaa9e157a57dcc36f184b9f8206743 (patch)
treec7246ba6a57b9e0fe829d3436b72030bd60a0427 /base/command_line.h
parentbf2641b495ff36eee7bfbfd213d8fd2d22dd0ec6 (diff)
downloadchromium_src-0380184c27eaa9e157a57dcc36f184b9f8206743.zip
chromium_src-0380184c27eaa9e157a57dcc36f184b9f8206743.tar.gz
chromium_src-0380184c27eaa9e157a57dcc36f184b9f8206743.tar.bz2
Add API to CommandLine to get a FilePath value of a switch.
This is the last piece needed before I can clean up all the callers. BUG=24672 TEST=compiles Review URL: http://codereview.chromium.org/274022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.h')
-rw-r--r--base/command_line.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/base/command_line.h b/base/command_line.h
index 78adb46..91eb892 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -99,12 +99,17 @@ class CommandLine {
// Returns the value associated with the given switch. If the
// switch has no value or isn't present, this method returns
// the empty string.
- std::wstring GetSwitchValue(const std::string& switch_string) const;
+ // TODO(evanm): move these into command_line.cpp once we've fixed the
+ // wstringness.
std::string GetSwitchValueASCII(const std::string& switch_string) const {
return WideToASCII(GetSwitchValue(switch_string));
}
+ FilePath GetSwitchValuePath(const std::string& switch_string) const {
+ return FilePath::FromWStringHack(GetSwitchValue(switch_string));
+ }
- // Deprecated version of the above.
+ // Deprecated versions of the above.
+ std::wstring GetSwitchValue(const std::string& switch_string) const;
std::wstring GetSwitchValue(const std::wstring& switch_string) const {
return GetSwitchValue(WideToASCII(switch_string));
}