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

Side by Side Diff: chrome/browser/sync/profile_sync_service_unittest.cc

Issue 12847003: Separate invalidator and sync client ID (part 2/2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_listen_notifications utility Created 7 years, 9 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 | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 virtual void Acknowledge(const invalidation::ObjectId& id, 550 virtual void Acknowledge(const invalidation::ObjectId& id,
551 const syncer::AckHandle& ack_handle) OVERRIDE { 551 const syncer::AckHandle& ack_handle) OVERRIDE {
552 // Do nothing. 552 // Do nothing.
553 } 553 }
554 554
555 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE { 555 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE {
556 return service_->GetInvalidatorState(); 556 return service_->GetInvalidatorState();
557 } 557 }
558 558
559 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE {
560 // Do nothing.
561 }
562
563 virtual void UpdateCredentials( 559 virtual void UpdateCredentials(
564 const std::string& email, const std::string& token) OVERRIDE { 560 const std::string& email, const std::string& token) OVERRIDE {
565 // Do nothing. 561 // Do nothing.
566 } 562 }
567 563
568 virtual void SendInvalidation( 564 virtual void SendInvalidation(
569 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE { 565 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE {
570 // Do nothing. 566 // Do nothing.
571 } 567 }
572 568
(...skipping 10 matching lines...) Expand all
583 // the syncer namespace (where InvalidatorTest lives). 579 // the syncer namespace (where InvalidatorTest lives).
584 class ProfileSyncServiceInvalidatorTestDelegate { 580 class ProfileSyncServiceInvalidatorTestDelegate {
585 public: 581 public:
586 ProfileSyncServiceInvalidatorTestDelegate() {} 582 ProfileSyncServiceInvalidatorTestDelegate() {}
587 583
588 ~ProfileSyncServiceInvalidatorTestDelegate() { 584 ~ProfileSyncServiceInvalidatorTestDelegate() {
589 DestroyInvalidator(); 585 DestroyInvalidator();
590 } 586 }
591 587
592 void CreateInvalidator( 588 void CreateInvalidator(
589 const std::string& invalidation_client_id,
593 const std::string& initial_state, 590 const std::string& initial_state,
594 const base::WeakPtr<syncer::InvalidationStateTracker>& 591 const base::WeakPtr<syncer::InvalidationStateTracker>&
595 invalidation_state_tracker) { 592 invalidation_state_tracker) {
596 DCHECK(!invalidator_.get()); 593 DCHECK(!invalidator_.get());
597 harness_.SetUp(); 594 harness_.SetUp();
598 harness_.StartSyncService(); 595 harness_.StartSyncService();
599 invalidator_.reset( 596 invalidator_.reset(
600 new ProfileSyncServiceInvalidator(harness_.service.get())); 597 new ProfileSyncServiceInvalidator(harness_.service.get()));
601 } 598 }
602 599
(...skipping 30 matching lines...) Expand all
633 namespace syncer { 630 namespace syncer {
634 namespace { 631 namespace {
635 632
636 // ProfileSyncService should behave just like an invalidator. 633 // ProfileSyncService should behave just like an invalidator.
637 INSTANTIATE_TYPED_TEST_CASE_P( 634 INSTANTIATE_TYPED_TEST_CASE_P(
638 ProfileSyncServiceInvalidatorTest, InvalidatorTest, 635 ProfileSyncServiceInvalidatorTest, InvalidatorTest,
639 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate); 636 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate);
640 637
641 } // namespace 638 } // namespace
642 } // namespace syncer 639 } // namespace syncer
OLDNEW
« no previous file with comments | « chrome/browser/sync/invalidations/invalidator_storage.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698