| 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 #ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/callback_list.h" | 11 #include "base/callback_list.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class TaskRunner; | 14 class TaskRunner; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace sync_driver { | 17 namespace sync_driver { |
| 18 | 18 |
| 19 class DeviceInfo; | 19 class DeviceInfo; |
| 20 | 20 |
| 21 // Interface for providing sync specific information about the | 21 // Interface for providing sync specific information about the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 // Starts initializing local device info. | 46 // Starts initializing local device info. |
| 47 virtual void Initialize( | 47 virtual void Initialize( |
| 48 const std::string& cache_guid, | 48 const std::string& cache_guid, |
| 49 const std::string& signin_scoped_device_id, | 49 const std::string& signin_scoped_device_id, |
| 50 const scoped_refptr<base::TaskRunner>& blocking_task_runner) = 0; | 50 const scoped_refptr<base::TaskRunner>& blocking_task_runner) = 0; |
| 51 | 51 |
| 52 // Registers a callback to be called when local device info becomes available. | 52 // Registers a callback to be called when local device info becomes available. |
| 53 // The callback will remain registered until the | 53 // The callback will remain registered until the |
| 54 // returned Subscription is destroyed, which must occur before the | 54 // returned Subscription is destroyed, which must occur before the |
| 55 // CallbackList is destroyed. | 55 // CallbackList is destroyed. |
| 56 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( | 56 virtual std::unique_ptr<Subscription> RegisterOnInitializedCallback( |
| 57 const base::Closure& callback) = 0; | 57 const base::Closure& callback) = 0; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace sync_driver | 60 } // namespace sync_driver |
| 61 | 61 |
| 62 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ | 62 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
| OLD | NEW |