| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 base::Bind(&CrxInstaller::OnInstallChecksComplete, this)); | 519 base::Bind(&CrxInstaller::OnInstallChecksComplete, this)); |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 | 522 |
| 523 void CrxInstaller::OnInstallChecksComplete(int failed_checks) { | 523 void CrxInstaller::OnInstallChecksComplete(int failed_checks) { |
| 524 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 524 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 525 if (!service_weak_) | 525 if (!service_weak_) |
| 526 return; | 526 return; |
| 527 | 527 |
| 528 // Check for requirement errors. | 528 // Check for requirement errors. |
| 529 if (!install_checker_->requirement_errors().empty()) { | 529 if (!install_checker_->requirements_error_message().empty()) { |
| 530 if (error_on_unsupported_requirements_) { | 530 if (error_on_unsupported_requirements_) { |
| 531 ReportFailureFromUIThread( | 531 ReportFailureFromUIThread(CrxInstallError( |
| 532 CrxInstallError(CrxInstallError::ERROR_DECLINED, | 532 CrxInstallError::ERROR_DECLINED, |
| 533 base::UTF8ToUTF16(base::JoinString( | 533 base::UTF8ToUTF16(install_checker_->requirements_error_message()))); |
| 534 install_checker_->requirement_errors(), " ")))); | |
| 535 return; | 534 return; |
| 536 } | 535 } |
| 537 install_flags_ |= kInstallFlagHasRequirementErrors; | 536 install_flags_ |= kInstallFlagHasRequirementErrors; |
| 538 } | 537 } |
| 539 | 538 |
| 540 // Check the blacklist state. | 539 // Check the blacklist state. |
| 541 if (install_checker_->blacklist_error() == PreloadCheck::BLACKLISTED_ID) { | 540 if (install_checker_->blacklist_error() == PreloadCheck::BLACKLISTED_ID) { |
| 542 install_flags_ |= kInstallFlagIsBlacklistedForMalware; | 541 install_flags_ |= kInstallFlagIsBlacklistedForMalware; |
| 543 } | 542 } |
| 544 | 543 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( | 906 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( |
| 908 service->profile(), extension()); | 907 service->profile(), extension()); |
| 909 client_->ShowDialog(base::Bind(&CrxInstaller::OnInstallPromptDone, this), | 908 client_->ShowDialog(base::Bind(&CrxInstaller::OnInstallPromptDone, this), |
| 910 extension(), nullptr, | 909 extension(), nullptr, |
| 911 base::MakeUnique<ExtensionInstallPrompt::Prompt>(type), | 910 base::MakeUnique<ExtensionInstallPrompt::Prompt>(type), |
| 912 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); | 911 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); |
| 913 } | 912 } |
| 914 } | 913 } |
| 915 | 914 |
| 916 } // namespace extensions | 915 } // namespace extensions |
| OLD | NEW |