OLD | NEW |
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 NET_BASE_NETWORK_DELEGATE_IMPL_H_ | 5 #ifndef NET_BASE_NETWORK_DELEGATE_IMPL_H_ |
6 #define NET_BASE_NETWORK_DELEGATE_IMPL_H_ | 6 #define NET_BASE_NETWORK_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
10 #include "net/base/network_delegate.h" | 10 #include "net/base/network_delegate.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 // Called when the |referrer_url| for requesting |target_url| during handling | 187 // Called when the |referrer_url| for requesting |target_url| during handling |
188 // of the |request| is does not comply with the referrer policy (e.g. a | 188 // of the |request| is does not comply with the referrer policy (e.g. a |
189 // secure referrer for an insecure initial target). | 189 // secure referrer for an insecure initial target). |
190 // Returns true if the request should be cancelled. Otherwise, the referrer | 190 // Returns true if the request should be cancelled. Otherwise, the referrer |
191 // header is stripped from the request. | 191 // header is stripped from the request. |
192 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 192 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
193 const URLRequest& request, | 193 const URLRequest& request, |
194 const GURL& target_url, | 194 const GURL& target_url, |
195 const GURL& referrer_url) const override; | 195 const GURL& referrer_url) const override; |
| 196 |
| 197 // If we get a response with GZIP encoding, we check if the response mime |
| 198 // type is one of the supported mime types. If it is supported, we will |
| 199 // decompress response to allow it to be displayed directly in browser, |
| 200 // otherwise we'll leave it compressed. |
| 201 bool OnIsSupportedMimeType(const std::string& mime_type) const override; |
196 }; | 202 }; |
197 | 203 |
198 } // namespace net | 204 } // namespace net |
199 | 205 |
200 #endif // NET_BASE_NETWORK_DELEGATE_IMPL_H_ | 206 #endif // NET_BASE_NETWORK_DELEGATE_IMPL_H_ |
OLD | NEW |