| OLD | NEW |
| 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" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/browser.h" | |
| 13 #include "chrome/browser/browser_list.h" | 12 #include "chrome/browser/browser_list.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
| 16 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "gfx/codec/png_codec.h" | 19 #include "gfx/codec/png_codec.h" |
| 20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 21 #include "grit/app_resources.h" | 21 #include "grit/app_resources.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 23 #include "net/base/net_util.h" | 23 #include "net/base/net_util.h" |
| 24 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
| 25 | 25 |
| 26 struct CustomHomePagesTableModel::Entry { | 26 struct CustomHomePagesTableModel::Entry { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 return NULL; | 232 return NULL; |
| 233 } | 233 } |
| 234 | 234 |
| 235 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const { | 235 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const { |
| 236 std::string languages = | 236 std::string languages = |
| 237 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); | 237 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); |
| 238 string16 url = net::FormatUrl(entries_[row].url, languages); | 238 string16 url = net::FormatUrl(entries_[row].url, languages); |
| 239 url = base::i18n::GetDisplayStringInLTRDirectionality(url); | 239 url = base::i18n::GetDisplayStringInLTRDirectionality(url); |
| 240 return UTF16ToWide(url); | 240 return UTF16ToWide(url); |
| 241 } | 241 } |
| OLD | NEW |