| 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" |
| 11 #include "chrome/browser/browsing_data_remover.h" | 11 #include "chrome/browser/browsing_data_remover.h" |
| 12 #include "chrome/browser/character_encoding.h" | 12 #include "chrome/browser/character_encoding.h" |
| 13 #include "chrome/browser/chrome_plugin_message_filter.h" | 13 #include "chrome/browser/chrome_plugin_message_filter.h" |
| 14 #include "chrome/browser/chrome_plugin_service_helper.h" |
| 14 #include "chrome/browser/chrome_quota_permission_context.h" | 15 #include "chrome/browser/chrome_quota_permission_context.h" |
| 15 #include "chrome/browser/chrome_worker_message_filter.h" | 16 #include "chrome/browser/chrome_worker_message_filter.h" |
| 16 #include "chrome/browser/content_settings/host_content_settings_map.h" | 17 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 17 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 18 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 18 #include "chrome/browser/download/download_file_picker.h" | 19 #include "chrome/browser/download/download_file_picker.h" |
| 19 #include "chrome/browser/download/save_package_file_picker.h" | 20 #include "chrome/browser/download/save_package_file_picker.h" |
| 20 #include "chrome/browser/extensions/extension_info_map.h" | 21 #include "chrome/browser/extensions/extension_info_map.h" |
| 21 #include "chrome/browser/extensions/extension_message_handler.h" | 22 #include "chrome/browser/extensions/extension_message_handler.h" |
| 22 #include "chrome/browser/extensions/extension_service.h" | 23 #include "chrome/browser/extensions/extension_service.h" |
| 23 #include "chrome/browser/extensions/extension_web_ui.h" | 24 #include "chrome/browser/extensions/extension_web_ui.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 } | 477 } |
| 477 | 478 |
| 478 bool ChromeContentBrowserClient::AllowSaveLocalState( | 479 bool ChromeContentBrowserClient::AllowSaveLocalState( |
| 479 const content::ResourceContext& context) { | 480 const content::ResourceContext& context) { |
| 480 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 481 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 481 ProfileIOData* io_data = | 482 ProfileIOData* io_data = |
| 482 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); | 483 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); |
| 483 return !io_data->clear_local_state_on_exit()->GetValue(); | 484 return !io_data->clear_local_state_on_exit()->GetValue(); |
| 484 } | 485 } |
| 485 | 486 |
| 487 PluginService::Filter* ChromeContentBrowserClient::CreatePluginFilter( |
| 488 int render_process_id, |
| 489 int render_view_id, |
| 490 const content::ResourceContext& context, |
| 491 const GURL& url, |
| 492 const GURL& policy_url) { |
| 493 return ChromePluginServiceHelper::GetInstance()->CreatePluginFilter( |
| 494 render_process_id, render_view_id, context, url, policy_url); |
| 495 } |
| 496 |
| 486 net::URLRequestContext* | 497 net::URLRequestContext* |
| 487 ChromeContentBrowserClient::OverrideRequestContextForURL( | 498 ChromeContentBrowserClient::OverrideRequestContextForURL( |
| 488 const GURL& url, const content::ResourceContext& context) { | 499 const GURL& url, const content::ResourceContext& context) { |
| 489 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 500 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 490 if (url.SchemeIs(chrome::kExtensionScheme)) { | 501 if (url.SchemeIs(chrome::kExtensionScheme)) { |
| 491 ProfileIOData* io_data = | 502 ProfileIOData* io_data = |
| 492 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); | 503 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); |
| 493 return io_data->extensions_request_context(); | 504 return io_data->extensions_request_context(); |
| 494 } | 505 } |
| 495 | 506 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 #if defined(USE_NSS) | 857 #if defined(USE_NSS) |
| 847 crypto::CryptoModuleBlockingPasswordDelegate* | 858 crypto::CryptoModuleBlockingPasswordDelegate* |
| 848 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 859 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 849 const GURL& url) { | 860 const GURL& url) { |
| 850 return browser::NewCryptoModuleBlockingDialogDelegate( | 861 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 851 browser::kCryptoModulePasswordKeygen, url.host()); | 862 browser::kCryptoModulePasswordKeygen, url.host()); |
| 852 } | 863 } |
| 853 #endif | 864 #endif |
| 854 | 865 |
| 855 } // namespace chrome | 866 } // namespace chrome |
| OLD | NEW |