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

Unified Diff: mojo/shell/switches.cc

Issue 731923002: Emit error if unknown switch is passed to mojo_shell (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove static Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/switches.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/switches.cc
diff --git a/mojo/shell/switches.cc b/mojo/shell/switches.cc
index bb159b5b8bd306b212d4e9edf2f3335318dfaef7..80d2e5b7a9911b86f0a22401f8ed9e5f14dbc8ca 100644
--- a/mojo/shell/switches.cc
+++ b/mojo/shell/switches.cc
@@ -4,6 +4,8 @@
#include "mojo/shell/switches.h"
+#include "base/basictypes.h"
+
namespace switches {
// Specify configuration arguments for a Mojo application URL. For example:
@@ -49,4 +51,25 @@ const char kSpy[] = "spy";
// first maps 'a' to 'b' and the second 'c' to 'd'.
const char kURLMappings[] = "url-mappings";
+const char* kSwitchArray[] = {
+ kArgsFor,
+ kChildProcessType,
+ kContentHandlers,
+ kDisableCache,
+ kEnableExternalApplications,
+ kEnableMultiprocess,
+ kHelp,
+ kOrigin,
+ kSpy,
+ kURLMappings
+};
+
+const std::set<std::string> GetAllSwitches() {
+ std::set<std::string> switch_set;
+
+ for (size_t i = 0; i < arraysize(kSwitchArray); ++i)
+ switch_set.insert(kSwitchArray[i]);
+ return switch_set;
+}
+
} // namespace switches
« no previous file with comments | « mojo/shell/switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698