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

Unified Diff: chrome/browser/ui/webui/about_ui.cc

Issue 11419316: webui: Replace wstring with string16 for one variable. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/about_ui.cc
===================================================================
--- chrome/browser/ui/webui/about_ui.cc (revision 173509)
+++ chrome/browser/ui/webui/about_ui.cc (working copy)
@@ -871,7 +871,7 @@
const std::vector<ProcessData>& browser_processes = processes();
// Aggregate per-process data into browser summary data.
- std::wstring log_string;
+ string16 log_string;
for (size_t index = 0; index < browser_processes.size(); index++) {
if (browser_processes[index].processes.empty())
continue;
@@ -902,20 +902,16 @@
BindProcessMetrics(browser_data, &aggregate);
// We log memory info as we record it.
- if (log_string.length() > 0)
- log_string.append(L", ");
- log_string.append(UTF16ToWide(browser_processes[index].name));
- log_string.append(L", ");
- log_string.append(UTF8ToWide(
- base::Int64ToString(aggregate.working_set.priv)));
- log_string.append(L", ");
- log_string.append(UTF8ToWide(
- base::Int64ToString(aggregate.working_set.shared)));
- log_string.append(L", ");
- log_string.append(UTF8ToWide(
- base::Int64ToString(aggregate.working_set.shareable)));
+ if (!log_string.empty())
+ log_string += ASCIIToUTF16(", ");
+ log_string += browser_processes[index].name + ASCIIToUTF16(", ") +
+ base::Int64ToString16(aggregate.working_set.priv) +
+ ASCIIToUTF16(", ") +
+ base::Int64ToString16(aggregate.working_set.shared) +
+ ASCIIToUTF16(", ") +
+ base::Int64ToString16(aggregate.working_set.shareable);
}
- if (log_string.length() > 0)
+ if (!log_string.empty())
VLOG(1) << "memory: " << log_string;
// Set the browser & renderer detailed process data.
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698