| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/printing/printers_manager_factory.h" | 5 #include "chrome/browser/chromeos/printing/printers_manager_factory.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 BrowserContextDependencyManager::GetInstance()) {} | 50 BrowserContextDependencyManager::GetInstance()) {} |
| 51 | 51 |
| 52 PrintersManagerFactory::~PrintersManagerFactory() {} | 52 PrintersManagerFactory::~PrintersManagerFactory() {} |
| 53 | 53 |
| 54 PrintersManager* PrintersManagerFactory::BuildServiceInstanceFor( | 54 PrintersManager* PrintersManagerFactory::BuildServiceInstanceFor( |
| 55 content::BrowserContext* browser_context) const { | 55 content::BrowserContext* browser_context) const { |
| 56 Profile* profile = Profile::FromBrowserContext(browser_context); | 56 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 57 | 57 |
| 58 const syncer::ModelTypeStoreFactory& store_factory = | 58 const syncer::ModelTypeStoreFactory& store_factory = |
| 59 browser_sync::ProfileSyncService::GetModelTypeStoreFactory( | 59 browser_sync::ProfileSyncService::GetModelTypeStoreFactory( |
| 60 syncer::PRINTERS, profile->GetPath(), | 60 syncer::PRINTERS, profile->GetPath()); |
| 61 content::BrowserThread::GetBlockingPool()); | |
| 62 | 61 |
| 63 std::unique_ptr<PrintersSyncBridge> sync_bridge = | 62 std::unique_ptr<PrintersSyncBridge> sync_bridge = |
| 64 base::MakeUnique<PrintersSyncBridge>( | 63 base::MakeUnique<PrintersSyncBridge>( |
| 65 store_factory, | 64 store_factory, |
| 66 base::BindRepeating( | 65 base::BindRepeating( |
| 67 base::IgnoreResult(&base::debug::DumpWithoutCrashing))); | 66 base::IgnoreResult(&base::debug::DumpWithoutCrashing))); |
| 68 | 67 |
| 69 return new PrintersManager(profile, std::move(sync_bridge)); | 68 return new PrintersManager(profile, std::move(sync_bridge)); |
| 70 } | 69 } |
| 71 | 70 |
| 72 } // namespace chromeos | 71 } // namespace chromeos |
| OLD | NEW |