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 CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/callback_list.h" | 9 #include "base/callback_list.h" |
10 | 10 |
11 namespace browser_sync { | 11 namespace sync_driver { |
12 | 12 |
13 class DeviceInfo; | 13 class DeviceInfo; |
14 | 14 |
15 // Interface for providing sync specific informaiton about the | 15 // Interface for providing sync specific informaiton about the |
16 // local device. | 16 // local device. |
17 class LocalDeviceInfoProvider { | 17 class LocalDeviceInfoProvider { |
18 public: | 18 public: |
19 typedef base::CallbackList<void(void)>::Subscription Subscription; | 19 typedef base::CallbackList<void(void)>::Subscription Subscription; |
20 | 20 |
21 virtual ~LocalDeviceInfoProvider() {} | 21 virtual ~LocalDeviceInfoProvider() {} |
(...skipping 16 matching lines...) Expand all Loading... |
38 const std::string& signin_scoped_device_id) = 0; | 38 const std::string& signin_scoped_device_id) = 0; |
39 | 39 |
40 // Registers a callback to be called when local device info becomes available. | 40 // Registers a callback to be called when local device info becomes available. |
41 // The callback will remain registered until the | 41 // The callback will remain registered until the |
42 // returned Subscription is destroyed, which must occur before the | 42 // returned Subscription is destroyed, which must occur before the |
43 // CallbackList is destroyed. | 43 // CallbackList is destroyed. |
44 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( | 44 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( |
45 const base::Closure& callback) = 0; | 45 const base::Closure& callback) = 0; |
46 }; | 46 }; |
47 | 47 |
48 } // namespace browser_sync | 48 } // namespace sync_driver |
49 | 49 |
50 #endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ | 50 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_H_ |
OLD | NEW |