OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome_sync_client.h" | 5 #include "chrome/browser/sync/chrome_sync_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 new browser_sync::SyncedWindowDelegatesGetterAndroid()); | 130 new browser_sync::SyncedWindowDelegatesGetterAndroid()); |
131 #else | 131 #else |
132 new browser_sync::BrowserSyncedWindowDelegatesGetter(profile)); | 132 new browser_sync::BrowserSyncedWindowDelegatesGetter(profile)); |
133 #endif | 133 #endif |
134 } | 134 } |
135 ~SyncSessionsClientImpl() override {} | 135 ~SyncSessionsClientImpl() override {} |
136 | 136 |
137 // SyncSessionsClient implementation. | 137 // SyncSessionsClient implementation. |
138 bookmarks::BookmarkModel* GetBookmarkModel() override { | 138 bookmarks::BookmarkModel* GetBookmarkModel() override { |
139 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 139 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
140 return BookmarkModelFactory::GetForProfile(profile_); | 140 return BookmarkModelFactory::GetForBrowserContext(profile_); |
141 } | 141 } |
142 favicon::FaviconService* GetFaviconService() override { | 142 favicon::FaviconService* GetFaviconService() override { |
143 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 143 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
144 return FaviconServiceFactory::GetForProfile( | 144 return FaviconServiceFactory::GetForProfile( |
145 profile_, ServiceAccessType::IMPLICIT_ACCESS); | 145 profile_, ServiceAccessType::IMPLICIT_ACCESS); |
146 } | 146 } |
147 history::HistoryService* GetHistoryService() override { | 147 history::HistoryService* GetHistoryService() override { |
148 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 148 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
149 return HistoryServiceFactory::GetForProfile( | 149 return HistoryServiceFactory::GetForProfile( |
150 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 150 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 return ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_); | 223 return ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_); |
224 } | 224 } |
225 | 225 |
226 PrefService* ChromeSyncClient::GetPrefService() { | 226 PrefService* ChromeSyncClient::GetPrefService() { |
227 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 227 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
228 return profile_->GetPrefs(); | 228 return profile_->GetPrefs(); |
229 } | 229 } |
230 | 230 |
231 bookmarks::BookmarkModel* ChromeSyncClient::GetBookmarkModel() { | 231 bookmarks::BookmarkModel* ChromeSyncClient::GetBookmarkModel() { |
232 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 232 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
233 return BookmarkModelFactory::GetForProfile(profile_); | 233 return BookmarkModelFactory::GetForBrowserContext(profile_); |
234 } | 234 } |
235 | 235 |
236 favicon::FaviconService* ChromeSyncClient::GetFaviconService() { | 236 favicon::FaviconService* ChromeSyncClient::GetFaviconService() { |
237 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 237 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
238 return FaviconServiceFactory::GetForProfile( | 238 return FaviconServiceFactory::GetForProfile( |
239 profile_, ServiceAccessType::IMPLICIT_ACCESS); | 239 profile_, ServiceAccessType::IMPLICIT_ACCESS); |
240 } | 240 } |
241 | 241 |
242 history::HistoryService* ChromeSyncClient::GetHistoryService() { | 242 history::HistoryService* ChromeSyncClient::GetHistoryService() { |
243 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 243 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 sync_service->RegisterDataTypeController( | 626 sync_service->RegisterDataTypeController( |
627 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS, | 627 new SupervisedUserSyncDataTypeController(syncer::SUPERVISED_USER_SETTINGS, |
628 error_callback, this, profile_)); | 628 error_callback, this, profile_)); |
629 sync_service->RegisterDataTypeController( | 629 sync_service->RegisterDataTypeController( |
630 new SupervisedUserSyncDataTypeController( | 630 new SupervisedUserSyncDataTypeController( |
631 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 631 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
632 #endif | 632 #endif |
633 } | 633 } |
634 | 634 |
635 } // namespace browser_sync | 635 } // namespace browser_sync |
OLD | NEW |