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/background_sync/background_sync_service_impl.h" | 5 #include "content/browser/background_sync/background_sync_service_impl.h" |
6 | 6 |
7 #include "background_sync_registration_handle.h" | 7 #include "background_sync_registration_handle.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "content/browser/background_sync/background_sync_context_impl.h" | 10 #include "content/browser/background_sync/background_sync_context_impl.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 void BackgroundSyncServiceImpl::GetPermissionStatus( | 181 void BackgroundSyncServiceImpl::GetPermissionStatus( |
182 BackgroundSyncPeriodicity periodicity, | 182 BackgroundSyncPeriodicity periodicity, |
183 int64_t sw_registration_id, | 183 int64_t sw_registration_id, |
184 const GetPermissionStatusCallback& callback) { | 184 const GetPermissionStatusCallback& callback) { |
185 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 185 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
186 | 186 |
187 // TODO(iclelland): Implement a real policy. This is a stub implementation. | 187 // TODO(iclelland): Implement a real policy. This is a stub implementation. |
188 // OneShot: crbug.com/482091 | 188 // OneShot: crbug.com/482091 |
189 // Periodic: crbug.com/482093 | 189 // Periodic: crbug.com/482093 |
190 callback.Run(BACKGROUND_SYNC_ERROR_NONE, PERMISSION_STATUS_GRANTED); | 190 callback.Run(BACKGROUND_SYNC_ERROR_NONE, permission::STATUS_GRANTED); |
191 } | 191 } |
192 | 192 |
193 void BackgroundSyncServiceImpl::DuplicateRegistrationHandle( | 193 void BackgroundSyncServiceImpl::DuplicateRegistrationHandle( |
194 BackgroundSyncRegistrationHandle::HandleId handle_id, | 194 BackgroundSyncRegistrationHandle::HandleId handle_id, |
195 const DuplicateRegistrationHandleCallback& callback) { | 195 const DuplicateRegistrationHandleCallback& callback) { |
196 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 196 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
197 BackgroundSyncManager* background_sync_manager = | 197 BackgroundSyncManager* background_sync_manager = |
198 background_sync_context_->background_sync_manager(); | 198 background_sync_context_->background_sync_manager(); |
199 DCHECK(background_sync_manager); | 199 DCHECK(background_sync_manager); |
200 | 200 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 void BackgroundSyncServiceImpl::OnNotifyWhenDoneResult( | 290 void BackgroundSyncServiceImpl::OnNotifyWhenDoneResult( |
291 const NotifyWhenDoneCallback& callback, | 291 const NotifyWhenDoneCallback& callback, |
292 BackgroundSyncStatus status, | 292 BackgroundSyncStatus status, |
293 BackgroundSyncState sync_state) { | 293 BackgroundSyncState sync_state) { |
294 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 294 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
295 callback.Run(static_cast<content::BackgroundSyncError>(status), sync_state); | 295 callback.Run(static_cast<content::BackgroundSyncError>(status), sync_state); |
296 } | 296 } |
297 | 297 |
298 } // namespace content | 298 } // namespace content |
OLD | NEW |