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

Unified Diff: base/command_line.cc

Issue 9477001: Allow callers of CommandLine::Init to know whether they were the first caller. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comment clarification. Created 8 years, 10 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 | « base/command_line.h ('k') | base/command_line_unittest.cc » ('j') | no next file with comments »
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 0237ffeb104509dfa91653cf231d2b90ba75dff7..530941e787fb52f9e6c68ad4e7e488d6d41ef409 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -167,12 +167,12 @@ CommandLine::~CommandLine() {
}
// static
-void CommandLine::Init(int argc, const char* const* argv) {
+bool CommandLine::Init(int argc, const char* const* argv) {
if (current_process_commandline_) {
// If this is intentional, Reset() must be called first. If we are using
// the shared build mode, we have to share a single object across multiple
// shared libraries.
- return;
+ return false;
}
current_process_commandline_ = new CommandLine(NO_PROGRAM);
@@ -181,6 +181,8 @@ void CommandLine::Init(int argc, const char* const* argv) {
#elif defined(OS_POSIX)
current_process_commandline_->InitFromArgv(argc, argv);
#endif
+
+ return true;
}
// static
« no previous file with comments | « 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