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

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

Issue 546523002: Improve error messaging with shared module import failures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (imported_module && 487 if (imported_module &&
488 !SharedModuleInfo::IsSharedModule(imported_module)) { 488 !SharedModuleInfo::IsSharedModule(imported_module)) {
489 ReportFailureFromUIThread( 489 ReportFailureFromUIThread(
490 CrxInstallerError(l10n_util::GetStringFUTF16( 490 CrxInstallerError(l10n_util::GetStringFUTF16(
491 IDS_EXTENSION_INSTALL_DEPENDENCY_NOT_SHARED_MODULE, 491 IDS_EXTENSION_INSTALL_DEPENDENCY_NOT_SHARED_MODULE,
492 base::ASCIIToUTF16(i->extension_id)))); 492 base::ASCIIToUTF16(i->extension_id))));
493 return; 493 return;
494 } else if (imported_module && 494 } else if (imported_module &&
495 !SharedModuleInfo::IsExportAllowedByWhitelist(imported_module, 495 !SharedModuleInfo::IsExportAllowedByWhitelist(imported_module,
496 extension()->id())) { 496 extension()->id())) {
497 ReportFailureFromUIThread( 497 ReportFailureFromUIThread(CrxInstallerError(l10n_util::GetStringFUTF16(
498 CrxInstallerError(l10n_util::GetStringFUTF16( 498 IDS_EXTENSION_INSTALL_DEPENDENCY_NOT_WHITELISTED,
499 IDS_EXTENSION_INSTALL_DEPENDENCY_NOT_WHITELISTED, 499 base::UTF8ToUTF16(extension()->name()),
500 base::ASCIIToUTF16(i->extension_id)))); 500 base::UTF8ToUTF16(imported_module->name()))));
501 return; 501 return;
502 } 502 }
503 } 503 }
504 } 504 }
505 505
506 // Run the policy, requirements and blacklist checks in parallel. 506 // Run the policy, requirements and blacklist checks in parallel.
507 install_checker_.Start( 507 install_checker_.Start(
508 ExtensionInstallChecker::CHECK_ALL, 508 ExtensionInstallChecker::CHECK_ALL,
509 false /* fail fast */, 509 false /* fail fast */,
510 base::Bind(&CrxInstaller::OnInstallChecksComplete, this)); 510 base::Bind(&CrxInstaller::OnInstallChecksComplete, this));
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) 890 if (!prefs->DidExtensionEscalatePermissions(extension()->id()))
891 return; 891 return;
892 892
893 if (client_) { 893 if (client_) {
894 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). 894 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort().
895 client_->ConfirmReEnable(this, extension()); 895 client_->ConfirmReEnable(this, extension());
896 } 896 }
897 } 897 }
898 898
899 } // namespace extensions 899 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698