OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "content/browser/download/download_status_updater.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/download/download_status_updater_delegate.h" | |
9 #include "chrome/browser/download/download_util.h" | 8 #include "chrome/browser/download/download_util.h" |
| 9 #include "content/browser/download/download_status_updater_delegate.h" |
10 | 10 |
11 DownloadStatusUpdater::DownloadStatusUpdater() { | 11 DownloadStatusUpdater::DownloadStatusUpdater() { |
12 } | 12 } |
13 | 13 |
14 DownloadStatusUpdater::~DownloadStatusUpdater() { | 14 DownloadStatusUpdater::~DownloadStatusUpdater() { |
15 } | 15 } |
16 | 16 |
17 void DownloadStatusUpdater::AddDelegate( | 17 void DownloadStatusUpdater::AddDelegate( |
18 DownloadStatusUpdaterDelegate* delegate) { | 18 DownloadStatusUpdaterDelegate* delegate) { |
19 delegates_.insert(delegate); | 19 delegates_.insert(delegate); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 int64 DownloadStatusUpdater::GetInProgressDownloadCount() { | 56 int64 DownloadStatusUpdater::GetInProgressDownloadCount() { |
57 int64 download_count = 0; | 57 int64 download_count = 0; |
58 for (DelegateSet::iterator i = delegates_.begin(); | 58 for (DelegateSet::iterator i = delegates_.begin(); |
59 i != delegates_.end(); ++i) { | 59 i != delegates_.end(); ++i) { |
60 download_count += (*i)->GetInProgressDownloadCount(); | 60 download_count += (*i)->GetInProgressDownloadCount(); |
61 } | 61 } |
62 | 62 |
63 return download_count; | 63 return download_count; |
64 } | 64 } |
OLD | NEW |