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

Unified Diff: components/policy/core/common/preg_parser_win.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
Index: components/policy/core/common/preg_parser_win.cc
diff --git a/components/policy/core/common/preg_parser_win.cc b/components/policy/core/common/preg_parser_win.cc
index ee3fd2d9c4b545fc8e3c2b03abf5fa5e91fa8fa5..6c6248ce58cf90a7a328b000f1ccca4dbfccfa3e 100644
--- a/components/policy/core/common/preg_parser_win.cc
+++ b/components/policy/core/common/preg_parser_win.cc
@@ -33,12 +33,12 @@ const char kPRegFileHeader[8] =
const int64 kMaxPRegFileSize = 1024 * 1024 * 16;
// Constants for PReg file delimiters.
-const char16 kDelimBracketOpen = L'[';
-const char16 kDelimBracketClose = L']';
-const char16 kDelimSemicolon = L';';
+const base::char16 kDelimBracketOpen = L'[';
+const base::char16 kDelimBracketClose = L']';
+const base::char16 kDelimSemicolon = L';';
// Registry path separator.
-const char16 kRegistryPathSeparator[] = L"\\";
+const base::char16 kRegistryPathSeparator[] = L"\\";
// Magic strings for the PReg value field to trigger special actions.
const char kActionTriggerPrefix[] = "**";
@@ -52,12 +52,12 @@ const char kActionTriggerSoft[] = "soft";
// Returns the character at |cursor| and increments it, unless the end is here
// in which case -1 is returned.
int NextChar(const uint8** cursor, const uint8* end) {
- // Only read the character if a full char16 is available.
- if (*cursor + sizeof(char16) > end)
+ // Only read the character if a full base::char16 is available.
+ if (*cursor + sizeof(base::char16) > end)
return -1;
int result = **cursor | (*(*cursor + 1) << 8);
- *cursor += sizeof(char16);
+ *cursor += sizeof(base::char16);
return result;
}
@@ -99,11 +99,12 @@ bool ReadFieldString(const uint8** cursor,
}
std::string DecodePRegStringValue(const std::vector<uint8>& data) {
- size_t len = data.size() / sizeof(char16);
+ size_t len = data.size() / sizeof(base::char16);
if (len <= 0)
return std::string();
- const char16* chars = reinterpret_cast<const char16*>(vector_as_array(&data));
+ const base::char16* chars =
+ reinterpret_cast<const base::char16*>(vector_as_array(&data));
base::string16 result;
std::transform(chars, chars + len - 1, std::back_inserter(result),
std::ptr_fun(base::ByteSwapToLE16));
« no previous file with comments | « components/policy/core/common/policy_loader_win_unittest.cc ('k') | components/sessions/serialized_navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698