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

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: Follow review 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 | « shell/switches.h ('k') | sky/tools/skydb » ('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 "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: when gdb is used through gdbserver, it needs to be able to
66 // find locally any loaded library. For this, gdb use the filename of the
67 // library. When using this flag, the application are named with the sha256 of
68 // their content.
69 const char kPredictableAppFilenames[] = "predictable-app-filenames";
70
61 // Specifies a set of mappings to apply when resolving urls. The value is a set 71 // 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 72 // 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, 73 // 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'. 74 // the first maps 'a' to 'b' and the second 'c' to 'd'.
65 const char kURLMappings[] = "url-mappings"; 75 const char kURLMappings[] = "url-mappings";
66 76
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). 77 // Switches valid for the main process (i.e., that the user may pass in).
71 const char* kSwitchArray[] = {kV, 78 const char* kSwitchArray[] = {kV,
72 kArgsFor, 79 kArgsFor,
73 // |kChildProcessType| not for user use. 80 // |kChildProcessType| not for user use.
74 kContentHandlers, 81 kContentHandlers,
75 kDisableCache, 82 kDisableCache,
76 kDontDeleteOnDownload, 83 kDontDeleteOnDownload,
77 kEnableExternalApplications, 84 kEnableExternalApplications,
78 kEnableMultiprocess, 85 kEnableMultiprocess,
79 kForceInProcess, 86 kForceInProcess,
80 kHelp, 87 kHelp,
81 kMapOrigin, 88 kMapOrigin,
82 kOrigin, 89 kOrigin,
90 kPredictableAppFilenames,
83 kURLMappings}; 91 kURLMappings};
84 92
85 const std::set<std::string> GetAllSwitches() { 93 const std::set<std::string> GetAllSwitches() {
86 std::set<std::string> switch_set; 94 std::set<std::string> switch_set;
87 95
88 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) 96 for (size_t i = 0; i < arraysize(kSwitchArray); ++i)
89 switch_set.insert(kSwitchArray[i]); 97 switch_set.insert(kSwitchArray[i]);
90 return switch_set; 98 return switch_set;
91 } 99 }
92 100
93 } // namespace switches 101 } // namespace switches
OLDNEW
« no previous file with comments | « shell/switches.h ('k') | sky/tools/skydb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698