| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 // Contrary to the style guide, the output parameter of this function comes | 826 // Contrary to the style guide, the output parameter of this function comes |
| 827 // before input parameters so Bind can be used on it to create a FetchCallback | 827 // before input parameters so Bind can be used on it to create a FetchCallback |
| 828 // to pass to DispatchFetchEvent. | 828 // to pass to DispatchFetchEvent. |
| 829 void ReceiveFetchResultOnIOThread( | 829 void ReceiveFetchResultOnIOThread( |
| 830 const base::Closure& quit, | 830 const base::Closure& quit, |
| 831 ChromeBlobStorageContext* blob_context, | 831 ChromeBlobStorageContext* blob_context, |
| 832 FetchResult* out_result, | 832 FetchResult* out_result, |
| 833 ServiceWorkerStatusCode actual_status, | 833 ServiceWorkerStatusCode actual_status, |
| 834 ServiceWorkerFetchEventResult actual_result, | 834 ServiceWorkerFetchEventResult actual_result, |
| 835 const ServiceWorkerResponse& actual_response, | 835 const ServiceWorkerResponse& actual_response, |
| 836 blink::mojom::ServiceWorkerStreamHandlePtr /* stream */, |
| 836 const scoped_refptr<ServiceWorkerVersion>& worker) { | 837 const scoped_refptr<ServiceWorkerVersion>& worker) { |
| 837 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 838 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 838 ASSERT_TRUE(fetch_dispatcher_); | 839 ASSERT_TRUE(fetch_dispatcher_); |
| 839 fetch_dispatcher_.reset(); | 840 fetch_dispatcher_.reset(); |
| 840 out_result->status = actual_status; | 841 out_result->status = actual_status; |
| 841 out_result->result = actual_result; | 842 out_result->result = actual_result; |
| 842 out_result->response = actual_response; | 843 out_result->response = actual_response; |
| 843 if (!actual_response.blob_uuid.empty()) { | 844 if (!actual_response.blob_uuid.empty()) { |
| 844 out_result->blob_data_handle = | 845 out_result->blob_data_handle = |
| 845 blob_context->context()->GetBlobDataFromUUID( | 846 blob_context->context()->GetBlobDataFromUUID( |
| (...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2934 // effect in CanSuspendRenderer(). | 2935 // effect in CanSuspendRenderer(). |
| 2935 shell()->web_contents()->WasHidden(); | 2936 shell()->web_contents()->WasHidden(); |
| 2936 EXPECT_TRUE(rph->IsProcessBackgrounded()); | 2937 EXPECT_TRUE(rph->IsProcessBackgrounded()); |
| 2937 | 2938 |
| 2938 // The process which has service worker thread shouldn't be suspended. | 2939 // The process which has service worker thread shouldn't be suspended. |
| 2939 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); | 2940 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); |
| 2940 } | 2941 } |
| 2941 #endif | 2942 #endif |
| 2942 | 2943 |
| 2943 } // namespace content | 2944 } // namespace content |
| OLD | NEW |