| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list_threadsafe.h" | 14 #include "base/observer_list_threadsafe.h" |
| 15 #include "components/sync_driver/change_processor.h" | 15 #include "components/sync_driver/change_processor.h" |
| 16 | 16 |
| 17 namespace syncer { | 17 namespace syncer { |
| 18 struct UserShare; | 18 struct UserShare; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace browser_sync { | 21 namespace browser_sync { |
| 22 | 22 |
| 23 class DeviceInfo; | 23 class DeviceInfo; |
| 24 | 24 |
| 25 class SyncedDeviceTracker : public ChangeProcessor { | 25 class SyncedDeviceTracker : public sync_driver::ChangeProcessor { |
| 26 public: | 26 public: |
| 27 SyncedDeviceTracker(syncer::UserShare* user_share, | 27 SyncedDeviceTracker(syncer::UserShare* user_share, |
| 28 const std::string& cache_guid); | 28 const std::string& cache_guid); |
| 29 virtual ~SyncedDeviceTracker(); | 29 virtual ~SyncedDeviceTracker(); |
| 30 | 30 |
| 31 // Observer class for listening to device info changes. | 31 // Observer class for listening to device info changes. |
| 32 class Observer { | 32 class Observer { |
| 33 public: | 33 public: |
| 34 virtual void OnDeviceInfoChange() = 0; | 34 virtual void OnDeviceInfoChange() = 0; |
| 35 }; | 35 }; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 scoped_refptr<ObserverList> observers_; | 92 scoped_refptr<ObserverList> observers_; |
| 93 | 93 |
| 94 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; | 94 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); | 96 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace browser_sync | 99 } // namespace browser_sync |
| 100 | 100 |
| 101 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ | 101 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ |
| OLD | NEW |