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

Side by Side Diff: shell/switches.cc

Issue 926093003: AddOriginMapping() (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Comments Created 5 years, 10 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 27 matching lines...) Expand all
38 const char kEnableExternalApplications[] = "enable-external-applications"; 38 const char kEnableExternalApplications[] = "enable-external-applications";
39 39
40 // Load apps in separate processes. 40 // Load apps in separate processes.
41 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe 41 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe
42 // change it to "single-process") when it works. 42 // change it to "single-process") when it works.
43 const char kEnableMultiprocess[] = "enable-multiprocess"; 43 const char kEnableMultiprocess[] = "enable-multiprocess";
44 44
45 // Print the usage message and exit. 45 // Print the usage message and exit.
46 const char kHelp[] = "help"; 46 const char kHelp[] = "help";
47 47
48 // Specify origin to map to base url. See url_resolver.cc for details.
49 // Can be used multiple times.
50 const char kMapOrigin[] = "map-origin";
51
48 // Map mojo: URLs to a shared library of similar name at this origin. See 52 // Map mojo: URLs to a shared library of similar name at this origin. See
49 // url_resolver.cc for details. 53 // url_resolver.cc for details.
50 const char kOrigin[] = "origin"; 54 const char kOrigin[] = "origin";
51 55
52 // Specifies a set of mappings to apply when resolving urls. The value is set of 56 // Specifies a set of mappings to apply when resolving urls. The value is set of
53 // ',' separated mappings, where each mapping consists of a pair of urls giving 57 // ',' separated mappings, where each mapping consists of a pair of urls giving
54 // the to/from url to map. For example, 'a=b,c=d' contains two mappings, the 58 // the to/from url to map. For example, 'a=b,c=d' contains two mappings, the
55 // first maps 'a' to 'b' and the second 'c' to 'd'. 59 // first maps 'a' to 'b' and the second 'c' to 'd'.
Aaron Boodman 2015/02/13 22:44:15 Are you going to make this match the style of map-
DaveMoore 2015/02/13 23:07:10 Yes.
56 const char kURLMappings[] = "url-mappings"; 60 const char kURLMappings[] = "url-mappings";
57 61
58 const char* kSwitchArray[] = {kV, 62 const char* kSwitchArray[] = {kV,
59 kArgsFor, 63 kArgsFor,
60 kChildProcessType, 64 kChildProcessType,
61 kContentHandlers, 65 kContentHandlers,
62 kDisableCache, 66 kDisableCache,
63 kEnableExternalApplications, 67 kEnableExternalApplications,
64 kEnableMultiprocess, 68 kEnableMultiprocess,
65 kHelp, 69 kHelp,
70 kMapOrigin,
66 kOrigin, 71 kOrigin,
67 kURLMappings}; 72 kURLMappings};
68 73
69 const std::set<std::string> GetAllSwitches() { 74 const std::set<std::string> GetAllSwitches() {
70 std::set<std::string> switch_set; 75 std::set<std::string> switch_set;
71 76
72 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) 77 for (size_t i = 0; i < arraysize(kSwitchArray); ++i)
73 switch_set.insert(kSwitchArray[i]); 78 switch_set.insert(kSwitchArray[i]);
74 return switch_set; 79 return switch_set;
75 } 80 }
76 81
77 } // namespace switches 82 } // namespace switches
OLDNEW
« no previous file with comments | « shell/switches.h ('k') | shell/url_resolver.h » ('j') | shell/url_resolver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698