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 "content/browser/notifications/notification_event_dispatcher_impl.h" | 5 #include "content/browser/notifications/notification_event_dispatcher_impl.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "content/browser/notifications/platform_notification_context_impl.h" | 8 #include "content/browser/notifications/platform_notification_context_impl.h" |
9 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 9 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
10 #include "content/browser/service_worker/service_worker_registration.h" | 10 #include "content/browser/service_worker/service_worker_registration.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const NotificationClickDispatchCompleteCallback& dispatch_complete_callback, | 143 const NotificationClickDispatchCompleteCallback& dispatch_complete_callback, |
144 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context, | 144 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context, |
145 bool success, | 145 bool success, |
146 const NotificationDatabaseData& notification_database_data) { | 146 const NotificationDatabaseData& notification_database_data) { |
147 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 147 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
148 | 148 |
149 #if defined(OS_ANDROID) | 149 #if defined(OS_ANDROID) |
150 // This LOG(INFO) deliberately exists to help track down the cause of | 150 // This LOG(INFO) deliberately exists to help track down the cause of |
151 // https://crbug.com/534537, where notifications sometimes do not react to | 151 // https://crbug.com/534537, where notifications sometimes do not react to |
152 // the user clicking on them. It should be removed once that's fixed. | 152 // the user clicking on them. It should be removed once that's fixed. |
153 LOG(INFO) << "Lookup for ServiceWoker Registration: sucesss:" << success | 153 LOG(INFO) << "Lookup for ServiceWoker Registration: success:" << success |
154 << " action_index: " << action_index; | 154 << " action_index: " << action_index; |
155 #endif | 155 #endif |
156 if (!success) { | 156 if (!success) { |
157 BrowserThread::PostTask( | 157 BrowserThread::PostTask( |
158 BrowserThread::UI, FROM_HERE, | 158 BrowserThread::UI, FROM_HERE, |
159 base::Bind(dispatch_complete_callback, | 159 base::Bind(dispatch_complete_callback, |
160 PERSISTENT_NOTIFICATION_STATUS_DATABASE_ERROR)); | 160 PERSISTENT_NOTIFICATION_STATUS_DATABASE_ERROR)); |
161 return; | 161 return; |
162 } | 162 } |
163 | 163 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 partition->GetPlatformNotificationContext()); | 223 partition->GetPlatformNotificationContext()); |
224 | 224 |
225 BrowserThread::PostTask( | 225 BrowserThread::PostTask( |
226 BrowserThread::IO, FROM_HERE, | 226 BrowserThread::IO, FROM_HERE, |
227 base::Bind(&ReadNotificationDatabaseData, persistent_notification_id, | 227 base::Bind(&ReadNotificationDatabaseData, persistent_notification_id, |
228 origin, action_index, dispatch_complete_callback, | 228 origin, action_index, dispatch_complete_callback, |
229 service_worker_context, notification_context)); | 229 service_worker_context, notification_context)); |
230 } | 230 } |
231 | 231 |
232 } // namespace content | 232 } // namespace content |
OLD | NEW |