| OLD | NEW |
| 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 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 static bool IsHandledProtocol(const std::string& scheme); | 303 static bool IsHandledProtocol(const std::string& scheme); |
| 304 | 304 |
| 305 // Returns true if the url can be handled by URLRequest. False otherwise. | 305 // Returns true if the url can be handled by URLRequest. False otherwise. |
| 306 // The function returns true for invalid urls because URLRequest knows how | 306 // The function returns true for invalid urls because URLRequest knows how |
| 307 // to handle those. | 307 // to handle those. |
| 308 // NOTE: This will also return true for URLs that are handled by | 308 // NOTE: This will also return true for URLs that are handled by |
| 309 // ProtocolFactories that only work for requests that are scoped to a | 309 // ProtocolFactories that only work for requests that are scoped to a |
| 310 // Profile. | 310 // Profile. |
| 311 static bool IsHandledURL(const GURL& url); | 311 static bool IsHandledURL(const GURL& url); |
| 312 | 312 |
| 313 // Allow access to file:// on ChromeOS for tests. | |
| 314 static void AllowFileAccess(); | |
| 315 static bool IsFileAccessAllowed(); | |
| 316 | |
| 317 // The original url is the url used to initialize the request, and it may | 313 // The original url is the url used to initialize the request, and it may |
| 318 // differ from the url if the request was redirected. | 314 // differ from the url if the request was redirected. |
| 319 const GURL& original_url() const { return url_chain_.front(); } | 315 const GURL& original_url() const { return url_chain_.front(); } |
| 320 // The chain of urls traversed by this request. If the request had no | 316 // The chain of urls traversed by this request. If the request had no |
| 321 // redirects, this vector will contain one element. | 317 // redirects, this vector will contain one element. |
| 322 const std::vector<GURL>& url_chain() const { return url_chain_; } | 318 const std::vector<GURL>& url_chain() const { return url_chain_; } |
| 323 const GURL& url() const { return url_chain_.back(); } | 319 const GURL& url() const { return url_chain_.back(); } |
| 324 | 320 |
| 325 // The URL that should be consulted for the third-party cookie blocking | 321 // The URL that should be consulted for the third-party cookie blocking |
| 326 // policy. | 322 // policy. |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 scoped_refptr<AuthChallengeInfo> auth_info_; | 767 scoped_refptr<AuthChallengeInfo> auth_info_; |
| 772 | 768 |
| 773 base::TimeTicks creation_time_; | 769 base::TimeTicks creation_time_; |
| 774 | 770 |
| 775 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 771 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 776 }; | 772 }; |
| 777 | 773 |
| 778 } // namespace net | 774 } // namespace net |
| 779 | 775 |
| 780 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 776 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |