| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 31 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 32 #include "chrome/browser/character_encoding.h" | 32 #include "chrome/browser/character_encoding.h" |
| 33 #include "chrome/browser/chrome_content_browser_client_parts.h" | 33 #include "chrome/browser/chrome_content_browser_client_parts.h" |
| 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
| 35 #include "chrome/browser/chrome_quota_permission_context.h" | 35 #include "chrome/browser/chrome_quota_permission_context.h" |
| 36 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 36 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 38 #include "chrome/browser/defaults.h" | 38 #include "chrome/browser/defaults.h" |
| 39 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 39 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
| 40 #include "chrome/browser/download/download_prefs.h" | 40 #include "chrome/browser/download/download_prefs.h" |
| 41 #include "chrome/browser/engagement/site_engagement_eviction_policy.h" |
| 42 #include "chrome/browser/engagement/site_engagement_service.h" |
| 41 #include "chrome/browser/font_family_cache.h" | 43 #include "chrome/browser/font_family_cache.h" |
| 42 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 44 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
| 43 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 45 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 44 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 46 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
| 45 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 47 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 46 #include "chrome/browser/net/chrome_net_log.h" | 48 #include "chrome/browser/net/chrome_net_log.h" |
| 47 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 49 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 50 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 49 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 51 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 50 #include "chrome/browser/platform_util.h" | 52 #include "chrome/browser/platform_util.h" |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2532 } | 2534 } |
| 2533 | 2535 |
| 2534 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 2536 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
| 2535 const GURL& url) { | 2537 const GURL& url) { |
| 2536 if (url.is_valid()) { | 2538 if (url.is_valid()) { |
| 2537 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 2539 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
| 2538 metric, url); | 2540 metric, url); |
| 2539 } | 2541 } |
| 2540 } | 2542 } |
| 2541 | 2543 |
| 2544 storage::QuotaEvictionPolicy* |
| 2545 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( |
| 2546 content::BrowserContext* browser_context) { |
| 2547 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 2548 SiteEngagementService* service = SiteEngagementService::Get(profile); |
| 2549 return service ? service->GetSiteEngagementEvictionPolicy() : nullptr; |
| 2550 } |
| 2551 |
| 2542 content::DevToolsManagerDelegate* | 2552 content::DevToolsManagerDelegate* |
| 2543 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2553 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
| 2544 return new ChromeDevToolsManagerDelegate(); | 2554 return new ChromeDevToolsManagerDelegate(); |
| 2545 } | 2555 } |
| 2546 | 2556 |
| 2547 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { | 2557 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { |
| 2548 #if !defined(OS_ANDROID) | 2558 #if !defined(OS_ANDROID) |
| 2549 return new ChromeTracingDelegate(); | 2559 return new ChromeTracingDelegate(); |
| 2550 #else | 2560 #else |
| 2551 return nullptr; | 2561 return nullptr; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 switches::kDisableWebRtcEncryption, | 2622 switches::kDisableWebRtcEncryption, |
| 2613 }; | 2623 }; |
| 2614 to_command_line->CopySwitchesFrom(from_command_line, | 2624 to_command_line->CopySwitchesFrom(from_command_line, |
| 2615 kWebRtcDevSwitchNames, | 2625 kWebRtcDevSwitchNames, |
| 2616 arraysize(kWebRtcDevSwitchNames)); | 2626 arraysize(kWebRtcDevSwitchNames)); |
| 2617 } | 2627 } |
| 2618 } | 2628 } |
| 2619 #endif // defined(ENABLE_WEBRTC) | 2629 #endif // defined(ENABLE_WEBRTC) |
| 2620 | 2630 |
| 2621 } // namespace chrome | 2631 } // namespace chrome |
| OLD | NEW |