| Index: chrome/browser/extensions/tab_helper.cc
|
| diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
|
| index 52b7656aea8fc58a077adba8575fb31723374270..1d1433a451e54e2d7aa00421a6d6a6f131eecddf 100644
|
| --- a/chrome/browser/extensions/tab_helper.cc
|
| +++ b/chrome/browser/extensions/tab_helper.cc
|
| @@ -245,13 +245,15 @@ void TabHelper::OnInlineWebstoreInstall(
|
| int return_route_id,
|
| const std::string& webstore_item_id,
|
| const GURL& requestor_url) {
|
| + WebstoreInlineInstaller::Callback callback =
|
| + base::Bind(&TabHelper::OnInlineInstallComplete, base::Unretained(this),
|
| + install_id, return_route_id);
|
| scoped_refptr<WebstoreInlineInstaller> installer(new WebstoreInlineInstaller(
|
| web_contents(),
|
| - install_id,
|
| - return_route_id,
|
| webstore_item_id,
|
| + true,
|
| requestor_url,
|
| - this));
|
| + callback));
|
| installer->BeginInstall();
|
| }
|
|
|
| @@ -401,16 +403,17 @@ WindowController* TabHelper::GetExtensionWindowController() const {
|
| return ExtensionTabUtil::GetWindowControllerOfTab(web_contents());
|
| }
|
|
|
| -void TabHelper::OnInlineInstallSuccess(int install_id, int return_route_id) {
|
| - Send(new ExtensionMsg_InlineWebstoreInstallResponse(
|
| - return_route_id, install_id, true, ""));
|
| -}
|
| -
|
| -void TabHelper::OnInlineInstallFailure(int install_id,
|
| - int return_route_id,
|
| - const std::string& error) {
|
| - Send(new ExtensionMsg_InlineWebstoreInstallResponse(
|
| - return_route_id, install_id, false, error));
|
| +void TabHelper::OnInlineInstallComplete(int install_id,
|
| + int return_route_id,
|
| + bool success,
|
| + const std::string& error) {
|
| + if (success) {
|
| + Send(new ExtensionMsg_InlineWebstoreInstallResponse(
|
| + return_route_id, install_id, true, ""));
|
| + } else {
|
| + Send(new ExtensionMsg_InlineWebstoreInstallResponse(
|
| + return_route_id, install_id, false, error));
|
| + }
|
| }
|
|
|
| WebContents* TabHelper::GetAssociatedWebContents() const {
|
|
|