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

Unified Diff: content/common/page_state_serialization.cc

Issue 113403006: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/indexed_db/indexed_db_key_unittest.cc ('k') | content/common/plugin_constants_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/page_state_serialization.cc
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 4fba5075690a2fe6ab96be6c784f067837454f1c..1a7db619442e43bf3b91fd1c78817a18621004e8 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -311,8 +311,8 @@ void WriteString(const base::NullableString16& str, SerializeObject* obj) {
if (str.is_null()) {
obj->pickle.WriteInt(-1);
} else {
- const char16* data = str.string().data();
- size_t length_in_bytes = str.string().length() * sizeof(char16);
+ const base::char16* data = str.string().data();
+ size_t length_in_bytes = str.string().length() * sizeof(base::char16);
CHECK_LT(length_in_bytes,
static_cast<size_t>(std::numeric_limits<int>::max()));
@@ -323,7 +323,7 @@ void WriteString(const base::NullableString16& str, SerializeObject* obj) {
// This reads a serialized NullableString16 from obj. If a string can't be
// read, NULL is returned.
-const char16* ReadStringNoCopy(SerializeObject* obj, int* num_chars) {
+const base::char16* ReadStringNoCopy(SerializeObject* obj, int* num_chars) {
int length_in_bytes;
if (!obj->pickle.ReadInt(&obj->iter, &length_in_bytes)) {
obj->parse_error = true;
@@ -340,20 +340,20 @@ const char16* ReadStringNoCopy(SerializeObject* obj, int* num_chars) {
}
if (num_chars)
- *num_chars = length_in_bytes / sizeof(char16);
- return reinterpret_cast<const char16*>(data);
+ *num_chars = length_in_bytes / sizeof(base::char16);
+ return reinterpret_cast<const base::char16*>(data);
}
base::NullableString16 ReadString(SerializeObject* obj) {
int num_chars;
- const char16* chars = ReadStringNoCopy(obj, &num_chars);
+ const base::char16* chars = ReadStringNoCopy(obj, &num_chars);
return chars ?
base::NullableString16(base::string16(chars, num_chars), false) :
base::NullableString16();
}
void ConsumeString(SerializeObject* obj) {
- const char16* unused ALLOW_UNUSED = ReadStringNoCopy(obj, NULL);
+ const base::char16* unused ALLOW_UNUSED = ReadStringNoCopy(obj, NULL);
}
template <typename T>
« no previous file with comments | « content/common/indexed_db/indexed_db_key_unittest.cc ('k') | content/common/plugin_constants_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698