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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_sync_client.h

Issue 10837061: gdata: Make WeakPtrFactory the last parameter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and reorder Created 8 years, 4 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_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // thread. Note that this class does not use a lock to protect |queue_| as 189 // thread. Note that this class does not use a lock to protect |queue_| as
190 // all methods touching |queue_| run on the UI thread. 190 // all methods touching |queue_| run on the UI thread.
191 std::deque<SyncTask> queue_; 191 std::deque<SyncTask> queue_;
192 192
193 // The delay is used for delaying processing SyncTasks in DoSyncLoop(). 193 // The delay is used for delaying processing SyncTasks in DoSyncLoop().
194 base::TimeDelta delay_; 194 base::TimeDelta delay_;
195 195
196 // True if the sync loop is running. 196 // True if the sync loop is running.
197 bool sync_loop_is_running_; 197 bool sync_loop_is_running_;
198 198
199 // Note: This should remain the last member so it'll be destroyed and
200 // invalidate its weak pointers before any other members are destroyed.
199 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_; 201 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_;
200 202
201 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient); 203 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient);
202 }; 204 };
203 205
204 } // namespace gdata 206 } // namespace gdata
205 207
206 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ 208 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operation_runner.cc ('k') | chrome/browser/chromeos/gdata/gdata_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698