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

Side by Side Diff: third_party/WebKit/public/platform/WebString.h

Issue 2007103003: Expand WTF::StringView's API to be more like StringPiece. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove bad assert. Created 4 years, 6 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 | « third_party/WebKit/Source/wtf/wtf.gypi ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 { 113 {
114 assign(fromUTF8(data, N - 1)); 114 assign(fromUTF8(data, N - 1));
115 return *this; 115 return *this;
116 } 116 }
117 117
118 #if INSIDE_BLINK 118 #if INSIDE_BLINK
119 BLINK_COMMON_EXPORT WebString(const WTF::String&); 119 BLINK_COMMON_EXPORT WebString(const WTF::String&);
120 BLINK_COMMON_EXPORT WebString& operator=(const WTF::String&); 120 BLINK_COMMON_EXPORT WebString& operator=(const WTF::String&);
121 BLINK_COMMON_EXPORT operator WTF::String() const; 121 BLINK_COMMON_EXPORT operator WTF::String() const;
122 122
123 BLINK_COMMON_EXPORT operator WTF::StringView() const;
124
123 BLINK_COMMON_EXPORT WebString(const WTF::AtomicString&); 125 BLINK_COMMON_EXPORT WebString(const WTF::AtomicString&);
124 BLINK_COMMON_EXPORT WebString& operator=(const WTF::AtomicString&); 126 BLINK_COMMON_EXPORT WebString& operator=(const WTF::AtomicString&);
125 BLINK_COMMON_EXPORT operator WTF::AtomicString() const; 127 BLINK_COMMON_EXPORT operator WTF::AtomicString() const;
126 #else 128 #else
127 WebString(const base::string16& s) 129 WebString(const base::string16& s)
128 { 130 {
129 assign(s.data(), s.length()); 131 assign(s.data(), s.length());
130 } 132 }
131 133
132 WebString& operator=(const base::string16& s) 134 WebString& operator=(const base::string16& s)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 201 }
200 202
201 inline bool operator!=(const WebString& a, const WebString& b) 203 inline bool operator!=(const WebString& a, const WebString& b)
202 { 204 {
203 return !(a == b); 205 return !(a == b);
204 } 206 }
205 207
206 } // namespace blink 208 } // namespace blink
207 209
208 #endif 210 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/wtf.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698