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

Side by Side Diff: chrome/browser/chromeos/printing/printers_manager_factory.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "chrome/browser/chromeos/printing/printers_sync_bridge.h" 12 #include "chrome/browser/chromeos/printing/printers_sync_bridge.h"
13 #include "chrome/browser/profiles/incognito_helpers.h" 13 #include "chrome/browser/profiles/incognito_helpers.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/sync/profile_sync_service_factory.h" 15 #include "chrome/browser/sync/profile_sync_service_factory.h"
16 #include "components/browser_sync/profile_sync_service.h" 16 #include "components/browser_sync/profile_sync_service.h"
17 #include "components/keyed_service/content/browser_context_dependency_manager.h" 17 #include "components/keyed_service/content/browser_context_dependency_manager.h"
18 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
19 19
20 namespace chromeos { 20 namespace chromeos {
21 21
22 namespace { 22 namespace {
23 23
24 base::LazyInstance<PrintersManagerFactory> g_printers_manager = 24 base::LazyInstance<PrintersManagerFactory>::DestructorAtExit
25 LAZY_INSTANCE_INITIALIZER; 25 g_printers_manager = LAZY_INSTANCE_INITIALIZER;
26 26
27 } // namespace 27 } // namespace
28 28
29 // static 29 // static
30 PrintersManager* PrintersManagerFactory::GetForBrowserContext( 30 PrintersManager* PrintersManagerFactory::GetForBrowserContext(
31 content::BrowserContext* context) { 31 content::BrowserContext* context) {
32 return static_cast<PrintersManager*>( 32 return static_cast<PrintersManager*>(
33 GetInstance()->GetServiceForBrowserContext(context, true)); 33 GetInstance()->GetServiceForBrowserContext(context, true));
34 } 34 }
35 35
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 std::unique_ptr<PrintersSyncBridge> sync_bridge = 69 std::unique_ptr<PrintersSyncBridge> sync_bridge =
70 base::MakeUnique<PrintersSyncBridge>( 70 base::MakeUnique<PrintersSyncBridge>(
71 store_factory, 71 store_factory,
72 base::BindRepeating( 72 base::BindRepeating(
73 base::IgnoreResult(&base::debug::DumpWithoutCrashing))); 73 base::IgnoreResult(&base::debug::DumpWithoutCrashing)));
74 74
75 return new PrintersManager(profile, std::move(sync_bridge)); 75 return new PrintersManager(profile, std::move(sync_bridge));
76 } 76 }
77 77
78 } // namespace chromeos 78 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/printing/printers_manager_factory.h ('k') | chrome/browser/devtools/device/usb/android_usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698