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

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

Issue 2586483002: Use explicit WebString <-> string16 conversion methods in storage API files (Closed)
Patch Set: '' Created 4 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 | « third_party/WebKit/public/platform/FilePathConversion.h ('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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // * webstring.utf8() 65 // * webstring.utf8()
66 // * webstring.utf16() 66 // * webstring.utf16()
67 // * WebString::toNullableString16(webstring) 67 // * WebString::toNullableString16(webstring)
68 // 68 //
69 // Some types like GURL and base::FilePath can directly take either utf-8 or 69 // Some types like GURL and base::FilePath can directly take either utf-8 or
70 // utf-16 strings. Use following methods to convert WebString to/from GURL or 70 // utf-16 strings. Use following methods to convert WebString to/from GURL or
71 // FilePath rather than going through intermediate string types: 71 // FilePath rather than going through intermediate string types:
72 // 72 //
73 // * GURL WebStringToGURL(const WebString&) 73 // * GURL WebStringToGURL(const WebString&)
74 // * base::FilePath WebStringToFilePath(const WebString&) 74 // * base::FilePath WebStringToFilePath(const WebString&)
75 // * WebString FilePathToWebString(const base::FilePath&);
75 // 76 //
76 // It is inexpensive to copy a WebString object. 77 // It is inexpensive to copy a WebString object.
77 // WARNING: It is not safe to pass a WebString across threads!!! 78 // WARNING: It is not safe to pass a WebString across threads!!!
78 // 79 //
79 class WebString { 80 class WebString {
80 public: 81 public:
81 ~WebString() { reset(); } 82 ~WebString() { reset(); }
82 83
83 WebString() {} 84 WebString() {}
84 85
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return a.equals(b); 232 return a.equals(b);
232 } 233 }
233 234
234 inline bool operator!=(const WebString& a, const WebString& b) { 235 inline bool operator!=(const WebString& a, const WebString& b) {
235 return !(a == b); 236 return !(a == b);
236 } 237 }
237 238
238 } // namespace blink 239 } // namespace blink
239 240
240 #endif 241 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/FilePathConversion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698