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

Side by Side Diff: base/command_line.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « base/callback_forward.h ('k') | base/containers/hash_tables.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 InitFromArgv(argv); 180 InitFromArgv(argv);
181 } 181 }
182 182
183 CommandLine::~CommandLine() { 183 CommandLine::~CommandLine() {
184 } 184 }
185 185
186 #if defined(OS_WIN) 186 #if defined(OS_WIN)
187 // static 187 // static
188 void CommandLine::set_slash_is_not_a_switch() { 188 void CommandLine::set_slash_is_not_a_switch() {
189 // The last switch prefix should be slash, so adjust the size to skip it. 189 // The last switch prefix should be slash, so adjust the size to skip it.
190 DCHECK(wcscmp(kSwitchPrefixes[arraysize(kSwitchPrefixes) - 1], L"/") == 0); 190 DCHECK_EQ(wcscmp(kSwitchPrefixes[arraysize(kSwitchPrefixes) - 1], L"/"), 0);
191 switch_prefix_count = arraysize(kSwitchPrefixes) - 1; 191 switch_prefix_count = arraysize(kSwitchPrefixes) - 1;
192 } 192 }
193 #endif 193 #endif
194 194
195 // static 195 // static
196 bool CommandLine::Init(int argc, const char* const* argv) { 196 bool CommandLine::Init(int argc, const char* const* argv) {
197 if (current_process_commandline_) { 197 if (current_process_commandline_) {
198 // If this is intentional, Reset() must be called first. If we are using 198 // If this is intentional, Reset() must be called first. If we are using
199 // the shared build mode, we have to share a single object across multiple 199 // the shared build mode, we have to share a single object across multiple
200 // shared libraries. 200 // shared libraries.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 #if defined(OS_WIN) 442 #if defined(OS_WIN)
443 arg = QuoteForCommandLineToArgvW(arg, quote_placeholders); 443 arg = QuoteForCommandLineToArgvW(arg, quote_placeholders);
444 #endif 444 #endif
445 params.append(arg); 445 params.append(arg);
446 } 446 }
447 } 447 }
448 return params; 448 return params;
449 } 449 }
450 450
451 } // namespace base 451 } // namespace base
OLDNEW
« no previous file with comments | « base/callback_forward.h ('k') | base/containers/hash_tables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698