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

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

Issue 2828953002: [IndexedDB] Hold referenced to IDB::put blobs in the IDBRequest (Closed)
Patch Set: Created 3 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 <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 // that process go away upon destruction of the instance. 40 // that process go away upon destruction of the instance.
41 // This lives in the browser process, is single threaded (IO thread), and there 41 // This lives in the browser process, is single threaded (IO thread), and there
42 // is one per child process. 42 // is one per child process.
43 class CONTENT_EXPORT BlobDispatcherHost : public BrowserMessageFilter { 43 class CONTENT_EXPORT BlobDispatcherHost : public BrowserMessageFilter {
44 public: 44 public:
45 BlobDispatcherHost( 45 BlobDispatcherHost(
46 int process_id, 46 int process_id,
47 scoped_refptr<ChromeBlobStorageContext> blob_storage_context, 47 scoped_refptr<ChromeBlobStorageContext> blob_storage_context,
48 scoped_refptr<storage::FileSystemContext> file_system_context); 48 scoped_refptr<storage::FileSystemContext> file_system_context);
49 49
50 // Decrements the refcount for the given blob for this renderer.
51 void AckBlobRecievedFromIDB(const std::string& uuid);
52
50 // BrowserMessageFilter implementation. 53 // BrowserMessageFilter implementation.
51 void OnChannelClosing() override; 54 void OnChannelClosing() override;
52 bool OnMessageReceived(const IPC::Message& message) override; 55 bool OnMessageReceived(const IPC::Message& message) override;
53 56
54 protected: 57 protected:
55 ~BlobDispatcherHost() override; 58 ~BlobDispatcherHost() override;
56 59
57 private: 60 private:
58 friend class base::RefCountedThreadSafe<BlobDispatcherHost>; 61 friend class base::RefCountedThreadSafe<BlobDispatcherHost>;
59 friend class BlobDispatcherHostTest; 62 friend class BlobDispatcherHostTest;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // The set of public blob urls coined by this consumer. 142 // The set of public blob urls coined by this consumer.
140 std::set<GURL> public_blob_urls_; 143 std::set<GURL> public_blob_urls_;
141 144
142 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 145 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
143 storage::BlobTransportHost transport_host_; 146 storage::BlobTransportHost transport_host_;
144 147
145 DISALLOW_COPY_AND_ASSIGN(BlobDispatcherHost); 148 DISALLOW_COPY_AND_ASSIGN(BlobDispatcherHost);
146 }; 149 };
147 } // namespace content 150 } // namespace content
148 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_ 151 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698