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 "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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |