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

Side by Side Diff: chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc

Issue 10451060: sync: migrate invalidation state from syncable::Directory to InvalidationStorage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include order 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 OnNotificationStateChange(bool notifications_enabled) {
74 NOTREACHED(); 74 NOTREACHED();
75 } 75 }
76 virtual void StoreState(const std::string& state) OVERRIDE {
77 NOTREACHED();
78 }
79 76
80 bool ReceivedProperNotification() const { 77 bool ReceivedProperNotification() const {
81 return (notification_count_ == 1) && !received_improper_notification_; 78 return (notification_count_ == 1) && !received_improper_notification_;
82 } 79 }
83 80
84 private: 81 private:
85 ChromeSyncNotificationBridge* bridge_; 82 ChromeSyncNotificationBridge* bridge_;
86 bool received_improper_notification_; 83 bool received_improper_notification_;
87 size_t notification_count_; 84 size_t notification_count_;
88 syncable::ModelTypePayloadMap expected_payloads_; 85 syncable::ModelTypePayloadMap expected_payloads_;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 syncable::ModelTypePayloadMap payload_map; 267 syncable::ModelTypePayloadMap payload_map;
271 payload_map[syncable::SESSIONS] = ""; 268 payload_map[syncable::SESSIONS] = "";
272 CreateObserverWithExpectedPayload(payload_map); 269 CreateObserverWithExpectedPayload(payload_map);
273 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, 270 TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
274 payload_map); 271 payload_map);
275 VerifyAndDestroyObserver(); 272 VerifyAndDestroyObserver();
276 } 273 }
277 274
278 } // namespace 275 } // namespace
279 } // namespace browser_sync 276 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc ('k') | chrome/browser/sync/invalidations/invalidator_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698