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(this, dummy_extension_, &icon_, NULL); |
329 // Control flow finishes up in InstallUIProceed or InstallUIAbort. | 329 // Control flow finishes up in InstallUIProceed or InstallUIAbort. |
330 } | 330 } |
331 | 331 |
332 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( | 332 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( |
333 const std::string& id, | 333 const std::string& id, |
334 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, | 334 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, |
335 const std::string& error_message) { | 335 const std::string& error_message) { |
336 CHECK_EQ(id_, id); | 336 CHECK_EQ(id_, id); |
337 | 337 |
338 // Map from WebstoreInstallHelper's result codes to ours. | 338 // 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(); | 505 feature_checker_->CheckGPUFeatureAvailability(); |
506 return true; | 506 return true; |
507 } | 507 } |
508 | 508 |
509 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { | 509 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { |
510 CreateResult(feature_allowed); | 510 CreateResult(feature_allowed); |
511 SendResponse(true); | 511 SendResponse(true); |
512 } | 512 } |
513 | 513 |
514 } // namespace extensions | 514 } // namespace extensions |
OLD | NEW |