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

Side by Side Diff: sync/tools/sync_listen_notifications.cc

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
« sync/notifier/p2p_notifier.cc ('K') | « sync/sync.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <cstdio> 5 #include <cstdio>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 for (syncable::ModelTypePayloadMap::const_iterator it = 44 for (syncable::ModelTypePayloadMap::const_iterator it =
45 type_payloads.begin(); it != type_payloads.end(); ++it) { 45 type_payloads.begin(); it != type_payloads.end(); ++it) {
46 LOG(INFO) << (source == sync_notifier::REMOTE_NOTIFICATION ? 46 LOG(INFO) << (source == sync_notifier::REMOTE_NOTIFICATION ?
47 "Remote" : "Local") 47 "Remote" : "Local")
48 << " Notification: type = " 48 << " Notification: type = "
49 << syncable::ModelTypeToString(it->first) 49 << syncable::ModelTypeToString(it->first)
50 << ", payload = " << it->second; 50 << ", payload = " << it->second;
51 } 51 }
52 } 52 }
53 53
54 virtual void OnNotificationStateChange( 54 virtual void OnSyncNotifierStateChange(
55 bool notifications_enabled) OVERRIDE { 55 sync_notifier::SyncNotifierState sync_notifier_state) OVERRIDE {
56 LOG(INFO) << "Notifications enabled: " << notifications_enabled; 56 LOG(INFO) << "SyncNotifierState: "
57 << sync_notifier::SyncNotifierStateToString(sync_notifier_state);
57 } 58 }
58 59
59 private: 60 private:
60 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter); 61 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter);
61 }; 62 };
62 63
63 class NullInvalidationStateTracker 64 class NullInvalidationStateTracker
64 : public base::SupportsWeakPtr<NullInvalidationStateTracker>, 65 : public base::SupportsWeakPtr<NullInvalidationStateTracker>,
65 public sync_notifier::InvalidationStateTracker { 66 public sync_notifier::InvalidationStateTracker {
66 public: 67 public:
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 sync_notifier->UpdateCredentials(email, token); 224 sync_notifier->UpdateCredentials(email, token);
224 // Listen for notifications for all known types. 225 // Listen for notifications for all known types.
225 sync_notifier->UpdateEnabledTypes(syncable::ModelTypeSet::All()); 226 sync_notifier->UpdateEnabledTypes(syncable::ModelTypeSet::All());
226 227
227 ui_loop.Run(); 228 ui_loop.Run();
228 229
229 sync_notifier->RemoveObserver(&notification_printer); 230 sync_notifier->RemoveObserver(&notification_printer);
230 io_thread.Stop(); 231 io_thread.Stop();
231 return 0; 232 return 0;
232 } 233 }
OLDNEW
« sync/notifier/p2p_notifier.cc ('K') | « sync/sync.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698