| 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 "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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); | 328 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); |
| 329 } | 329 } |
| 330 | 330 |
| 331 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { | 331 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { |
| 332 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 332 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| 333 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); | 333 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); |
| 334 } | 334 } |
| 335 | 335 |
| 336 bool ChromeContentBrowserClient::AllowAppCache( | 336 bool ChromeContentBrowserClient::AllowAppCache( |
| 337 const GURL& manifest_url, | 337 const GURL& manifest_url, |
| 338 const GURL& first_party, |
| 338 const content::ResourceContext& context) { | 339 const content::ResourceContext& context) { |
| 339 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 340 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 340 ProfileIOData* io_data = | 341 ProfileIOData* io_data = |
| 341 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); | 342 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); |
| 342 // FIXME(jochen): get the correct top-level origin. | |
| 343 ContentSetting setting = io_data->GetHostContentSettingsMap()-> | 343 ContentSetting setting = io_data->GetHostContentSettingsMap()-> |
| 344 GetCookieContentSetting(manifest_url, manifest_url, true); | 344 GetCookieContentSetting(manifest_url, first_party, true); |
| 345 DCHECK(setting != CONTENT_SETTING_DEFAULT); | 345 DCHECK(setting != CONTENT_SETTING_DEFAULT); |
| 346 return setting != CONTENT_SETTING_BLOCK; | 346 return setting != CONTENT_SETTING_BLOCK; |
| 347 } | 347 } |
| 348 | 348 |
| 349 bool ChromeContentBrowserClient::AllowGetCookie( | 349 bool ChromeContentBrowserClient::AllowGetCookie( |
| 350 const GURL& url, | 350 const GURL& url, |
| 351 const GURL& first_party, | 351 const GURL& first_party, |
| 352 const net::CookieList& cookie_list, | 352 const net::CookieList& cookie_list, |
| 353 const content::ResourceContext& context, | 353 const content::ResourceContext& context, |
| 354 int render_process_id, | 354 int render_process_id, |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 #if defined(USE_NSS) | 730 #if defined(USE_NSS) |
| 731 crypto::CryptoModuleBlockingPasswordDelegate* | 731 crypto::CryptoModuleBlockingPasswordDelegate* |
| 732 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 732 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 733 const GURL& url) { | 733 const GURL& url) { |
| 734 return browser::NewCryptoModuleBlockingDialogDelegate( | 734 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 735 browser::kCryptoModulePasswordKeygen, url.host()); | 735 browser::kCryptoModulePasswordKeygen, url.host()); |
| 736 } | 736 } |
| 737 #endif | 737 #endif |
| 738 | 738 |
| 739 } // namespace chrome | 739 } // namespace chrome |
| OLD | NEW |