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

Side by Side Diff: chrome/browser/custom_home_pages_table_model.cc

Issue 3108027: Convert GetDisplayStringInLTRDirectionality from wstring to string16. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/custom_home_pages_table_model.h" 5 #include "chrome/browser/custom_home_pages_table_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "app/table_model_observer.h" 9 #include "app/table_model_observer.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 *index = static_cast<int>(i); 202 *index = static_cast<int>(i);
203 return &entries_[i]; 203 return &entries_[i];
204 } 204 }
205 } 205 }
206 return NULL; 206 return NULL;
207 } 207 }
208 208
209 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const { 209 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const {
210 std::wstring languages = 210 std::wstring languages =
211 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); 211 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
212 std::wstring url(net::FormatUrl(entries_[row].url, languages)); 212 string16 url = WideToUTF16(net::FormatUrl(entries_[row].url, languages));
213 base::i18n::GetDisplayStringInLTRDirectionality(&url); 213 url = base::i18n::GetDisplayStringInLTRDirectionality(url);
214 return url; 214 return UTF16ToWide(url);
215 } 215 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698