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

Side by Side Diff: chrome/browser/extensions/crx_installer.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 561
562 void CrxInstaller::ConfirmInstall() { 562 void CrxInstaller::ConfirmInstall() {
563 DCHECK_CURRENTLY_ON(BrowserThread::UI); 563 DCHECK_CURRENTLY_ON(BrowserThread::UI);
564 ExtensionService* service = service_weak_.get(); 564 ExtensionService* service = service_weak_.get();
565 if (!service || service->browser_terminating()) 565 if (!service || service->browser_terminating())
566 return; 566 return;
567 567
568 if (KioskModeInfo::IsKioskOnly(installer_.extension())) { 568 if (KioskModeInfo::IsKioskOnly(installer_.extension())) {
569 bool in_kiosk_mode = false; 569 bool in_kiosk_mode = false;
570 #if defined(OS_CHROMEOS) 570 #if defined(OS_CHROMEOS)
571 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 571 chromeos::UserManager* user_manager = chromeos::GetUserManager();
572 in_kiosk_mode = user_manager && user_manager->IsLoggedInAsKioskApp(); 572 in_kiosk_mode = user_manager && user_manager->IsLoggedInAsKioskApp();
573 #endif 573 #endif
574 if (!in_kiosk_mode) { 574 if (!in_kiosk_mode) {
575 ReportFailureFromUIThread(CrxInstallerError( 575 ReportFailureFromUIThread(CrxInstallerError(
576 l10n_util::GetStringUTF16( 576 l10n_util::GetStringUTF16(
577 IDS_EXTENSION_INSTALL_KIOSK_MODE_ONLY))); 577 IDS_EXTENSION_INSTALL_KIOSK_MODE_ONLY)));
578 return; 578 return;
579 } 579 }
580 } 580 }
581 581
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) 898 if (!prefs->DidExtensionEscalatePermissions(extension()->id()))
899 return; 899 return;
900 900
901 if (client_) { 901 if (client_) {
902 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). 902 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort().
903 client_->ConfirmReEnable(this, extension()); 903 client_->ConfirmReEnable(this, extension());
904 } 904 }
905 } 905 }
906 906
907 } // namespace extensions 907 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698