OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 bool* prepare_result, | 784 bool* prepare_result, |
785 FetchResult* result) { | 785 FetchResult* result) { |
786 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 786 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
787 std::unique_ptr<ServiceWorkerFetchRequest> request( | 787 std::unique_ptr<ServiceWorkerFetchRequest> request( |
788 new ServiceWorkerFetchRequest( | 788 new ServiceWorkerFetchRequest( |
789 embedded_test_server()->GetURL("/service_worker/empty.html"), "GET", | 789 embedded_test_server()->GetURL("/service_worker/empty.html"), "GET", |
790 ServiceWorkerHeaderMap(), Referrer(), false)); | 790 ServiceWorkerHeaderMap(), Referrer(), false)); |
791 version_->SetStatus(ServiceWorkerVersion::ACTIVATED); | 791 version_->SetStatus(ServiceWorkerVersion::ACTIVATED); |
792 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher( | 792 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher( |
793 std::move(request), version_.get(), RESOURCE_TYPE_MAIN_FRAME, | 793 std::move(request), version_.get(), RESOURCE_TYPE_MAIN_FRAME, |
794 net::NetLogWithSource(), CreatePrepareReceiver(prepare_result), | 794 base::nullopt, net::NetLogWithSource(), |
| 795 CreatePrepareReceiver(prepare_result), |
795 CreateResponseReceiver(done, blob_context_.get(), result))); | 796 CreateResponseReceiver(done, blob_context_.get(), result))); |
796 fetch_dispatcher_->Run(); | 797 fetch_dispatcher_->Run(); |
797 } | 798 } |
798 | 799 |
799 // Contrary to the style guide, the output parameter of this function comes | 800 // Contrary to the style guide, the output parameter of this function comes |
800 // before input parameters so Bind can be used on it to create a FetchCallback | 801 // before input parameters so Bind can be used on it to create a FetchCallback |
801 // to pass to DispatchFetchEvent. | 802 // to pass to DispatchFetchEvent. |
802 void ReceiveFetchResultOnIOThread( | 803 void ReceiveFetchResultOnIOThread( |
803 const base::Closure& quit, | 804 const base::Closure& quit, |
804 ChromeBlobStorageContext* blob_context, | 805 ChromeBlobStorageContext* blob_context, |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2923 ServiceWorkerV8CacheStrategiesNormalTest, | 2924 ServiceWorkerV8CacheStrategiesNormalTest, |
2924 ::testing::Values(true, false)); | 2925 ::testing::Values(true, false)); |
2925 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, | 2926 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, |
2926 ServiceWorkerV8CacheStrategiesAggressiveTest, | 2927 ServiceWorkerV8CacheStrategiesAggressiveTest, |
2927 ::testing::Values(true, false)); | 2928 ::testing::Values(true, false)); |
2928 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, | 2929 INSTANTIATE_TEST_CASE_P(ServiceWorkerBrowserTest, |
2929 ServiceWorkerDisableWebSecurityTest, | 2930 ServiceWorkerDisableWebSecurityTest, |
2930 ::testing::Values(true, false)); | 2931 ::testing::Values(true, false)); |
2931 | 2932 |
2932 } // namespace content | 2933 } // namespace content |
OLD | NEW |