| 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 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // mojom::BackgroundSyncService methods: | 34 // mojom::BackgroundSyncService methods: |
| 35 void Register(content::mojom::SyncRegistrationPtr options, | 35 void Register(content::mojom::SyncRegistrationPtr options, |
| 36 int64_t sw_registration_id, | 36 int64_t sw_registration_id, |
| 37 const RegisterCallback& callback) override; | 37 const RegisterCallback& callback) override; |
| 38 void GetRegistrations(int64_t sw_registration_id, | 38 void GetRegistrations(int64_t sw_registration_id, |
| 39 const GetRegistrationsCallback& callback) override; | 39 const GetRegistrationsCallback& callback) override; |
| 40 | 40 |
| 41 void OnRegisterResult(const RegisterCallback& callback, | 41 void OnRegisterResult(const RegisterCallback& callback, |
| 42 BackgroundSyncStatus status, | 42 BackgroundSyncStatus status, |
| 43 scoped_ptr<BackgroundSyncRegistration> result); | 43 std::unique_ptr<BackgroundSyncRegistration> result); |
| 44 void OnGetRegistrationsResult( | 44 void OnGetRegistrationsResult( |
| 45 const GetRegistrationsCallback& callback, | 45 const GetRegistrationsCallback& callback, |
| 46 BackgroundSyncStatus status, | 46 BackgroundSyncStatus status, |
| 47 scoped_ptr<ScopedVector<BackgroundSyncRegistration>> result); | 47 std::unique_ptr<ScopedVector<BackgroundSyncRegistration>> result); |
| 48 | 48 |
| 49 // Called when an error is detected on binding_. | 49 // Called when an error is detected on binding_. |
| 50 void OnConnectionError(); | 50 void OnConnectionError(); |
| 51 | 51 |
| 52 // background_sync_context_ owns this. | 52 // background_sync_context_ owns this. |
| 53 BackgroundSyncContextImpl* background_sync_context_; | 53 BackgroundSyncContextImpl* background_sync_context_; |
| 54 | 54 |
| 55 mojo::Binding<mojom::BackgroundSyncService> binding_; | 55 mojo::Binding<mojom::BackgroundSyncService> binding_; |
| 56 | 56 |
| 57 base::WeakPtrFactory<BackgroundSyncServiceImpl> weak_ptr_factory_; | 57 base::WeakPtrFactory<BackgroundSyncServiceImpl> weak_ptr_factory_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncServiceImpl); | 59 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncServiceImpl); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace content | 62 } // namespace content |
| 63 | 63 |
| 64 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ | 64 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ |
| OLD | NEW |