OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 } | 981 } |
982 | 982 |
983 void ResourceDispatcherHost::OnSSLCertificateError( | 983 void ResourceDispatcherHost::OnSSLCertificateError( |
984 URLRequest* request, | 984 URLRequest* request, |
985 int cert_error, | 985 int cert_error, |
986 net::X509Certificate* cert) { | 986 net::X509Certificate* cert) { |
987 DCHECK(request); | 987 DCHECK(request); |
988 SSLManager::OnSSLCertificateError(this, request, cert_error, cert); | 988 SSLManager::OnSSLCertificateError(this, request, cert_error, cert); |
989 } | 989 } |
990 | 990 |
991 void ResourceDispatcherHost::OnSetCookieBlocked(URLRequest* request) { | 991 void ResourceDispatcherHost::OnSetCookie(URLRequest* request, |
992 RESOURCE_LOG("OnSetCookieBlocked: " << request->url().spec()); | 992 const std::string& cookie_line, |
| 993 bool blocked_by_policy) { |
| 994 RESOURCE_LOG("OnSetCookie: " << request->url().spec()); |
993 | 995 |
994 int render_process_id, render_view_id; | 996 int render_process_id, render_view_id; |
995 if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) | 997 if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) |
996 return; | 998 return; |
997 | 999 |
998 CallRenderViewHostContentSettingsDelegate( | 1000 CallRenderViewHostContentSettingsDelegate( |
999 render_process_id, render_view_id, | 1001 render_process_id, render_view_id, |
1000 &RenderViewHostDelegate::ContentSettings::OnContentBlocked, | 1002 &RenderViewHostDelegate::ContentSettings::OnCookieAccessed, |
1001 CONTENT_SETTINGS_TYPE_COOKIES); | 1003 request->url(), cookie_line, blocked_by_policy); |
1002 } | 1004 } |
1003 | 1005 |
1004 void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) { | 1006 void ResourceDispatcherHost::OnResponseStarted(URLRequest* request) { |
1005 RESOURCE_LOG("OnResponseStarted: " << request->url().spec()); | 1007 RESOURCE_LOG("OnResponseStarted: " << request->url().spec()); |
1006 ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); | 1008 ResourceDispatcherHostRequestInfo* info = InfoForRequest(request); |
1007 if (PauseRequestIfNeeded(info)) { | 1009 if (PauseRequestIfNeeded(info)) { |
1008 RESOURCE_LOG("OnResponseStarted pausing: " << request->url().spec()); | 1010 RESOURCE_LOG("OnResponseStarted pausing: " << request->url().spec()); |
1009 return; | 1011 return; |
1010 } | 1012 } |
1011 | 1013 |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 // them. | 1821 // them. |
1820 case ResourceType::IMAGE: | 1822 case ResourceType::IMAGE: |
1821 return net::LOWEST; | 1823 return net::LOWEST; |
1822 | 1824 |
1823 default: | 1825 default: |
1824 // When new resource types are added, their priority must be considered. | 1826 // When new resource types are added, their priority must be considered. |
1825 NOTREACHED(); | 1827 NOTREACHED(); |
1826 return net::LOW; | 1828 return net::LOW; |
1827 } | 1829 } |
1828 } | 1830 } |
OLD | NEW |