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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 EXPECT_FALSE(msg.has_store_birthday()); | 248 EXPECT_FALSE(msg.has_store_birthday()); |
249 | 249 |
250 directory()->set_store_birthday("meat"); | 250 directory()->set_store_birthday("meat"); |
251 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); | 251 SyncerProtoUtil::AddRequestBirthday(directory(), &msg); |
252 EXPECT_EQ(msg.store_birthday(), "meat"); | 252 EXPECT_EQ(msg.store_birthday(), "meat"); |
253 } | 253 } |
254 | 254 |
255 class DummyConnectionManager : public ServerConnectionManager { | 255 class DummyConnectionManager : public ServerConnectionManager { |
256 public: | 256 public: |
257 DummyConnectionManager() | 257 DummyConnectionManager() |
258 : ServerConnectionManager("unused", 0, false, false), | 258 : ServerConnectionManager("unused", 0, false, false, NULL), |
259 send_error_(false), | 259 send_error_(false), |
260 access_denied_(false) {} | 260 access_denied_(false) {} |
261 | 261 |
262 virtual ~DummyConnectionManager() {} | 262 virtual ~DummyConnectionManager() {} |
263 virtual bool PostBufferWithCachedAuth( | 263 virtual bool PostBufferWithCachedAuth( |
264 PostBufferParams* params, | 264 PostBufferParams* params, |
265 ScopedServerStatusWatcher* watcher) OVERRIDE { | 265 ScopedServerStatusWatcher* watcher) OVERRIDE { |
266 if (send_error_) { | 266 if (send_error_) { |
267 return false; | 267 return false; |
268 } | 268 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 dcm.set_send_error(false); | 304 dcm.set_send_error(false); |
305 EXPECT_TRUE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, | 305 EXPECT_TRUE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, |
306 msg, &response)); | 306 msg, &response)); |
307 | 307 |
308 dcm.set_access_denied(true); | 308 dcm.set_access_denied(true); |
309 EXPECT_FALSE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, | 309 EXPECT_FALSE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, |
310 msg, &response)); | 310 msg, &response)); |
311 } | 311 } |
312 | 312 |
313 } // namespace syncer | 313 } // namespace syncer |
OLD | NEW |