OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 // with the kEnableStatsTable switch to ensure that the stats table global | 627 // with the kEnableStatsTable switch to ensure that the stats table global |
628 // is initialized correctly. | 628 // is initialized correctly. |
629 if (command_line->HasSwitch(switches::kEnableBenchmarking)) | 629 if (command_line->HasSwitch(switches::kEnableBenchmarking)) |
630 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); | 630 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); |
631 } | 631 } |
632 | 632 |
633 std::string ChromeContentBrowserClient::GetApplicationLocale() { | 633 std::string ChromeContentBrowserClient::GetApplicationLocale() { |
634 return g_browser_process->GetApplicationLocale(); | 634 return g_browser_process->GetApplicationLocale(); |
635 } | 635 } |
636 | 636 |
637 std::string ChromeContentBrowserClient::GetAcceptLangs(const TabContents* tab) { | 637 std::string ChromeContentBrowserClient::GetAcceptLangs( |
638 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); | 638 content::BrowserContext* context) { |
| 639 Profile* profile = Profile::FromBrowserContext(context); |
639 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); | 640 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); |
640 } | 641 } |
641 | 642 |
642 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { | 643 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { |
643 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 644 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
644 #if defined(TOUCH_UI) | 645 #if defined(TOUCH_UI) |
645 // In touch builds, we want large default favicons for the tabstrip, but in | 646 // In touch builds, we want large default favicons for the tabstrip, but in |
646 // other places (such as bookmark, manage search engines, homepage) we assume | 647 // other places (such as bookmark, manage search engines, homepage) we assume |
647 // default favicons are 16x16. | 648 // default favicons are 16x16. |
648 return rb.GetBitmapNamed(IDR_DEFAULT_LARGE_FAVICON); | 649 return rb.GetBitmapNamed(IDR_DEFAULT_LARGE_FAVICON); |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 #if defined(USE_NSS) | 1113 #if defined(USE_NSS) |
1113 crypto::CryptoModuleBlockingPasswordDelegate* | 1114 crypto::CryptoModuleBlockingPasswordDelegate* |
1114 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1115 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1115 const GURL& url) { | 1116 const GURL& url) { |
1116 return browser::NewCryptoModuleBlockingDialogDelegate( | 1117 return browser::NewCryptoModuleBlockingDialogDelegate( |
1117 browser::kCryptoModulePasswordKeygen, url.host()); | 1118 browser::kCryptoModulePasswordKeygen, url.host()); |
1118 } | 1119 } |
1119 #endif | 1120 #endif |
1120 | 1121 |
1121 } // namespace chrome | 1122 } // namespace chrome |
OLD | NEW |