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

Unified Diff: Source/platform/network/ResourceRequest.h

Issue 102103002: Have HashMap<KeyType, AtomicString>::get() return a const reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use AtomicString::ConstructFromLiteral Created 7 years 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 | « Source/platform/network/HTTPHeaderMap.cpp ('k') | Source/platform/network/ResourceRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ResourceRequest.h
diff --git a/Source/platform/network/ResourceRequest.h b/Source/platform/network/ResourceRequest.h
index d319534a914cded9cd971afa5caea1f0fd1181ee..acbe96b20682a2cf10e013af73ddf6266316ce95 100644
--- a/Source/platform/network/ResourceRequest.h
+++ b/Source/platform/network/ResourceRequest.h
@@ -122,7 +122,7 @@ public:
void setHTTPMethod(const AtomicString&);
const HTTPHeaderMap& httpHeaderFields() const;
- AtomicString httpHeaderField(const AtomicString& name) const;
+ const AtomicString& httpHeaderField(const AtomicString& name) const;
const AtomicString& httpHeaderField(const char* name) const;
void setHTTPHeaderField(const AtomicString& name, const AtomicString& value);
void setHTTPHeaderField(const char* name, const AtomicString& value);
@@ -132,23 +132,23 @@ public:
void clearHTTPAuthorization();
- AtomicString httpContentType() const { return httpHeaderField("Content-Type"); }
+ const AtomicString& httpContentType() const { return httpHeaderField("Content-Type"); }
void setHTTPContentType(const AtomicString& httpContentType) { setHTTPHeaderField("Content-Type", httpContentType); }
void clearHTTPContentType();
- AtomicString httpReferrer() const { return httpHeaderField("Referer"); }
+ const AtomicString& httpReferrer() const { return httpHeaderField("Referer"); }
void setHTTPReferrer(const AtomicString& httpReferrer) { setHTTPHeaderField("Referer", httpReferrer); }
void clearHTTPReferrer();
- AtomicString httpOrigin() const { return httpHeaderField("Origin"); }
+ const AtomicString& httpOrigin() const { return httpHeaderField("Origin"); }
void setHTTPOrigin(const AtomicString& httpOrigin) { setHTTPHeaderField("Origin", httpOrigin); }
void clearHTTPOrigin();
- AtomicString httpUserAgent() const { return httpHeaderField("User-Agent"); }
+ const AtomicString& httpUserAgent() const { return httpHeaderField("User-Agent"); }
void setHTTPUserAgent(const AtomicString& httpUserAgent) { setHTTPHeaderField("User-Agent", httpUserAgent); }
void clearHTTPUserAgent();
- AtomicString httpAccept() const { return httpHeaderField("Accept"); }
+ const AtomicString& httpAccept() const { return httpHeaderField("Accept"); }
void setHTTPAccept(const AtomicString& httpAccept) { setHTTPHeaderField("Accept", httpAccept); }
void clearHTTPAccept();
« no previous file with comments | « Source/platform/network/HTTPHeaderMap.cpp ('k') | Source/platform/network/ResourceRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698