| 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 // Contrary to the style guide, the output parameter of this function comes | 880 // Contrary to the style guide, the output parameter of this function comes |
| 881 // before input parameters so Bind can be used on it to create a FetchCallback | 881 // before input parameters so Bind can be used on it to create a FetchCallback |
| 882 // to pass to DispatchFetchEvent. | 882 // to pass to DispatchFetchEvent. |
| 883 void ReceiveFetchResultOnIOThread( | 883 void ReceiveFetchResultOnIOThread( |
| 884 const base::Closure& quit, | 884 const base::Closure& quit, |
| 885 ChromeBlobStorageContext* blob_context, | 885 ChromeBlobStorageContext* blob_context, |
| 886 FetchResult* out_result, | 886 FetchResult* out_result, |
| 887 ServiceWorkerStatusCode actual_status, | 887 ServiceWorkerStatusCode actual_status, |
| 888 ServiceWorkerFetchEventResult actual_result, | 888 ServiceWorkerFetchEventResult actual_result, |
| 889 const ServiceWorkerResponse& actual_response, | 889 const ServiceWorkerResponse& actual_response, |
| 890 blink::mojom::ServiceWorkerStreamHandlePtr /* stream */, |
| 890 const scoped_refptr<ServiceWorkerVersion>& worker) { | 891 const scoped_refptr<ServiceWorkerVersion>& worker) { |
| 891 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 892 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 892 ASSERT_TRUE(fetch_dispatcher_); | 893 ASSERT_TRUE(fetch_dispatcher_); |
| 893 fetch_dispatcher_.reset(); | 894 fetch_dispatcher_.reset(); |
| 894 out_result->status = actual_status; | 895 out_result->status = actual_status; |
| 895 out_result->result = actual_result; | 896 out_result->result = actual_result; |
| 896 out_result->response = actual_response; | 897 out_result->response = actual_response; |
| 897 if (!actual_response.blob_uuid.empty()) { | 898 if (!actual_response.blob_uuid.empty()) { |
| 898 out_result->blob_data_handle = | 899 out_result->blob_data_handle = |
| 899 blob_context->context()->GetBlobDataFromUUID( | 900 blob_context->context()->GetBlobDataFromUUID( |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3008 // effect in CanSuspendRenderer(). | 3009 // effect in CanSuspendRenderer(). |
| 3009 shell()->web_contents()->WasHidden(); | 3010 shell()->web_contents()->WasHidden(); |
| 3010 EXPECT_TRUE(rph->IsProcessBackgrounded()); | 3011 EXPECT_TRUE(rph->IsProcessBackgrounded()); |
| 3011 | 3012 |
| 3012 // The process which has service worker thread shouldn't be suspended. | 3013 // The process which has service worker thread shouldn't be suspended. |
| 3013 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); | 3014 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); |
| 3014 } | 3015 } |
| 3015 #endif | 3016 #endif |
| 3016 | 3017 |
| 3017 } // namespace content | 3018 } // namespace content |
| OLD | NEW |