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

Side by Side Diff: sync/engine/syncer_proto_util_unittest.cc

Issue 15421011: Use OAuth2 token for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « sync/engine/net/server_connection_manager.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « sync/engine/net/server_connection_manager.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698