| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/child/background_sync/background_sync_provider.h" | 5 #include "content/child/background_sync/background_sync_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/threading/thread_local.h" | 15 #include "base/threading/thread_local.h" |
| 16 #include "content/child/background_sync/background_sync_type_converters.h" | 16 #include "content/child/background_sync/background_sync_type_converters.h" |
| 17 #include "content/child/child_thread_impl.h" | 17 #include "content/child/child_thread_impl.h" |
| 18 #include "content/child/service_worker/web_service_worker_registration_impl.h" | 18 #include "content/child/service_worker/web_service_worker_registration_impl.h" |
| 19 #include "services/shell/public/cpp/interface_provider.h" | |
| 20 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncErro
r.h" | 19 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncErro
r.h" |
| 21 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegi
stration.h" | 20 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegi
stration.h" |
| 22 | 21 |
| 23 using base::LazyInstance; | 22 using base::LazyInstance; |
| 24 using base::ThreadLocalPointer; | 23 using base::ThreadLocalPointer; |
| 25 | 24 |
| 26 namespace content { | 25 namespace content { |
| 27 namespace { | 26 namespace { |
| 28 | 27 |
| 29 // Returns the id of the given |service_worker_registration|, which | 28 // Returns the id of the given |service_worker_registration|, which |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request = | 212 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request = |
| 214 mojo::GetProxy(&background_sync_service_); | 213 mojo::GetProxy(&background_sync_service_); |
| 215 main_thread_task_runner_->PostTask( | 214 main_thread_task_runner_->PostTask( |
| 216 FROM_HERE, | 215 FROM_HERE, |
| 217 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request))); | 216 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request))); |
| 218 } | 217 } |
| 219 return background_sync_service_; | 218 return background_sync_service_; |
| 220 } | 219 } |
| 221 | 220 |
| 222 } // namespace content | 221 } // namespace content |
| OLD | NEW |