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

Side by Side Diff: chrome/browser/chromeos/printer_detector/printer_detector_factory.h

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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_ 6 #define CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_
7 7
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11 #include "extensions/browser/extension_system_provider.h" 11 #include "extensions/browser/extension_system_provider.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 } 15 }
16 16
17 namespace chromeos { 17 namespace chromeos {
18 18
19 class PrinterDetector; 19 class PrinterDetector;
20 20
21 class PrinterDetectorFactory : public BrowserContextKeyedServiceFactory { 21 class PrinterDetectorFactory : public BrowserContextKeyedServiceFactory {
22 public: 22 public:
23 static PrinterDetectorFactory* GetInstance(); 23 static PrinterDetectorFactory* GetInstance();
24 24
25 PrinterDetector* Get(content::BrowserContext* context); 25 PrinterDetector* Get(content::BrowserContext* context);
26 26
27 private: 27 private:
28 friend struct base::DefaultLazyInstanceTraits<PrinterDetectorFactory>; 28 friend struct base::LazyInstanceTraitsBase<PrinterDetectorFactory>;
29 PrinterDetectorFactory(); 29 PrinterDetectorFactory();
30 ~PrinterDetectorFactory() override; 30 ~PrinterDetectorFactory() override;
31 31
32 KeyedService* BuildServiceInstanceFor( 32 KeyedService* BuildServiceInstanceFor(
33 content::BrowserContext* browser_context) const override; 33 content::BrowserContext* browser_context) const override;
34 bool ServiceIsCreatedWithBrowserContext() const override; 34 bool ServiceIsCreatedWithBrowserContext() const override;
35 bool ServiceIsNULLWhileTesting() const override; 35 bool ServiceIsNULLWhileTesting() const override;
36 36
37 DISALLOW_COPY_AND_ASSIGN(PrinterDetectorFactory); 37 DISALLOW_COPY_AND_ASSIGN(PrinterDetectorFactory);
38 }; 38 };
39 39
40 } // namespace chromeos 40 } // namespace chromeos
41 41
42 #endif // CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_ 42 #endif // CHROME_BROWSER_CHROMEOS_PRINTER_DETECTOR_PRINTER_DETECTOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698