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

Side by Side Diff: net/url_request/url_request_job.h

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: Address eroman's comments 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 NET_URL_REQUEST_URL_REQUEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_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/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "net/base/filter.h" 17 #include "net/base/filter.h"
18 #include "net/base/host_port_pair.h"
18 #include "net/base/load_states.h" 19 #include "net/base/load_states.h"
19 20
20 21
21 namespace net { 22 namespace net {
22 23
23 class AuthChallengeInfo; 24 class AuthChallengeInfo;
24 class HttpRequestHeaders; 25 class HttpRequestHeaders;
25 class HttpResponseInfo; 26 class HttpResponseInfo;
26 class IOBuffer; 27 class IOBuffer;
27 class URLRequest; 28 class URLRequest;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 virtual bool GetURL(GURL* gurl) const; 203 virtual bool GetURL(GURL* gurl) const;
203 virtual base::Time GetRequestTime() const; 204 virtual base::Time GetRequestTime() const;
204 virtual bool IsDownload() const; 205 virtual bool IsDownload() const;
205 virtual bool IsSdchResponse() const; 206 virtual bool IsSdchResponse() const;
206 virtual bool IsCachedContent() const; 207 virtual bool IsCachedContent() const;
207 virtual int64 GetByteReadCount() const; 208 virtual int64 GetByteReadCount() const;
208 virtual int GetResponseCode() const; 209 virtual int GetResponseCode() const;
209 virtual int GetInputStreamBufferSize() const; 210 virtual int GetInputStreamBufferSize() const;
210 virtual void RecordPacketStats(StatisticSelector statistic) const; 211 virtual void RecordPacketStats(StatisticSelector statistic) const;
211 212
213 // Returns the socket address for the connection.
214 // See url_request.h for details.
215 virtual HostPortPair GetSocketAddress() const;
216
212 protected: 217 protected:
213 friend class base::RefCounted<URLRequestJob>; 218 friend class base::RefCounted<URLRequestJob>;
214 virtual ~URLRequestJob(); 219 virtual ~URLRequestJob();
215 220
216 // Notifies the job that headers have been received. 221 // Notifies the job that headers have been received.
217 void NotifyHeadersComplete(); 222 void NotifyHeadersComplete();
218 223
219 // Notifies the request that the job has completed a Read operation. 224 // Notifies the request that the job has completed a Read operation.
220 void NotifyReadComplete(int bytes_read); 225 void NotifyReadComplete(int bytes_read);
221 226
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // The count of the number of packets, some of which may not have been timed. 418 // The count of the number of packets, some of which may not have been timed.
414 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes. 419 // We're ignoring overflow, as 1430 x 2^31 is a LOT of bytes.
415 int observed_packet_count_; 420 int observed_packet_count_;
416 421
417 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 422 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
418 }; 423 };
419 424
420 } // namespace net 425 } // namespace net
421 426
422 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 427 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698