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

Unified Diff: url/origin.cc

Issue 1726323002: Have Permission{Manager,Service} use Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Blimp interface. Created 4 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
« 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 97e24f208d5b2098df01078615a7791503d30fbf..7efd9c453f2dd35ceaf2c55675bd5d6ec55d32ff 100644
--- a/url/origin.cc
+++ b/url/origin.cc
@@ -17,10 +17,9 @@
namespace url {
-Origin::Origin() : unique_(true) {
-}
+Origin::Origin() : unique_(true), empty_(true) {}
-Origin::Origin(const GURL& url) : unique_(true) {
+Origin::Origin(const GURL& url) : unique_(true), empty_(url.is_empty()) {
if (!url.is_valid() || (!url.IsStandard() && !url.SchemeIsBlob()))
return;
@@ -39,6 +38,8 @@ Origin::Origin(const GURL& url) : unique_(true) {
unique_ = tuple_.IsInvalid();
}
+Origin::Origin(const std::string& url_string) : Origin(GURL(url_string)) {}
+
Origin::Origin(base::StringPiece scheme, base::StringPiece host, uint16_t port)
: tuple_(scheme, host, port) {
unique_ = tuple_.IsInvalid();
« 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