| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 | 1092 |
| 1093 scoped_refptr<ResourceResponse> response = new ResourceResponse; | 1093 scoped_refptr<ResourceResponse> response = new ResourceResponse; |
| 1094 PopulateResourceResponse(request, info->filter_policy(), response); | 1094 PopulateResourceResponse(request, info->filter_policy(), response); |
| 1095 | 1095 |
| 1096 BlacklistRequestInfo* request_info = | 1096 BlacklistRequestInfo* request_info = |
| 1097 BlacklistRequestInfo::FromURLRequest(request); | 1097 BlacklistRequestInfo::FromURLRequest(request); |
| 1098 if (request_info) { | 1098 if (request_info) { |
| 1099 const BlacklistManager* blacklist_manager = | 1099 const BlacklistManager* blacklist_manager = |
| 1100 request_info->GetBlacklistManager(); | 1100 request_info->GetBlacklistManager(); |
| 1101 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); | 1101 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); |
| 1102 scoped_ptr<Blacklist::Match> match(blacklist->findMatch(request->url())); | 1102 scoped_ptr<Blacklist::Match> match(blacklist->FindMatch(request->url())); |
| 1103 if (match.get() && match->attributes() & Blacklist::kBlockByType) { | 1103 if (match.get() && match->attributes() & Blacklist::kBlockByType) { |
| 1104 if (match->MatchType(response->response_head.mime_type)) | 1104 if (match->MatchType(response->response_head.mime_type)) |
| 1105 return false; // TODO(idanan): Generate a replacement response. | 1105 return false; // TODO(idanan): Generate a replacement response. |
| 1106 } | 1106 } |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 if (request->ssl_info().cert) { | 1109 if (request->ssl_info().cert) { |
| 1110 int cert_id = | 1110 int cert_id = |
| 1111 CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, | 1111 CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, |
| 1112 info->child_id()); | 1112 info->child_id()); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 case ViewHostMsg_UploadProgress_ACK::ID: | 1771 case ViewHostMsg_UploadProgress_ACK::ID: |
| 1772 case ViewHostMsg_SyncLoad::ID: | 1772 case ViewHostMsg_SyncLoad::ID: |
| 1773 return true; | 1773 return true; |
| 1774 | 1774 |
| 1775 default: | 1775 default: |
| 1776 break; | 1776 break; |
| 1777 } | 1777 } |
| 1778 | 1778 |
| 1779 return false; | 1779 return false; |
| 1780 } | 1780 } |
| OLD | NEW |