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

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: address code review comments Created 7 years, 9 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 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
pauljensen 2013/03/15 13:37:45 Please add period.
mef 2013/03/15 16:36:42 Done.
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 LoadTimingInfo load_timing_info_; 839 LoadTimingInfo load_timing_info_;
841 840
842 scoped_ptr<const base::debug::StackTrace> stack_trace_; 841 scoped_ptr<const base::debug::StackTrace> stack_trace_;
843 842
844 DISALLOW_COPY_AND_ASSIGN(URLRequest); 843 DISALLOW_COPY_AND_ASSIGN(URLRequest);
845 }; 844 };
846 845
847 } // namespace net 846 } // namespace net
848 847
849 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 848 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698