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

Side by Side Diff: shell/switches.cc

Issue 1011333003: Fix races when the same bits are downloaded from 2 URLs. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
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 "shell/switches.h" 5 #include "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
(...skipping 14 matching lines...) Expand all
25 const char kChildProcessType[] = "child-process-type"; 25 const char kChildProcessType[] = "child-process-type";
26 26
27 // Comma separated list like: 27 // Comma separated list like:
28 // text/html,mojo:html_viewer,application/bravo,https://abarth.com/bravo 28 // text/html,mojo:html_viewer,application/bravo,https://abarth.com/bravo
29 const char kContentHandlers[] = "content-handlers"; 29 const char kContentHandlers[] = "content-handlers";
30 30
31 // Force dynamically loaded apps / services to be loaded irrespective of cache 31 // Force dynamically loaded apps / services to be loaded irrespective of cache
32 // instructions. 32 // instructions.
33 const char kDisableCache[] = "disable-cache"; 33 const char kDisableCache[] = "disable-cache";
34 34
35 // If set apps downloaded are not deleted.
36 const char kDontDeleteOnDownload[] = "dont-delete-on-download";
37
35 // Allow externally-running applications to discover, connect to, and register 38 // Allow externally-running applications to discover, connect to, and register
36 // themselves with the shell. 39 // themselves with the shell.
37 // TODO(cmasone): Work in progress. Once we're sure this works, remove. 40 // TODO(cmasone): Work in progress. Once we're sure this works, remove.
38 const char kEnableExternalApplications[] = "enable-external-applications"; 41 const char kEnableExternalApplications[] = "enable-external-applications";
39 42
40 // Load apps in separate processes. 43 // Load apps in separate processes.
41 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe 44 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe
42 // change it to "single-process") when it works. 45 // change it to "single-process") when it works.
43 const char kEnableMultiprocess[] = "enable-multiprocess"; 46 const char kEnableMultiprocess[] = "enable-multiprocess";
44 47
45 // In multiprocess mode, force these apps to be loaded in the main process. 48 // In multiprocess mode, force these apps to be loaded in the main process.
46 // Comma-separate list of URLs. Example: 49 // Comma-separate list of URLs. Example:
47 // --force-in-process=mojo:native_viewport_service,mojo:network_service 50 // --force-in-process=mojo:native_viewport_service,mojo:network_service
48 const char kForceInProcess[] = "force-in-process"; 51 const char kForceInProcess[] = "force-in-process";
49 52
50 // Print the usage message and exit. 53 // Print the usage message and exit.
51 const char kHelp[] = "help"; 54 const char kHelp[] = "help";
52 55
53 // Specify origin to map to base url. See url_resolver.cc for details. 56 // Specify origin to map to base url. See url_resolver.cc for details.
54 // Can be used multiple times. 57 // Can be used multiple times.
55 const char kMapOrigin[] = "map-origin"; 58 const char kMapOrigin[] = "map-origin";
56 59
57 // Map mojo: URLs to a shared library of similar name at this origin. See 60 // Map mojo: URLs to a shared library of similar name at this origin. See
58 // url_resolver.cc for details. 61 // url_resolver.cc for details.
59 const char kOrigin[] = "origin"; 62 const char kOrigin[] = "origin";
60 63
64 // If set apps downloaded are saved in with a predictable filename, to help
65 // remote debugging.
Nick Bray (chromium) 2015/03/19 17:45:20 Comment / crosslink / document.
qsr 2015/03/20 11:50:49 Done.
66 const char kPredictableAppFilenames[] = "predictable-app-filenames";
67
61 // Specifies a set of mappings to apply when resolving urls. The value is a set 68 // Specifies a set of mappings to apply when resolving urls. The value is a set
62 // of ',' separated mappings, where each mapping consists of a pair of urls 69 // of ',' separated mappings, where each mapping consists of a pair of urls
63 // giving the to/from url to map. For example, 'a=b,c=d' contains two mappings, 70 // giving the to/from url to map. For example, 'a=b,c=d' contains two mappings,
64 // the first maps 'a' to 'b' and the second 'c' to 'd'. 71 // the first maps 'a' to 'b' and the second 'c' to 'd'.
65 const char kURLMappings[] = "url-mappings"; 72 const char kURLMappings[] = "url-mappings";
66 73
67 // If set apps downloaded are not deleted.
68 const char kDontDeleteOnDownload[] = "dont-delete-on-download";
69
70 // Switches valid for the main process (i.e., that the user may pass in). 74 // Switches valid for the main process (i.e., that the user may pass in).
71 const char* kSwitchArray[] = {kV, 75 const char* kSwitchArray[] = {kV,
72 kArgsFor, 76 kArgsFor,
73 // |kChildProcessType| not for user use. 77 // |kChildProcessType| not for user use.
74 kContentHandlers, 78 kContentHandlers,
75 kDisableCache, 79 kDisableCache,
76 kDontDeleteOnDownload, 80 kDontDeleteOnDownload,
77 kEnableExternalApplications, 81 kEnableExternalApplications,
78 kEnableMultiprocess, 82 kEnableMultiprocess,
79 kForceInProcess, 83 kForceInProcess,
80 kHelp, 84 kHelp,
81 kMapOrigin, 85 kMapOrigin,
82 kOrigin, 86 kOrigin,
87 kPredictableAppFilenames,
83 kURLMappings}; 88 kURLMappings};
84 89
85 const std::set<std::string> GetAllSwitches() { 90 const std::set<std::string> GetAllSwitches() {
86 std::set<std::string> switch_set; 91 std::set<std::string> switch_set;
87 92
88 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) 93 for (size_t i = 0; i < arraysize(kSwitchArray); ++i)
89 switch_set.insert(kSwitchArray[i]); 94 switch_set.insert(kSwitchArray[i]);
90 return switch_set; 95 return switch_set;
91 } 96 }
92 97
93 } // namespace switches 98 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698