summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 20:15:25 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 20:15:25 +0000
commitdcd869cd5cc3d237e76608126094240c09fc3632 (patch)
tree28bc5af2ab3440952b3316ec38ca5d39e77890e2 /base
parent50d6e170a47305a393a07e7f2244e9045fd0ea07 (diff)
downloadchromium_src-dcd869cd5cc3d237e76608126094240c09fc3632.zip
chromium_src-dcd869cd5cc3d237e76608126094240c09fc3632.tar.gz
chromium_src-dcd869cd5cc3d237e76608126094240c09fc3632.tar.bz2
FBTF: Move some heavy, repeatedly emitted symbols to implementation files.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3162047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/command_line.cc12
-rw-r--r--base/command_line.h11
-rw-r--r--base/process_util_unittest.cc1
3 files changed, 15 insertions, 9 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 9b531fa..d34bcb9 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -273,6 +273,12 @@ void CommandLine::Reset() {
current_process_commandline_ = NULL;
}
+// static
+CommandLine* CommandLine::ForCurrentProcess() {
+ DCHECK(current_process_commandline_);
+ return current_process_commandline_;
+}
+
bool CommandLine::HasSwitch(const std::string& switch_string) const {
std::string lowercased_switch(switch_string);
#if defined(OS_WIN)
@@ -530,3 +536,9 @@ void CommandLine::CopySwitchesFrom(const CommandLine& source,
// private
CommandLine::CommandLine() {
}
+
+// static
+CommandLine* CommandLine::ForCurrentProcessMutable() {
+ DCHECK(current_process_commandline_);
+ return current_process_commandline_;
+}
diff --git a/base/command_line.h b/base/command_line.h
index e4ac08b..ce10d65 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -24,7 +24,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/logging.h"
class FilePath;
class InProcessBrowserTest;
@@ -83,10 +82,7 @@ class CommandLine {
// Get the singleton CommandLine representing the current process's
// command line. Note: returned value is mutable, but not thread safe;
// only mutate if you know what you're doing!
- static CommandLine* ForCurrentProcess() {
- DCHECK(current_process_commandline_);
- return current_process_commandline_;
- }
+ static CommandLine* ForCurrentProcess();
// Returns true if this command line contains the given switch.
// (Switch names are case-insensitive.)
@@ -180,10 +176,7 @@ class CommandLine {
CommandLine();
// Used by InProcessBrowserTest.
- static CommandLine* ForCurrentProcessMutable() {
- DCHECK(current_process_commandline_);
- return current_process_commandline_;
- }
+ static CommandLine* ForCurrentProcessMutable();
// The singleton CommandLine instance representing the current process's
// command line.
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index bea84c7..e92459c 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
#include "base/file_path.h"
+#include "base/logging.h"
#include "base/path_service.h"
#include "base/platform_thread.h"
#include "base/process_util.h"