OLD | NEW |
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 ReferrerPolicyNever, | 17 ReferrerPolicyNever, |
17 ReferrerPolicyOrigin, | 18 ReferrerPolicyOrigin, |
18 ReferrerPolicyLast = ReferrerPolicyOrigin | 19 ReferrerPolicyOriginWhenCrossOrigin, |
| 20 ReferrerPolicyLast = ReferrerPolicyOriginWhenCrossOrigin |
19 }; | 21 }; |
20 | 22 |
21 // This struct holds a referrer URL, as well as the referrer policy to be | 23 // This struct holds a referrer URL, as well as the referrer policy to be |
22 // applied to this URL. When passing around referrers that will eventually end | 24 // applied to this URL. When passing around referrers that will eventually end |
23 // up being used for URL requests, always use this struct. | 25 // up being used for URL requests, always use this struct. |
24 struct Referrer { | 26 struct Referrer { |
25 Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {} | 27 Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {} |
26 Referrer() : policy(ReferrerPolicyDefault) {} | 28 Referrer() : policy(ReferrerPolicyDefault) {} |
27 | 29 |
28 GURL url; | 30 GURL url; |
29 ReferrerPolicy policy; | 31 ReferrerPolicy policy; |
30 }; | 32 }; |
31 | 33 |
32 } // namespace web | 34 } // namespace web |
33 | 35 |
34 #endif // IOS_WEB_PUBLIC_REFERRER_H_ | 36 #endif // IOS_WEB_PUBLIC_REFERRER_H_ |
OLD | NEW |