OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ |
| 7 |
| 8 #include <string> |
| 9 #include "base/callback_list.h" |
| 10 |
| 11 namespace browser_sync { |
| 12 |
| 13 class DeviceInfo; |
| 14 |
| 15 class LocalDeviceInfoProvider { |
| 16 public: |
| 17 typedef base::CallbackList<void(void)>::Subscription Subscription; |
| 18 |
| 19 // Returns sync's representation of the local device info. |
| 20 // Return value is an empty scoped_ptr if the device info is unavailable. |
| 21 virtual const DeviceInfo* GetLocalDeviceInfo() const = 0; |
| 22 |
| 23 // Used for creation of the machine tag for this local session. |
| 24 virtual std::string GetLocalSyncCacheGUID() const = 0; |
| 25 |
| 26 // Starts initializing local device info. |
| 27 virtual void Initialize(const std::string& cache_guid) = 0; |
| 28 |
| 29 // Specifies whether local device info is available |
| 30 virtual bool IsInitialized() const = 0; |
| 31 |
| 32 // Registers a callback to be called when local device info becomes available |
| 33 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( |
| 34 const base::Closure& callback) = 0; |
| 35 }; |
| 36 |
| 37 } // namespace browser_sync |
| 38 |
| 39 #endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_ |
OLD | NEW |