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

Unified Diff: chrome/browser/memory_details_mac.cc

Issue 5968008: Update file version info/memory details/process utils to use string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/browser/memory_details_linux.cc ('k') | chrome/browser/memory_details_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory_details_mac.cc
===================================================================
--- chrome/browser/memory_details_mac.cc (revision 69950)
+++ chrome/browser/memory_details_mac.cc (working copy)
@@ -51,8 +51,8 @@
MemoryDetails::MemoryDetails() {
- static const std::wstring google_browser_name =
- l10n_util::GetString(IDS_PRODUCT_NAME);
+ static const std::string google_browser_name =
+ l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
// (Human and process) names of browsers; should match the ordering for
// |BrowserProcess| (i.e., |BrowserType|).
// TODO(viettrungluu): The current setup means that we can't detect both
@@ -60,21 +60,21 @@
// TODO(viettrungluu): Get localized browser names for other browsers
// (crbug.com/25779).
struct {
- const wchar_t* name;
- const wchar_t* process_name;
+ const char* name;
+ const char* process_name;
} process_template[MAX_BROWSERS] = {
{ google_browser_name.c_str(), chrome::kBrowserProcessExecutableName, },
- { L"Safari", L"Safari", },
- { L"Firefox", L"firefox-bin", },
- { L"Camino", L"Camino", },
- { L"Opera", L"Opera", },
- { L"OmniWeb", L"OmniWeb", },
+ { "Safari", "Safari", },
+ { "Firefox", "firefox-bin", },
+ { "Camino", "Camino", },
+ { "Opera", "Opera", },
+ { "OmniWeb", "OmniWeb", },
};
for (size_t index = 0; index < MAX_BROWSERS; ++index) {
ProcessData process;
- process.name = process_template[index].name;
- process.process_name = process_template[index].process_name;
+ process.name = UTF8ToUTF16(process_template[index].name);
+ process.process_name = UTF8ToUTF16(process_template[index].process_name);
process_data_.push_back(process);
}
}
@@ -104,8 +104,8 @@
std::vector<base::ProcessId> pids_by_browser[MAX_BROWSERS];
std::vector<base::ProcessId> all_pids;
for (size_t index = CHROME_BROWSER; index < MAX_BROWSERS; index++) {
- base::NamedProcessIterator process_it(process_data_[index].process_name,
- NULL);
+ base::NamedProcessIterator process_it(
+ UTF16ToUTF8(process_data_[index].process_name), NULL);
while (const base::ProcessEntry* entry = process_it.NextProcessEntry()) {
pids_by_browser[index].push_back(entry->pid());
@@ -158,7 +158,7 @@
info.version = version_info->product_version();
} else {
info.product_name = process_data_[index].name;
- info.version = L"";
+ info.version = string16();
}
// Memory info.
@@ -202,11 +202,11 @@
chrome::VersionInfo version_info;
if (version_info.is_valid()) {
- info.product_name = ASCIIToWide(version_info.Name());
- info.version = ASCIIToWide(version_info.Version());
+ info.product_name = ASCIIToUTF16(version_info.Name());
+ info.version = ASCIIToUTF16(version_info.Version());
} else {
info.product_name = process_data_[CHROME_BROWSER].name;
- info.version = L"";
+ info.version = string16();
}
// Check if this is one of the child processes whose data we collected
« no previous file with comments | « chrome/browser/memory_details_linux.cc ('k') | chrome/browser/memory_details_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698