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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 } | 315 } |
316 | 316 |
317 void ResourceDispatcherHost::OnShutdown() { | 317 void ResourceDispatcherHost::OnShutdown() { |
318 DCHECK(MessageLoop::current() == io_loop_); | 318 DCHECK(MessageLoop::current() == io_loop_); |
319 is_shutdown_ = true; | 319 is_shutdown_ = true; |
320 STLDeleteValues(&pending_requests_); | 320 STLDeleteValues(&pending_requests_); |
321 // Make sure we shutdown the timer now, otherwise by the time our destructor | 321 // Make sure we shutdown the timer now, otherwise by the time our destructor |
322 // runs if the timer is still running the Task is deleted twice (once by | 322 // runs if the timer is still running the Task is deleted twice (once by |
323 // the MessageLoop and the second time by RepeatingTimer). | 323 // the MessageLoop and the second time by RepeatingTimer). |
324 update_load_states_timer_.Stop(); | 324 update_load_states_timer_.Stop(); |
325 // Let the WebKit thread know the IO thread is going away soon and that it | |
326 // should prepare for its own shutdown soon after. | |
327 webkit_thread_->Shutdown(); | |
328 } | 325 } |
329 | 326 |
330 bool ResourceDispatcherHost::HandleExternalProtocol(int request_id, | 327 bool ResourceDispatcherHost::HandleExternalProtocol(int request_id, |
331 int child_id, | 328 int child_id, |
332 int route_id, | 329 int route_id, |
333 const GURL& url, | 330 const GURL& url, |
334 ResourceType::Type type, | 331 ResourceType::Type type, |
335 ResourceHandler* handler) { | 332 ResourceHandler* handler) { |
336 if (!ResourceType::IsFrame(type) || URLRequest::IsHandledURL(url)) | 333 if (!ResourceType::IsFrame(type) || URLRequest::IsHandledURL(url)) |
337 return false; | 334 return false; |
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 case ViewHostMsg_UploadProgress_ACK::ID: | 1800 case ViewHostMsg_UploadProgress_ACK::ID: |
1804 case ViewHostMsg_SyncLoad::ID: | 1801 case ViewHostMsg_SyncLoad::ID: |
1805 return true; | 1802 return true; |
1806 | 1803 |
1807 default: | 1804 default: |
1808 break; | 1805 break; |
1809 } | 1806 } |
1810 | 1807 |
1811 return false; | 1808 return false; |
1812 } | 1809 } |
OLD | NEW |