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

Unified Diff: url/origin.cc

Issue 2495353003: chrome.webRequest support for ExtensionSettings (Closed)
Patch Set: Clean up tests & comments Created 3 years, 7 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 | « url/origin.h ('k') | no next file » | 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 d15ba43f8f64f196e47fd540c3e15632c5c3a61a..087dde77a57c5768d3d5764ff65adee8c2463d12 100644
--- a/url/origin.cc
+++ b/url/origin.cc
@@ -159,6 +159,18 @@ GURL Origin::GetURL() const {
return tuple_url;
}
+GURL Origin::GetURLWithoutSuborigin() const {
+ if (unique())
+ return GURL();
+
+ if (scheme() == kFileScheme)
+ return GURL("file:///");
+
+ GURL tuple_url(tuple_.GetURL());
+
+ return tuple_url;
+}
Mike West 2017/05/26 11:45:35 +Jochen, who's responsible for suborigins these da
jochen (gone - plz use gerrit) 2017/05/26 11:51:53 why not use origin->GetPhysicalOrigin().GetURL() ?
nrpeter 2017/05/26 15:50:24 Good point, I'll switch to GetPhysicalOrigin().Get
+
bool Origin::IsSameOriginWith(const Origin& other) const {
if (unique_ || other.unique_)
return false;
« no previous file with comments | « url/origin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698