OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/child/blob_storage/blob_transport_controller.h" | 5 #include "content/child/blob_storage/blob_transport_controller.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 if (!last_modified) { | 133 if (!last_modified) { |
134 return base::nullopt; | 134 return base::nullopt; |
135 } | 135 } |
136 last_modified_times[request.handle_index] = last_modified.value(); | 136 last_modified_times[request.handle_index] = last_modified.value(); |
137 } | 137 } |
138 for (const auto& request : *requests) { | 138 for (const auto& request : *requests) { |
139 responses.push_back(BlobItemBytesResponse(request.request_number)); | 139 responses.push_back(BlobItemBytesResponse(request.request_number)); |
140 responses.back().time_file_modified = | 140 responses.back().time_file_modified = |
141 last_modified_times[request.handle_index]; | 141 last_modified_times[request.handle_index]; |
142 } | 142 } |
| 143 for (auto& file : files) { |
| 144 file.Flush(); |
| 145 } |
143 | 146 |
144 return responses; | 147 return responses; |
145 } | 148 } |
146 | 149 |
147 } // namespace | 150 } // namespace |
148 | 151 |
149 BlobTransportController* BlobTransportController::GetInstance() { | 152 BlobTransportController* BlobTransportController::GetInstance() { |
150 return g_controller.Pointer(); | 153 return g_controller.Pointer(); |
151 } | 154 } |
152 | 155 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 404 |
402 void BlobTransportController::ReleaseBlobConsolidation( | 405 void BlobTransportController::ReleaseBlobConsolidation( |
403 const std::string& uuid) { | 406 const std::string& uuid) { |
404 if (blob_storage_.erase(uuid)) { | 407 if (blob_storage_.erase(uuid)) { |
405 main_thread_runner_->PostTask(FROM_HERE, | 408 main_thread_runner_->PostTask(FROM_HERE, |
406 base::Bind(&DecChildProcessRefCount)); | 409 base::Bind(&DecChildProcessRefCount)); |
407 } | 410 } |
408 } | 411 } |
409 | 412 |
410 } // namespace content | 413 } // namespace content |
OLD | NEW |