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

Side by Side Diff: chrome/browser/extensions/crx_installer.cc

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: minor test cleanup Created 3 years, 8 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
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 #include <utility> 9 #include <utility>
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698