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

Side by Side Diff: content/child/webblobregistry_impl.cc

Issue 1853333003: [BlobAsync] Faster shortcuttin, make renderer controller leaky & alive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl owners 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 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/webblobregistry_impl.h" 5 #include "content/child/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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 uint64_t length, 231 uint64_t length,
232 double expected_modification_time) { 232 double expected_modification_time) {
233 DCHECK(GURL(fileSystemURL).SchemeIsFileSystem()); 233 DCHECK(GURL(fileSystemURL).SchemeIsFileSystem());
234 consolidation_->AddFileSystemItem(GURL(fileSystemURL), offset, length, 234 consolidation_->AddFileSystemItem(GURL(fileSystemURL), offset, length,
235 expected_modification_time); 235 expected_modification_time);
236 } 236 }
237 237
238 void WebBlobRegistryImpl::BuilderImpl::build() { 238 void WebBlobRegistryImpl::BuilderImpl::build() {
239 sender_->Send(new BlobStorageMsg_RegisterBlobUUID( 239 sender_->Send(new BlobStorageMsg_RegisterBlobUUID(
240 uuid_, content_type_, "", consolidation_->referenced_blobs())); 240 uuid_, content_type_, "", consolidation_->referenced_blobs()));
241 io_runner_->PostTask( 241 BlobTransportController::InitiateBlobTransfer(
242 FROM_HERE, 242 uuid_, std::move(consolidation_), sender_, io_runner_, main_runner_);
243 base::Bind(&WebBlobRegistryImpl::StartBlobAsyncConstruction, uuid_,
244 base::Passed(&consolidation_), sender_, main_runner_));
245 }
246
247 /* static */
248 void WebBlobRegistryImpl::StartBlobAsyncConstruction(
249 const std::string& uuid,
250 scoped_ptr<BlobConsolidation> consolidation,
251 scoped_refptr<ThreadSafeSender> sender,
252 scoped_refptr<base::SingleThreadTaskRunner> main_runner) {
253 BlobTransportController::GetInstance()->InitiateBlobTransfer(
254 uuid, std::move(consolidation), sender.get(), std::move(main_runner));
255 } 243 }
256 244
257 } // namespace content 245 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698