| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/engine/syncer_proto_util.h" | 5 #include "chrome/browser/sync/engine/syncer_proto_util.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "chrome/browser/sync/engine/syncproto.h" | 8 #include "chrome/browser/sync/engine/syncproto.h" |
| 9 #include "chrome/browser/sync/syncable/blob.h" | 9 #include "chrome/browser/sync/syncable/blob.h" |
| 10 #include "chrome/browser/sync/syncable/directory_manager.h" | 10 #include "chrome/browser/sync/syncable/directory_manager.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 EXPECT_FALSE(msg.has_store_birthday()); | 175 EXPECT_FALSE(msg.has_store_birthday()); |
| 176 | 176 |
| 177 lookup->set_store_birthday("meat"); | 177 lookup->set_store_birthday("meat"); |
| 178 SyncerProtoUtil::AddRequestBirthday(lookup, &msg); | 178 SyncerProtoUtil::AddRequestBirthday(lookup, &msg); |
| 179 EXPECT_EQ(msg.store_birthday(), "meat"); | 179 EXPECT_EQ(msg.store_birthday(), "meat"); |
| 180 } | 180 } |
| 181 | 181 |
| 182 class DummyConnectionManager : public browser_sync::ServerConnectionManager { | 182 class DummyConnectionManager : public browser_sync::ServerConnectionManager { |
| 183 public: | 183 public: |
| 184 DummyConnectionManager() | 184 DummyConnectionManager() |
| 185 : ServerConnectionManager("unused", 0, false, "version", "id"), | 185 : ServerConnectionManager("unused", 0, false, "version"), |
| 186 send_error_(false), | 186 send_error_(false), |
| 187 access_denied_(false) {} | 187 access_denied_(false) {} |
| 188 | 188 |
| 189 virtual ~DummyConnectionManager() {} | 189 virtual ~DummyConnectionManager() {} |
| 190 virtual bool PostBufferWithCachedAuth(const PostBufferParams* params, | 190 virtual bool PostBufferWithCachedAuth(const PostBufferParams* params, |
| 191 ScopedServerStatusWatcher* watcher) { | 191 ScopedServerStatusWatcher* watcher) { |
| 192 if (send_error_) { | 192 if (send_error_) { |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 | 195 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 dcm.set_send_error(false); | 229 dcm.set_send_error(false); |
| 230 EXPECT_TRUE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, | 230 EXPECT_TRUE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, |
| 231 msg, &response)); | 231 msg, &response)); |
| 232 | 232 |
| 233 dcm.set_access_denied(true); | 233 dcm.set_access_denied(true); |
| 234 EXPECT_FALSE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, | 234 EXPECT_FALSE(SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, |
| 235 msg, &response)); | 235 msg, &response)); |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace browser_sync | 238 } // namespace browser_sync |
| OLD | NEW |