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

Side by Side Diff: base/command_line.h

Issue 3817001: CommandLine: remove wstring-based program() accessor (Closed) Base URL: http://src.chromium.org/git/chromium.git
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 unified diff | Download patch
« no previous file with comments | « no previous file | base/command_line.cc » ('j') | base/command_line_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This class works with command lines: building and parsing. 5 // This class works with command lines: building and parsing.
6 // Switches can optionally have a value attached using an equals sign, 6 // Switches can optionally have a value attached using an equals sign,
7 // as in "-switch=value". Arguments that aren't prefixed with a 7 // as in "-switch=value". Arguments that aren't prefixed with a
8 // switch prefix are saved as extra arguments. An argument of "--" 8 // switch prefix are saved as extra arguments. An argument of "--"
9 // will terminate switch parsing, causing everything after to be 9 // will terminate switch parsing, causing everything after to be
10 // considered as extra arguments. 10 // considered as extra arguments.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // Copy a set of switches (and their values, if any) from another command 158 // Copy a set of switches (and their values, if any) from another command
159 // line. Commonly used when launching a subprocess. 159 // line. Commonly used when launching a subprocess.
160 void CopySwitchesFrom(const CommandLine& source, const char* const switches[], 160 void CopySwitchesFrom(const CommandLine& source, const char* const switches[],
161 size_t count); 161 size_t count);
162 162
163 // APIs that work with wstrings are deprecated. 163 // APIs that work with wstrings are deprecated.
164 // TODO(evanm): remove all of these. 164 // TODO(evanm): remove all of these.
165 #if defined(OS_WIN) 165 #if defined(OS_WIN)
166 // Deprecated on non-Windows. 166 // Deprecated on non-Windows.
167 std::wstring program() const;
168 bool HasSwitch(const std::wstring& switch_string) const; 167 bool HasSwitch(const std::wstring& switch_string) const;
169 #endif 168 #endif
170 169
171 private: 170 private:
172 friend class InProcessBrowserTest; 171 friend class InProcessBrowserTest;
173 172
174 CommandLine(); 173 CommandLine();
175 174
176 // Used by InProcessBrowserTest. 175 // Used by InProcessBrowserTest.
177 static CommandLine* ForCurrentProcessMutable(); 176 static CommandLine* ForCurrentProcessMutable();
(...skipping 28 matching lines...) Expand all
206 std::vector<StringType> args_; 205 std::vector<StringType> args_;
207 206
208 // We allow copy constructors, because a common pattern is to grab a 207 // We allow copy constructors, because a common pattern is to grab a
209 // copy of the current process's command line and then add some 208 // copy of the current process's command line and then add some
210 // flags to it. E.g.: 209 // flags to it. E.g.:
211 // CommandLine cl(*CommandLine::ForCurrentProcess()); 210 // CommandLine cl(*CommandLine::ForCurrentProcess());
212 // cl.AppendSwitch(...); 211 // cl.AppendSwitch(...);
213 }; 212 };
214 213
215 #endif // BASE_COMMAND_LINE_H_ 214 #endif // BASE_COMMAND_LINE_H_
OLDNEW
« no previous file with comments | « no previous file | base/command_line.cc » ('j') | base/command_line_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698