Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: chrome/browser/chromeos/printing/printers_manager_factory.cc

Issue 2716973002: Use an in memory store until crbug.com/688533 is fixed. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/printing/printers_manager_factory.cc
diff --git a/chrome/browser/chromeos/printing/printers_manager_factory.cc b/chrome/browser/chromeos/printing/printers_manager_factory.cc
index acfe074b82bfad083920f57b306469d0ba5e48ae..13e2ec43a7ae3525b398b2cff2e6bcf87461301f 100644
--- a/chrome/browser/chromeos/printing/printers_manager_factory.cc
+++ b/chrome/browser/chromeos/printing/printers_manager_factory.cc
@@ -57,13 +57,18 @@ PrintersManager* PrintersManagerFactory::BuildServiceInstanceFor(
browser_sync::ProfileSyncService* sync_service =
ProfileSyncServiceFactory::GetForProfile(profile);
- // TODO(skau): --disable-sync and --enable-native-cups are mutually exclusive
- // until crbug.com/688533 is resolved.
- DCHECK(sync_service);
+ // TODO(skym): After crbug.com/688533 is fixed, this should not use
+ // CreateInMemoryStoreForTest, but rather a ModelTypeStore creation mechanism
+ // that's agnostic to the existence of sync infrastructure.
+ const syncer::ModelTypeStoreFactory& store_factory =
+ sync_service ? sync_service->GetModelTypeStoreFactory(syncer::PRINTERS)
+ : base::BindRepeating(
+ syncer::ModelTypeStore::CreateInMemoryStoreForTest,
+ syncer::PRINTERS);
std::unique_ptr<PrintersSyncBridge> sync_bridge =
base::MakeUnique<PrintersSyncBridge>(
- sync_service->GetModelTypeStoreFactory(syncer::PRINTERS),
+ store_factory,
base::BindRepeating(
base::IgnoreResult(&base::debug::DumpWithoutCrashing)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698