Index: chrome/browser/sync/chrome_sync_client.cc |
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc |
index 295fdfb8744f2e644e06eb11f0344dbc64232807..a7fa143973cc1624f35376e1eefa465af2111b26 100644 |
--- a/chrome/browser/sync/chrome_sync_client.cc |
+++ b/chrome/browser/sync/chrome_sync_client.cc |
@@ -456,6 +456,17 @@ ChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) { |
->GetSyncBridge() |
->AsWeakPtr(); |
#endif |
+ case syncer::TYPED_URLS: { |
+ // We request history service with explicit access here because this |
+ // codepath is executed on backend thread while HistoryServiceFactory |
skym
2017/03/03 17:41:09
I'm not sure I agree with you that the way the cod
Gang Wu
2017/03/06 08:21:23
Done.
|
+ // checks preference value in implicit mode and PrefService expectes calls |
+ // only from UI thread. |
+ history::HistoryService* history = HistoryServiceFactory::GetForProfile( |
+ profile_, ServiceAccessType::EXPLICIT_ACCESS); |
+ if (!history) |
+ return base::WeakPtr<history::TypedURLSyncBridge>(); |
+ return history->GetTypedURLSyncBridge()->AsWeakPtr(); |
+ } |
default: |
NOTREACHED(); |
return base::WeakPtr<syncer::ModelTypeSyncBridge>(); |