| 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/download/download_status_updater.h" | 5 #include "chrome/browser/download/download_status_updater.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "chrome/browser/download/download_util.h" | |
| 12 | 11 |
| 13 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 12 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 14 #include "ui/linux_ui/linux_ui.h" | 13 #include "ui/linux_ui/linux_ui.h" |
| 15 #endif | 14 #endif |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 // DownloadStatusUpdater::UpdateAppIconDownloadProgress() expects to only be | 18 // DownloadStatusUpdater::UpdateAppIconDownloadProgress() expects to only be |
| 20 // called once when a DownloadItem completes, then not again (except perhaps | 19 // called once when a DownloadItem completes, then not again (except perhaps |
| 21 // until it is resumed). The existence of WasInProgressData is effectively a | 20 // until it is resumed). The existence of WasInProgressData is effectively a |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 float progress = 0; | 142 float progress = 0; |
| 144 int download_count = 0; | 143 int download_count = 0; |
| 145 GetProgress(&progress, &download_count); | 144 GetProgress(&progress, &download_count); |
| 146 linux_ui->SetDownloadCount(download_count); | 145 linux_ui->SetDownloadCount(download_count); |
| 147 linux_ui->SetProgressFraction(progress); | 146 linux_ui->SetProgressFraction(progress); |
| 148 } | 147 } |
| 149 #endif | 148 #endif |
| 150 // TODO(avi): Implement for Android? | 149 // TODO(avi): Implement for Android? |
| 151 } | 150 } |
| 152 #endif | 151 #endif |
| OLD | NEW |