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

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: Fixed clang problem 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. 305 // Allow access to all file:// URLs (used for tests).
306 static void AllowFileAccess(); 306 static void AllowAccessToAllFiles();
307 static bool IsFileAccessAllowed(); 307
308 // Tests to see if access to |path| is allowed. If AllowAccessToAllFiles has
309 // been called, then this will return true. Otherwise it uses the list of
310 // restricted directories set by AllowFileAccessTo to decide. If neither
311 // has been called, will return false.
312 bool IsFileAccessAllowed(const FilePath& path);
willchan no longer on Chromium 2012/04/19 21:12:24 This is only used by the URLRequestFileJob, right?
Greg Spencer (Chromium) 2012/04/20 00:05:54 Done. I originally missed how to get at the netwo
308 313
309 // The original url is the url used to initialize the request, and it may 314 // The original url is the url used to initialize the request, and it may
310 // differ from the url if the request was redirected. 315 // differ from the url if the request was redirected.
311 const GURL& original_url() const { return url_chain_.front(); } 316 const GURL& original_url() const { return url_chain_.front(); }
312 // The chain of urls traversed by this request. If the request had no 317 // The chain of urls traversed by this request. If the request had no
313 // redirects, this vector will contain one element. 318 // redirects, this vector will contain one element.
314 const std::vector<GURL>& url_chain() const { return url_chain_; } 319 const std::vector<GURL>& url_chain() const { return url_chain_; }
315 const GURL& url() const { return url_chain_.back(); } 320 const GURL& url() const { return url_chain_.back(); }
316 321
317 // The URL that should be consulted for the third-party cookie blocking 322 // The URL that should be consulted for the third-party cookie blocking
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 scoped_refptr<AuthChallengeInfo> auth_info_; 763 scoped_refptr<AuthChallengeInfo> auth_info_;
759 764
760 base::TimeTicks creation_time_; 765 base::TimeTicks creation_time_;
761 766
762 DISALLOW_COPY_AND_ASSIGN(URLRequest); 767 DISALLOW_COPY_AND_ASSIGN(URLRequest);
763 }; 768 };
764 769
765 } // namespace net 770 } // namespace net
766 771
767 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 772 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698