| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 EXPECT_FALSE(msg.has_store_birthday()); | 235 EXPECT_FALSE(msg.has_store_birthday()); |
| 236 | 236 |
| 237 directory()->set_store_birthday("meat"); | 237 directory()->set_store_birthday("meat"); |
| 238 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); | 238 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); |
| 239 EXPECT_EQ(msg.store_birthday(), "meat"); | 239 EXPECT_EQ(msg.store_birthday(), "meat"); |
| 240 } | 240 } |
| 241 | 241 |
| 242 class DummyConnectionManager : public ServerConnectionManager { | 242 class DummyConnectionManager : public ServerConnectionManager { |
| 243 public: | 243 public: |
| 244 DummyConnectionManager() | 244 DummyConnectionManager() |
| 245 : ServerConnectionManager("unused", 0, false), | 245 : ServerConnectionManager("unused", 0, false, false), |
| 246 send_error_(false), | 246 send_error_(false), |
| 247 access_denied_(false) {} | 247 access_denied_(false) {} |
| 248 | 248 |
| 249 virtual ~DummyConnectionManager() {} | 249 virtual ~DummyConnectionManager() {} |
| 250 virtual bool PostBufferWithCachedAuth( | 250 virtual bool PostBufferWithCachedAuth( |
| 251 PostBufferParams* params, | 251 PostBufferParams* params, |
| 252 ScopedServerStatusWatcher* watcher) OVERRIDE { | 252 ScopedServerStatusWatcher* watcher) OVERRIDE { |
| 253 if (send_error_) { | 253 if (send_error_) { |
| 254 return false; | 254 return false; |
| 255 } | 255 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); | 320 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); |
| 321 | 321 |
| 322 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); | 322 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); |
| 323 | 323 |
| 324 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); | 324 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); |
| 325 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); | 325 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 } // namespace syncer | 328 } // namespace syncer |
| OLD | NEW |