summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-30 00:50:04 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-30 00:50:04 +0000
commitbdaab67c485eee51a098c7b34544c5d18bf725af (patch)
tree31e0c087b57c538ef91b6598040f2b7f2293505d /app
parentfbc7678b2f73707962861c99eb4c809604ddd611 (diff)
downloadchromium_src-bdaab67c485eee51a098c7b34544c5d18bf725af.zip
chromium_src-bdaab67c485eee51a098c7b34544c5d18bf725af.tar.gz
chromium_src-bdaab67c485eee51a098c7b34544c5d18bf725af.tar.bz2
Remove wstring from TableModel.
BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6044007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/table_model.cc18
-rw-r--r--app/table_model.h14
2 files changed, 16 insertions, 16 deletions
diff --git a/app/table_model.cc b/app/table_model.cc
index 4ce5ebb..8a6176e 100644
--- a/app/table_model.cc
+++ b/app/table_model.cc
@@ -21,7 +21,7 @@ TableColumn::TableColumn()
sortable(false) {
}
-TableColumn::TableColumn(int id, const std::wstring& title,
+TableColumn::TableColumn(int id, const string16& title,
Alignment alignment,
int width)
: id(id),
@@ -33,7 +33,7 @@ TableColumn::TableColumn(int id, const std::wstring& title,
sortable(false) {
}
-TableColumn::TableColumn(int id, const std::wstring& title,
+TableColumn::TableColumn(int id, const string16& title,
Alignment alignment, int width, float percent)
: id(id),
title(title),
@@ -54,7 +54,7 @@ TableColumn::TableColumn(int id, Alignment alignment, int width)
percent(0),
min_visible_width(0),
sortable(false) {
- title = UTF16ToWide(l10n_util::GetStringUTF16(id));
+ title = l10n_util::GetStringUTF16(id);
}
TableColumn::TableColumn(int id, Alignment alignment, int width, float percent)
@@ -64,7 +64,7 @@ TableColumn::TableColumn(int id, Alignment alignment, int width, float percent)
percent(percent),
min_visible_width(0),
sortable(false) {
- title = UTF16ToWide(l10n_util::GetStringUTF16(id));
+ title = l10n_util::GetStringUTF16(id);
}
// TableModel -----------------------------------------------------------------
@@ -76,8 +76,8 @@ SkBitmap TableModel::GetIcon(int row) {
return SkBitmap();
}
-std::wstring TableModel::GetTooltip(int row) {
- return std::wstring();
+string16 TableModel::GetTooltip(int row) {
+ return string16();
}
bool TableModel::ShouldIndent(int row) {
@@ -105,12 +105,12 @@ int TableModel::GetGroupID(int row) {
int TableModel::CompareValues(int row1, int row2, int column_id) {
DCHECK(row1 >= 0 && row1 < RowCount() &&
row2 >= 0 && row2 < RowCount());
- std::wstring value1 = GetText(row1, column_id);
- std::wstring value2 = GetText(row2, column_id);
+ string16 value1 = GetText(row1, column_id);
+ string16 value2 = GetText(row2, column_id);
icu::Collator* collator = GetCollator();
if (collator)
- return l10n_util::CompareStringWithCollator(collator, value1, value2);
+ return l10n_util::CompareString16WithCollator(collator, value1, value2);
NOTREACHED();
return 0;
diff --git a/app/table_model.h b/app/table_model.h
index 78dedf1..76f50b8 100644
--- a/app/table_model.h
+++ b/app/table_model.h
@@ -6,9 +6,9 @@
#define APP_TABLE_MODEL_H_
#pragma once
-#include <string>
#include <vector>
+#include "base/string16.h"
#include "unicode/coll.h"
class SkBitmap;
@@ -21,7 +21,7 @@ class TableModel {
// See HasGroups, get GetGroupID for details as to how this is used.
struct Group {
// The title text for the group.
- std::wstring title;
+ string16 title;
// Unique id for the group.
int id;
@@ -32,7 +32,7 @@ class TableModel {
virtual int RowCount() = 0;
// Returns the value at a particular location in text.
- virtual std::wstring GetText(int row, int column_id) = 0;
+ virtual string16 GetText(int row, int column_id) = 0;
// Returns the small icon (16x16) that should be displayed in the first
// column before the text. This is only used when the TableView was created
@@ -43,7 +43,7 @@ class TableModel {
// Returns the tooltip, if any, to show for a particular row. If there are
// multiple columns in the row, this will only be shown when hovering over
// column zero.
- virtual std::wstring GetTooltip(int row);
+ virtual string16 GetTooltip(int row);
// If true, this row should be indented.
virtual bool ShouldIndent(int row);
@@ -93,9 +93,9 @@ struct TableColumn {
};
TableColumn();
- TableColumn(int id, const std::wstring& title,
+ TableColumn(int id, const string16& title,
Alignment alignment, int width);
- TableColumn(int id, const std::wstring& title,
+ TableColumn(int id, const string16& title,
Alignment alignment, int width, float percent);
// It's common (but not required) to use the title's IDS_* tag as the column
@@ -108,7 +108,7 @@ struct TableColumn {
int id;
// The title for the column.
- std::wstring title;
+ string16 title;
// Alignment for the content.
Alignment alignment;