| Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
| index 6aae05497f1fa645c68d63aa4df6cf40d27514f2..8fa1fbf5e44cebbd9d93b4a55aa83e94aafd13ed 100644
|
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
| @@ -438,10 +438,12 @@ bool CompleteInstallFunction::RunImpl() {
|
| return false;
|
| }
|
|
|
| + AddRef();
|
| +
|
| // The extension will install through the normal extension install flow, but
|
| // the whitelist entry will bypass the normal permissions install dialog.
|
| scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
|
| - profile(), test_webstore_installer_delegate,
|
| + profile(), this,
|
| &(dispatcher()->delegate()->GetAssociatedWebContents()->GetController()),
|
| id, approval.Pass(), WebstoreInstaller::FLAG_NONE);
|
| installer->Start();
|
| @@ -449,6 +451,30 @@ bool CompleteInstallFunction::RunImpl() {
|
| return true;
|
| }
|
|
|
| +void CompleteInstallFunction::OnExtensionInstallSuccess(
|
| + const std::string& id) {
|
| + if (test_webstore_installer_delegate)
|
| + test_webstore_installer_delegate->OnExtensionInstallSuccess(id);
|
| +
|
| + SendResponse(true);
|
| +
|
| + // Matches the AddRef in RunImpl().
|
| + Release();
|
| +}
|
| +
|
| +void CompleteInstallFunction::OnExtensionInstallFailure(
|
| + const std::string& id, const std::string& error) {
|
| + if (test_webstore_installer_delegate)
|
| + test_webstore_installer_delegate->OnExtensionInstallFailure(id, error);
|
| +
|
| + error_ = error;
|
| + SendResponse(false);
|
| +
|
| + // Matches the AddRef in RunImpl().
|
| + Release();
|
| +}
|
| +
|
| +
|
| bool GetBrowserLoginFunction::RunImpl() {
|
| SetResult(CreateLoginResult(profile_->GetOriginalProfile()));
|
| return true;
|
|
|