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_installer.h" | 5 #include "chrome/browser/extensions/webstore_installer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 UMA_HISTOGRAM_TIMES("Extensions.WebstoreDownload.FileDownload", | 723 UMA_HISTOGRAM_TIMES("Extensions.WebstoreDownload.FileDownload", |
724 download.GetEndTime() - download.GetStartTime()); | 724 download.GetEndTime() - download.GetStartTime()); |
725 } | 725 } |
726 ExtensionService* service = ExtensionSystem::Get(profile_)-> | 726 ExtensionService* service = ExtensionSystem::Get(profile_)-> |
727 extension_service(); | 727 extension_service(); |
728 CHECK(service); | 728 CHECK(service); |
729 | 729 |
730 const Approval* approval = GetAssociatedApproval(download); | 730 const Approval* approval = GetAssociatedApproval(download); |
731 DCHECK(approval); | 731 DCHECK(approval); |
732 | 732 |
| 733 #if defined(OS_ANDROID) |
| 734 NOTIMPLEMENTED(); |
| 735 #else |
733 crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download); | 736 crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download); |
734 | 737 |
735 crx_installer_->set_expected_id(approval->extension_id); | 738 crx_installer_->set_expected_id(approval->extension_id); |
736 crx_installer_->set_is_gallery_install(true); | 739 crx_installer_->set_is_gallery_install(true); |
737 crx_installer_->set_allow_silent_install(true); | 740 crx_installer_->set_allow_silent_install(true); |
738 | 741 |
739 crx_installer_->InstallCrx(download.GetFullPath()); | 742 crx_installer_->InstallCrx(download.GetFullPath()); |
| 743 #endif |
740 } | 744 } |
741 | 745 |
742 void WebstoreInstaller::ReportFailure(const std::string& error, | 746 void WebstoreInstaller::ReportFailure(const std::string& error, |
743 FailureReason reason) { | 747 FailureReason reason) { |
744 if (delegate_) { | 748 if (delegate_) { |
745 delegate_->OnExtensionInstallFailure(id_, error, reason); | 749 delegate_->OnExtensionInstallFailure(id_, error, reason); |
746 delegate_ = NULL; | 750 delegate_ = NULL; |
747 } | 751 } |
748 | 752 |
749 extensions::InstallTracker* tracker = | 753 extensions::InstallTracker* tracker = |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 1, | 787 1, |
784 kMaxSizeKb, | 788 kMaxSizeKb, |
785 kNumBuckets); | 789 kNumBuckets); |
786 } | 790 } |
787 UMA_HISTOGRAM_BOOLEAN( | 791 UMA_HISTOGRAM_BOOLEAN( |
788 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 792 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
789 total_bytes <= 0); | 793 total_bytes <= 0); |
790 } | 794 } |
791 | 795 |
792 } // namespace extensions | 796 } // namespace extensions |
OLD | NEW |