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

Side by Side Diff: content/public/test/test_download_request_handler.cc

Issue 1838963002: [Downloads] Fix copy and move operators for TestDownloadRequestHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/test/test_download_request_handler.h" 5 #include "content/public/test/test_download_request_handler.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 TestDownloadRequestHandler::Parameters::Parameters(const Parameters&) = default; 566 TestDownloadRequestHandler::Parameters::Parameters(const Parameters&) = default;
567 TestDownloadRequestHandler::Parameters& TestDownloadRequestHandler::Parameters:: 567 TestDownloadRequestHandler::Parameters& TestDownloadRequestHandler::Parameters::
568 operator=(const Parameters&) = default; 568 operator=(const Parameters&) = default;
569 569
570 TestDownloadRequestHandler::Parameters::Parameters(Parameters&& that) 570 TestDownloadRequestHandler::Parameters::Parameters(Parameters&& that)
571 : etag(std::move(that.etag)), 571 : etag(std::move(that.etag)),
572 last_modified(std::move(that.last_modified)), 572 last_modified(std::move(that.last_modified)),
573 content_type(std::move(that.content_type)), 573 content_type(std::move(that.content_type)),
574 size(that.size), 574 size(that.size),
575 pattern_generator_seed(that.pattern_generator_seed), 575 pattern_generator_seed(that.pattern_generator_seed),
576 support_byte_ranges(that.support_byte_ranges),
576 on_start_handler(that.on_start_handler), 577 on_start_handler(that.on_start_handler),
577 injected_errors(std::move(that.injected_errors)) {} 578 injected_errors(std::move(that.injected_errors)) {}
578 579
579 TestDownloadRequestHandler::Parameters& TestDownloadRequestHandler::Parameters:: 580 TestDownloadRequestHandler::Parameters& TestDownloadRequestHandler::Parameters::
580 operator=(Parameters&& that) { 581 operator=(Parameters&& that) {
581 etag = std::move(that.etag); 582 etag = std::move(that.etag);
582 last_modified = std::move(that.etag); 583 last_modified = std::move(that.etag);
583 content_type = std::move(that.content_type); 584 content_type = std::move(that.content_type);
584 size = that.size; 585 size = that.size;
585 pattern_generator_seed = that.pattern_generator_seed; 586 pattern_generator_seed = that.pattern_generator_seed;
587 support_byte_ranges = that.support_byte_ranges;
586 on_start_handler = that.on_start_handler; 588 on_start_handler = that.on_start_handler;
587 injected_errors.swap(that.injected_errors); 589 injected_errors = std::move(that.injected_errors);
588 return *this; 590 return *this;
589 } 591 }
590 592
591 TestDownloadRequestHandler::Parameters::~Parameters() {} 593 TestDownloadRequestHandler::Parameters::~Parameters() {}
592 594
593 void TestDownloadRequestHandler::Parameters::ClearInjectedErrors() { 595 void TestDownloadRequestHandler::Parameters::ClearInjectedErrors() {
594 std::queue<InjectedError> empty_error_list; 596 std::queue<InjectedError> empty_error_list;
595 injected_errors.swap(empty_error_list); 597 injected_errors.swap(empty_error_list);
596 } 598 }
597 599
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 base::RunLoop run_loop; 666 base::RunLoop run_loop;
665 BrowserThread::PostTaskAndReply( 667 BrowserThread::PostTaskAndReply(
666 BrowserThread::IO, FROM_HERE, 668 BrowserThread::IO, FROM_HERE,
667 base::Bind(&Interceptor::GetAndResetCompletedRequests, interceptor_, 669 base::Bind(&Interceptor::GetAndResetCompletedRequests, interceptor_,
668 requests), 670 requests),
669 run_loop.QuitClosure()); 671 run_loop.QuitClosure());
670 run_loop.Run(); 672 run_loop.Run();
671 } 673 }
672 674
673 } // namespace content 675 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698