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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 months 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 "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
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
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698