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

Side by Side Diff: net/http/http_transaction_test_util.cc

Issue 1545233002: Convert Pass()→std::move() in //net (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 | « net/http/http_stream_parser_unittest.cc ('k') | net/http/mock_http_cache.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/http/http_transaction_test_util.h" 5 #include "net/http/http_transaction_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/location.h" 11 #include "base/location.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
13 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
14 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
15 #include "base/time/clock.h" 16 #include "base/time/clock.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "net/base/load_flags.h" 18 #include "net/base/load_flags.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 stop_caching_called_ = true; 524 stop_caching_called_ = true;
524 } 525 }
525 526
526 int MockNetworkLayer::CreateTransaction(RequestPriority priority, 527 int MockNetworkLayer::CreateTransaction(RequestPriority priority,
527 scoped_ptr<HttpTransaction>* trans) { 528 scoped_ptr<HttpTransaction>* trans) {
528 transaction_count_++; 529 transaction_count_++;
529 last_create_transaction_priority_ = priority; 530 last_create_transaction_priority_ = priority;
530 scoped_ptr<MockNetworkTransaction> mock_transaction( 531 scoped_ptr<MockNetworkTransaction> mock_transaction(
531 new MockNetworkTransaction(priority, this)); 532 new MockNetworkTransaction(priority, this));
532 last_transaction_ = mock_transaction->AsWeakPtr(); 533 last_transaction_ = mock_transaction->AsWeakPtr();
533 *trans = mock_transaction.Pass(); 534 *trans = std::move(mock_transaction);
534 return OK; 535 return OK;
535 } 536 }
536 537
537 HttpCache* MockNetworkLayer::GetCache() { 538 HttpCache* MockNetworkLayer::GetCache() {
538 return NULL; 539 return NULL;
539 } 540 }
540 541
541 HttpNetworkSession* MockNetworkLayer::GetSession() { 542 HttpNetworkSession* MockNetworkLayer::GetSession() {
542 return NULL; 543 return NULL;
543 } 544 }
(...skipping 28 matching lines...) Expand all
572 content.append(buf->data(), rv); 573 content.append(buf->data(), rv);
573 else if (rv < 0) 574 else if (rv < 0)
574 return rv; 575 return rv;
575 } while (rv > 0); 576 } while (rv > 0);
576 577
577 result->swap(content); 578 result->swap(content);
578 return OK; 579 return OK;
579 } 580 }
580 581
581 } // namespace net 582 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_parser_unittest.cc ('k') | net/http/mock_http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698