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/browser/notifications/platform_notification_context_impl.h" | 5 #include "content/browser/notifications/platform_notification_context_impl.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 services_.clear(); | 120 services_.clear(); |
121 | 121 |
122 // |service_worker_context_| may be NULL in tests. | 122 // |service_worker_context_| may be NULL in tests. |
123 if (service_worker_context_) | 123 if (service_worker_context_) |
124 service_worker_context_->RemoveObserver(this); | 124 service_worker_context_->RemoveObserver(this); |
125 } | 125 } |
126 | 126 |
127 void PlatformNotificationContextImpl::CreateService( | 127 void PlatformNotificationContextImpl::CreateService( |
128 int render_process_id, | 128 int render_process_id, |
129 mojo::InterfaceRequest<blink::mojom::NotificationService> request) { | 129 const service_manager::BindSourceInfo& source_info, |
| 130 blink::mojom::NotificationServiceRequest request) { |
130 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 131 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
131 BrowserThread::PostTask( | 132 BrowserThread::PostTask( |
132 BrowserThread::IO, FROM_HERE, | 133 BrowserThread::IO, FROM_HERE, |
133 base::Bind(&PlatformNotificationContextImpl::CreateServiceOnIO, this, | 134 base::Bind(&PlatformNotificationContextImpl::CreateServiceOnIO, this, |
134 render_process_id, browser_context_->GetResourceContext(), | 135 render_process_id, browser_context_->GetResourceContext(), |
135 base::Passed(&request))); | 136 base::Passed(&request))); |
136 } | 137 } |
137 | 138 |
138 void PlatformNotificationContextImpl::CreateServiceOnIO( | 139 void PlatformNotificationContextImpl::CreateServiceOnIO( |
139 int render_process_id, | 140 int render_process_id, |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 563 |
563 return path_.Append(kPlatformNotificationsDirectory); | 564 return path_.Append(kPlatformNotificationsDirectory); |
564 } | 565 } |
565 | 566 |
566 void PlatformNotificationContextImpl::SetTaskRunnerForTesting( | 567 void PlatformNotificationContextImpl::SetTaskRunnerForTesting( |
567 const scoped_refptr<base::SequencedTaskRunner>& task_runner) { | 568 const scoped_refptr<base::SequencedTaskRunner>& task_runner) { |
568 task_runner_ = task_runner; | 569 task_runner_ = task_runner; |
569 } | 570 } |
570 | 571 |
571 } // namespace content | 572 } // namespace content |
OLD | NEW |