| 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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 pending_requests_.erase(iter); | 879 pending_requests_.erase(iter); |
| 880 | 880 |
| 881 // If we have no more pending requests, then stop the load state monitor | 881 // If we have no more pending requests, then stop the load state monitor |
| 882 if (pending_requests_.empty()) | 882 if (pending_requests_.empty()) |
| 883 update_load_states_timer_.Stop(); | 883 update_load_states_timer_.Stop(); |
| 884 } | 884 } |
| 885 | 885 |
| 886 // URLRequest::Delegate ------------------------------------------------------- | 886 // URLRequest::Delegate ------------------------------------------------------- |
| 887 | 887 |
| 888 void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, | 888 void ResourceDispatcherHost::OnReceivedRedirect(URLRequest* request, |
| 889 const GURL& new_url) { | 889 const GURL& new_url, |
| 890 bool* defer_redirect) { |
| 890 RESOURCE_LOG("OnReceivedRedirect: " << request->url().spec()); | 891 RESOURCE_LOG("OnReceivedRedirect: " << request->url().spec()); |
| 891 ExtraRequestInfo* info = ExtraInfoForRequest(request); | 892 ExtraRequestInfo* info = ExtraInfoForRequest(request); |
| 892 | 893 |
| 893 DCHECK(request->status().is_success()); | 894 DCHECK(request->status().is_success()); |
| 894 | 895 |
| 895 if (info->process_type != ChildProcessInfo::PLUGIN_PROCESS && | 896 if (info->process_type != ChildProcessInfo::PLUGIN_PROCESS && |
| 896 !ChildProcessSecurityPolicy::GetInstance()-> | 897 !ChildProcessSecurityPolicy::GetInstance()-> |
| 897 CanRequestURL(info->process_id, new_url)) { | 898 CanRequestURL(info->process_id, new_url)) { |
| 898 LOG(INFO) << "Denied unauthorized request for " << | 899 LOG(INFO) << "Denied unauthorized request for " << |
| 899 new_url.possibly_invalid_spec(); | 900 new_url.possibly_invalid_spec(); |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 case ViewHostMsg_UploadProgress_ACK::ID: | 1617 case ViewHostMsg_UploadProgress_ACK::ID: |
| 1617 case ViewHostMsg_SyncLoad::ID: | 1618 case ViewHostMsg_SyncLoad::ID: |
| 1618 return true; | 1619 return true; |
| 1619 | 1620 |
| 1620 default: | 1621 default: |
| 1621 break; | 1622 break; |
| 1622 } | 1623 } |
| 1623 | 1624 |
| 1624 return false; | 1625 return false; |
| 1625 } | 1626 } |
| OLD | NEW |