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

Side by Side Diff: sync/notifier/non_blocking_invalidator.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 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 // An implementation of SyncNotifier that wraps InvalidationNotifier 5 // An implementation of SyncNotifier that wraps InvalidationNotifier
6 // on its own thread. 6 // on its own thread.
7 7
8 #ifndef SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ 8 #ifndef SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_
9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ 9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const std::string& email, const std::string& token) OVERRIDE; 59 const std::string& email, const std::string& token) OVERRIDE;
60 60
61 // InvalidationHandler implementation. 61 // InvalidationHandler implementation.
62 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; 62 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE;
63 virtual void OnIncomingInvalidation( 63 virtual void OnIncomingInvalidation(
64 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; 64 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE;
65 65
66 private: 66 private:
67 class Core; 67 class Core;
68 68
69 base::WeakPtrFactory<NonBlockingInvalidator> weak_ptr_factory_;
70
71 InvalidatorRegistrar registrar_; 69 InvalidatorRegistrar registrar_;
72 70
73 // The real guts of NonBlockingInvalidator, which allows this class to live 71 // The real guts of NonBlockingInvalidator, which allows this class to live
74 // completely on the parent thread. 72 // completely on the parent thread.
75 scoped_refptr<Core> core_; 73 scoped_refptr<Core> core_;
76 scoped_refptr<base::SingleThreadTaskRunner> parent_task_runner_; 74 scoped_refptr<base::SingleThreadTaskRunner> parent_task_runner_;
77 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 75 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
78 76
77 base::WeakPtrFactory<NonBlockingInvalidator> weak_ptr_factory_;
78
79 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidator); 79 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidator);
80 }; 80 };
81 81
82 } // namespace syncer 82 } // namespace syncer
83 83
84 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ 84 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698