summaryrefslogtreecommitdiffstats
path: root/base/command_line.h
diff options
context:
space:
mode:
authoryoichio <yoichio@chromium.org>2015-04-17 01:28:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-17 08:29:07 +0000
commit817cf387dbb2b63fb8c00f0f9b1535a152d88b62 (patch)
treebb31a1db714e875168411e6f1d4f9327bb5dfa17 /base/command_line.h
parentff739236c68dae346a4d12f15fc9ae5b8a83144e (diff)
downloadchromium_src-817cf387dbb2b63fb8c00f0f9b1535a152d88b62.zip
chromium_src-817cf387dbb2b63fb8c00f0f9b1535a152d88b62.tar.gz
chromium_src-817cf387dbb2b63fb8c00f0f9b1535a152d88b62.tar.bz2
Revert of Enforce lowercase switches when calling CommandLine::HasSwitch(const char*). (patchset #5 id:80001 of https://codereview.chromium.org/1046363002/)
Reason for revert: This causes test fails on Android: https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/27294 The test uses upper case with HasSwitch(): https://code.google.com/p/chromium/codesearch#chromium/src/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java&q=testJavaNativeTransition&sq=package:chromium&type=cs&l=96 Original issue's description: > Enforce lowercase switches when calling CommandLine::HasSwitch. > > At the moment, all compile-time switches are lowercase. By enforcing > this, we can skip converting it to lowercase on Windows, which saves > one string allocation per call. > > On a profile with 2 extensions, HasSwitch is called ~12k times during > startup. In an ideal situation (no paging/cache pressure), the > string allocation under Windows takes ~137ns on an Xeon E5-2690 @ > 2.9Ghz. So this should shave off at least 1.6ms off a typical startup > with this hardware. For context, > Startup.BrowserMessageLoopStartTimeFromMainEntry is typically > 280-300ms on the same hardware, so we should get a ~0.5% improvement. > > BUG=472383 > > Committed: https://crrev.com/f58961749a980032241fe6c3fc829ac2e6652030 > Cr-Commit-Position: refs/heads/master@{#325576} TBR=tapted@chromium.org,brettw@chromium.org,jackhou@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=472383 Review URL: https://codereview.chromium.org/1091993002 Cr-Commit-Position: refs/heads/master@{#325610}
Diffstat (limited to 'base/command_line.h')
-rw-r--r--base/command_line.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/command_line.h b/base/command_line.h
index 439921e..19df40c 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -142,7 +142,7 @@ class BASE_EXPORT CommandLine {
void SetProgram(const FilePath& program);
// Returns true if this command line contains the given switch.
- // Switch names should only be lowercase.
+ // (Switch names are case-insensitive).
// The second override provides an optimized version to avoid inlining the
// codegen for the string allocation.
bool HasSwitch(const std::string& switch_string) const;