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

Side by Side Diff: content/browser/blob_storage/blob_dispatcher_host.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 void OnIncrementBlobRefCount(const std::string& uuid); 112 void OnIncrementBlobRefCount(const std::string& uuid);
113 void OnDecrementBlobRefCount(const std::string& uuid); 113 void OnDecrementBlobRefCount(const std::string& uuid);
114 void OnRegisterPublicBlobURL(const GURL& public_url, const std::string& uuid); 114 void OnRegisterPublicBlobURL(const GURL& public_url, const std::string& uuid);
115 void OnRevokePublicBlobURL(const GURL& public_url); 115 void OnRevokePublicBlobURL(const GURL& public_url);
116 116
117 storage::BlobStorageContext* context(); 117 storage::BlobStorageContext* context();
118 118
119 void SendMemoryRequest( 119 void SendMemoryRequest(
120 const std::string& uuid, 120 const std::string& uuid,
121 scoped_ptr<std::vector<storage::BlobItemBytesRequest>> requests, 121 std::unique_ptr<std::vector<storage::BlobItemBytesRequest>> requests,
122 scoped_ptr<std::vector<base::SharedMemoryHandle>> memory_handles, 122 std::unique_ptr<std::vector<base::SharedMemoryHandle>> memory_handles,
123 scoped_ptr<std::vector<base::File>> files); 123 std::unique_ptr<std::vector<base::File>> files);
124 124
125 // Send the appropriate IPC response to the renderer for the given result. 125 // Send the appropriate IPC response to the renderer for the given result.
126 void SendIPCResponse(const std::string& uuid, 126 void SendIPCResponse(const std::string& uuid,
127 storage::BlobTransportResult result); 127 storage::BlobTransportResult result);
128 128
129 bool IsInUseInHost(const std::string& uuid); 129 bool IsInUseInHost(const std::string& uuid);
130 bool IsUrlRegisteredInHost(const GURL& blob_url); 130 bool IsUrlRegisteredInHost(const GURL& blob_url);
131 131
132 // Unregisters all blobs and urls that were registered in this host. 132 // Unregisters all blobs and urls that were registered in this host.
133 void ClearHostFromBlobStorageContext(); 133 void ClearHostFromBlobStorageContext();
134 134
135 // Collection of blob ids and a count of how many usages 135 // Collection of blob ids and a count of how many usages
136 // of that id are attributable to this consumer. 136 // of that id are attributable to this consumer.
137 BlobReferenceMap blobs_inuse_map_; 137 BlobReferenceMap blobs_inuse_map_;
138 138
139 // The set of public blob urls coined by this consumer. 139 // The set of public blob urls coined by this consumer.
140 std::set<GURL> public_blob_urls_; 140 std::set<GURL> public_blob_urls_;
141 141
142 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 142 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
143 storage::BlobAsyncBuilderHost async_builder_; 143 storage::BlobAsyncBuilderHost async_builder_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(BlobDispatcherHost); 145 DISALLOW_COPY_AND_ASSIGN(BlobDispatcherHost);
146 }; 146 };
147 } // namespace content 147 } // namespace content
148 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_ 148 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/blob_storage/blob_async_builder_host_unittest.cc ('k') | content/browser/blob_storage/blob_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698