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

Side by Side Diff: content/browser/download/download_item.h

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 std::string original_mime_type() const { return original_mime_type_; } 272 std::string original_mime_type() const { return original_mime_type_; }
273 std::string referrer_charset() const { return referrer_charset_; } 273 std::string referrer_charset() const { return referrer_charset_; }
274 int64 total_bytes() const { return total_bytes_; } 274 int64 total_bytes() const { return total_bytes_; }
275 void set_total_bytes(int64 total_bytes) { 275 void set_total_bytes(int64 total_bytes) {
276 total_bytes_ = total_bytes; 276 total_bytes_ = total_bytes;
277 } 277 }
278 int64 received_bytes() const { return received_bytes_; } 278 int64 received_bytes() const { return received_bytes_; }
279 int32 id() const { return download_id_; } 279 int32 id() const { return download_id_; }
280 DownloadId global_id() const; 280 DownloadId global_id() const;
281 base::Time start_time() const { return start_time_; } 281 base::Time start_time() const { return start_time_; }
282 base::Time end_time() const { return end_time_; }
282 void set_db_handle(int64 handle) { db_handle_ = handle; } 283 void set_db_handle(int64 handle) { db_handle_ = handle; }
283 int64 db_handle() const { return db_handle_; } 284 int64 db_handle() const { return db_handle_; }
284 DownloadManager* download_manager() { return download_manager_; } 285 DownloadManager* download_manager() { return download_manager_; }
285 bool is_paused() const { return is_paused_; } 286 bool is_paused() const { return is_paused_; }
286 bool open_when_complete() const { return open_when_complete_; } 287 bool open_when_complete() const { return open_when_complete_; }
287 void set_open_when_complete(bool open) { open_when_complete_ = open; } 288 void set_open_when_complete(bool open) { open_when_complete_ = open; }
288 bool file_externally_removed() const { return file_externally_removed_; } 289 bool file_externally_removed() const { return file_externally_removed_; }
289 SafetyState safety_state() const { return safety_state_; } 290 SafetyState safety_state() const { return safety_state_; }
290 // Why |safety_state_| is not SAFE. 291 // Why |safety_state_| is not SAFE.
291 DangerType GetDangerType() const; 292 DangerType GetDangerType() const;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 427
427 // The current state of this download 428 // The current state of this download
428 DownloadState state_; 429 DownloadState state_;
429 430
430 // The views of this item in the download shelf and download tab 431 // The views of this item in the download shelf and download tab
431 ObserverList<Observer> observers_; 432 ObserverList<Observer> observers_;
432 433
433 // Time the download was started 434 // Time the download was started
434 base::Time start_time_; 435 base::Time start_time_;
435 436
437 // Time the download completed
438 base::Time end_time_;
439
436 // Our persistent store handle 440 // Our persistent store handle
437 int64 db_handle_; 441 int64 db_handle_;
438 442
439 // Timer for regularly updating our observers 443 // Timer for regularly updating our observers
440 base::RepeatingTimer<DownloadItem> update_timer_; 444 base::RepeatingTimer<DownloadItem> update_timer_;
441 445
442 // Our owning object 446 // Our owning object
443 DownloadManager* download_manager_; 447 DownloadManager* download_manager_;
444 448
445 // In progress downloads may be paused by the user, we note it here 449 // In progress downloads may be paused by the user, we note it here
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // only. 483 // only.
480 bool open_enabled_; 484 bool open_enabled_;
481 485
482 // Did the delegate delay calling Complete on this download? 486 // Did the delegate delay calling Complete on this download?
483 bool delegate_delayed_complete_; 487 bool delegate_delayed_complete_;
484 488
485 DISALLOW_COPY_AND_ASSIGN(DownloadItem); 489 DISALLOW_COPY_AND_ASSIGN(DownloadItem);
486 }; 490 };
487 491
488 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ 492 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_shelf_view.cc ('k') | content/browser/download/download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698