OLD | NEW |
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 CONTENT_PUBLIC_COMMON_REFERRER_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_REFERRER_H_ |
6 #define CONTENT_PUBLIC_COMMON_REFERRER_H_ | 6 #define CONTENT_PUBLIC_COMMON_REFERRER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
10 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h
" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h
" |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 // This struct holds a referrer URL, as well as the referrer policy to be | 14 // This struct holds a referrer URL, as well as the referrer policy to be |
16 // applied to this URL. When passing around referrers that will eventually end | 15 // applied to this URL. When passing around referrers that will eventually end |
17 // up being used for URL requests, always use this struct. | 16 // up being used for URL requests, always use this struct. |
18 struct CONTENT_EXPORT Referrer { | 17 struct CONTENT_EXPORT Referrer { |
19 Referrer(const GURL& url, WebKit::WebReferrerPolicy policy) : url(url), | 18 Referrer(const GURL& url, WebKit::WebReferrerPolicy policy) : url(url), |
20 policy(policy) { | 19 policy(policy) { |
21 } | 20 } |
22 Referrer() : policy(WebKit::WebReferrerPolicyDefault) { | 21 Referrer() : policy(WebKit::WebReferrerPolicyDefault) { |
23 } | 22 } |
24 | 23 |
25 GURL url; | 24 GURL url; |
26 WebKit::WebReferrerPolicy policy; | 25 WebKit::WebReferrerPolicy policy; |
27 }; | 26 }; |
28 | 27 |
29 } // namespace content | 28 } // namespace content |
30 | 29 |
31 #endif // CONTENT_PUBLIC_COMMON_REFERRER_H_ | 30 #endif // CONTENT_PUBLIC_COMMON_REFERRER_H_ |
OLD | NEW |