| OLD | NEW |
| 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 "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 { | 11 namespace { |
| 12 // This controls logging verbosity. It's not strictly a switch for mojo_shell, | 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 | 13 // and isn't included in the public switches, but is included here so that it |
| 14 // doesn't trigger an error at startup. | 14 // doesn't trigger an error at startup. |
| 15 const char kV[] = "v"; | 15 const char kV[] = "v"; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Enables the mojo spy, which acts as a man-in-the-middle inspector for | 52 // Enables the mojo spy, which acts as a man-in-the-middle inspector for |
| 53 // message pipes and other activities. This is work in progress. | 53 // message pipes and other activities. This is work in progress. |
| 54 const char kSpy[] = "spy"; | 54 const char kSpy[] = "spy"; |
| 55 | 55 |
| 56 // 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 |
| 57 // ',' 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 |
| 58 // 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 |
| 59 // first maps 'a' to 'b' and the second 'c' to 'd'. | 59 // first maps 'a' to 'b' and the second 'c' to 'd'. |
| 60 const char kURLMappings[] = "url-mappings"; | 60 const char kURLMappings[] = "url-mappings"; |
| 61 | 61 |
| 62 const char* kSwitchArray[] = { | 62 const char* kSwitchArray[] = {kV, |
| 63 kV, | 63 kArgsFor, |
| 64 kArgsFor, | 64 kChildProcessType, |
| 65 kChildProcessType, | 65 kContentHandlers, |
| 66 kContentHandlers, | 66 kDisableCache, |
| 67 kDisableCache, | 67 kEnableExternalApplications, |
| 68 kEnableExternalApplications, | 68 kEnableMultiprocess, |
| 69 kEnableMultiprocess, | 69 kHelp, |
| 70 kHelp, | 70 kOrigin, |
| 71 kOrigin, | 71 kSpy, |
| 72 kSpy, | 72 kURLMappings}; |
| 73 kURLMappings | |
| 74 }; | |
| 75 | 73 |
| 76 const std::set<std::string> GetAllSwitches() { | 74 const std::set<std::string> GetAllSwitches() { |
| 77 std::set<std::string> switch_set; | 75 std::set<std::string> switch_set; |
| 78 | 76 |
| 79 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) | 77 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) |
| 80 switch_set.insert(kSwitchArray[i]); | 78 switch_set.insert(kSwitchArray[i]); |
| 81 return switch_set; | 79 return switch_set; |
| 82 } | 80 } |
| 83 | 81 |
| 84 } // namespace switches | 82 } // namespace switches |
| OLD | NEW |