| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/sync/profile_sync_test_util.h" | 5 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 13 #include "chrome/browser/signin/signin_manager_factory.h" | 13 #include "chrome/browser/signin/signin_manager_factory.h" |
| 14 #include "chrome/browser/sync/chrome_sync_client.h" | 14 #include "chrome/browser/sync/chrome_sync_client.h" |
| 15 #include "chrome/common/channel_info.h" | 15 #include "chrome/common/channel_info.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 17 #include "components/browser_sync/browser/profile_sync_service.h" | 17 #include "components/browser_sync/browser/profile_sync_service.h" |
| 18 #include "components/browser_sync/browser/profile_sync_test_util.h" |
| 18 #include "components/signin/core/browser/signin_manager.h" | 19 #include "components/signin/core/browser/signin_manager.h" |
| 19 #include "components/sync_driver/signin_manager_wrapper.h" | 20 #include "components/sync_driver/signin_manager_wrapper.h" |
| 20 #include "components/sync_driver/startup_controller.h" | 21 #include "components/sync_driver/startup_controller.h" |
| 21 #include "components/sync_driver/sync_api_component_factory_mock.h" | 22 #include "components/sync_driver/sync_api_component_factory_mock.h" |
| 22 | 23 |
| 23 using content::BrowserThread; | 24 using content::BrowserThread; |
| 24 | 25 |
| 25 void EmptyNetworkTimeUpdate(const base::Time&, | |
| 26 const base::TimeDelta&, | |
| 27 const base::TimeDelta&) {} | |
| 28 | |
| 29 SyncServiceObserverMock::SyncServiceObserverMock() { | |
| 30 } | |
| 31 | |
| 32 SyncServiceObserverMock::~SyncServiceObserverMock() { | |
| 33 } | |
| 34 | |
| 35 ThreadNotifier::ThreadNotifier(base::Thread* notify_thread) | 26 ThreadNotifier::ThreadNotifier(base::Thread* notify_thread) |
| 36 : done_event_(false, false), | 27 : done_event_(false, false), |
| 37 notify_thread_(notify_thread) {} | 28 notify_thread_(notify_thread) {} |
| 38 | 29 |
| 39 void ThreadNotifier::Notify(int type, | 30 void ThreadNotifier::Notify(int type, |
| 40 const content::NotificationDetails& details) { | 31 const content::NotificationDetails& details) { |
| 41 Notify(type, content::NotificationService::AllSources(), details); | 32 Notify(type, content::NotificationService::AllSources(), details); |
| 42 } | 33 } |
| 43 | 34 |
| 44 void ThreadNotifier::Notify(int type, | 35 void ThreadNotifier::Notify(int type, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ->SetAuthenticatedAccountInfo("12345", "foo"); | 98 ->SetAuthenticatedAccountInfo("12345", "foo"); |
| 108 return profile; | 99 return profile; |
| 109 } | 100 } |
| 110 | 101 |
| 111 scoped_ptr<KeyedService> BuildMockProfileSyncService( | 102 scoped_ptr<KeyedService> BuildMockProfileSyncService( |
| 112 content::BrowserContext* context) { | 103 content::BrowserContext* context) { |
| 113 return make_scoped_ptr( | 104 return make_scoped_ptr( |
| 114 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( | 105 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( |
| 115 Profile::FromBrowserContext(context)))); | 106 Profile::FromBrowserContext(context)))); |
| 116 } | 107 } |
| OLD | NEW |