| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module blink.mojom; | 5 module blink.mojom; |
| 6 | 6 |
| 7 import "url/mojo/url.mojom"; | 7 import "url/mojo/url.mojom"; |
| 8 | 8 |
| 9 // Maps to blink::WebReferrerPolicy in | 9 // Maps to blink::WebReferrerPolicy in |
| 10 // src/third_party/WebKit/public/platform/WebReferrerPolicy.h. | 10 // src/third_party/WebKit/public/platform/WebReferrerPolicy.h. |
| 11 // | 11 // |
| 12 // TODO(rockot): Update all WebReferrerPolicy consumers to use this type | 12 // TODO(rockot): Update all WebReferrerPolicy consumers to use this type |
| 13 // instead, and remove the typemap. | 13 // instead, and remove the typemap. |
| 14 enum ReferrerPolicy { | 14 enum ReferrerPolicy { |
| 15 ALWAYS, | 15 ALWAYS, |
| 16 DEFAULT, | 16 DEFAULT, |
| 17 NO_REFERRER_WHEN_DOWNGRADE, | 17 NO_REFERRER_WHEN_DOWNGRADE, |
| 18 NEVER, | 18 NEVER, |
| 19 ORIGIN, | 19 ORIGIN, |
| 20 ORIGIN_WHEN_CROSS_ORIGIN, | 20 ORIGIN_WHEN_CROSS_ORIGIN, |
| 21 SAME_ORIGIN, |
| 22 STRICT_ORIGIN, |
| 21 NO_REFERRER_WHEN_DOWNGRADE_ORIGIN_WHEN_CROSS_ORIGIN, | 23 NO_REFERRER_WHEN_DOWNGRADE_ORIGIN_WHEN_CROSS_ORIGIN, |
| 22 }; | 24 }; |
| 23 | 25 |
| 24 // 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 |
| 25 // 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 |
| 26 // up being used for URL requests, always use this struct. | 28 // up being used for URL requests, always use this struct. |
| 27 struct Referrer { | 29 struct Referrer { |
| 28 url.mojom.Url url; | 30 url.mojom.Url url; |
| 29 ReferrerPolicy policy; | 31 ReferrerPolicy policy; |
| 30 }; | 32 }; |
| OLD | NEW |