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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringView.cpp

Issue 2140353002: Move StringView constructors into WTFString.h/AtomicString.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constructor. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "wtf/text/StringView.h" 5 #include "wtf/text/StringView.h"
6 6
7 #include "wtf/text/AtomicString.h"
8 #include "wtf/text/WTFString.h"
9
7 namespace WTF { 10 namespace WTF {
8 11
9 StringView::StringView(const UChar* chars) 12 StringView::StringView(const UChar* chars)
10 : StringView(chars, chars ? lengthOfNullTerminatedString(chars) : 0) {} 13 : StringView(chars, chars ? lengthOfNullTerminatedString(chars) : 0) {}
11 14
12 #if DCHECK_IS_ON() 15 #if DCHECK_IS_ON()
13 StringView::~StringView() 16 StringView::~StringView()
14 { 17 {
15 DCHECK(m_impl); 18 DCHECK(m_impl);
16 DCHECK(!m_impl->hasOneRef()) 19 DCHECK(!m_impl->hasOneRef())
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (b.is8Bit()) 73 if (b.is8Bit())
71 return equalIgnoringASCIICase(a.characters8(), b.characters8(), a.le ngth()); 74 return equalIgnoringASCIICase(a.characters8(), b.characters8(), a.le ngth());
72 return equalIgnoringASCIICase(a.characters8(), b.characters16(), a.lengt h()); 75 return equalIgnoringASCIICase(a.characters8(), b.characters16(), a.lengt h());
73 } 76 }
74 if (b.is8Bit()) 77 if (b.is8Bit())
75 return equalIgnoringASCIICase(a.characters16(), b.characters8(), a.lengt h()); 78 return equalIgnoringASCIICase(a.characters16(), b.characters8(), a.lengt h());
76 return equalIgnoringASCIICase(a.characters16(), b.characters16(), a.length() ); 79 return equalIgnoringASCIICase(a.characters16(), b.characters16(), a.length() );
77 } 80 }
78 81
79 } // namespace WTF 82 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.h ('k') | third_party/WebKit/Source/wtf/text/StringViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698