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

Side by Side Diff: Source/wtf/text/StringOperators.h

Issue 99733002: Update HTTPHeaderMap wrappers to use AtomicString type for header values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master 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 unified diff | Download patch
« no previous file with comments | « Source/platform/network/WebSocketHandshakeResponse.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 17 matching lines...) Expand all
28 class StringAppend { 28 class StringAppend {
29 public: 29 public:
30 StringAppend(StringType1 string1, StringType2 string2) 30 StringAppend(StringType1 string1, StringType2 string2)
31 : m_string1(string1) 31 : m_string1(string1)
32 , m_string2(string2) 32 , m_string2(string2)
33 { 33 {
34 } 34 }
35 35
36 operator String() const 36 operator String() const
37 { 37 {
38 RefPtr<StringImpl> resultImpl = makeString(m_string1, m_string2); 38 return String(makeString(m_string1, m_string2));
39 return resultImpl.release();
40 } 39 }
41 40
42 operator AtomicString() const 41 operator AtomicString() const
43 { 42 {
44 return operator String(); 43 return AtomicString(makeString(m_string1, m_string2));
45 } 44 }
46 45
47 bool is8Bit() 46 bool is8Bit()
48 { 47 {
49 StringTypeAdapter<StringType1> adapter1(m_string1); 48 StringTypeAdapter<StringType1> adapter1(m_string1);
50 StringTypeAdapter<StringType2> adapter2(m_string2); 49 StringTypeAdapter<StringType2> adapter2(m_string2);
51 return adapter1.is8Bit() && adapter2.is8Bit(); 50 return adapter1.is8Bit() && adapter2.is8Bit();
52 } 51 }
53 52
54 void writeTo(LChar* destination) 53 void writeTo(LChar* destination)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 138
140 template<typename U, typename V, typename W> 139 template<typename U, typename V, typename W>
141 StringAppend<StringAppend<U, V>, W> operator+(const StringAppend<U, V>& string1, W string2) 140 StringAppend<StringAppend<U, V>, W> operator+(const StringAppend<U, V>& string1, W string2)
142 { 141 {
143 return StringAppend<StringAppend<U, V>, W>(string1, string2); 142 return StringAppend<StringAppend<U, V>, W>(string1, string2);
144 } 143 }
145 144
146 } // namespace WTF 145 } // namespace WTF
147 146
148 #endif // StringOperators_h 147 #endif // StringOperators_h
OLDNEW
« no previous file with comments | « Source/platform/network/WebSocketHandshakeResponse.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698