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

Unified Diff: ash/system/monitor/tray_monitor.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 months 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: ash/system/monitor/tray_monitor.cc
diff --git a/ash/system/monitor/tray_monitor.cc b/ash/system/monitor/tray_monitor.cc
index b6f134a3c1084f9cfd15d4d81484aa362a834acd..e34ffb54a03dfd9711f17ea7cb0911930fc185e6 100644
--- a/ash/system/monitor/tray_monitor.cc
+++ b/ash/system/monitor/tray_monitor.cc
@@ -65,12 +65,12 @@ void TrayMonitor::OnGotHandles(const std::list<base::ProcessHandle>& handles) {
std::string output;
string16 free_bytes =
ui::FormatBytes(static_cast<int64>(mem_info.free) * 1024);
- output = StringPrintf("free: %s", UTF16ToUTF8(free_bytes).c_str());
+ output = base::StringPrintf("free: %s", UTF16ToUTF8(free_bytes).c_str());
if (mem_info.gem_size != -1) {
string16 gem_size = ui::FormatBytes(mem_info.gem_size);
- output += StringPrintf(" gmem: %s", UTF16ToUTF8(gem_size).c_str());
+ output += base::StringPrintf(" gmem: %s", UTF16ToUTF8(gem_size).c_str());
if (mem_info.gem_objects != -1)
- output += StringPrintf(" gobjects: %d", mem_info.gem_objects);
+ output += base::StringPrintf(" gobjects: %d", mem_info.gem_objects);
}
size_t total_private_bytes = 0, total_shared_bytes = 0;
for (std::list<base::ProcessHandle>::const_iterator i = handles.begin();
@@ -85,9 +85,9 @@ void TrayMonitor::OnGotHandles(const std::list<base::ProcessHandle>& handles) {
string16 private_size = ui::FormatBytes(total_private_bytes);
string16 shared_size = ui::FormatBytes(total_shared_bytes);
- output += StringPrintf("\nGPU private: %s shared: %s",
- UTF16ToUTF8(private_size).c_str(),
- UTF16ToUTF8(shared_size).c_str());
+ output += base::StringPrintf("\nGPU private: %s shared: %s",
+ UTF16ToUTF8(private_size).c_str(),
+ UTF16ToUTF8(shared_size).c_str());
label_->SetText(UTF8ToUTF16(output));
refresh_timer_.Start(FROM_HERE,
base::TimeDelta::FromMilliseconds(kRefreshTimeoutMs),

Powered by Google App Engine
This is Rietveld 408576698