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/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "base/threading/thread_local.h" | 15 #include "base/threading/thread_local.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
19 #include "content/child/notifications/notification_data_conversions.h" | 19 #include "content/child/notifications/notification_data_conversions.h" |
20 #include "content/child/request_extra_data.h" | 20 #include "content/child/request_extra_data.h" |
21 #include "content/child/service_worker/service_worker_dispatcher.h" | 21 #include "content/child/service_worker/service_worker_dispatcher.h" |
22 #include "content/child/service_worker/service_worker_handle_reference.h" | 22 #include "content/child/service_worker/service_worker_handle_reference.h" |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 } | 1057 } |
1058 | 1058 |
1059 base::WeakPtr<ServiceWorkerContextClient> | 1059 base::WeakPtr<ServiceWorkerContextClient> |
1060 ServiceWorkerContextClient::GetWeakPtr() { | 1060 ServiceWorkerContextClient::GetWeakPtr() { |
1061 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1061 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
1062 DCHECK(context_); | 1062 DCHECK(context_); |
1063 return context_->weak_factory.GetWeakPtr(); | 1063 return context_->weak_factory.GetWeakPtr(); |
1064 } | 1064 } |
1065 | 1065 |
1066 } // namespace content | 1066 } // namespace content |
OLD | NEW |