| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Download utilities. | 5 // Download utilities. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 // Update the application icon to indicate overall download progress. | 160 // Update the application icon to indicate overall download progress. |
| 161 // |download_count| is the number of downloads currently in progress. If | 161 // |download_count| is the number of downloads currently in progress. If |
| 162 // |progress_known| is false, then at least one download is of indeterminate | 162 // |progress_known| is false, then at least one download is of indeterminate |
| 163 // size and |progress| is invalid, otherwise |progress| indicates the overall | 163 // size and |progress| is invalid, otherwise |progress| indicates the overall |
| 164 // download progress (float value from 0..1). | 164 // download progress (float value from 0..1). |
| 165 void UpdateAppIconDownloadProgress(int download_count, | 165 void UpdateAppIconDownloadProgress(int download_count, |
| 166 bool progress_known, | 166 bool progress_known, |
| 167 float progress); | 167 float progress); |
| 168 | 168 |
| 169 // Appends the passed the number between parenthesis the path before the |
| 170 // extension. |
| 171 void AppendNumberToPath(FilePath* path, int number); |
| 172 |
| 173 // Attempts to find a number that can be appended to that path to make it |
| 174 // unique. If |path| does not exist, 0 is returned. If it fails to find such |
| 175 // a number, -1 is returned. |
| 176 int GetUniquePathNumber(const FilePath& path); |
| 177 |
| 169 } // namespace download_util | 178 } // namespace download_util |
| 170 | 179 |
| 171 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ | 180 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ |
| OLD | NEW |