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

Side by Side Diff: content/browser/appcache/appcache_update_job_unittest.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
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 "content/browser/appcache/appcache_update_job.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility>
7 10
8 #include "base/bind.h" 11 #include "base/bind.h"
9 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
10 #include "base/location.h" 13 #include "base/location.h"
11 #include "base/macros.h" 14 #include "base/macros.h"
12 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
13 #include "base/stl_util.h" 16 #include "base/stl_util.h"
14 #include "base/synchronization/waitable_event.h" 17 #include "base/synchronization/waitable_event.h"
15 #include "base/thread_task_runner_handle.h" 18 #include "base/thread_task_runner_handle.h"
16 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
17 #include "content/browser/appcache/appcache_group.h" 20 #include "content/browser/appcache/appcache_group.h"
18 #include "content/browser/appcache/appcache_host.h" 21 #include "content/browser/appcache/appcache_host.h"
19 #include "content/browser/appcache/appcache_response.h" 22 #include "content/browser/appcache/appcache_response.h"
20 #include "content/browser/appcache/appcache_update_job.h"
21 #include "content/browser/appcache/mock_appcache_service.h" 23 #include "content/browser/appcache/mock_appcache_service.h"
22 #include "net/base/net_errors.h" 24 #include "net/base/net_errors.h"
23 #include "net/http/http_response_headers.h" 25 #include "net/http/http_response_headers.h"
24 #include "net/url_request/url_request_error_job.h" 26 #include "net/url_request/url_request_error_job.h"
25 #include "net/url_request/url_request_job_factory_impl.h" 27 #include "net/url_request/url_request_job_factory_impl.h"
26 #include "net/url_request/url_request_test_job.h" 28 #include "net/url_request/url_request_test_job.h"
27 #include "net/url_request/url_request_test_util.h" 29 #include "net/url_request/url_request_test_util.h"
28 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
29 31
30 namespace content { 32 namespace content {
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 request_context_->set_job_factory(job_factory_.get()); 577 request_context_->set_job_factory(job_factory_.get());
576 } 578 }
577 579
578 void Init() override { 580 void Init() override {
579 scoped_ptr<net::URLRequestJobFactoryImpl> factory( 581 scoped_ptr<net::URLRequestJobFactoryImpl> factory(
580 new net::URLRequestJobFactoryImpl()); 582 new net::URLRequestJobFactoryImpl());
581 factory->SetProtocolHandler("http", 583 factory->SetProtocolHandler("http",
582 make_scoped_ptr(new MockHttpServerJobFactory)); 584 make_scoped_ptr(new MockHttpServerJobFactory));
583 factory->SetProtocolHandler("https", 585 factory->SetProtocolHandler("https",
584 make_scoped_ptr(new MockHttpServerJobFactory)); 586 make_scoped_ptr(new MockHttpServerJobFactory));
585 job_factory_ = factory.Pass(); 587 job_factory_ = std::move(factory);
586 request_context_.reset(new net::TestURLRequestContext()); 588 request_context_.reset(new net::TestURLRequestContext());
587 request_context_->set_job_factory(job_factory_.get()); 589 request_context_->set_job_factory(job_factory_.get());
588 } 590 }
589 591
590 void CleanUp() override { 592 void CleanUp() override {
591 request_context_.reset(); 593 request_context_.reset();
592 job_factory_.reset(); 594 job_factory_.reset();
593 } 595 }
594 596
595 private: 597 private:
(...skipping 3130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3726 3728
3727 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { 3729 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) {
3728 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); 3730 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest);
3729 } 3731 }
3730 3732
3731 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { 3733 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
3732 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); 3734 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest);
3733 } 3735 }
3734 3736
3735 } // namespace content 3737 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698