Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(828)

Side by Side Diff: content/child/blob_storage/blob_transport_controller.h

Issue 1997623002: Revert of [BlobAsync] Fixed race between IPC messages and IO task queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/child/blob_storage/blob_transport_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_ 5 #ifndef CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_
6 #define CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_ 6 #define CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // ChildProcess::ReleaseProcess to release our previous reference. 103 // ChildProcess::ReleaseProcess to release our previous reference.
104 void ClearForTesting(); 104 void ClearForTesting();
105 105
106 enum class ResponsesStatus { 106 enum class ResponsesStatus {
107 BLOB_NOT_FOUND, 107 BLOB_NOT_FOUND,
108 SHARED_MEMORY_MAP_FAILED, 108 SHARED_MEMORY_MAP_FAILED,
109 SUCCESS 109 SUCCESS
110 }; 110 };
111 friend struct base::DefaultLazyInstanceTraits<BlobTransportController>; 111 friend struct base::DefaultLazyInstanceTraits<BlobTransportController>;
112 112
113 void StoreBlobDataAndStart( 113 void StoreBlobDataForRequests(
114 const std::string& uuid, 114 const std::string& uuid,
115 std::unique_ptr<BlobConsolidation> consolidation, 115 std::unique_ptr<BlobConsolidation> consolidation,
116 scoped_refptr<ThreadSafeSender> sender,
117 scoped_refptr<base::SingleThreadTaskRunner> main_runner); 116 scoped_refptr<base::SingleThreadTaskRunner> main_runner);
118 117
119 ResponsesStatus GetResponses( 118 ResponsesStatus GetResponses(
120 const std::string& uuid, 119 const std::string& uuid,
121 const std::vector<storage::BlobItemBytesRequest>& requests, 120 const std::vector<storage::BlobItemBytesRequest>& requests,
122 std::vector<base::SharedMemoryHandle>* memory_handles, 121 std::vector<base::SharedMemoryHandle>* memory_handles,
123 const std::vector<IPC::PlatformFileForTransit>& file_handles, 122 const std::vector<IPC::PlatformFileForTransit>& file_handles,
124 std::vector<storage::BlobItemBytesResponse>* output); 123 std::vector<storage::BlobItemBytesResponse>* output);
125 124
126 // Deletes the consolidation, and if we removed the last consolidation from 125 // Deletes the consolidation, and if we removed the last consolidation from
127 // our map, we call ChildProcess::ReleaseProcess to release our previous 126 // our map, we call ChildProcess::ReleaseProcess to release our previous
128 // reference. 127 // reference.
129 void ReleaseBlobConsolidation(const std::string& uuid); 128 void ReleaseBlobConsolidation(const std::string& uuid);
130 129
131 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_; 130 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
132 std::map<std::string, std::unique_ptr<BlobConsolidation>> blob_storage_; 131 std::map<std::string, std::unique_ptr<BlobConsolidation>> blob_storage_;
133 132
134 DISALLOW_COPY_AND_ASSIGN(BlobTransportController); 133 DISALLOW_COPY_AND_ASSIGN(BlobTransportController);
135 }; 134 };
136 135
137 } // namespace content 136 } // namespace content
138 #endif // CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_ 137 #endif // CONTENT_CHILD_BLOB_STORAGE_BLOB_TRANSPORT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/blob_storage/blob_transport_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698