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

Unified Diff: chrome/browser/extensions/webstore_standalone_installer.cc

Issue 384823002: Introduce a stable set of errors for inline install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace printf with vlog(1) in unrelated code so it passes presubmit Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/webstore_standalone_installer.cc
diff --git a/chrome/browser/extensions/webstore_standalone_installer.cc b/chrome/browser/extensions/webstore_standalone_installer.cc
index 9eba52f7de5edc7d77bd167f484c1d32f26e7066..54d8d421f47fe7b4127cf247fd5b171b4a39acef 100644
--- a/chrome/browser/extensions/webstore_standalone_installer.cc
+++ b/chrome/browser/extensions/webstore_standalone_installer.cc
@@ -59,7 +59,7 @@ void WebstoreStandaloneInstaller::BeginInstall() {
return;
}
- webstore_install::Result result = webstore_install::UNKNOWN_ERROR;
+ webstore_install::Result result = webstore_install::OTHER_ERROR;
std::string error;
if (!EnsureUniqueInstall(&result, &error)) {
CompleteInstall(result, error);
@@ -124,7 +124,7 @@ void WebstoreStandaloneInstaller::CompleteInstall(
const std::string& error) {
scoped_active_install_.reset();
if (!callback_.is_null())
- callback_.Run(result == webstore_install::SUCCESS, error);
+ callback_.Run(result == webstore_install::SUCCESS, error, result);
Release(); // Matches the AddRef in BeginInstall.
}
@@ -306,7 +306,7 @@ void WebstoreStandaloneInstaller::OnWebstoreParseFailure(
const std::string& id,
InstallHelperResultCode result_code,
const std::string& error_message) {
- webstore_install::Result install_result = webstore_install::UNKNOWN_ERROR;
+ webstore_install::Result install_result = webstore_install::OTHER_ERROR;
switch (result_code) {
case WebstoreInstallHelper::Delegate::MANIFEST_ERROR:
install_result = webstore_install::INVALID_MANIFEST;
@@ -400,7 +400,7 @@ void WebstoreStandaloneInstaller::OnExtensionInstallFailure(
WebstoreInstaller::FailureReason reason) {
CHECK_EQ(id_, id);
- webstore_install::Result install_result = webstore_install::UNKNOWN_ERROR;
+ webstore_install::Result install_result = webstore_install::OTHER_ERROR;
switch (reason) {
case WebstoreInstaller::FAILURE_REASON_CANCELLED:
install_result = webstore_install::USER_CANCELLED;

Powered by Google App Engine
This is Rietveld 408576698