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

Side by Side Diff: components/cronet/android/cronet_url_request_adapter.h

Issue 937513003: Add Data Saver support to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_
6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // When called during a OnRedirect or OnResponseStarted callback, these 110 // When called during a OnRedirect or OnResponseStarted callback, these
111 // methods return the corresponding response information. 111 // methods return the corresponding response information.
112 112
113 // Gets all response headers, as a HttpResponseHeaders object. Returns NULL 113 // Gets all response headers, as a HttpResponseHeaders object. Returns NULL
114 // if the last attempted request received no headers. 114 // if the last attempted request received no headers.
115 const net::HttpResponseHeaders* GetResponseHeaders() const; 115 const net::HttpResponseHeaders* GetResponseHeaders() const;
116 116
117 // Gets NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo. 117 // Gets NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo.
118 const std::string& GetNegotiatedProtocol() const; 118 const std::string& GetNegotiatedProtocol() const;
119 119
120 // Gets the proxy server used.
121 const std::string GetProxyServer() const;
122
120 // Returns true if response is coming from the cache. 123 // Returns true if response is coming from the cache.
121 bool GetWasCached() const; 124 bool GetWasCached() const;
122 125
123 // Gets the total amount of body data received from network after 126 // Gets the total amount of body data received from network after
124 // SSL/SPDY/QUIC decoding and proxy handling. Basically the size of the body 127 // SSL/SPDY/QUIC decoding and proxy handling. Basically the size of the body
125 // prior to decompression. 128 // prior to decompression.
126 int64 GetTotalReceivedBytes() const; 129 int64 GetTotalReceivedBytes() const;
127 130
128 // Bypasses cache. If context is not set up to use cache, this call has no 131 // Bypasses cache. If context is not set up to use cache, this call has no
129 // effect. 132 // effect.
(...skipping 23 matching lines...) Expand all
153 156
154 scoped_refptr<net::IOBufferWithSize> read_buffer_; 157 scoped_refptr<net::IOBufferWithSize> read_buffer_;
155 scoped_ptr<net::URLRequest> url_request_; 158 scoped_ptr<net::URLRequest> url_request_;
156 159
157 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); 160 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter);
158 }; 161 };
159 162
160 } // namespace cronet 163 } // namespace cronet
161 164
162 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_ 165 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698