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

Side by Side Diff: content/browser/download/download_persistent_store_info.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: fixed tests 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 // Download struct used for informing and querying the download system's 5 // Download struct used for informing and querying the download system's
6 // persitent store. 6 // persitent store.
7 7
8 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ 8 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_
9 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ 9 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_
10 #pragma once 10 #pragma once
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 18
19 class DownloadItem; 19 class DownloadItem;
20 20
21 // Contains the information that is stored in the download system's persistent 21 // Contains the information that is stored in the download system's persistent
22 // store (or refers to it). Managed by the DownloadItem. 22 // store (or refers to it). Managed by the DownloadItem.
23 struct CONTENT_EXPORT DownloadPersistentStoreInfo { 23 struct CONTENT_EXPORT DownloadPersistentStoreInfo {
24 // TODO(ahendrickson) -- Reduce the number of constructors. 24 // TODO(ahendrickson) -- Reduce the number of constructors.
Randy Smith (Not in Mondays) 2011/09/30 15:57:21 I think it's reasonable to remove this--at least,
benjhayden 2011/10/03 20:54:39 Andy still wants to fix it.
25 DownloadPersistentStoreInfo(); 25 DownloadPersistentStoreInfo();
26 DownloadPersistentStoreInfo(const FilePath& path, 26 DownloadPersistentStoreInfo(const FilePath& path,
27 const GURL& url, 27 const GURL& url,
28 const GURL& referrer, 28 const GURL& referrer,
29 const base::Time& start, 29 const base::Time& start,
30 const base::Time& end,
30 int64 received, 31 int64 received,
31 int64 total, 32 int64 total,
32 int32 download_state, 33 int32 download_state,
33 int64 handle); 34 int64 handle,
35 bool opend);
Randy Smith (Not in Mondays) 2011/09/30 15:57:21 nit: I dislike deliberately misspelling something
benjhayden 2011/10/03 20:54:39 Done.
34 ~DownloadPersistentStoreInfo(); // For linux-clang. 36 ~DownloadPersistentStoreInfo(); // For linux-clang.
35 37
36 // The final path where the download is saved. 38 // The final path where the download is saved.
37 FilePath path; 39 FilePath path;
38 40
39 // The URL from which we are downloading. This is the final URL after any 41 // The URL from which we are downloading. This is the final URL after any
40 // redirection by the server for |url_chain|. 42 // redirection by the server for |url_chain|.
41 GURL url; 43 GURL url;
42 44
43 // The URL that referred us. 45 // The URL that referred us.
44 GURL referrer_url; 46 GURL referrer_url;
45 47
46 // The time when the download started. 48 // The time when the download started.
47 base::Time start_time; 49 base::Time start_time;
48 50
51 // The time when the download completed.
52 base::Time end_time;
53
49 // The number of bytes received (so far). 54 // The number of bytes received (so far).
50 int64 received_bytes; 55 int64 received_bytes;
51 56
52 // The total number of bytes in the download. 57 // The total number of bytes in the download.
53 int64 total_bytes; 58 int64 total_bytes;
54 59
55 // The current state of the download. 60 // The current state of the download.
56 int32 state; 61 int32 state;
57 62
58 // The handle of the download in the database. 63 // The handle of the download in the database.
59 int64 db_handle; 64 int64 db_handle;
65
66 bool opened;
Randy Smith (Not in Mondays) 2011/09/30 15:57:21 It's pretty obvious, but I'd still include a comme
benjhayden 2011/10/03 20:54:39 Done.
60 }; 67 };
61 68
62 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ 69 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698