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

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

Issue 10068021: Fix file access on Chrome for ChromeOS on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes Created 8 years, 8 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) 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 static bool IsHandledProtocol(const std::string& scheme); 295 static bool IsHandledProtocol(const std::string& scheme);
296 296
297 // Returns true if the url can be handled by URLRequest. False otherwise. 297 // Returns true if the url can be handled by URLRequest. False otherwise.
298 // The function returns true for invalid urls because URLRequest knows how 298 // The function returns true for invalid urls because URLRequest knows how
299 // to handle those. 299 // to handle those.
300 // NOTE: This will also return true for URLs that are handled by 300 // NOTE: This will also return true for URLs that are handled by
301 // ProtocolFactories that only work for requests that are scoped to a 301 // ProtocolFactories that only work for requests that are scoped to a
302 // Profile. 302 // Profile.
303 static bool IsHandledURL(const GURL& url); 303 static bool IsHandledURL(const GURL& url);
304 304
305 // Allow access to file:// on ChromeOS for tests.
306 static void AllowFileAccess();
307 static bool IsFileAccessAllowed();
308
309 // The original url is the url used to initialize the request, and it may 305 // The original url is the url used to initialize the request, and it may
310 // differ from the url if the request was redirected. 306 // differ from the url if the request was redirected.
311 const GURL& original_url() const { return url_chain_.front(); } 307 const GURL& original_url() const { return url_chain_.front(); }
312 // The chain of urls traversed by this request. If the request had no 308 // The chain of urls traversed by this request. If the request had no
313 // redirects, this vector will contain one element. 309 // redirects, this vector will contain one element.
314 const std::vector<GURL>& url_chain() const { return url_chain_; } 310 const std::vector<GURL>& url_chain() const { return url_chain_; }
315 const GURL& url() const { return url_chain_.back(); } 311 const GURL& url() const { return url_chain_.back(); }
316 312
317 // The URL that should be consulted for the third-party cookie blocking 313 // The URL that should be consulted for the third-party cookie blocking
318 // policy. 314 // policy.
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 scoped_refptr<AuthChallengeInfo> auth_info_; 754 scoped_refptr<AuthChallengeInfo> auth_info_;
759 755
760 base::TimeTicks creation_time_; 756 base::TimeTicks creation_time_;
761 757
762 DISALLOW_COPY_AND_ASSIGN(URLRequest); 758 DISALLOW_COPY_AND_ASSIGN(URLRequest);
763 }; 759 };
764 760
765 } // namespace net 761 } // namespace net
766 762
767 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 763 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698