| OLD | NEW |
| 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/webstore_standalone_installer.h" | 5 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 install_result = kExtensionIsBlacklisted; | 245 install_result = kExtensionIsBlacklisted; |
| 246 } | 246 } |
| 247 } // else extension is installed and enabled; no work to be done. | 247 } // else extension is installed and enabled; no work to be done. |
| 248 CompleteInstall(install_result); | 248 CompleteInstall(install_result); |
| 249 return; | 249 return; |
| 250 } | 250 } |
| 251 | 251 |
| 252 scoped_ptr<WebstoreInstaller::Approval> approval = CreateApproval(); | 252 scoped_ptr<WebstoreInstaller::Approval> approval = CreateApproval(); |
| 253 | 253 |
| 254 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( | 254 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( |
| 255 profile_, | 255 profile_, this, GetWebContents(), id_, approval.Pass(), install_source_); |
| 256 this, | |
| 257 &(GetWebContents()->GetController()), | |
| 258 id_, | |
| 259 approval.Pass(), | |
| 260 install_source_); | |
| 261 installer->Start(); | 256 installer->Start(); |
| 262 } | 257 } |
| 263 | 258 |
| 264 void WebstoreStandaloneInstaller::InstallUIAbort(bool user_initiated) { | 259 void WebstoreStandaloneInstaller::InstallUIAbort(bool user_initiated) { |
| 265 CompleteInstall(kUserCancelledError); | 260 CompleteInstall(kUserCancelledError); |
| 266 Release(); // Balanced in ShowInstallUI. | 261 Release(); // Balanced in ShowInstallUI. |
| 267 } | 262 } |
| 268 | 263 |
| 269 void WebstoreStandaloneInstaller::OnExtensionInstallSuccess( | 264 void WebstoreStandaloneInstaller::OnExtensionInstallSuccess( |
| 270 const std::string& id) { | 265 const std::string& id) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via | 316 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via |
| 322 // OnExtensionInstallSuccess or OnExtensionInstallFailure. | 317 // OnExtensionInstallSuccess or OnExtensionInstallFailure. |
| 323 AddRef(); | 318 AddRef(); |
| 324 | 319 |
| 325 install_ui_ = CreateInstallUI(); | 320 install_ui_ = CreateInstallUI(); |
| 326 install_ui_->ConfirmStandaloneInstall( | 321 install_ui_->ConfirmStandaloneInstall( |
| 327 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); | 322 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); |
| 328 } | 323 } |
| 329 | 324 |
| 330 } // namespace extensions | 325 } // namespace extensions |
| OLD | NEW |