| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 void CrxInstaller::OnInstallChecksComplete(int failed_checks) { | 529 void CrxInstaller::OnInstallChecksComplete(int failed_checks) { |
| 530 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 530 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 531 if (!service_weak_) | 531 if (!service_weak_) |
| 532 return; | 532 return; |
| 533 | 533 |
| 534 // Check for requirement errors. | 534 // Check for requirement errors. |
| 535 if (!install_checker_.requirement_errors().empty()) { | 535 if (!install_checker_.requirement_errors().empty()) { |
| 536 if (error_on_unsupported_requirements_) { | 536 if (error_on_unsupported_requirements_) { |
| 537 ReportFailureFromUIThread( | 537 ReportFailureFromUIThread( |
| 538 CrxInstallError(CrxInstallError::ERROR_DECLINED, | 538 CrxInstallError(CrxInstallError::ERROR_DECLINED, |
| 539 base::UTF8ToUTF16(JoinString( | 539 base::UTF8ToUTF16(base::JoinString( |
| 540 install_checker_.requirement_errors(), ' ')))); | 540 install_checker_.requirement_errors(), " ")))); |
| 541 return; | 541 return; |
| 542 } | 542 } |
| 543 install_flags_ |= kInstallFlagHasRequirementErrors; | 543 install_flags_ |= kInstallFlagHasRequirementErrors; |
| 544 } | 544 } |
| 545 | 545 |
| 546 // Check the blacklist state. | 546 // Check the blacklist state. |
| 547 if (install_checker_.blacklist_state() == extensions::BLACKLISTED_MALWARE) { | 547 if (install_checker_.blacklist_state() == extensions::BLACKLISTED_MALWARE) { |
| 548 install_flags_ |= kInstallFlagIsBlacklistedForMalware; | 548 install_flags_ |= kInstallFlagIsBlacklistedForMalware; |
| 549 } | 549 } |
| 550 | 550 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) | 907 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) |
| 908 return; | 908 return; |
| 909 | 909 |
| 910 if (client_) { | 910 if (client_) { |
| 911 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). | 911 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). |
| 912 client_->ConfirmReEnable(this, extension()); | 912 client_->ConfirmReEnable(this, extension()); |
| 913 } | 913 } |
| 914 } | 914 } |
| 915 | 915 |
| 916 } // namespace extensions | 916 } // namespace extensions |
| OLD | NEW |