Commit f5fef066 authored by mkwst's avatar mkwst Committed by Commit bot

Constify SchemeHostPort and Origin accessors.

BUG=490074
R=rsleevi@chromium.org,brettw@chromium.org

Review URL: https://codereview.chromium.org/1229003007

Cr-Commit-Position: refs/heads/master@{#339846}
parent 77011c24
...@@ -89,11 +89,8 @@ class URL_EXPORT Origin { ...@@ -89,11 +89,8 @@ class URL_EXPORT Origin {
~Origin(); ~Origin();
// For unique origins, these return ("", "", 0). // For unique origins, these return ("", "", 0).
// const std::string& scheme() const { return tuple_.scheme(); }
// TODO(mkwst): These should be 'const std::string&', along with their const std::string& host() const { return tuple_.host(); }
// 'url::SchemeHostPort' analogs.
std::string scheme() const { return tuple_.scheme(); }
std::string host() const { return tuple_.host(); }
uint16 port() const { return tuple_.port(); } uint16 port() const { return tuple_.port(); }
bool unique() const { return unique_; } bool unique() const { return unique_; }
......
...@@ -96,8 +96,8 @@ class URL_EXPORT SchemeHostPort { ...@@ -96,8 +96,8 @@ class URL_EXPORT SchemeHostPort {
// Returns the host component, in URL form. That is all IDN domain names will // Returns the host component, in URL form. That is all IDN domain names will
// be expressed as A-Labels ('☃.net' will be returned as 'xn--n3h.net'), and // be expressed as A-Labels ('☃.net' will be returned as 'xn--n3h.net'), and
// and all IPv6 addresses will be enclosed in brackets ("[2001:db8::1]"). // and all IPv6 addresses will be enclosed in brackets ("[2001:db8::1]").
std::string host() const { return host_; } const std::string& host() const { return host_; }
std::string scheme() const { return scheme_; } const std::string& scheme() const { return scheme_; }
uint16 port() const { return port_; } uint16 port() const { return port_; }
bool IsInvalid() const; bool IsInvalid() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment