diff options
Diffstat (limited to 'ios/web')
-rw-r--r-- | ios/web/ios_web.gyp | 1 | ||||
-rw-r--r-- | ios/web/public/referrer.h | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/ios/web/ios_web.gyp b/ios/web/ios_web.gyp index 1742121..c092fd2 100644 --- a/ios/web/ios_web.gyp +++ b/ios/web/ios_web.gyp @@ -20,6 +20,7 @@ 'public/favicon_status.cc', 'public/favicon_status.h', 'public/navigation_item.h', + 'public/referrer.h', 'public/security_style.h', 'public/ssl_status.cc', 'public/ssl_status.h', diff --git a/ios/web/public/referrer.h b/ios/web/public/referrer.h new file mode 100644 index 0000000..3110c89 --- /dev/null +++ b/ios/web/public/referrer.h @@ -0,0 +1,34 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_WEB_PUBLIC_REFERRER_H_ +#define IOS_WEB_PUBLIC_REFERRER_H_ + +#include "base/logging.h" +#include "url/gurl.h" + +namespace web { + +enum ReferrerPolicy { + ReferrerPolicyAlways, + ReferrerPolicyDefault, + ReferrerPolicyNever, + ReferrerPolicyOrigin, + ReferrerPolicyLast = ReferrerPolicyOrigin +}; + +// This struct holds a referrer URL, as well as the referrer policy to be +// applied to this URL. When passing around referrers that will eventually end +// up being used for URL requests, always use this struct. +struct Referrer { + Referrer(const GURL& url, ReferrerPolicy policy) : url(url), policy(policy) {} + Referrer() : policy(ReferrerPolicyDefault) {} + + GURL url; + ReferrerPolicy policy; +}; + +} // namespace web + +#endif // IOS_WEB_PUBLIC_REFERRER_H_ |