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

Unified Diff: content/browser/download/download_item.h

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_item.h
diff --git a/content/browser/download/download_item.h b/content/browser/download/download_item.h
index 7a19ea014107f293a632e8e043d9a96cf8097beb..5d8d619ac67c71bb27b39cf751108716ff7eb02e 100644
--- a/content/browser/download/download_item.h
+++ b/content/browser/download/download_item.h
@@ -26,6 +26,7 @@
#include "base/time.h"
#include "base/timer.h"
#include "content/browser/download/download_request_handle.h"
+#include "content/browser/download/download_id.h"
Miranda Callahan 2011/10/27 17:00:19 nit: alphabetization
benjhayden 2011/10/27 19:04:41 Done.
#include "content/browser/download/download_state_info.h"
#include "content/browser/download/interrupt_reasons.h"
#include "content/common/content_export.h"
@@ -114,7 +115,8 @@ class CONTENT_EXPORT DownloadItem {
// Constructing from persistent store:
DownloadItem(DownloadManager* download_manager,
- const DownloadPersistentStoreInfo& info);
+ const DownloadPersistentStoreInfo& info,
+ const DownloadId& download_id);
Randy Smith (Not in Mondays) 2011/10/27 18:01:44 Long term, when we construct from the persistent s
benjhayden 2011/10/27 19:04:41 Done.
// Constructing for a regular download:
DownloadItem(DownloadManager* download_manager,
@@ -277,8 +279,8 @@ class CONTENT_EXPORT DownloadItem {
total_bytes_ = total_bytes;
}
int64 received_bytes() const { return received_bytes_; }
- int32 id() const { return download_id_; }
- DownloadId global_id() const;
+ int32 id() const { return download_id_.local(); }
+ const DownloadId& global_id() const { return download_id_; }
Randy Smith (Not in Mondays) 2011/10/27 18:01:44 Hmmm. I'm actually a litte uncomfortable about th
benjhayden 2011/10/27 19:04:41 Done.
base::Time start_time() const { return start_time_; }
base::Time end_time() const { return end_time_; }
void set_db_handle(int64 handle) { db_handle_ = handle; }
@@ -379,7 +381,7 @@ class CONTENT_EXPORT DownloadItem {
DownloadRequestHandle request_handle_;
// Download ID assigned by DownloadResourceHandler.
- int32 download_id_;
+ DownloadId download_id_;
// Full path to the downloaded or downloading file.
FilePath full_path_;

Powered by Google App Engine
This is Rietveld 408576698