OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/common/switch_utils.h" | 5 #include "chrome/common/switch_utils.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
9 | 9 |
10 namespace switches { | 10 namespace switches { |
(...skipping 12 matching lines...) Expand all Loading... |
23 switches::kNoStartupWindow, | 23 switches::kNoStartupWindow, |
24 switches::kRestoreLastSession | 24 switches::kRestoreLastSession |
25 }; | 25 }; |
26 | 26 |
27 void RemoveSwitchesForAutostart( | 27 void RemoveSwitchesForAutostart( |
28 std::map<std::string, CommandLine::StringType>* switch_list) { | 28 std::map<std::string, CommandLine::StringType>* switch_list) { |
29 for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i) | 29 for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i) |
30 switch_list->erase(kSwitchesToRemoveOnAutorestart[i]); | 30 switch_list->erase(kSwitchesToRemoveOnAutorestart[i]); |
31 } | 31 } |
32 | 32 |
| 33 bool IsRunningInAppMode() { |
| 34 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 35 return command_line->HasSwitch(switches::kKioskMode) || |
| 36 (command_line->HasSwitch(switches::kForceAppMode) && |
| 37 command_line->HasSwitch(switches::kAppId)); |
| 38 } |
| 39 |
33 } // namespace switches | 40 } // namespace switches |
OLD | NEW |