| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 pending_requests_.erase(iter); | 806 pending_requests_.erase(iter); |
| 807 | 807 |
| 808 // If we have no more pending requests, then stop the load state monitor | 808 // If we have no more pending requests, then stop the load state monitor |
| 809 if (pending_requests_.empty()) | 809 if (pending_requests_.empty()) |
| 810 update_load_states_timer_.Stop(); | 810 update_load_states_timer_.Stop(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 // URLRequest::Delegate ------------------------------------------------------- | 813 // URLRequest::Delegate ------------------------------------------------------- |
| 814 | 814 |
| 815 void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, | 815 void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, |
| 816 const GURL& new_url) { | 816 const GURL& new_url, |
| 817 bool* defer_redirect) { |
| 817 RESOURCE_LOG("OnReceivedRedirect: " << request->url().spec()); | 818 RESOURCE_LOG("OnReceivedRedirect: " << request->url().spec()); |
| 818 ExtraRequestInfo* info = ExtraInfoForRequest(request); | 819 ExtraRequestInfo* info = ExtraInfoForRequest(request); |
| 819 | 820 |
| 820 DCHECK(request->status().is_success()); | 821 DCHECK(request->status().is_success()); |
| 821 | 822 |
| 822 if (info->process_type == ChildProcessInfo::RENDER_PROCESS && | 823 if (info->process_type == ChildProcessInfo::RENDER_PROCESS && |
| 823 !RendererSecurityPolicy::GetInstance()-> | 824 !RendererSecurityPolicy::GetInstance()-> |
| 824 CanRequestURL(info->process_id, new_url)) { | 825 CanRequestURL(info->process_id, new_url)) { |
| 825 LOG(INFO) << "Denied unauthorized request for " << | 826 LOG(INFO) << "Denied unauthorized request for " << |
| 826 new_url.possibly_invalid_spec(); | 827 new_url.possibly_invalid_spec(); |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 case ViewHostMsg_UploadProgress_ACK::ID: | 1556 case ViewHostMsg_UploadProgress_ACK::ID: |
| 1556 case ViewHostMsg_SyncLoad::ID: | 1557 case ViewHostMsg_SyncLoad::ID: |
| 1557 return true; | 1558 return true; |
| 1558 | 1559 |
| 1559 default: | 1560 default: |
| 1560 break; | 1561 break; |
| 1561 } | 1562 } |
| 1562 | 1563 |
| 1563 return false; | 1564 return false; |
| 1564 } | 1565 } |
| OLD | NEW |