Index: chrome/common/app_mode.cc |
diff --git a/chrome/common/app_mode.cc b/chrome/common/app_mode.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7778944fc30e612a278aa64bd0a5c604aff25de4 |
--- /dev/null |
+++ b/chrome/common/app_mode.cc |
@@ -0,0 +1,18 @@ |
+// Copyright (c) 2012 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/common/app_mode.h" |
+ |
+#include "base/command_line.h" |
+#include "chrome/common/chrome_switches.h" |
+ |
+namespace app_mode { |
+ |
+bool IsRunningInAppMode() { |
+ CommandLine* cl = CommandLine::ForCurrentProcess(); |
+ return cl->HasSwitch(switches::kApp) || cl->HasSwitch(switches::kAppId); |
+} |
+ |
+} // namespace app_mode |
+ |