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

Side by Side Diff: chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.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
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 "chrome/browser/sync/glue/chrome_sync_notification_bridge.h" 5 #include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 notification_count_++; 63 notification_count_++;
64 if (source != sync_notifier::LOCAL_NOTIFICATION) { 64 if (source != sync_notifier::LOCAL_NOTIFICATION) {
65 LOG(ERROR) << "Received notification with wrong source."; 65 LOG(ERROR) << "Received notification with wrong source.";
66 received_improper_notification_ = true; 66 received_improper_notification_ = true;
67 } 67 }
68 if (expected_payloads_ != type_payloads) { 68 if (expected_payloads_ != type_payloads) {
69 LOG(ERROR) << "Received wrong payload."; 69 LOG(ERROR) << "Received wrong payload.";
70 received_improper_notification_ = true; 70 received_improper_notification_ = true;
71 } 71 }
72 } 72 }
73 virtual void OnNotificationStateChange(bool notifications_enabled) { 73 virtual void OnSyncNotifierStateChange(
74 sync_notifier::SyncNotifierState sync_notifier_state) OVERRIDE {
74 NOTREACHED(); 75 NOTREACHED();
75 } 76 }
76 77
77 bool ReceivedProperNotification() const { 78 bool ReceivedProperNotification() const {
78 return (notification_count_ == 1) && !received_improper_notification_; 79 return (notification_count_ == 1) && !received_improper_notification_;
79 } 80 }
80 81
81 private: 82 private:
82 ChromeSyncNotificationBridge* bridge_; 83 ChromeSyncNotificationBridge* bridge_;
83 bool received_improper_notification_; 84 bool received_improper_notification_;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 syncable::ModelTypePayloadMap payload_map; 268 syncable::ModelTypePayloadMap payload_map;
268 payload_map[syncable::SESSIONS] = ""; 269 payload_map[syncable::SESSIONS] = "";
269 CreateObserverWithExpectedPayload(payload_map); 270 CreateObserverWithExpectedPayload(payload_map);
270 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, 271 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
271 payload_map); 272 payload_map);
272 VerifyAndDestroyObserver(); 273 VerifyAndDestroyObserver();
273 } 274 }
274 275
275 } // namespace 276 } // namespace
276 } // namespace browser_sync 277 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/service/cloud_print/cloud_print_proxy_backend.cc » ('j') | sync/notifier/p2p_notifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698