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/renderer/service_worker/service_worker_context_client.h" | 5 #include "content/renderer/service_worker/service_worker_context_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
14 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
15 #include "base/threading/thread_local.h" | 16 #include "base/threading/thread_local.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
18 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
19 #include "content/child/background_sync/background_sync_type_converters.h" | 20 #include "content/child/background_sync/background_sync_type_converters.h" |
20 #include "content/child/notifications/notification_data_conversions.h" | 21 #include "content/child/notifications/notification_data_conversions.h" |
21 #include "content/child/request_extra_data.h" | 22 #include "content/child/request_extra_data.h" |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 } | 1290 } |
1290 | 1291 |
1291 base::WeakPtr<ServiceWorkerContextClient> | 1292 base::WeakPtr<ServiceWorkerContextClient> |
1292 ServiceWorkerContextClient::GetWeakPtr() { | 1293 ServiceWorkerContextClient::GetWeakPtr() { |
1293 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1294 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
1294 DCHECK(context_); | 1295 DCHECK(context_); |
1295 return context_->weak_factory.GetWeakPtr(); | 1296 return context_->weak_factory.GetWeakPtr(); |
1296 } | 1297 } |
1297 | 1298 |
1298 } // namespace content | 1299 } // namespace content |
OLD | NEW |