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 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2411 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { | 2412 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { |
2412 Profile* profile = Profile::FromBrowserContext( | 2413 Profile* profile = Profile::FromBrowserContext( |
2413 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 2414 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
2414 BrowsingDataRemover* remover = | 2415 BrowsingDataRemover* remover = |
2415 BrowsingDataRemover::CreateForUnboundedRange(profile); | 2416 BrowsingDataRemover::CreateForUnboundedRange(profile); |
2416 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; | 2417 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; |
2417 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); | 2418 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); |
2418 // BrowsingDataRemover takes care of deleting itself when done. | 2419 // BrowsingDataRemover takes care of deleting itself when done. |
2419 } | 2420 } |
2420 | 2421 |
2422 void ChromeContentBrowserClient::SetBlockedDomains( | |
2423 content::RenderViewHost* rvh, | |
2424 const std::string& id, | |
2425 const std::vector<std::string>& blocked_domains) { | |
2426 Profile* profile = Profile::FromBrowserContext( | |
2427 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | |
2428 DevToolsNetworkController::SetBlockedDomains(profile, id, blocked_domains); | |
mmenke
2014/03/07 19:38:08
Presumably you're going to need to include a heade
eustas
2014/03/11 12:06:42
I've tried to reduce review scope in this CL.
I'll
| |
2429 } | |
2430 | |
2421 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 2431 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
2422 return DownloadPrefs::GetDefaultDownloadDirectory(); | 2432 return DownloadPrefs::GetDefaultDownloadDirectory(); |
2423 } | 2433 } |
2424 | 2434 |
2425 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 2435 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
2426 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 2436 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
2427 } | 2437 } |
2428 | 2438 |
2429 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 2439 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
2430 content::BrowserPpapiHost* browser_host) { | 2440 content::BrowserPpapiHost* browser_host) { |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2728 switches::kDisableWebRtcEncryption, | 2738 switches::kDisableWebRtcEncryption, |
2729 }; | 2739 }; |
2730 to_command_line->CopySwitchesFrom(from_command_line, | 2740 to_command_line->CopySwitchesFrom(from_command_line, |
2731 kWebRtcDevSwitchNames, | 2741 kWebRtcDevSwitchNames, |
2732 arraysize(kWebRtcDevSwitchNames)); | 2742 arraysize(kWebRtcDevSwitchNames)); |
2733 } | 2743 } |
2734 } | 2744 } |
2735 #endif // defined(ENABLE_WEBRTC) | 2745 #endif // defined(ENABLE_WEBRTC) |
2736 | 2746 |
2737 } // namespace chrome | 2747 } // namespace chrome |
OLD | NEW |