| Index: content/child/webblobregistry_impl.h
|
| diff --git a/content/child/webblobregistry_impl.h b/content/child/webblobregistry_impl.h
|
| index 21c6625539660beb4a05f1bb32b097e521a96f39..dc0aafee8bfdae348b480e40b9d546623282a78c 100644
|
| --- a/content/child/webblobregistry_impl.h
|
| +++ b/content/child/webblobregistry_impl.h
|
| @@ -2,14 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
|
| -#define CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
|
| +#ifndef CONTENT_CHILD_BLOB_STORAGE_WEBBLOBREGISTRY_IMPL_H_
|
| +#define CONTENT_CHILD_BLOB_STORAGE_WEBBLOBREGISTRY_IMPL_H_
|
|
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/memory/ref_counted.h"
|
| -#include "content/child/blob_storage/blob_consolidation.h"
|
| +#include "base/single_thread_task_runner.h"
|
| #include "storage/common/data_element.h"
|
| #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
|
|
|
| @@ -22,11 +22,13 @@ class DataElement;
|
| }
|
|
|
| namespace content {
|
| +class BlobConsolidation;
|
| class ThreadSafeSender;
|
|
|
| class WebBlobRegistryImpl : public blink::WebBlobRegistry {
|
| public:
|
| - explicit WebBlobRegistryImpl(ThreadSafeSender* sender);
|
| + explicit WebBlobRegistryImpl(base::SingleThreadTaskRunner* io_runner,
|
| + ThreadSafeSender* sender);
|
| ~WebBlobRegistryImpl() override;
|
|
|
| // TODO(dmurph): remove this after moving to createBuilder. crbug.com/504583
|
| @@ -62,7 +64,8 @@ class WebBlobRegistryImpl : public blink::WebBlobRegistry {
|
| public:
|
| BuilderImpl(const blink::WebString& uuid,
|
| const blink::WebString& contentType,
|
| - ThreadSafeSender* sender);
|
| + ThreadSafeSender* sender,
|
| + base::SingleThreadTaskRunner* io_runner);
|
| ~BuilderImpl() override;
|
|
|
| void appendData(const blink::WebThreadSafeData&) override;
|
| @@ -81,18 +84,24 @@ class WebBlobRegistryImpl : public blink::WebBlobRegistry {
|
| void build() override;
|
|
|
| private:
|
| - // Sends data that is larger than the threshold.
|
| - void SendOversizedDataForBlob(size_t consolidated_item_index);
|
| -
|
| const std::string uuid_;
|
| const std::string content_type_;
|
| - BlobConsolidation consolidation_;
|
| + scoped_ptr<BlobConsolidation> consolidation_;
|
| scoped_refptr<ThreadSafeSender> sender_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> io_runner_;
|
| };
|
|
|
| + // Method called on the IO thread.
|
| + static void StartBlobAsyncConstruction(
|
| + const std::string& uuid,
|
| + const std::string& type,
|
| + scoped_ptr<BlobConsolidation> consolidation,
|
| + const scoped_refptr<ThreadSafeSender>& sender);
|
| +
|
| + scoped_refptr<base::SingleThreadTaskRunner> io_runner_;
|
| scoped_refptr<ThreadSafeSender> sender_;
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
|
| +#endif // CONTENT_CHILD_BLOB_STORAGE_WEBBLOBREGISTRY_IMPL_H_
|
|
|