| OLD | NEW |
| 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 "sync/engine/syncer_proto_util.h" | 5 #include "sync/engine/syncer_proto_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 EXPECT_FALSE(msg.has_store_birthday()); | 199 EXPECT_FALSE(msg.has_store_birthday()); |
| 200 | 200 |
| 201 directory()->set_store_birthday("meat"); | 201 directory()->set_store_birthday("meat"); |
| 202 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); | 202 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); |
| 203 EXPECT_EQ(msg.store_birthday(), "meat"); | 203 EXPECT_EQ(msg.store_birthday(), "meat"); |
| 204 } | 204 } |
| 205 | 205 |
| 206 class DummyConnectionManager : public csync::ServerConnectionManager { | 206 class DummyConnectionManager : public csync::ServerConnectionManager { |
| 207 public: | 207 public: |
| 208 DummyConnectionManager() | 208 DummyConnectionManager() |
| 209 : ServerConnectionManager("unused", 0, false, "version"), | 209 : ServerConnectionManager("unused", 0, false), |
| 210 send_error_(false), | 210 send_error_(false), |
| 211 access_denied_(false) {} | 211 access_denied_(false) {} |
| 212 | 212 |
| 213 virtual ~DummyConnectionManager() {} | 213 virtual ~DummyConnectionManager() {} |
| 214 virtual bool PostBufferWithCachedAuth( | 214 virtual bool PostBufferWithCachedAuth( |
| 215 PostBufferParams* params, | 215 PostBufferParams* params, |
| 216 ScopedServerStatusWatcher* watcher) OVERRIDE { | 216 ScopedServerStatusWatcher* watcher) OVERRIDE { |
| 217 if (send_error_) { | 217 if (send_error_) { |
| 218 return false; | 218 return false; |
| 219 } | 219 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 error.error_type = csync::THROTTLED; | 281 error.error_type = csync::THROTTLED; |
| 282 | 282 |
| 283 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); | 283 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); |
| 284 | 284 |
| 285 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); | 285 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); |
| 286 | 286 |
| 287 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); | 287 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); |
| 288 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); | 288 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); |
| 289 } | 289 } |
| 290 } // namespace csync | 290 } // namespace csync |
| OLD | NEW |