| 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_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_ | 6 #define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "components/sync_driver/device_info.h" | 10 #include "components/sync_driver/device_info.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ~LocalDeviceInfoProviderImpl() override; | 22 ~LocalDeviceInfoProviderImpl() override; |
| 23 | 23 |
| 24 // LocalDeviceInfoProvider implementation. | 24 // LocalDeviceInfoProvider implementation. |
| 25 const sync_driver::DeviceInfo* GetLocalDeviceInfo() const override; | 25 const sync_driver::DeviceInfo* GetLocalDeviceInfo() const override; |
| 26 std::string GetSyncUserAgent() const override; | 26 std::string GetSyncUserAgent() const override; |
| 27 std::string GetLocalSyncCacheGUID() const override; | 27 std::string GetLocalSyncCacheGUID() const override; |
| 28 void Initialize( | 28 void Initialize( |
| 29 const std::string& cache_guid, | 29 const std::string& cache_guid, |
| 30 const std::string& signin_scoped_device_id, | 30 const std::string& signin_scoped_device_id, |
| 31 const scoped_refptr<base::TaskRunner>& blocking_task_runner) override; | 31 const scoped_refptr<base::TaskRunner>& blocking_task_runner) override; |
| 32 scoped_ptr<Subscription> RegisterOnInitializedCallback( | 32 std::unique_ptr<Subscription> RegisterOnInitializedCallback( |
| 33 const base::Closure& callback) override; | 33 const base::Closure& callback) override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void InitializeContinuation(const std::string& guid, | 36 void InitializeContinuation(const std::string& guid, |
| 37 const std::string& signin_scoped_device_id, | 37 const std::string& signin_scoped_device_id, |
| 38 const std::string& session_name); | 38 const std::string& session_name); |
| 39 | 39 |
| 40 // The channel (CANARY, DEV, BETA, etc.) of the current client. | 40 // The channel (CANARY, DEV, BETA, etc.) of the current client. |
| 41 const version_info::Channel channel_; | 41 const version_info::Channel channel_; |
| 42 | 42 |
| 43 // The version string for the current client. | 43 // The version string for the current client. |
| 44 const std::string version_; | 44 const std::string version_; |
| 45 | 45 |
| 46 // Whether this device has a tablet form factor (only used on Android | 46 // Whether this device has a tablet form factor (only used on Android |
| 47 // devices). | 47 // devices). |
| 48 const bool is_tablet_; | 48 const bool is_tablet_; |
| 49 | 49 |
| 50 std::string cache_guid_; | 50 std::string cache_guid_; |
| 51 scoped_ptr<sync_driver::DeviceInfo> local_device_info_; | 51 std::unique_ptr<sync_driver::DeviceInfo> local_device_info_; |
| 52 base::CallbackList<void(void)> callback_list_; | 52 base::CallbackList<void(void)> callback_list_; |
| 53 base::WeakPtrFactory<LocalDeviceInfoProviderImpl> weak_factory_; | 53 base::WeakPtrFactory<LocalDeviceInfoProviderImpl> weak_factory_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(LocalDeviceInfoProviderImpl); | 55 DISALLOW_COPY_AND_ASSIGN(LocalDeviceInfoProviderImpl); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace browser_sync | 58 } // namespace browser_sync |
| 59 | 59 |
| 60 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_ | 60 #endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_ |
| OLD | NEW |