Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / public / common / referrer.h
blobb45cd07150a846f8c124637a5577c6611e976e6c
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_REFERRER_H_
6 #define CONTENT_PUBLIC_COMMON_REFERRER_H_
8 #include "base/logging.h"
9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
11 #include "url/gurl.h"
13 namespace content {
15 // 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
17 // up being used for URL requests, always use this struct.
18 struct CONTENT_EXPORT Referrer {
19 Referrer(const GURL& url, blink::WebReferrerPolicy policy)
20 : url(url), policy(policy) {}
21 Referrer() : policy(blink::WebReferrerPolicyDefault) {}
23 GURL url;
24 blink::WebReferrerPolicy policy;
26 static Referrer SanitizeForRequest(const GURL& request,
27 const Referrer& referrer);
30 } // namespace content
32 #endif // CONTENT_PUBLIC_COMMON_REFERRER_H_