OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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. | |
4 | |
5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_ | |
6 #define CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_ | |
7 #pragma once | |
8 | |
9 #include <iosfwd> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "content/common/content_export.h" | |
13 #include "googleurl/src/gurl.h" | |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h" | |
15 | |
16 namespace content { | |
17 | |
18 // This class holds a referrer URL, as well as the referrer policy to be | |
19 // applied to this URL. When passing around referrers in the browser process, | |
20 // that will eventually end up being used for URL requests, always use this | |
21 // class. | |
22 class CONTENT_EXPORT Referrer { | |
23 public: | |
24 Referrer(const GURL& referrer, WebKit::WebReferrerPolicy referrer_policy); | |
25 Referrer(); | |
26 | |
27 const GURL& url() const { return url_; } | |
28 WebKit::WebReferrerPolicy policy() const { return policy_; } | |
29 | |
30 private: | |
31 GURL url_; | |
32 WebKit::WebReferrerPolicy policy_; | |
33 }; | |
34 | |
35 // Stream operator so Referrer can be used in assertion statements. | |
36 CONTENT_EXPORT std::ostream& operator<<(std::ostream& out, | |
brettw
2011/11/22 21:14:01
We don't usually write these. Is it really necessa
jochen (gone - plz use gerrit)
2011/11/22 21:26:07
Done.
| |
37 const Referrer& referrer); | |
38 | |
39 } // namespace content | |
40 | |
41 #endif // CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_ | |
OLD | NEW |