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

Side by Side Diff: sync/notifier/non_blocking_invalidation_notifier.h

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 8 years, 6 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 // 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_INVALIDATION_NOTIFIER_H_ 8 #ifndef SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ 9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
10 #pragma once 10 #pragma once
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const std::string& email, const std::string& token) OVERRIDE; 53 const std::string& email, const std::string& token) OVERRIDE;
54 virtual void UpdateEnabledTypes( 54 virtual void UpdateEnabledTypes(
55 syncable::ModelTypeSet enabled_types) OVERRIDE; 55 syncable::ModelTypeSet enabled_types) OVERRIDE;
56 virtual void SendNotification( 56 virtual void SendNotification(
57 syncable::ModelTypeSet changed_types) OVERRIDE; 57 syncable::ModelTypeSet changed_types) OVERRIDE;
58 58
59 // SyncNotifierObserver implementation. 59 // SyncNotifierObserver implementation.
60 virtual void OnIncomingNotification( 60 virtual void OnIncomingNotification(
61 const syncable::ModelTypePayloadMap& type_payloads, 61 const syncable::ModelTypePayloadMap& type_payloads,
62 IncomingNotificationSource source) OVERRIDE; 62 IncomingNotificationSource source) OVERRIDE;
63 virtual void OnNotificationStateChange(bool notifications_enabled) OVERRIDE; 63 virtual void OnSyncNotifierStateChange(
64 SyncNotifierState sync_notifier_state) OVERRIDE;
64 65
65 private: 66 private:
66 class Core; 67 class Core;
67 68
68 base::WeakPtrFactory<NonBlockingInvalidationNotifier> weak_ptr_factory_; 69 base::WeakPtrFactory<NonBlockingInvalidationNotifier> weak_ptr_factory_;
69 70
70 // Our observers (which must live on the parent thread). 71 // Our observers (which must live on the parent thread).
71 ObserverList<SyncNotifierObserver> observers_; 72 ObserverList<SyncNotifierObserver> observers_;
72 73
73 // The real guts of NonBlockingInvalidationNotifier, which allows 74 // The real guts of NonBlockingInvalidationNotifier, which allows
74 // this class to live completely on the parent thread. 75 // this class to live completely on the parent thread.
75 scoped_refptr<Core> core_; 76 scoped_refptr<Core> core_;
76 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_; 77 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_;
77 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 78 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier); 80 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier);
80 }; 81 };
81 82
82 } // namespace sync_notifier 83 } // namespace sync_notifier
83 84
84 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ 85 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698