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

Unified Diff: views/examples/table2_example.h

Issue 6038006: Leftover wstring removal from r70290 (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/examples/table2_example.h
diff --git a/views/examples/table2_example.h b/views/examples/table2_example.h
index c58b073c7b4e648e5055ff2901b13dc09b96020c..f055a64ec7098423f47cc149fb1a42509092d5de 100644
--- a/views/examples/table2_example.h
+++ b/views/examples/table2_example.h
@@ -51,10 +51,14 @@ class Table2Example
container->SetLayoutManager(layout);
std::vector<TableColumn> columns;
- columns.push_back(TableColumn(0, L"Fruit", TableColumn::LEFT, 100));
- columns.push_back(TableColumn(1, L"Color", TableColumn::LEFT, 100));
- columns.push_back(TableColumn(2, L"Origin", TableColumn::LEFT, 100));
- columns.push_back(TableColumn(3, L"Price", TableColumn::LEFT, 100));
+ columns.push_back(TableColumn(0, ASCIIToUTF16("Fruit"), TableColumn::LEFT,
+ 100));
+ columns.push_back(TableColumn(1, ASCIIToUTF16("Color"), TableColumn::LEFT,
+ 100));
+ columns.push_back(TableColumn(2, ASCIIToUTF16("Origin"), TableColumn::LEFT,
+ 100));
+ columns.push_back(TableColumn(3, ASCIIToUTF16("Price"), TableColumn::LEFT,
+ 100));
const int options = (views::TableView2::SINGLE_SELECTION |
views::TableView2::RESIZABLE_COLUMNS |
views::TableView2::AUTOSIZE_COLUMNS |
@@ -102,15 +106,15 @@ class Table2Example
return 10;
}
- virtual std::wstring GetText(int row, int column_id) {
- std::wstring cells[5][5] = {
- { L"Orange", L"Orange", L"South america", L"$5" },
- { L"Apple", L"Green", L"Canada", L"$3" },
- { L"Blue berries", L"Blue", L"Mexico", L"$10.3" },
- { L"Strawberries", L"Red", L"California", L"$7" },
- { L"Cantaloupe", L"Orange", L"South america", L"$5" },
+ virtual string16 GetText(int row, int column_id) {
+ std::string cells[5][5] = {
viettrungluu 2010/12/30 05:21:16 Comment: This may as well be made a const char* co
sadrul 2010/12/30 05:33:49 Making it const char* const sounds like a good ide
+ { "Orange", "Orange", "South america", "$5" },
+ { "Apple", "Green", "Canada", "$3" },
+ { "Blue berries", "Blue", "Mexico", "$10.3" },
+ { "Strawberries", "Red", "California", "$7" },
+ { "Cantaloupe", "Orange", "South america", "$5" },
viettrungluu 2010/12/30 05:21:16 (And, strictly speaking, C++ doesn't allow the tra
sadrul 2010/12/30 05:33:49 Fixed.
};
- return cells[row % 5][column_id];
+ return ASCIIToUTF16(cells[row % 5][column_id]);
}
virtual SkBitmap GetIcon(int row) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698