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

Unified Diff: url/origin.h

Issue 1229003007: Constify SchemeHostPort and Origin accessors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1224293002
Patch Set: Rebase. Created 5 years, 5 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/scheme_host_port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin.h
diff --git a/url/origin.h b/url/origin.h
index 15fe0eaa9b4a92aade81f12f204e7bb1051129e9..01703efa38648443a38a55e835d3d79fbc6f13da 100644
--- a/url/origin.h
+++ b/url/origin.h
@@ -89,11 +89,8 @@ class URL_EXPORT Origin {
~Origin();
// For unique origins, these return ("", "", 0).
- //
- // TODO(mkwst): These should be 'const std::string&', along with their
- // 'url::SchemeHostPort' analogs.
- std::string scheme() const { return tuple_.scheme(); }
- std::string host() const { return tuple_.host(); }
+ const std::string& scheme() const { return tuple_.scheme(); }
+ const std::string& host() const { return tuple_.host(); }
uint16 port() const { return tuple_.port(); }
bool unique() const { return unique_; }
« no previous file with comments | « no previous file | url/scheme_host_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698