| OLD | NEW |
| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 Release(); // Balanced in CheckRequirements(). | 420 Release(); // Balanced in CheckRequirements(). |
| 421 if (!requirement_errors.empty()) { | 421 if (!requirement_errors.empty()) { |
| 422 if (error_on_unsupported_requirements_) { | 422 if (error_on_unsupported_requirements_) { |
| 423 ReportFailureFromUIThread(CrxInstallerError( | 423 ReportFailureFromUIThread(CrxInstallerError( |
| 424 UTF8ToUTF16(JoinString(requirement_errors, ' ')))); | 424 UTF8ToUTF16(JoinString(requirement_errors, ' ')))); |
| 425 return; | 425 return; |
| 426 } | 426 } |
| 427 has_requirement_errors_ = true; | 427 has_requirement_errors_ = true; |
| 428 } | 428 } |
| 429 | 429 |
| 430 #if defined(ENABLE_MANAGED_USERS) | 430 #if defined(ENABLE_MANAGED_USERS) && !defined(OS_CHROMEOS) |
| 431 // Check whether the profile is managed. | 431 // Check whether the profile is managed. |
| 432 ManagedUserService* service = | 432 ManagedUserService* service = |
| 433 ManagedUserServiceFactory::GetForProfile(profile_); | 433 ManagedUserServiceFactory::GetForProfile(profile_); |
| 434 if (service->ProfileIsManaged()) { | 434 if (service->ProfileIsManaged()) { |
| 435 // Extensions which should be installed by policy are installed without | 435 // Extensions which should be installed by policy are installed without |
| 436 // using the ExtensionInstallPrompt. In that case, |client_| is NULL. | 436 // using the ExtensionInstallPrompt. In that case, |client_| is NULL. |
| 437 if (client_ == NULL) { | 437 if (client_ == NULL) { |
| 438 // Automatically set authorization | 438 // Automatically set authorization |
| 439 OnAuthorizationResult(true); | 439 OnAuthorizationResult(true); |
| 440 return; | 440 return; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 if (!prefs->DidExtensionEscalatePermissions(extension_->id())) | 813 if (!prefs->DidExtensionEscalatePermissions(extension_->id())) |
| 814 return; | 814 return; |
| 815 | 815 |
| 816 if (client_) { | 816 if (client_) { |
| 817 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). | 817 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). |
| 818 client_->ConfirmReEnable(this, extension_.get()); | 818 client_->ConfirmReEnable(this, extension_.get()); |
| 819 } | 819 } |
| 820 } | 820 } |
| 821 | 821 |
| 822 } // namespace extensions | 822 } // namespace extensions |
| OLD | NEW |