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

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 26594002: Chrome sync: Put WeakPtrFactory members at the end (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 JsArgList GetClientServerTraffic(const JsArgList& args); 278 JsArgList GetClientServerTraffic(const JsArgList& args);
279 279
280 syncable::Directory* directory(); 280 syncable::Directory* directory();
281 281
282 base::FilePath database_path_; 282 base::FilePath database_path_;
283 283
284 const std::string name_; 284 const std::string name_;
285 285
286 base::ThreadChecker thread_checker_; 286 base::ThreadChecker thread_checker_;
287 287
288 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_;
289
290 // Thread-safe handle used by 288 // Thread-safe handle used by
291 // HandleCalculateChangesChangeEventFromSyncApi(), which can be 289 // HandleCalculateChangesChangeEventFromSyncApi(), which can be
292 // called from any thread. Valid only between between calls to 290 // called from any thread. Valid only between between calls to
293 // Init() and Shutdown(). 291 // Init() and Shutdown().
294 // 292 //
295 // TODO(akalin): Ideally, we wouldn't need to store this; instead, 293 // TODO(akalin): Ideally, we wouldn't need to store this; instead,
296 // we'd have another worker class which implements 294 // we'd have another worker class which implements
297 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a 295 // HandleCalculateChangesChangeEventFromSyncApi() and we'd pass it a
298 // WeakHandle when we construct it. 296 // WeakHandle when we construct it.
299 WeakHandle<SyncManagerImpl> weak_handle_this_; 297 WeakHandle<SyncManagerImpl> weak_handle_this_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 358
361 Encryptor* encryptor_; 359 Encryptor* encryptor_;
362 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; 360 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_;
363 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; 361 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_;
364 362
365 // Sync's encryption handler. It tracks the set of encrypted types, manages 363 // Sync's encryption handler. It tracks the set of encrypted types, manages
366 // changing passphrases, and in general handles sync-specific interactions 364 // changing passphrases, and in general handles sync-specific interactions
367 // with the cryptographer. 365 // with the cryptographer.
368 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 366 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
369 367
368 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_;
369
370 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 370 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
371 }; 371 };
372 372
373 } // namespace syncer 373 } // namespace syncer
374 374
375 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 375 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698