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

Side by Side Diff: apps/launcher.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "apps/launcher.h" 5 #include "apps/launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 void LaunchPlatformAppWithCommandLine(Profile* profile, 308 void LaunchPlatformAppWithCommandLine(Profile* profile,
309 const Extension* extension, 309 const Extension* extension,
310 const CommandLine& command_line, 310 const CommandLine& command_line,
311 const base::FilePath& current_directory) { 311 const base::FilePath& current_directory) {
312 // An app with "kiosk_only" should not be installed and launched 312 // An app with "kiosk_only" should not be installed and launched
313 // outside of ChromeOS kiosk mode in the first place. This is a defensive 313 // outside of ChromeOS kiosk mode in the first place. This is a defensive
314 // check in case this scenario does occur. 314 // check in case this scenario does occur.
315 if (extensions::KioskModeInfo::IsKioskOnly(extension)) { 315 if (extensions::KioskModeInfo::IsKioskOnly(extension)) {
316 bool in_kiosk_mode = false; 316 bool in_kiosk_mode = false;
317 #if defined(OS_CHROMEOS) 317 #if defined(OS_CHROMEOS)
318 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 318 chromeos::UserManager* user_manager = chromeos::GetUserManager();
319 in_kiosk_mode = user_manager && user_manager->IsLoggedInAsKioskApp(); 319 in_kiosk_mode = user_manager && user_manager->IsLoggedInAsKioskApp();
320 #endif 320 #endif
321 if (!in_kiosk_mode) { 321 if (!in_kiosk_mode) {
322 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " 322 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in "
323 << " ChromeOS kiosk mode."; 323 << " ChromeOS kiosk mode.";
324 NOTREACHED(); 324 NOTREACHED();
325 return; 325 return;
326 } 326 }
327 } 327 }
328 328
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 void LaunchPlatformAppWithUrl(Profile* profile, 400 void LaunchPlatformAppWithUrl(Profile* profile,
401 const Extension* extension, 401 const Extension* extension,
402 const std::string& handler_id, 402 const std::string& handler_id,
403 const GURL& url, 403 const GURL& url,
404 const GURL& referrer_url) { 404 const GURL& referrer_url) {
405 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl( 405 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl(
406 profile, extension, handler_id, url, referrer_url); 406 profile, extension, handler_id, url, referrer_url);
407 } 407 }
408 408
409 } // namespace apps 409 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698