summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_mode/app_mode_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/app_mode/app_mode_utils.cc')
-rw-r--r--chrome/browser/app_mode/app_mode_utils.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/app_mode/app_mode_utils.cc b/chrome/browser/app_mode/app_mode_utils.cc
new file mode 100644
index 0000000..ca3baa5
--- /dev/null
+++ b/chrome/browser/app_mode/app_mode_utils.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/app_mode/app_mode_utils.h"
+
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
+
+namespace chrome {
+
+bool IsRunningInAppMode() {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return command_line->HasSwitch(switches::kKioskMode) ||
+ (command_line->HasSwitch(switches::kForceAppMode) &&
+ command_line->HasSwitch(switches::kAppId));
+}
+
+} // namespace switches