Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chrome/browser/extensions/webstore_installer.cc

Issue 1092963004: [chrome/browser/extensions] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_storage_monitor.cc ('k') | chrome/browser/extensions/zipfile_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698