Commit 70e812e9 authored by Mohamed Amir Yosef's avatar Mohamed Amir Yosef Committed by Commit Bot

BookmarkSyncServiceFactory shouldn't create the BookmarkUndoService

Since the BookmarkSyncServiceFactory doesn't start the
BookmarkUndoService, it should use it only if it exists.

This was the case already in non-ios factory.
https://cs.chromium.org/chromium/src/chrome/browser/sync/bookmark_sync_service_factory.cc?l=38&rcl=46520ae13478333fe882e79041b667e5a3112796

However, by mistake, it was created in iOS factory
which caused tests to fail here:
https://chromium-review.googlesource.com/c/chromium/src/+/1052767

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5f205fa575773b3382b1e4c90ac4afa19d41d77a
Reviewed-on: https://chromium-review.googlesource.com/1171231Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582558}
parent dafabe13
...@@ -41,7 +41,8 @@ BookmarkSyncServiceFactory::BuildServiceInstanceFor( ...@@ -41,7 +41,8 @@ BookmarkSyncServiceFactory::BuildServiceInstanceFor(
ios::ChromeBrowserState::FromBrowserState(context); ios::ChromeBrowserState::FromBrowserState(context);
std::unique_ptr<sync_bookmarks::BookmarkSyncService> bookmark_sync_service( std::unique_ptr<sync_bookmarks::BookmarkSyncService> bookmark_sync_service(
new sync_bookmarks::BookmarkSyncService( new sync_bookmarks::BookmarkSyncService(
BookmarkUndoServiceFactory::GetForBrowserState(browser_state))); BookmarkUndoServiceFactory::GetForBrowserStateIfExists(
browser_state)));
return bookmark_sync_service; return bookmark_sync_service;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment