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

Side by Side Diff: chrome/browser/download/download_status_updater.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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/download/download_status_updater.h" 5 #include "chrome/browser/download/download_status_updater.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 const char WasInProgressData::kKey[] = 50 const char WasInProgressData::kKey[] =
51 "DownloadItem DownloadStatusUpdater WasInProgressData"; 51 "DownloadItem DownloadStatusUpdater WasInProgressData";
52 52
53 } // anonymous namespace 53 } // anonymous namespace
54 54
55 DownloadStatusUpdater::DownloadStatusUpdater() { 55 DownloadStatusUpdater::DownloadStatusUpdater() {
56 } 56 }
57 57
58 DownloadStatusUpdater::~DownloadStatusUpdater() { 58 DownloadStatusUpdater::~DownloadStatusUpdater() {
59 STLDeleteElements(&notifiers_); 59 base::STLDeleteElements(&notifiers_);
60 } 60 }
61 61
62 bool DownloadStatusUpdater::GetProgress(float* progress, 62 bool DownloadStatusUpdater::GetProgress(float* progress,
63 int* download_count) const { 63 int* download_count) const {
64 *progress = 0; 64 *progress = 0;
65 *download_count = 0; 65 *download_count = 0;
66 bool progress_certain = true; 66 bool progress_certain = true;
67 int64_t received_bytes = 0; 67 int64_t received_bytes = 0;
68 int64_t total_bytes = 0; 68 int64_t total_bytes = 0;
69 69
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 float progress = 0; 146 float progress = 0;
147 int download_count = 0; 147 int download_count = 0;
148 GetProgress(&progress, &download_count); 148 GetProgress(&progress, &download_count);
149 linux_ui->SetDownloadCount(download_count); 149 linux_ui->SetDownloadCount(download_count);
150 linux_ui->SetProgressFraction(progress); 150 linux_ui->SetProgressFraction(progress);
151 } 151 }
152 #endif 152 #endif
153 // TODO(avi): Implement for Android? 153 // TODO(avi): Implement for Android?
154 } 154 }
155 #endif 155 #endif
OLDNEW
« no previous file with comments | « chrome/browser/download/download_request_limiter.cc ('k') | chrome/browser/download/download_status_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698