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 // Holds helpers for gathering UMA stats about downloads. | 5 // Holds helpers for gathering UMA stats about downloads. |
6 | 6 |
7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 SAVE_PACKAGE_WRITE_TO_COMPLETED, | 211 SAVE_PACKAGE_WRITE_TO_COMPLETED, |
212 | 212 |
213 // The save package tried to write to an already failed file. | 213 // The save package tried to write to an already failed file. |
214 SAVE_PACKAGE_WRITE_TO_FAILED, | 214 SAVE_PACKAGE_WRITE_TO_FAILED, |
215 | 215 |
216 SAVE_PACKAGE_LAST_ENTRY | 216 SAVE_PACKAGE_LAST_ENTRY |
217 }; | 217 }; |
218 | 218 |
219 void RecordSavePackageEvent(SavePackageEvent event); | 219 void RecordSavePackageEvent(SavePackageEvent event); |
220 | 220 |
| 221 enum OriginStateOnResumption { |
| 222 ORIGIN_STATE_ON_RESUMPTION_ADDITIONAL_REDIRECTS = 1<<0, |
| 223 ORIGIN_STATE_ON_RESUMPTION_VALIDATORS_CHANGED = 1<<1, |
| 224 ORIGIN_STATE_ON_RESUMPTION_CONTENT_DISPOSITION_CHANGED = 1<<2, |
| 225 ORIGIN_STATE_ON_RESUMPTION_MAX = 1<<3 |
| 226 }; |
| 227 |
| 228 // Record the state of the origin information across a download resumption |
| 229 // request. |state| is a combination of values from OriginStateOnResumption |
| 230 // enum. |
| 231 void RecordOriginStateOnResumption(bool is_partial, |
| 232 int state); |
| 233 |
221 } // namespace content | 234 } // namespace content |
222 | 235 |
223 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 236 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |