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/common/resource_dispatcher.h" | 7 #include "chrome/common/resource_dispatcher.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "chrome/common/extensions/extension_localization_peer.h" | 15 #include "chrome/common/extensions/extension_localization_peer.h" |
16 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.h" |
17 #include "chrome/common/security_filter_peer.h" | 17 #include "chrome/common/security_filter_peer.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
| 20 #include "net/http/http_response_headers.h" |
20 #include "webkit/glue/resource_type.h" | 21 #include "webkit/glue/resource_type.h" |
21 #include "webkit/glue/webkit_glue.h" | 22 #include "webkit/glue/webkit_glue.h" |
22 | 23 |
23 // Uncomment to enable logging of request traffic | 24 // Uncomment to enable logging of request traffic |
24 // #define LOG_RESOURCE_REQUESTS | 25 // #define LOG_RESOURCE_REQUESTS |
25 | 26 |
26 #ifdef LOG_RESOURCE_REQUESTS | 27 #ifdef LOG_RESOURCE_REQUESTS |
27 # define RESOURCE_LOG(stuff) LOG(INFO) << stuff | 28 # define RESOURCE_LOG(stuff) LOG(INFO) << stuff |
28 #else | 29 #else |
29 # define RESOURCE_LOG(stuff) | 30 # define RESOURCE_LOG(stuff) |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 | 621 |
621 // static | 622 // static |
622 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 623 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
623 while (!queue->empty()) { | 624 while (!queue->empty()) { |
624 IPC::Message* message = queue->front(); | 625 IPC::Message* message = queue->front(); |
625 ReleaseResourcesInDataMessage(*message); | 626 ReleaseResourcesInDataMessage(*message); |
626 queue->pop_front(); | 627 queue->pop_front(); |
627 delete message; | 628 delete message; |
628 } | 629 } |
629 } | 630 } |
OLD | NEW |