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

Side by Side Diff: ios/web/public/referrer.h

Issue 2918313002: Implement new referrer policies (Closed)
Patch Set: update public/platform/OWNERS per presubmit Created 3 years, 6 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ios/web/public/referrer_util.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 IOS_WEB_PUBLIC_REFERRER_H_ 5 #ifndef IOS_WEB_PUBLIC_REFERRER_H_
6 #define IOS_WEB_PUBLIC_REFERRER_H_ 6 #define IOS_WEB_PUBLIC_REFERRER_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace web { 11 namespace web {
12 12
13 enum ReferrerPolicy { 13 enum ReferrerPolicy {
14 ReferrerPolicyAlways, 14 ReferrerPolicyAlways,
15 ReferrerPolicyDefault, 15 ReferrerPolicyDefault,
16 ReferrerPolicyNoReferrerWhenDowngrade, 16 ReferrerPolicyNoReferrerWhenDowngrade,
17 ReferrerPolicyNever, 17 ReferrerPolicyNever,
18 ReferrerPolicyOrigin, 18 ReferrerPolicyOrigin,
19 ReferrerPolicyOriginWhenCrossOrigin, 19 ReferrerPolicyOriginWhenCrossOrigin,
20 ReferrerPolicyLast = ReferrerPolicyOriginWhenCrossOrigin 20 ReferrerPolicySameOrigin,
21 ReferrerPolicyStrictOrigin,
22 ReferrerPolicyStrictOriginWhenCrossOrigin,
23 ReferrerPolicyLast = ReferrerPolicyStrictOriginWhenCrossOrigin
21 }; 24 };
22 25
23 // This struct holds a referrer URL, as well as the referrer policy to be 26 // This struct holds a referrer URL, as well as the referrer policy to be
24 // applied to this URL. When passing around referrers that will eventually end 27 // applied to this URL. When passing around referrers that will eventually end
25 // up being used for URL requests, always use this struct. 28 // up being used for URL requests, always use this struct.
26 struct Referrer { 29 struct Referrer {
27 Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {} 30 Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {}
28 Referrer() : policy(ReferrerPolicyDefault) {} 31 Referrer() : policy(ReferrerPolicyDefault) {}
29 32
30 GURL url; 33 GURL url;
31 ReferrerPolicy policy; 34 ReferrerPolicy policy;
32 }; 35 };
33 36
34 } // namespace web 37 } // namespace web
35 38
36 #endif // IOS_WEB_PUBLIC_REFERRER_H_ 39 #endif // IOS_WEB_PUBLIC_REFERRER_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ios/web/public/referrer_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698