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

Unified Diff: chrome/browser/history/download_history_info.h

Issue 6969009: Reduced the lifetime of DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stupid clang! Created 9 years, 7 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
« no previous file with comments | « chrome/browser/history/download_database.cc ('k') | chrome/browser/history/download_history_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/download_history_info.h
diff --git a/chrome/browser/history/download_history_info.h b/chrome/browser/history/download_history_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7c35d4e934dc29d1dd6933d91f57df8b4c2ec22
--- /dev/null
+++ b/chrome/browser/history/download_history_info.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Download struct used for informing and querying the history service.
+
+#ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
+#define CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
+#pragma once
+
+#include <vector>
+
+#include "base/file_path.h"
+#include "base/time.h"
+#include "googleurl/src/gurl.h"
+
+class DownloadItem;
+
+// Contains the information that is stored in the download history database
+// (or refers to it). Managed by the DownloadItem.
+struct DownloadHistoryInfo {
+ // TODO(ahendrickson) -- Reduce the number of constructors.
+ DownloadHistoryInfo();
+ DownloadHistoryInfo(const FilePath& path,
+ const GURL& url,
+ const GURL& referrer,
+ const base::Time& start,
+ int64 received,
+ int64 total,
+ int32 download_state,
+ int64 handle);
+ ~DownloadHistoryInfo(); // For linux-clang.
+
+ // The final path where the download is saved.
+ FilePath path;
+
+ // The URL from which we are downloading. This is the final URL after any
+ // redirection by the server for |url_chain|.
+ GURL url;
+
+ // The URL that referred us.
+ GURL referrer_url;
+
+ // The time when the download started.
+ base::Time start_time;
+
+ // The number of bytes received (so far).
+ int64 received_bytes;
+
+ // The total number of bytes in the download.
+ int64 total_bytes;
+
+ // The current state of the download.
+ int32 state;
+
+ // The handle of the download in the database.
+ int64 db_handle;
+};
+
+#endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
« no previous file with comments | « chrome/browser/history/download_database.cc ('k') | chrome/browser/history/download_history_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698