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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 FROM_HERE, | 691 FROM_HERE, |
692 base::TimeDelta::FromSeconds(kTimeRemainingMinutesThreshold), | 692 base::TimeDelta::FromSeconds(kTimeRemainingMinutesThreshold), |
693 this, | 693 this, |
694 &WebstoreInstaller::UpdateDownloadProgress); | 694 &WebstoreInstaller::UpdateDownloadProgress); |
695 } else { | 695 } else { |
696 download_progress_timer_.Stop(); | 696 download_progress_timer_.Stop(); |
697 } | 697 } |
698 } | 698 } |
699 | 699 |
700 void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { | 700 void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { |
701 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 701 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
702 DCHECK(!crx_installer_.get()); | 702 DCHECK(!crx_installer_.get()); |
703 | 703 |
704 // The clock may be backward, e.g. daylight savings time just happenned. | 704 // The clock may be backward, e.g. daylight savings time just happenned. |
705 if (download.GetEndTime() >= download.GetStartTime()) { | 705 if (download.GetEndTime() >= download.GetStartTime()) { |
706 UMA_HISTOGRAM_TIMES("Extensions.WebstoreDownload.FileDownload", | 706 UMA_HISTOGRAM_TIMES("Extensions.WebstoreDownload.FileDownload", |
707 download.GetEndTime() - download.GetStartTime()); | 707 download.GetEndTime() - download.GetStartTime()); |
708 } | 708 } |
709 ExtensionService* service = ExtensionSystem::Get(profile_)-> | 709 ExtensionService* service = ExtensionSystem::Get(profile_)-> |
710 extension_service(); | 710 extension_service(); |
711 CHECK(service); | 711 CHECK(service); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 1, | 766 1, |
767 kMaxSizeKb, | 767 kMaxSizeKb, |
768 kNumBuckets); | 768 kNumBuckets); |
769 } | 769 } |
770 UMA_HISTOGRAM_BOOLEAN( | 770 UMA_HISTOGRAM_BOOLEAN( |
771 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 771 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
772 total_bytes <= 0); | 772 total_bytes <= 0); |
773 } | 773 } |
774 | 774 |
775 } // namespace extensions | 775 } // namespace extensions |
OLD | NEW |