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

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: Created 5 years, 2 months 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 21 matching lines...) Expand all
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/host_content_settings_map_factory.h" 37 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
38 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 38 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
39 #include "chrome/browser/defaults.h" 39 #include "chrome/browser/defaults.h"
40 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 40 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
41 #include "chrome/browser/download/download_prefs.h" 41 #include "chrome/browser/download/download_prefs.h"
42 #include "chrome/browser/engagement/site_engagement_eviction_policy.h"
42 #include "chrome/browser/font_family_cache.h" 43 #include "chrome/browser/font_family_cache.h"
43 #include "chrome/browser/geolocation/chrome_access_token_store.h" 44 #include "chrome/browser/geolocation/chrome_access_token_store.h"
44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 45 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
45 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 46 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
46 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 47 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
47 #include "chrome/browser/net/chrome_net_log.h" 48 #include "chrome/browser/net/chrome_net_log.h"
48 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 49 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
49 #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"
50 #include "chrome/browser/notifications/platform_notification_service_impl.h" 51 #include "chrome/browser/notifications/platform_notification_service_impl.h"
51 #include "chrome/browser/platform_util.h" 52 #include "chrome/browser/platform_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #include "device/devices_app/public/cpp/constants.h" 136 #include "device/devices_app/public/cpp/constants.h"
136 #include "device/devices_app/public/cpp/devices_app_factory.h" 137 #include "device/devices_app/public/cpp/devices_app_factory.h"
137 #include "gin/v8_initializer.h" 138 #include "gin/v8_initializer.h"
138 #include "mojo/application/public/cpp/application_delegate.h" 139 #include "mojo/application/public/cpp/application_delegate.h"
139 #include "net/base/mime_util.h" 140 #include "net/base/mime_util.h"
140 #include "net/cookies/canonical_cookie.h" 141 #include "net/cookies/canonical_cookie.h"
141 #include "net/cookies/cookie_options.h" 142 #include "net/cookies/cookie_options.h"
142 #include "net/ssl/ssl_cert_request_info.h" 143 #include "net/ssl/ssl_cert_request_info.h"
143 #include "ppapi/host/ppapi_host.h" 144 #include "ppapi/host/ppapi_host.h"
144 #include "storage/browser/fileapi/external_mount_points.h" 145 #include "storage/browser/fileapi/external_mount_points.h"
146 #include "storage/browser/quota/quota_manager.h"
145 #include "ui/base/l10n/l10n_util.h" 147 #include "ui/base/l10n/l10n_util.h"
146 #include "ui/base/resource/resource_bundle.h" 148 #include "ui/base/resource/resource_bundle.h"
147 #include "ui/resources/grit/ui_resources.h" 149 #include "ui/resources/grit/ui_resources.h"
148 150
149 #if defined(OS_WIN) 151 #if defined(OS_WIN)
150 #include "base/win/windows_version.h" 152 #include "base/win/windows_version.h"
151 #include "chrome/browser/chrome_browser_main_win.h" 153 #include "chrome/browser/chrome_browser_main_win.h"
152 #include "sandbox/win/src/sandbox_policy.h" 154 #include "sandbox/win/src/sandbox_policy.h"
153 #elif defined(OS_MACOSX) 155 #elif defined(OS_MACOSX)
154 #include "chrome/browser/chrome_browser_main_mac.h" 156 #include "chrome/browser/chrome_browser_main_mac.h"
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 #endif 1878 #endif
1877 1879
1878 return NULL; 1880 return NULL;
1879 } 1881 }
1880 1882
1881 QuotaPermissionContext* 1883 QuotaPermissionContext*
1882 ChromeContentBrowserClient::CreateQuotaPermissionContext() { 1884 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
1883 return new ChromeQuotaPermissionContext(); 1885 return new ChromeQuotaPermissionContext();
1884 } 1886 }
1885 1887
1888 void ChromeContentBrowserClient::AddQuotaEvictionPolicies(
raymes 2015/09/24 01:55:30 I guess the alternate API would look like: GetTemp
calamity 2015/10/26 03:01:57 Done.
1889 content::BrowserContext* context, storage::QuotaManager* quota_manager) {
1890 if (SiteEngagementEvictionPolicy::IsEnabled()) {
1891 quota_manager->SetQuotaEvictionPolicy(
1892 storage::kStorageTypeTemporary,
1893 make_scoped_ptr(
1894 new SiteEngagementEvictionPolicy(storage::kStorageTypeTemporary,
1895 quota_manager, context)));
1896 }
1897 }
1898
1886 void ChromeContentBrowserClient::AllowCertificateError( 1899 void ChromeContentBrowserClient::AllowCertificateError(
1887 int render_process_id, 1900 int render_process_id,
1888 int render_frame_id, 1901 int render_frame_id,
1889 int cert_error, 1902 int cert_error,
1890 const net::SSLInfo& ssl_info, 1903 const net::SSLInfo& ssl_info,
1891 const GURL& request_url, 1904 const GURL& request_url,
1892 ResourceType resource_type, 1905 ResourceType resource_type,
1893 bool overridable, 1906 bool overridable,
1894 bool strict_enforcement, 1907 bool strict_enforcement,
1895 bool expired_previous_decision, 1908 bool expired_previous_decision,
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 if (channel <= kMaxDisableEncryptionChannel) { 2682 if (channel <= kMaxDisableEncryptionChannel) {
2670 static const char* const kWebRtcDevSwitchNames[] = { 2683 static const char* const kWebRtcDevSwitchNames[] = {
2671 switches::kDisableWebRtcEncryption, 2684 switches::kDisableWebRtcEncryption,
2672 }; 2685 };
2673 to_command_line->CopySwitchesFrom(from_command_line, 2686 to_command_line->CopySwitchesFrom(from_command_line,
2674 kWebRtcDevSwitchNames, 2687 kWebRtcDevSwitchNames,
2675 arraysize(kWebRtcDevSwitchNames)); 2688 arraysize(kWebRtcDevSwitchNames));
2676 } 2689 }
2677 } 2690 }
2678 #endif // defined(ENABLE_WEBRTC) 2691 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698