Chromium Code Reviews| 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/api/webstore_private/webstore_private_api.h" | 5 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 &error); | 318 &error); |
| 319 | 319 |
| 320 if (!dummy_extension_) { | 320 if (!dummy_extension_) { |
| 321 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, | 321 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, |
| 322 kInvalidManifestError); | 322 kInvalidManifestError); |
| 323 return; | 323 return; |
| 324 } | 324 } |
| 325 | 325 |
| 326 install_prompt_.reset( | 326 install_prompt_.reset( |
| 327 chrome::CreateExtensionInstallPromptWithBrowser(GetCurrentBrowser())); | 327 chrome::CreateExtensionInstallPromptWithBrowser(GetCurrentBrowser())); |
| 328 install_prompt_->ConfirmWebstoreInstall(this, dummy_extension_, &icon_); | 328 install_prompt_->ConfirmWebstoreInstall( |
| 329 this, | |
| 330 dummy_extension_, | |
| 331 &icon_, | |
| 332 ExtensionInstallDialog::CreateDefaultImpl()); | |
|
Aaron Boodman
2012/10/11 01:57:57
Can you make it so you can just pass NULL here and
sail
2012/10/11 02:32:16
Done.
| |
| 329 // Control flow finishes up in InstallUIProceed or InstallUIAbort. | 333 // Control flow finishes up in InstallUIProceed or InstallUIAbort. |
| 330 } | 334 } |
| 331 | 335 |
| 332 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( | 336 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( |
| 333 const std::string& id, | 337 const std::string& id, |
| 334 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, | 338 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, |
| 335 const std::string& error_message) { | 339 const std::string& error_message) { |
| 336 CHECK_EQ(id_, id); | 340 CHECK_EQ(id_, id); |
| 337 | 341 |
| 338 // Map from WebstoreInstallHelper's result codes to ours. | 342 // Map from WebstoreInstallHelper's result codes to ours. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 505 feature_checker_->CheckGPUFeatureAvailability(); | 509 feature_checker_->CheckGPUFeatureAvailability(); |
| 506 return true; | 510 return true; |
| 507 } | 511 } |
| 508 | 512 |
| 509 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { | 513 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { |
| 510 CreateResult(feature_allowed); | 514 CreateResult(feature_allowed); |
| 511 SendResponse(true); | 515 SendResponse(true); |
| 512 } | 516 } |
| 513 | 517 |
| 514 } // namespace extensions | 518 } // namespace extensions |
| OLD | NEW |