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

Unified Diff: net/base/escape.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (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 | « media/midi/midi_manager_win.cc ('k') | net/base/escape_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.cc
diff --git a/net/base/escape.cc b/net/base/escape.cc
index d1b592c7171192daf17c0a467c00e06825c2ae1f..134a98652013177eaf7f52d2fa8c504f53654607 100644
--- a/net/base/escape.cc
+++ b/net/base/escape.cc
@@ -337,7 +337,7 @@ base::string16 UnescapeForHTML(const base::string16& input) {
{ "'", '\''},
};
- if (input.find(ASCIIToUTF16("&")) == std::string::npos)
+ if (input.find(base::ASCIIToUTF16("&")) == std::string::npos)
return input;
base::string16 ampersand_chars[ARRAYSIZE_UNSAFE(kEscapeToChars)];
@@ -348,8 +348,10 @@ base::string16 UnescapeForHTML(const base::string16& input) {
// Potential ampersand encode char.
size_t index = iter - text.begin();
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kEscapeToChars); i++) {
- if (ampersand_chars[i].empty())
- ampersand_chars[i] = ASCIIToUTF16(kEscapeToChars[i].ampersand_code);
+ if (ampersand_chars[i].empty()) {
+ ampersand_chars[i] =
+ base::ASCIIToUTF16(kEscapeToChars[i].ampersand_code);
+ }
if (text.find(ampersand_chars[i], index) == index) {
text.replace(iter, iter + ampersand_chars[i].length(),
1, kEscapeToChars[i].replacement);
« no previous file with comments | « media/midi/midi_manager_win.cc ('k') | net/base/escape_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698