OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/app_mode/app_mode_utils.h" | 5 #include "chrome/browser/app_mode/app_mode_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 if (kAllowed[i] == command_id) | 38 if (kAllowed[i] == command_id) |
39 return true; | 39 return true; |
40 } | 40 } |
41 | 41 |
42 return false; | 42 return false; |
43 } | 43 } |
44 | 44 |
45 bool IsRunningInAppMode() { | 45 bool IsRunningInAppMode() { |
46 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 46 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
47 return command_line->HasSwitch(switches::kKioskMode) || | 47 return command_line->HasSwitch(switches::kKioskMode) || |
48 IsRunningInForcedAppMode(); | 48 IsRunningInForcedAppMode(); |
49 } | 49 } |
50 | 50 |
51 bool IsRunningInForcedAppMode() { | 51 bool IsRunningInForcedAppMode() { |
52 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 52 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
53 return command_line->HasSwitch(switches::kForceAppMode) && | 53 return (command_line->HasSwitch(switches::kForceAppMode) && |
54 command_line->HasSwitch(switches::kAppId); | 54 command_line->HasSwitch(switches::kAppId)) || |
| 55 command_line->HasSwitch(switches::kForceAndroidAppMode); |
55 } | 56 } |
56 | 57 |
57 } // namespace chrome | 58 } // namespace chrome |
OLD | NEW |