Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/app_mode/app_mode_utils.cc

Issue 2498613003: Add ARC++ kiosk menu items and ability to start kiosk session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments + unit test build fix. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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() || IsRunningInForcedAndroidAppMode();
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 } 55 }
56 56
57 bool IsRunningInForcedAndroidAppMode() {
xiyuan 2016/11/15 16:56:25 Do we need to differentiate this from IsRunningInF
Sergey Poromov 2016/11/16 15:06:21 Looks like there is no difference right now. If yo
xiyuan 2016/11/16 17:28:55 Thanks.
58 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
59 return command_line->HasSwitch(switches::kForceAndroidAppMode);
60 }
61
57 } // namespace chrome 62 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698