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

Side by Side Diff: content/browser/byte_stream.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/byte_stream.h" 5 #include "content/browser/byte_stream.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 void ByteStreamReaderImpl::TransferData( 377 void ByteStreamReaderImpl::TransferData(
378 scoped_refptr<LifetimeFlag> object_lifetime_flag, 378 scoped_refptr<LifetimeFlag> object_lifetime_flag,
379 ByteStreamReaderImpl* target, 379 ByteStreamReaderImpl* target,
380 scoped_ptr<ContentVector> transfer_buffer, 380 scoped_ptr<ContentVector> transfer_buffer,
381 size_t buffer_size, 381 size_t buffer_size,
382 bool source_complete, 382 bool source_complete,
383 int status) { 383 int status) {
384 // If our target is no longer alive, do nothing. 384 // If our target is no longer alive, do nothing.
385 if (!object_lifetime_flag->is_alive) return; 385 if (!object_lifetime_flag->is_alive) return;
386 386
387 target->TransferDataInternal( 387 target->TransferDataInternal(std::move(transfer_buffer), buffer_size,
388 transfer_buffer.Pass(), buffer_size, source_complete, status); 388 source_complete, status);
389 } 389 }
390 390
391 void ByteStreamReaderImpl::TransferDataInternal( 391 void ByteStreamReaderImpl::TransferDataInternal(
392 scoped_ptr<ContentVector> transfer_buffer, 392 scoped_ptr<ContentVector> transfer_buffer,
393 size_t buffer_size, 393 size_t buffer_size,
394 bool source_complete, 394 bool source_complete,
395 int status) { 395 int status) {
396 DCHECK(my_task_runner_->RunsTasksOnCurrentThread()); 396 DCHECK(my_task_runner_->RunsTasksOnCurrentThread());
397 397
398 bool was_empty = available_contents_.empty(); 398 bool was_empty = available_contents_.empty();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 ByteStreamReaderImpl* out = new ByteStreamReaderImpl( 458 ByteStreamReaderImpl* out = new ByteStreamReaderImpl(
459 output_task_runner, output_flag, buffer_size); 459 output_task_runner, output_flag, buffer_size);
460 460
461 in->SetPeer(out, output_task_runner, output_flag); 461 in->SetPeer(out, output_task_runner, output_flag);
462 out->SetPeer(in, input_task_runner, input_flag); 462 out->SetPeer(in, input_task_runner, input_flag);
463 input->reset(in); 463 input->reset(in);
464 output->reset(out); 464 output->reset(out);
465 } 465 }
466 466
467 } // namespace content 467 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698