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

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

Issue 9296012: Hooked up NetLog to DownloadItem, DownloadFile, and FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create DownloadItem's BoundNetLog closer to constructor Created 8 years, 10 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) 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "content/browser/download/download_file.h" 15 #include "content/browser/download/download_file.h"
16 #include "content/browser/download/download_types.h" 16 #include "content/browser/download/download_types.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/public/browser/download_id.h" 18 #include "content/public/browser/download_id.h"
19 #include "content/public/common/page_transition_types.h" 19 #include "content/public/common/page_transition_types.h"
20 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
21 #include "net/base/net_log.h"
21 22
22 // Used for informing the download manager of a new download, since we don't 23 // Used for informing the download manager of a new download, since we don't
23 // want to pass |DownloadItem|s between threads. 24 // want to pass |DownloadItem|s between threads.
24 struct CONTENT_EXPORT DownloadCreateInfo { 25 struct CONTENT_EXPORT DownloadCreateInfo {
25 DownloadCreateInfo(const FilePath& path, 26 DownloadCreateInfo(const FilePath& path,
26 const GURL& url, 27 const GURL& url,
27 const base::Time& start_time, 28 const base::Time& start_time,
28 int64 received_bytes, 29 int64 received_bytes,
29 int64 total_bytes, 30 int64 total_bytes,
30 int32 state, 31 int32 state,
32 const net::BoundNetLog& log,
31 bool has_user_gesture, 33 bool has_user_gesture,
32 content::PageTransition transition_type); 34 content::PageTransition transition_type);
33 DownloadCreateInfo(); 35 DownloadCreateInfo();
34 ~DownloadCreateInfo(); 36 ~DownloadCreateInfo();
35 37
36 std::string DebugString() const; 38 std::string DebugString() const;
37 39
38 // The URL from which we are downloading. This is the final URL after any 40 // The URL from which we are downloading. This is the final URL after any
39 // redirection by the server for |url_chain|. 41 // redirection by the server for |url_chain|.
40 const GURL& url() const; 42 const GURL& url() const;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // The charset of the referring page where the download request comes from. 105 // The charset of the referring page where the download request comes from.
104 // It's used to construct a suggested filename. 106 // It's used to construct a suggested filename.
105 std::string referrer_charset; 107 std::string referrer_charset;
106 108
107 // The download file save info. 109 // The download file save info.
108 DownloadSaveInfo save_info; 110 DownloadSaveInfo save_info;
109 111
110 // The remote IP address where the download was fetched from. Copied from 112 // The remote IP address where the download was fetched from. Copied from
111 // UrlRequest::GetSocketAddress(). 113 // UrlRequest::GetSocketAddress().
112 std::string remote_address; 114 std::string remote_address;
115
116 const net::BoundNetLog bound_net_log;
Randy Smith (Not in Mondays) 2012/02/07 23:19:14 Willing to make this "url_request_bound_net_log" s
ahendrickson 2012/02/07 23:58:54 Done.
113 }; 117 };
114 118
115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 119 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698