Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: content/browser/tab_contents/referrer.h

Issue 8635017: Add a referrer class to be used in the browser process whenever passing around referrsr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/tab_contents/referrer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/referrer.h
diff --git a/content/browser/tab_contents/referrer.h b/content/browser/tab_contents/referrer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5cead17cf29a8036b807e27cd32596a0b76941d4
--- /dev/null
+++ b/content/browser/tab_contents/referrer.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_
+#define CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_
+#pragma once
+
+#include <iosfwd>
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+#include "googleurl/src/gurl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h"
+
+namespace content {
+
+// This class holds a referrer URL, as well as the referrer policy to be
+// applied to this URL. When passing around referrers in the browser process,
+// that will eventually end up being used for URL requests, always use this
+// class.
+class CONTENT_EXPORT Referrer {
+ public:
+ Referrer(const GURL& referrer, WebKit::WebReferrerPolicy referrer_policy);
+ Referrer();
+
+ const GURL& url() const { return url_; }
+ WebKit::WebReferrerPolicy policy() const { return policy_; }
+
+ private:
+ GURL url_;
+ WebKit::WebReferrerPolicy policy_;
+};
+
+// Stream operator so Referrer can be used in assertion statements.
+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.
+ const Referrer& referrer);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_TAB_CONTENTS_REFERRER_H_
« no previous file with comments | « no previous file | content/browser/tab_contents/referrer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698