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

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

Issue 8475024: Changed argument to GetAcceptLangs() to a BrowserContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_about_handler.h" 9 #include "chrome/browser/browser_about_handler.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // with the kEnableStatsTable switch to ensure that the stats table global 555 // with the kEnableStatsTable switch to ensure that the stats table global
556 // is initialized correctly. 556 // is initialized correctly.
557 if (command_line->HasSwitch(switches::kEnableBenchmarking)) 557 if (command_line->HasSwitch(switches::kEnableBenchmarking))
558 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); 558 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable));
559 } 559 }
560 560
561 std::string ChromeContentBrowserClient::GetApplicationLocale() { 561 std::string ChromeContentBrowserClient::GetApplicationLocale() {
562 return g_browser_process->GetApplicationLocale(); 562 return g_browser_process->GetApplicationLocale();
563 } 563 }
564 564
565 std::string ChromeContentBrowserClient::GetAcceptLangs(const TabContents* tab) { 565 std::string ChromeContentBrowserClient::GetAcceptLangs(
566 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); 566 const content::BrowserContext* context) {
567 Profile* profile = Profile::FromBrowserContext(context);
567 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); 568 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
568 } 569 }
569 570
570 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { 571 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() {
571 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); 572 ResourceBundle &rb = ResourceBundle::GetSharedInstance();
572 #if defined(TOUCH_UI) 573 #if defined(TOUCH_UI)
573 // In touch builds, we want large default favicons for the tabstrip, but in 574 // In touch builds, we want large default favicons for the tabstrip, but in
574 // other places (such as bookmark, manage search engines, homepage) we assume 575 // other places (such as bookmark, manage search engines, homepage) we assume
575 // default favicons are 16x16. 576 // default favicons are 16x16.
576 return rb.GetBitmapNamed(IDR_DEFAULT_LARGE_FAVICON); 577 return rb.GetBitmapNamed(IDR_DEFAULT_LARGE_FAVICON);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 #if defined(USE_NSS) 991 #if defined(USE_NSS)
991 crypto::CryptoModuleBlockingPasswordDelegate* 992 crypto::CryptoModuleBlockingPasswordDelegate*
992 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 993 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
993 const GURL& url) { 994 const GURL& url) {
994 return browser::NewCryptoModuleBlockingDialogDelegate( 995 return browser::NewCryptoModuleBlockingDialogDelegate(
995 browser::kCryptoModulePasswordKeygen, url.host()); 996 browser::kCryptoModulePasswordKeygen, url.host());
996 } 997 }
997 #endif 998 #endif
998 999
999 } // namespace chrome 1000 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698