OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // | 87 // |
88 // See ResourceDispatcher::ReleaseResourcesInDataMessage. | 88 // See ResourceDispatcher::ReleaseResourcesInDataMessage. |
89 // | 89 // |
90 // TODO(davidben): It would be nice if the behavior for base::SharedMemoryHandle | 90 // TODO(davidben): It would be nice if the behavior for base::SharedMemoryHandle |
91 // were more like it is in POSIX where the received fds are tracked in a | 91 // were more like it is in POSIX where the received fds are tracked in a |
92 // ref-counted core that closes them if not extracted. | 92 // ref-counted core that closes them if not extracted. |
93 void ReleaseHandlesInMessage(const IPC::Message& message) { | 93 void ReleaseHandlesInMessage(const IPC::Message& message) { |
94 if (message.type() == ResourceMsg_SetDataBuffer::ID) { | 94 if (message.type() == ResourceMsg_SetDataBuffer::ID) { |
95 PickleIterator iter(message); | 95 PickleIterator iter(message); |
96 int request_id; | 96 int request_id; |
97 CHECK(iter.ReadInt(&request_id)); | 97 CHECK(message.ReadInt(&iter, &request_id)); |
98 base::SharedMemoryHandle shm_handle; | 98 base::SharedMemoryHandle shm_handle; |
99 if (IPC::ParamTraits<base::SharedMemoryHandle>::Read(&message, | 99 if (IPC::ParamTraits<base::SharedMemoryHandle>::Read(&message, |
100 &iter, | 100 &iter, |
101 &shm_handle)) { | 101 &shm_handle)) { |
102 if (base::SharedMemory::IsHandleValid(shm_handle)) | 102 if (base::SharedMemory::IsHandleValid(shm_handle)) |
103 base::SharedMemory::CloseHandle(shm_handle); | 103 base::SharedMemory::CloseHandle(shm_handle); |
104 } | 104 } |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3017 return nullptr; | 3017 return nullptr; |
3018 } | 3018 } |
3019 | 3019 |
3020 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( | 3020 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( |
3021 net::URLRequest* request, | 3021 net::URLRequest* request, |
3022 net::NetworkDelegate* network_delegate) const { | 3022 net::NetworkDelegate* network_delegate) const { |
3023 return nullptr; | 3023 return nullptr; |
3024 } | 3024 } |
3025 | 3025 |
3026 } // namespace content | 3026 } // namespace content |
OLD | NEW |