summaryrefslogtreecommitdiffstats
path: root/components/browser_sync/browser/test_profile_sync_service.cc
blob: 48ede525fde516ad9749966675401bcddda59799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/browser_sync/browser/test_profile_sync_service.h"

#include <utility>

syncer::TestIdFactory* TestProfileSyncService::id_factory() {
  return &id_factory_;
}

syncer::WeakHandle<syncer::JsEventHandler>
TestProfileSyncService::GetJsEventHandler() {
  return syncer::WeakHandle<syncer::JsEventHandler>();
}

TestProfileSyncService::TestProfileSyncService(
    ProfileSyncService::InitParams init_params)
    : ProfileSyncService(std::move(init_params)) {}

TestProfileSyncService::~TestProfileSyncService() {}

void TestProfileSyncService::OnConfigureDone(
    const sync_driver::DataTypeManager::ConfigureResult& result) {
  ProfileSyncService::OnConfigureDone(result);
  base::MessageLoop::current()->QuitWhenIdle();
}

syncer::UserShare* TestProfileSyncService::GetUserShare() const {
  return backend_->GetUserShare();
}