Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: chrome/browser/sync/glue/synced_device_tracker.h

Issue 26594002: Chrome sync: Put WeakPtrFactory members at the end (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge (see prior patch for try jobs) Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const DeviceInfo& local_info); 68 const DeviceInfo& local_info);
69 69
70 // Helper to write specifics into our node. Also useful for testing. 70 // Helper to write specifics into our node. Also useful for testing.
71 void WriteLocalDeviceInfo(const DeviceInfo& info); 71 void WriteLocalDeviceInfo(const DeviceInfo& info);
72 72
73 // Helper to write arbitrary device info. Useful for writing local device 73 // Helper to write arbitrary device info. Useful for writing local device
74 // info and also used by test cases to write arbitrary device infos. 74 // info and also used by test cases to write arbitrary device infos.
75 void WriteDeviceInfo(const sync_pb::DeviceInfoSpecifics& specifics, 75 void WriteDeviceInfo(const sync_pb::DeviceInfoSpecifics& specifics,
76 const std::string& tag); 76 const std::string& tag);
77 77
78 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_;
79
80 syncer::UserShare* user_share_; 78 syncer::UserShare* user_share_;
81 const std::string cache_guid_; 79 const std::string cache_guid_;
82 const std::string local_device_info_tag_; 80 const std::string local_device_info_tag_;
83 81
84 // The |ObserverList| has to be thread safe as the changes happen 82 // The |ObserverList| has to be thread safe as the changes happen
85 // on sync thread and the observers could be on any thread. 83 // on sync thread and the observers could be on any thread.
86 typedef ObserverListThreadSafe<Observer> ObserverList; 84 typedef ObserverListThreadSafe<Observer> ObserverList;
87 scoped_refptr<ObserverList> observers_; 85 scoped_refptr<ObserverList> observers_;
88 86
87 base::WeakPtrFactory<SyncedDeviceTracker> weak_factory_;
88
89 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker); 89 DISALLOW_COPY_AND_ASSIGN(SyncedDeviceTracker);
90 }; 90 };
91 91
92 } // namespace browser_sync 92 } // namespace browser_sync
93 93
94 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_ 94 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_DEVICE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698