Home | History | Annotate | Download | only in sync
      1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "chrome/browser/sync/glue/change_processor.h"
      6 #include "chrome/browser/sync/glue/model_associator.h"
      7 #include "chrome/browser/sync/profile_sync_factory_mock.h"
      8 
      9 using browser_sync::AssociatorInterface;
     10 using browser_sync::ChangeProcessor;
     11 using testing::_;
     12 using testing::InvokeWithoutArgs;
     13 
     14 ProfileSyncFactoryMock::ProfileSyncFactoryMock() {}
     15 
     16 ProfileSyncFactoryMock::ProfileSyncFactoryMock(
     17     AssociatorInterface* bookmark_model_associator,
     18     ChangeProcessor* bookmark_change_processor)
     19     : bookmark_model_associator_(bookmark_model_associator),
     20       bookmark_change_processor_(bookmark_change_processor) {
     21   ON_CALL(*this, CreateBookmarkSyncComponents(_, _)).
     22       WillByDefault(
     23           InvokeWithoutArgs(
     24               this,
     25               &ProfileSyncFactoryMock::MakeBookmarkSyncComponents));
     26 }
     27 
     28 ProfileSyncFactoryMock::~ProfileSyncFactoryMock() {}
     29 
     30 ProfileSyncFactory::SyncComponents
     31 ProfileSyncFactoryMock::MakeBookmarkSyncComponents() {
     32   return SyncComponents(bookmark_model_associator_.release(),
     33                         bookmark_change_processor_.release());
     34 }
     35