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

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

Issue 9808029: Prepending view-source: does not load the source of the userscript. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed extra logging code. 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
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 static void AllowFileAccess(); 306 static void AllowFileAccess();
307 static bool IsFileAccessAllowed(); 307 static bool IsFileAccessAllowed();
308 308
309 // The original url is the url used to initialize the request, and it may 309 // The original url is the url used to initialize the request, and it may
310 // differ from the url if the request was redirected. 310 // differ from the url if the request was redirected.
311 const GURL& original_url() const { return url_chain_.front(); } 311 const GURL& original_url() const { return url_chain_.front(); }
312 // The chain of urls traversed by this request. If the request had no 312 // The chain of urls traversed by this request. If the request had no
313 // redirects, this vector will contain one element. 313 // redirects, this vector will contain one element.
314 const std::vector<GURL>& url_chain() const { return url_chain_; } 314 const std::vector<GURL>& url_chain() const { return url_chain_; }
315 const GURL& url() const { return url_chain_.back(); } 315 const GURL& url() const { return url_chain_.back(); }
316 // The virtual URL is kept to determine if the original request had any
317 // special modifiers, e.g. "view-source:".
318 const GURL& virtual_url() const { return virtual_url_; }
319 void set_virtual_url(const GURL& virtual_url);
316 320
317 // 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
318 // policy. 322 // policy.
319 const GURL& first_party_for_cookies() const { 323 const GURL& first_party_for_cookies() const {
320 return first_party_for_cookies_; 324 return first_party_for_cookies_;
321 } 325 }
322 // This method may be called before Start() or FollowDeferredRedirect() is 326 // This method may be called before Start() or FollowDeferredRedirect() is
323 // called. 327 // called.
324 void set_first_party_for_cookies(const GURL& first_party_for_cookies); 328 void set_first_party_for_cookies(const GURL& first_party_for_cookies);
325 329
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // most of the dependencies which are shared between requests (disk cache, 682 // most of the dependencies which are shared between requests (disk cache,
679 // cookie store, socket pool, etc.) 683 // cookie store, socket pool, etc.)
680 scoped_refptr<const URLRequestContext> context_; 684 scoped_refptr<const URLRequestContext> context_;
681 685
682 // Tracks the time spent in various load states throughout this request. 686 // Tracks the time spent in various load states throughout this request.
683 BoundNetLog net_log_; 687 BoundNetLog net_log_;
684 688
685 scoped_refptr<URLRequestJob> job_; 689 scoped_refptr<URLRequestJob> job_;
686 scoped_refptr<UploadData> upload_; 690 scoped_refptr<UploadData> upload_;
687 std::vector<GURL> url_chain_; 691 std::vector<GURL> url_chain_;
692 GURL virtual_url_;
688 GURL first_party_for_cookies_; 693 GURL first_party_for_cookies_;
689 GURL delegate_redirect_url_; 694 GURL delegate_redirect_url_;
690 std::string method_; // "GET", "POST", etc. Should be all uppercase. 695 std::string method_; // "GET", "POST", etc. Should be all uppercase.
691 std::string referrer_; 696 std::string referrer_;
692 HttpRequestHeaders extra_request_headers_; 697 HttpRequestHeaders extra_request_headers_;
693 int load_flags_; // Flags indicating the request type for the load; 698 int load_flags_; // Flags indicating the request type for the load;
694 // expected values are LOAD_* enums above. 699 // expected values are LOAD_* enums above.
695 700
696 // Never access methods of the |delegate_| directly. Always use the 701 // Never access methods of the |delegate_| directly. Always use the
697 // Notify... methods for this. 702 // Notify... methods for this.
(...skipping 60 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