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

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

Issue 12569007: Remove URL fragment from referrer HTTP header when opening link using "Open Link in New Tab" option. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync up to rev 193385 Created 7 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
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // The request method may only be changed before Start() is called and 363 // The request method may only be changed before Start() is called and
364 // should only be assigned an uppercase value. 364 // should only be assigned an uppercase value.
365 const std::string& method() const { return method_; } 365 const std::string& method() const { return method_; }
366 void set_method(const std::string& method); 366 void set_method(const std::string& method);
367 367
368 // The referrer URL for the request. This header may actually be suppressed 368 // The referrer URL for the request. This header may actually be suppressed
369 // from the underlying network request for security reasons (e.g., a HTTPS 369 // from the underlying network request for security reasons (e.g., a HTTPS
370 // URL will not be sent as the referrer for a HTTP request). The referrer 370 // URL will not be sent as the referrer for a HTTP request). The referrer
371 // may only be changed before Start() is called. 371 // may only be changed before Start() is called.
372 const std::string& referrer() const { return referrer_; } 372 const std::string& referrer() const { return referrer_; }
373 void set_referrer(const std::string& referrer); 373 // Referrer is sanitized to remove URL fragment, user name and password.
374 // Returns the referrer header with potential username and password removed. 374 void SetReferrer(const std::string& referrer);
375 GURL GetSanitizedReferrer() const;
376 375
377 // The referrer policy to apply when updating the referrer during redirects. 376 // The referrer policy to apply when updating the referrer during redirects.
378 // The referrer policy may only be changed before Start() is called. 377 // The referrer policy may only be changed before Start() is called.
379 void set_referrer_policy(ReferrerPolicy referrer_policy); 378 void set_referrer_policy(ReferrerPolicy referrer_policy);
380 379
381 // Sets the delegate of the request. This value may be changed at any time, 380 // Sets the delegate of the request. This value may be changed at any time,
382 // and it is permissible for it to be null. 381 // and it is permissible for it to be null.
383 void set_delegate(Delegate* delegate); 382 void set_delegate(Delegate* delegate);
384 383
385 // Indicates that the request body should be sent using chunked transfer 384 // Indicates that the request body should be sent using chunked transfer
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 LoadTimingInfo load_timing_info_; 837 LoadTimingInfo load_timing_info_;
839 838
840 scoped_ptr<const base::debug::StackTrace> stack_trace_; 839 scoped_ptr<const base::debug::StackTrace> stack_trace_;
841 840
842 DISALLOW_COPY_AND_ASSIGN(URLRequest); 841 DISALLOW_COPY_AND_ASSIGN(URLRequest);
843 }; 842 };
844 843
845 } // namespace net 844 } // namespace net
846 845
847 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 846 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698