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

Unified Diff: base/command_line.cc

Issue 3549023: CommandLine: deprecate another function on non-Windows (Closed)
Patch Set: Created 10 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
Index: base/command_line.cc
diff --git a/base/command_line.cc b/base/command_line.cc
index 4d76ed08955a075bfd13873760a331c1b4a26555..477b4e72bb7e2d01b93ece352c8ab189f715717c 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -332,18 +332,18 @@ CommandLine::StringType CommandLine::GetSwitchValueNative(
}
FilePath CommandLine::GetProgram() const {
- return FilePath::FromWStringHack(program());
+#if defined(OS_WIN)
+ return FilePath(program_);
+#else
+ DCHECK_GT(argv_.size(), 0U);
+ return FilePath(argv_[0]);
+#endif
}
#if defined(OS_WIN)
std::wstring CommandLine::program() const {
return program_;
}
-#else
-std::wstring CommandLine::program() const {
- DCHECK_GT(argv_.size(), 0U);
- return base::SysNativeMBToWide(argv_[0]);
-}
#endif
#if defined(OS_POSIX)
« base/command_line.h ('K') | « base/command_line.h ('k') | base/command_line_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698