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 <stddef.h> |
| 8 |
8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
10 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
11 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
12 | 14 |
13 namespace chrome { | 15 namespace chrome { |
14 | 16 |
15 bool IsCommandAllowedInAppMode(int command_id) { | 17 bool IsCommandAllowedInAppMode(int command_id) { |
16 DCHECK(IsRunningInForcedAppMode()); | 18 DCHECK(IsRunningInForcedAppMode()); |
17 | 19 |
18 const int kAllowed[] = { | 20 const int kAllowed[] = { |
19 IDC_BACK, | 21 IDC_BACK, |
(...skipping 24 matching lines...) Expand all Loading... |
44 IsRunningInForcedAppMode(); | 46 IsRunningInForcedAppMode(); |
45 } | 47 } |
46 | 48 |
47 bool IsRunningInForcedAppMode() { | 49 bool IsRunningInForcedAppMode() { |
48 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 50 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
49 return command_line->HasSwitch(switches::kForceAppMode) && | 51 return command_line->HasSwitch(switches::kForceAppMode) && |
50 command_line->HasSwitch(switches::kAppId); | 52 command_line->HasSwitch(switches::kAppId); |
51 } | 53 } |
52 | 54 |
53 } // namespace chrome | 55 } // namespace chrome |
OLD | NEW |