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

Unified Diff: chrome/browser/browser_shutdown.cc

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_shutdown.cc
===================================================================
--- chrome/browser/browser_shutdown.cc (revision 10269)
+++ chrome/browser/browser_shutdown.cc (working copy)
@@ -190,19 +190,19 @@
prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0);
if (type > NOT_VALID && shutdown_ms > 0 && num_procs > 0) {
- const wchar_t *time_fmt = L"Shutdown.%ls.time";
- const wchar_t *time_per_fmt = L"Shutdown.%ls.time_per_process";
- std::wstring time;
- std::wstring time_per;
+ const char *time_fmt = "Shutdown.%s.time";
+ const char *time_per_fmt = "Shutdown.%s.time_per_process";
+ std::string time;
+ std::string time_per;
if (type == WINDOW_CLOSE) {
- time = StringPrintf(time_fmt, L"window_close");
- time_per = StringPrintf(time_per_fmt, L"window_close");
+ time = StringPrintf(time_fmt, "window_close");
+ time_per = StringPrintf(time_per_fmt, "window_close");
} else if (type == BROWSER_EXIT) {
- time = StringPrintf(time_fmt, L"browser_exit");
- time_per = StringPrintf(time_per_fmt, L"browser_exit");
+ time = StringPrintf(time_fmt, "browser_exit");
+ time_per = StringPrintf(time_per_fmt, "browser_exit");
} else if (type == END_SESSION) {
- time = StringPrintf(time_fmt, L"end_session");
- time_per = StringPrintf(time_per_fmt, L"end_session");
+ time = StringPrintf(time_fmt, "end_session");
+ time_per = StringPrintf(time_per_fmt, "end_session");
} else {
NOTREACHED();
}
@@ -212,8 +212,8 @@
TimeDelta::FromMilliseconds(shutdown_ms));
UMA_HISTOGRAM_TIMES(time_per.c_str(),
TimeDelta::FromMilliseconds(shutdown_ms / num_procs));
- UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.total", num_procs);
- UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.slow", num_procs_slow);
+ UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.total", num_procs);
+ UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.slow", num_procs_slow);
}
}
}
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698