| 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 bool* prepare_result, | 727 bool* prepare_result, |
| 728 FetchResult* result) { | 728 FetchResult* result) { |
| 729 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 729 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 730 std::unique_ptr<ServiceWorkerFetchRequest> request( | 730 std::unique_ptr<ServiceWorkerFetchRequest> request( |
| 731 new ServiceWorkerFetchRequest( | 731 new ServiceWorkerFetchRequest( |
| 732 embedded_test_server()->GetURL("/service_worker/empty.html"), "GET", | 732 embedded_test_server()->GetURL("/service_worker/empty.html"), "GET", |
| 733 ServiceWorkerHeaderMap(), Referrer(), false)); | 733 ServiceWorkerHeaderMap(), Referrer(), false)); |
| 734 version_->SetStatus(ServiceWorkerVersion::ACTIVATED); | 734 version_->SetStatus(ServiceWorkerVersion::ACTIVATED); |
| 735 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher( | 735 fetch_dispatcher_.reset(new ServiceWorkerFetchDispatcher( |
| 736 std::move(request), version_.get(), RESOURCE_TYPE_MAIN_FRAME, | 736 std::move(request), version_.get(), RESOURCE_TYPE_MAIN_FRAME, |
| 737 net::BoundNetLog(), CreatePrepareReceiver(prepare_result), | 737 net::NetLogWithSource(), CreatePrepareReceiver(prepare_result), |
| 738 CreateResponseReceiver(done, blob_context_.get(), result))); | 738 CreateResponseReceiver(done, blob_context_.get(), result))); |
| 739 fetch_dispatcher_->Run(); | 739 fetch_dispatcher_->Run(); |
| 740 } | 740 } |
| 741 | 741 |
| 742 // Contrary to the style guide, the output parameter of this function comes | 742 // Contrary to the style guide, the output parameter of this function comes |
| 743 // before input parameters so Bind can be used on it to create a FetchCallback | 743 // before input parameters so Bind can be used on it to create a FetchCallback |
| 744 // to pass to DispatchFetchEvent. | 744 // to pass to DispatchFetchEvent. |
| 745 void ReceiveFetchResultOnIOThread( | 745 void ReceiveFetchResultOnIOThread( |
| 746 const base::Closure& quit, | 746 const base::Closure& quit, |
| 747 ChromeBlobStorageContext* blob_context, | 747 ChromeBlobStorageContext* blob_context, |
| (...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 | 2025 |
| 2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { | 2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { |
| 2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; | 2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; |
| 2028 const char kScopeUrl[] = "/service_worker/scope/"; | 2028 const char kScopeUrl[] = "/service_worker/scope/"; |
| 2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; | 2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; |
| 2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); | 2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); |
| 2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); | 2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); |
| 2032 } | 2032 } |
| 2033 | 2033 |
| 2034 } // namespace content | 2034 } // namespace content |
| OLD | NEW |