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

Unified Diff: url/origin.cc

Issue 2688573002: Allow a unique origin to compare equal to itself
Patch Set: Update tests 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 | « no previous file | url/origin_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin.cc
diff --git a/url/origin.cc b/url/origin.cc
index 53600b1dc96f6c5b2736cb2eb0988b3b34fb715b..98fcf1d91554f38dfd2c7bbf0d4bfb4603c9ef98 100644
--- a/url/origin.cc
+++ b/url/origin.cc
@@ -158,6 +158,9 @@ GURL Origin::GetURL() const {
}
bool Origin::IsSameOriginWith(const Origin& other) const {
+ if (this == &other)
+ return true;
+
if (unique_ || other.unique_)
return false;
« no previous file with comments | « no previous file | url/origin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698