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

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

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (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"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/browser.h" 12 #include "chrome/browser/browser.h"
13 #include "chrome/browser/browser_list.h" 13 #include "chrome/browser/browser_list.h"
14 #include "chrome/browser/pref_service.h" 14 #include "chrome/browser/prefs/pref_service.h"
15 #include "chrome/browser/profile.h" 15 #include "chrome/browser/profile.h"
16 #include "chrome/browser/tab_contents/tab_contents.h" 16 #include "chrome/browser/tab_contents/tab_contents.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"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return NULL; 230 return NULL;
231 } 231 }
232 232
233 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const { 233 std::wstring CustomHomePagesTableModel::FormattedURL(int row) const {
234 std::wstring languages = 234 std::wstring languages =
235 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); 235 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
236 string16 url = WideToUTF16(net::FormatUrl(entries_[row].url, languages)); 236 string16 url = WideToUTF16(net::FormatUrl(entries_[row].url, languages));
237 url = base::i18n::GetDisplayStringInLTRDirectionality(url); 237 url = base::i18n::GetDisplayStringInLTRDirectionality(url);
238 return UTF16ToWide(url); 238 return UTF16ToWide(url);
239 } 239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698