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

Side by Side Diff: Source/core/loader/LinkHeader.h

Issue 1285383002: Return const by ref instead of const by value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LinkHeader_h 5 #ifndef LinkHeader_h
6 #define LinkHeader_h 6 #define LinkHeader_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/html/CrossOriginAttribute.h" 9 #include "core/html/CrossOriginAttribute.h"
10 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LinkHeader { 14 class LinkHeader {
15 public: 15 public:
16 template <typename CharType> 16 template <typename CharType>
17 LinkHeader(CharType*& position, CharType* end); 17 LinkHeader(CharType*& position, CharType* end);
18 18
19 const String url() const { return m_url; } 19 const String& url() const { return m_url; }
20 const String rel() const { return m_rel; } 20 const String& rel() const { return m_rel; }
21 CrossOriginAttributeValue crossOrigin() const { return m_crossOrigin; } 21 CrossOriginAttributeValue crossOrigin() const { return m_crossOrigin; }
22 bool valid() const { return m_isValid; } 22 bool valid() const { return m_isValid; }
23 23
24 enum LinkParameterName { 24 enum LinkParameterName {
25 LinkParameterUnknown, 25 LinkParameterUnknown,
26 LinkParameterRel, 26 LinkParameterRel,
27 LinkParameterAnchor, 27 LinkParameterAnchor,
28 LinkParameterCrossOrigin, 28 LinkParameterCrossOrigin,
29 }; 29 };
30 30
(...skipping 18 matching lines...) Expand all
49 private: 49 private:
50 template <typename CharType> 50 template <typename CharType>
51 void init(CharType* headerValue, unsigned len); 51 void init(CharType* headerValue, unsigned len);
52 52
53 Vector<LinkHeader> m_headerSet; 53 Vector<LinkHeader> m_headerSet;
54 }; 54 };
55 55
56 } 56 }
57 57
58 #endif 58 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698