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

Unified Diff: chrome/browser/plugin_exceptions_table_model.cc

Issue 6044007: Remove wstring from TableModel.... (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
Index: chrome/browser/plugin_exceptions_table_model.cc
===================================================================
--- chrome/browser/plugin_exceptions_table_model.cc (revision 70272)
+++ chrome/browser/plugin_exceptions_table_model.cc (working copy)
@@ -75,23 +75,21 @@
return settings_.size();
}
-std::wstring PluginExceptionsTableModel::GetText(int row, int column_id) {
+string16 PluginExceptionsTableModel::GetText(int row, int column_id) {
DCHECK_GE(row, 0);
DCHECK_LT(row, static_cast<int>(settings_.size()));
SettingsEntry& entry = settings_[row];
switch (column_id) {
case IDS_EXCEPTIONS_PATTERN_HEADER:
case IDS_EXCEPTIONS_HOSTNAME_HEADER:
- return UTF8ToWide(entry.pattern.AsString());
+ return UTF8ToUTF16(entry.pattern.AsString());
case IDS_EXCEPTIONS_ACTION_HEADER:
switch (entry.setting) {
case CONTENT_SETTING_ALLOW:
- return UTF16ToWideHack(
- l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON));
+ return l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON);
case CONTENT_SETTING_BLOCK:
- return UTF16ToWideHack(
- l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON));
+ return l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON);
default:
NOTREACHED();
}
@@ -101,7 +99,7 @@
NOTREACHED();
}
- return std::wstring();
+ return string16();
}
bool PluginExceptionsTableModel::HasGroups() {
@@ -156,7 +154,7 @@
plugin,
&otr_settings);
}
- std::wstring title = UTF16ToWide(plugins[i].GetGroupName());
+ string16 title = plugins[i].GetGroupName();
for (HostContentSettingsMap::SettingsForOneType::iterator setting_it =
settings.begin(); setting_it != settings.end(); ++setting_it) {
SettingsEntry entry = {

Powered by Google App Engine
This is Rietveld 408576698