Roll src/third_party/WebKit f007c95:0171005 (svn 185074:185088)
[chromium-blink-merge.git] / ios / web / public / referrer.h
blob3110c8928b4b13790e88c0d0d4aabf116ae1b1bb
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
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_PUBLIC_REFERRER_H_
6 #define IOS_WEB_PUBLIC_REFERRER_H_
8 #include "base/logging.h"
9 #include "url/gurl.h"
11 namespace web {
13 enum ReferrerPolicy {
14 ReferrerPolicyAlways,
15 ReferrerPolicyDefault,
16 ReferrerPolicyNever,
17 ReferrerPolicyOrigin,
18 ReferrerPolicyLast = ReferrerPolicyOrigin
21 // 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
23 // up being used for URL requests, always use this struct.
24 struct Referrer {
25 Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {}
26 Referrer() : policy(ReferrerPolicyDefault) {}
28 GURL url;
29 ReferrerPolicy policy;
32 } // namespace web
34 #endif // IOS_WEB_PUBLIC_REFERRER_H_