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

Unified Diff: url/origin.h

Issue 2714813003: Add an identity component for unique/opaque url::Origins.
Patch Set: Switch to base::UnguessableToken, add to SecurityOrigin. No conversions yet. Created 3 years, 10 months 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 | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | url/origin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin.h
diff --git a/url/origin.h b/url/origin.h
index 4b838e420f3ffac5d280d70204030a6d9b84844c..e5c27165f68081b42b0fc416d17d761f03f11f8b 100644
--- a/url/origin.h
+++ b/url/origin.h
@@ -11,6 +11,7 @@
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
+#include "base/unguessable_token.h"
#include "url/scheme_host_port.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
@@ -174,9 +175,14 @@ class URL_EXPORT Origin {
std::string suborigin,
SchemeHostPort::ConstructPolicy policy);
- SchemeHostPort tuple_;
bool unique_;
+
+ SchemeHostPort tuple_;
std::string suborigin_;
+
+ // This should only be used for equality comparison when both origins are
+ // unique.
+ base::UnguessableToken unique_id_;
};
URL_EXPORT std::ostream& operator<<(std::ostream& out, const Origin& origin);
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | url/origin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698