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

Unified Diff: url/origin.cc

Issue 2495353003: chrome.webRequest support for ExtensionSettings (Closed)
Patch Set: Policy template translation doesn't like '&', switching to 'and'. Small fix to browser test. 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
« url/origin.h ('K') | « 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;
+}
+
bool Origin::IsSameOriginWith(const Origin& other) const {
if (unique_ || other.unique_)
return false;
« url/origin.h ('K') | « url/origin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698