| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNCED_DEVICE_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const syncer::BaseTransaction* trans, | 40 const syncer::BaseTransaction* trans, |
| 41 int64 model_version, | 41 int64 model_version, |
| 42 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; | 42 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; |
| 43 virtual void CommitChangesFromSyncModel() OVERRIDE; | 43 virtual void CommitChangesFromSyncModel() OVERRIDE; |
| 44 | 44 |
| 45 // Methods for accessing and updating the device_info list. | 45 // Methods for accessing and updating the device_info list. |
| 46 // These are virtual for testing. | 46 // These are virtual for testing. |
| 47 virtual scoped_ptr<DeviceInfo> ReadLocalDeviceInfo( | 47 virtual scoped_ptr<DeviceInfo> ReadLocalDeviceInfo( |
| 48 const syncer::BaseTransaction &trans) const; | 48 const syncer::BaseTransaction &trans) const; |
| 49 virtual scoped_ptr<DeviceInfo> ReadLocalDeviceInfo() const; | 49 virtual scoped_ptr<DeviceInfo> ReadLocalDeviceInfo() const; |
| 50 virtual void InitLocalDeviceInfo(const std::string& signin_scoped_device_id, | 50 virtual void InitLocalDeviceInfo(const base::Closure& callback); |
| 51 const base::Closure& callback); | |
| 52 virtual scoped_ptr<DeviceInfo> ReadDeviceInfo( | 51 virtual scoped_ptr<DeviceInfo> ReadDeviceInfo( |
| 53 const std::string& client_id) const; | 52 const std::string& client_id) const; |
| 54 virtual void GetAllSyncedDeviceInfo( | 53 virtual void GetAllSyncedDeviceInfo( |
| 55 ScopedVector<DeviceInfo>* device_info) const; | 54 ScopedVector<DeviceInfo>* device_info) const; |
| 56 | 55 |
| 57 virtual std::string cache_guid() const; | 56 virtual std::string cache_guid() const; |
| 58 | 57 |
| 59 // Can be called on any thread. Will be notified back on the same thread | 58 // Can be called on any thread. Will be notified back on the same thread |
| 60 // they were called on. Observer will be called on every device info | 59 // they were called on. Observer will be called on every device info |
| 61 // change. | 60 // change. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 92 scoped_refptr<ObserverList> observers_; | 91 scoped_refptr<ObserverList> observers_; |
| 93 | 92 |
| 94 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; | 93 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; |
| 95 | 94 |
| 96 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); | 95 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); |
| 97 }; | 96 }; |
| 98 | 97 |
| 99 } // namespace browser_sync | 98 } // namespace browser_sync |
| 100 | 99 |
| 101 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ | 100 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ |
| OLD | NEW |