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 base::Closure& callback); | 50 virtual void InitLocalDeviceInfo(const std::string& signin_scoped_device_id, |
| 51 const base::Closure& callback); |
51 virtual scoped_ptr<DeviceInfo> ReadDeviceInfo( | 52 virtual scoped_ptr<DeviceInfo> ReadDeviceInfo( |
52 const std::string& client_id) const; | 53 const std::string& client_id) const; |
53 virtual void GetAllSyncedDeviceInfo( | 54 virtual void GetAllSyncedDeviceInfo( |
54 ScopedVector<DeviceInfo>* device_info) const; | 55 ScopedVector<DeviceInfo>* device_info) const; |
55 | 56 |
56 virtual std::string cache_guid() const; | 57 virtual std::string cache_guid() const; |
57 | 58 |
58 // Can be called on any thread. Will be notified back on the same thread | 59 // Can be called on any thread. Will be notified back on the same thread |
59 // they were called on. Observer will be called on every device info | 60 // they were called on. Observer will be called on every device info |
60 // change. | 61 // change. |
(...skipping 30 matching lines...) Expand all Loading... |
91 scoped_refptr<ObserverList> observers_; | 92 scoped_refptr<ObserverList> observers_; |
92 | 93 |
93 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; | 94 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); | 96 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); |
96 }; | 97 }; |
97 | 98 |
98 } // namespace browser_sync | 99 } // namespace browser_sync |
99 | 100 |
100 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ | 101 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ |
OLD | NEW |