OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 24 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
25 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 25 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
26 #include "chrome/browser/character_encoding.h" | 26 #include "chrome/browser/character_encoding.h" |
27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
28 #include "chrome/browser/chrome_quota_permission_context.h" | 28 #include "chrome/browser/chrome_quota_permission_context.h" |
29 #include "chrome/browser/content_settings/content_settings_utils.h" | 29 #include "chrome/browser/content_settings/content_settings_utils.h" |
30 #include "chrome/browser/content_settings/cookie_settings.h" | 30 #include "chrome/browser/content_settings/cookie_settings.h" |
31 #include "chrome/browser/content_settings/host_content_settings_map.h" | 31 #include "chrome/browser/content_settings/host_content_settings_map.h" |
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
33 #include "chrome/browser/defaults.h" | 33 #include "chrome/browser/defaults.h" |
| 34 #include "chrome/browser/devtools/devtools_network_controller.h" |
34 #include "chrome/browser/download/download_prefs.h" | 35 #include "chrome/browser/download/download_prefs.h" |
35 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 36 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
36 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" | 37 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" |
37 #include "chrome/browser/extensions/extension_host.h" | 38 #include "chrome/browser/extensions/extension_host.h" |
38 #include "chrome/browser/extensions/extension_service.h" | 39 #include "chrome/browser/extensions/extension_service.h" |
39 #include "chrome/browser/extensions/extension_web_ui.h" | 40 #include "chrome/browser/extensions/extension_web_ui.h" |
40 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 41 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
41 #include "chrome/browser/extensions/suggest_permission_util.h" | 42 #include "chrome/browser/extensions/suggest_permission_util.h" |
42 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 43 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
43 #include "chrome/browser/google/google_util.h" | 44 #include "chrome/browser/google/google_util.h" |
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { | 2421 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { |
2421 Profile* profile = Profile::FromBrowserContext( | 2422 Profile* profile = Profile::FromBrowserContext( |
2422 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 2423 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
2423 BrowsingDataRemover* remover = | 2424 BrowsingDataRemover* remover = |
2424 BrowsingDataRemover::CreateForUnboundedRange(profile); | 2425 BrowsingDataRemover::CreateForUnboundedRange(profile); |
2425 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; | 2426 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; |
2426 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); | 2427 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); |
2427 // BrowsingDataRemover takes care of deleting itself when done. | 2428 // BrowsingDataRemover takes care of deleting itself when done. |
2428 } | 2429 } |
2429 | 2430 |
| 2431 void ChromeContentBrowserClient::SetBlockedDomains( |
| 2432 content::RenderViewHost* rvh, |
| 2433 const std::string& id, |
| 2434 const std::vector<std::string>& blocked_domains) { |
| 2435 Profile* profile = Profile::FromBrowserContext( |
| 2436 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
| 2437 DevToolsNetworkController::SetBlockedDomains(profile, id, blocked_domains); |
| 2438 } |
| 2439 |
2430 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 2440 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
2431 return DownloadPrefs::GetDefaultDownloadDirectory(); | 2441 return DownloadPrefs::GetDefaultDownloadDirectory(); |
2432 } | 2442 } |
2433 | 2443 |
2434 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 2444 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
2435 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 2445 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
2436 } | 2446 } |
2437 | 2447 |
2438 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 2448 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
2439 content::BrowserPpapiHost* browser_host) { | 2449 content::BrowserPpapiHost* browser_host) { |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 switches::kDisableWebRtcEncryption, | 2747 switches::kDisableWebRtcEncryption, |
2738 }; | 2748 }; |
2739 to_command_line->CopySwitchesFrom(from_command_line, | 2749 to_command_line->CopySwitchesFrom(from_command_line, |
2740 kWebRtcDevSwitchNames, | 2750 kWebRtcDevSwitchNames, |
2741 arraysize(kWebRtcDevSwitchNames)); | 2751 arraysize(kWebRtcDevSwitchNames)); |
2742 } | 2752 } |
2743 } | 2753 } |
2744 #endif // defined(ENABLE_WEBRTC) | 2754 #endif // defined(ENABLE_WEBRTC) |
2745 | 2755 |
2746 } // namespace chrome | 2756 } // namespace chrome |
OLD | NEW |