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

Side by Side Diff: mojo/shell/switches.cc

Issue 1057603003: Simplify mojo_shell since it's now only used for Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update scripts Created 5 years, 8 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 | « mojo/shell/switches.h ('k') | mojo/shell/url_resolver_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/shell/switches.h" 5 #include "mojo/shell/switches.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 8
9 namespace switches { 9 namespace switches {
10 10
11 namespace {
12 // This controls logging verbosity. It's not strictly a switch for mojo_shell,
13 // and isn't included in the public switches, but is included here so that it
14 // doesn't trigger an error at startup.
15 const char kV[] = "v";
16
17 } // namespace
18
19 // Specify configuration arguments for a Mojo application URL. For example:
20 // --args-for='mojo:wget http://www.google.com'
21 const char kArgsFor[] = "args-for";
22
23 // Used internally by the main process to indicate that a new process should be 11 // Used internally by the main process to indicate that a new process should be
24 // a child process. Not for user use. 12 // a child process. Not for user use.
25 const char kChildProcess[] = "child-process"; 13 const char kChildProcess[] = "child-process";
26 14
27 // Comma separated list like: 15 // Comma separated list like:
28 // text/html,mojo:html_viewer,application/bravo,https://abarth.com/bravo 16 // text/html,mojo:html_viewer,application/bravo,https://abarth.com/bravo
29 const char kContentHandlers[] = "content-handlers"; 17 const char kContentHandlers[] = "content-handlers";
30 18
31 // Force dynamically loaded apps / services to be loaded irrespective of cache 19 // Force dynamically loaded apps / services to be loaded irrespective of cache
32 // instructions. 20 // instructions.
(...skipping 27 matching lines...) Expand all
60 // remote debugging: when gdb is used through gdbserver, it needs to be able to 48 // remote debugging: when gdb is used through gdbserver, it needs to be able to
61 // find locally any loaded library. For this, gdb use the filename of the 49 // find locally any loaded library. For this, gdb use the filename of the
62 // library. When using this flag, the application are named with the sha256 of 50 // library. When using this flag, the application are named with the sha256 of
63 // their content. 51 // their content.
64 const char kPredictableAppFilenames[] = "predictable-app-filenames"; 52 const char kPredictableAppFilenames[] = "predictable-app-filenames";
65 53
66 // Starts tracing when the shell starts up, saving a trace file on disk after 5 54 // Starts tracing when the shell starts up, saving a trace file on disk after 5
67 // seconds or when the shell exits. 55 // seconds or when the shell exits.
68 const char kTraceStartup[] = "trace-startup"; 56 const char kTraceStartup[] = "trace-startup";
69 57
70 // Specifies a set of mappings to apply when resolving urls. The value is a set
71 // of ',' separated mappings, where each mapping consists of a pair of urls
72 // giving the to/from url to map. For example, 'a=b,c=d' contains two mappings,
73 // the first maps 'a' to 'b' and the second 'c' to 'd'.
74 const char kURLMappings[] = "url-mappings";
75
76 // Switches valid for the main process (i.e., that the user may pass in).
77 const char* kSwitchArray[] = {kV,
78 kArgsFor,
79 // |kChildProcess| not for user use.
80 kContentHandlers,
81 kDisableCache,
82 kDontDeleteOnDownload,
83 kEnableMultiprocess,
84 kForceInProcess,
85 kHelp,
86 kMapOrigin,
87 kOrigin,
88 kPredictableAppFilenames,
89 kTraceStartup,
90 kURLMappings};
91
92 const std::set<std::string> GetAllSwitches() {
93 std::set<std::string> switch_set;
94
95 for (size_t i = 0; i < arraysize(kSwitchArray); ++i)
96 switch_set.insert(kSwitchArray[i]);
97 return switch_set;
98 }
99
100 } // namespace switches 58 } // namespace switches
OLDNEW
« no previous file with comments | « mojo/shell/switches.h ('k') | mojo/shell/url_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698