Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1363523003: Enable SiteEngagementEvictionPolicy behind --enable-site-eviction-policy flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lru_policy_gooood
Patch Set: selfnit Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
34 #include "chrome/browser/character_encoding.h" 34 #include "chrome/browser/character_encoding.h"
35 #include "chrome/browser/chrome_content_browser_client_parts.h" 35 #include "chrome/browser/chrome_content_browser_client_parts.h"
36 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 36 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
37 #include "chrome/browser/chrome_quota_permission_context.h" 37 #include "chrome/browser/chrome_quota_permission_context.h"
38 #include "chrome/browser/content_settings/cookie_settings_factory.h" 38 #include "chrome/browser/content_settings/cookie_settings_factory.h"
39 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 39 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
40 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 40 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
41 #include "chrome/browser/defaults.h" 41 #include "chrome/browser/defaults.h"
42 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 42 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
43 #include "chrome/browser/download/download_prefs.h" 43 #include "chrome/browser/download/download_prefs.h"
44 #include "chrome/browser/engagement/site_engagement_eviction_policy.h"
44 #include "chrome/browser/font_family_cache.h" 45 #include "chrome/browser/font_family_cache.h"
45 #include "chrome/browser/geolocation/chrome_access_token_store.h" 46 #include "chrome/browser/geolocation/chrome_access_token_store.h"
46 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 47 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
47 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 48 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
48 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 49 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
49 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 50 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
50 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 51 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
51 #include "chrome/browser/notifications/platform_notification_service_impl.h" 52 #include "chrome/browser/notifications/platform_notification_service_impl.h"
52 #include "chrome/browser/platform_util.h" 53 #include "chrome/browser/platform_util.h"
53 #include "chrome/browser/prerender/prerender_final_status.h" 54 #include "chrome/browser/prerender/prerender_final_status.h"
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 #endif 1912 #endif
1912 1913
1913 return NULL; 1914 return NULL;
1914 } 1915 }
1915 1916
1916 QuotaPermissionContext* 1917 QuotaPermissionContext*
1917 ChromeContentBrowserClient::CreateQuotaPermissionContext() { 1918 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
1918 return new ChromeQuotaPermissionContext(); 1919 return new ChromeQuotaPermissionContext();
1919 } 1920 }
1920 1921
1922 scoped_ptr<storage::QuotaEvictionPolicy>
1923 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy(
1924 content::BrowserContext* context) {
1925 return SiteEngagementEvictionPolicy::IsEnabled()
1926 ? make_scoped_ptr(new SiteEngagementEvictionPolicy(context))
1927 : nullptr;
1928 }
1929
1921 void ChromeContentBrowserClient::AllowCertificateError( 1930 void ChromeContentBrowserClient::AllowCertificateError(
1922 int render_process_id, 1931 int render_process_id,
1923 int render_frame_id, 1932 int render_frame_id,
1924 int cert_error, 1933 int cert_error,
1925 const net::SSLInfo& ssl_info, 1934 const net::SSLInfo& ssl_info,
1926 const GURL& request_url, 1935 const GURL& request_url,
1927 ResourceType resource_type, 1936 ResourceType resource_type,
1928 bool overridable, 1937 bool overridable,
1929 bool strict_enforcement, 1938 bool strict_enforcement,
1930 bool expired_previous_decision, 1939 bool expired_previous_decision,
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 if (channel <= kMaxDisableEncryptionChannel) { 2734 if (channel <= kMaxDisableEncryptionChannel) {
2726 static const char* const kWebRtcDevSwitchNames[] = { 2735 static const char* const kWebRtcDevSwitchNames[] = {
2727 switches::kDisableWebRtcEncryption, 2736 switches::kDisableWebRtcEncryption,
2728 }; 2737 };
2729 to_command_line->CopySwitchesFrom(from_command_line, 2738 to_command_line->CopySwitchesFrom(from_command_line,
2730 kWebRtcDevSwitchNames, 2739 kWebRtcDevSwitchNames,
2731 arraysize(kWebRtcDevSwitchNames)); 2740 arraysize(kWebRtcDevSwitchNames));
2732 } 2741 }
2733 } 2742 }
2734 #endif // defined(ENABLE_WEBRTC) 2743 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698