| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 for (size_t i = 0; i < arraysize(kAllowed); ++i) { | 33 for (size_t i = 0; i < arraysize(kAllowed); ++i) { |
| 34 if (kAllowed[i] == command_id) | 34 if (kAllowed[i] == command_id) |
| 35 return true; | 35 return true; |
| 36 } | 36 } |
| 37 | 37 |
| 38 return false; | 38 return false; |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool IsRunningInAppMode() { | 41 bool IsRunningInAppMode() { |
| 42 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 42 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 43 return command_line->HasSwitch(switches::kKioskMode) || | 43 return command_line->HasSwitch(switches::kKioskMode) || |
| 44 IsRunningInForcedAppMode(); | 44 IsRunningInForcedAppMode(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 bool IsRunningInForcedAppMode() { | 47 bool IsRunningInForcedAppMode() { |
| 48 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 48 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 49 return command_line->HasSwitch(switches::kForceAppMode) && | 49 return command_line->HasSwitch(switches::kForceAppMode) && |
| 50 command_line->HasSwitch(switches::kAppId); | 50 command_line->HasSwitch(switches::kAppId); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace chrome | 53 } // namespace chrome |
| OLD | NEW |