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

Side by Side Diff: net/url_request/url_request.cc

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/stats_counters.h" 9 #include "base/metrics/stats_counters.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 void URLRequest::GetAllResponseHeaders(string* headers) { 252 void URLRequest::GetAllResponseHeaders(string* headers) {
253 DCHECK(headers); 253 DCHECK(headers);
254 if (response_info_.headers) { 254 if (response_info_.headers) {
255 response_info_.headers->GetNormalizedHeaders(headers); 255 response_info_.headers->GetNormalizedHeaders(headers);
256 } else { 256 } else {
257 headers->clear(); 257 headers->clear();
258 } 258 }
259 } 259 }
260 260
261 std::string URLRequest::GetSocketAddress() const {
262 DCHECK(job_);
263 return job_->GetSocketAddress();
264 }
265
261 net::HttpResponseHeaders* URLRequest::response_headers() const { 266 net::HttpResponseHeaders* URLRequest::response_headers() const {
262 return response_info_.headers.get(); 267 return response_info_.headers.get();
263 } 268 }
264 269
265 bool URLRequest::GetResponseCookies(ResponseCookies* cookies) { 270 bool URLRequest::GetResponseCookies(ResponseCookies* cookies) {
266 DCHECK(job_); 271 DCHECK(job_);
267 return job_->GetResponseCookies(cookies); 272 return job_->GetResponseCookies(cookies);
268 } 273 }
269 274
270 void URLRequest::GetMimeType(string* mime_type) { 275 void URLRequest::GetMimeType(string* mime_type) {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 if (found != user_data_.end()) 627 if (found != user_data_.end())
623 return found->second.get(); 628 return found->second.get();
624 return NULL; 629 return NULL;
625 } 630 }
626 631
627 void URLRequest::SetUserData(const void* key, UserData* data) { 632 void URLRequest::SetUserData(const void* key, UserData* data) {
628 user_data_[key] = linked_ptr<UserData>(data); 633 user_data_[key] = linked_ptr<UserData>(data);
629 } 634 }
630 635
631 } // namespace net 636 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698