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

Side by Side Diff: content/browser/download/download_resource_handler.cc

Issue 9296012: Hooked up NetLog to DownloadItem, DownloadFile, and FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk 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) 2012 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 #include "content/browser/download/download_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 &content_disposition); 91 &content_disposition);
92 set_content_disposition(content_disposition); 92 set_content_disposition(content_disposition);
93 set_content_length(response->content_length); 93 set_content_length(response->content_length);
94 94
95 const ResourceDispatcherHostRequestInfo* request_info = 95 const ResourceDispatcherHostRequestInfo* request_info =
96 ResourceDispatcherHost::InfoForRequest(request_); 96 ResourceDispatcherHost::InfoForRequest(request_);
97 97
98 // Deleted in DownloadManager. 98 // Deleted in DownloadManager.
99 scoped_ptr<DownloadCreateInfo> info(new DownloadCreateInfo(FilePath(), GURL(), 99 scoped_ptr<DownloadCreateInfo> info(new DownloadCreateInfo(FilePath(), GURL(),
100 base::Time::Now(), 0, content_length_, DownloadItem::IN_PROGRESS, 100 base::Time::Now(), 0, content_length_, DownloadItem::IN_PROGRESS,
101 request_info->has_user_gesture(), request_info->transition_type())); 101 request_->net_log(), request_info->has_user_gesture(),
102 request_info->transition_type()));
102 info->url_chain = request_->url_chain(); 103 info->url_chain = request_->url_chain();
103 info->referrer_url = GURL(request_->referrer()); 104 info->referrer_url = GURL(request_->referrer());
104 info->start_time = base::Time::Now(); 105 info->start_time = base::Time::Now();
105 info->received_bytes = save_info_.offset; 106 info->received_bytes = save_info_.offset;
106 info->total_bytes = content_length_; 107 info->total_bytes = content_length_;
107 info->state = DownloadItem::IN_PROGRESS; 108 info->state = DownloadItem::IN_PROGRESS;
108 info->has_user_gesture = request_info->has_user_gesture(); 109 info->has_user_gesture = request_info->has_user_gesture();
109 info->content_disposition = content_disposition_; 110 info->content_disposition = content_disposition_;
110 info->mime_type = response->mime_type; 111 info->mime_type = response->mime_type;
111 info->remote_address = request_->GetSocketAddress().host(); 112 info->remote_address = request_->GetSocketAddress().host();
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 " render_view_id_ = " "%d" 376 " render_view_id_ = " "%d"
376 " save_info_.file_path = \"%" PRFilePath "\"" 377 " save_info_.file_path = \"%" PRFilePath "\""
377 " }", 378 " }",
378 request_->url().spec().c_str(), 379 request_->url().spec().c_str(),
379 download_id_.local(), 380 download_id_.local(),
380 global_id_.child_id, 381 global_id_.child_id,
381 global_id_.request_id, 382 global_id_.request_id,
382 render_view_id_, 383 render_view_id_,
383 save_info_.file_path.value().c_str()); 384 save_info_.file_path.value().c_str());
384 } 385 }
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/drag_download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698