| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/webblobregistry_impl.h" | 5 #include "content/child/blob_storage/webblobregistry_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 main_runner_(std::move(main_runner)), | 43 main_runner_(std::move(main_runner)), |
| 44 sender_(std::move(sender)) { | 44 sender_(std::move(sender)) { |
| 45 // Record a dummy trace event on startup so the 'Storage' category shows up | 45 // Record a dummy trace event on startup so the 'Storage' category shows up |
| 46 // in the chrome://tracing viewer. | 46 // in the chrome://tracing viewer. |
| 47 TRACE_EVENT0("Blob", "Init"); | 47 TRACE_EVENT0("Blob", "Init"); |
| 48 } | 48 } |
| 49 | 49 |
| 50 WebBlobRegistryImpl::~WebBlobRegistryImpl() { | 50 WebBlobRegistryImpl::~WebBlobRegistryImpl() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 base::SingleThreadTaskRunner* WebBlobRegistryImpl::GetIORunner() { |
| 54 return io_runner_.get(); |
| 55 } |
| 56 |
| 53 std::unique_ptr<WebBlobRegistry::Builder> WebBlobRegistryImpl::CreateBuilder( | 57 std::unique_ptr<WebBlobRegistry::Builder> WebBlobRegistryImpl::CreateBuilder( |
| 54 const blink::WebString& uuid, | 58 const blink::WebString& uuid, |
| 55 const blink::WebString& content_type) { | 59 const blink::WebString& content_type) { |
| 56 return base::WrapUnique(new BuilderImpl(uuid, content_type, sender_.get(), | 60 return base::WrapUnique(new BuilderImpl(uuid, content_type, sender_.get(), |
| 57 io_runner_, main_runner_)); | 61 io_runner_, main_runner_)); |
| 58 } | 62 } |
| 59 | 63 |
| 60 void WebBlobRegistryImpl::RegisterBlobData(const blink::WebString& uuid, | 64 void WebBlobRegistryImpl::RegisterBlobData(const blink::WebString& uuid, |
| 61 const blink::WebBlobData& data) { | 65 const blink::WebBlobData& data) { |
| 62 TRACE_EVENT0("Blob", "Registry::RegisterBlob"); | 66 TRACE_EVENT0("Blob", "Registry::RegisterBlob"); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 expected_modification_time); | 241 expected_modification_time); |
| 238 } | 242 } |
| 239 | 243 |
| 240 void WebBlobRegistryImpl::BuilderImpl::Build() { | 244 void WebBlobRegistryImpl::BuilderImpl::Build() { |
| 241 BlobTransportController::InitiateBlobTransfer( | 245 BlobTransportController::InitiateBlobTransfer( |
| 242 uuid_, content_type_, std::move(consolidation_), sender_, | 246 uuid_, content_type_, std::move(consolidation_), sender_, |
| 243 io_runner_.get(), main_runner_); | 247 io_runner_.get(), main_runner_); |
| 244 } | 248 } |
| 245 | 249 |
| 246 } // namespace content | 250 } // namespace content |
| OLD | NEW |