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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/app_mode/kiosk_diagnosis_runner.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace chromeos { 22 namespace chromeos {
23 23
24 class KioskDiagnosisRunner::Factory : public BrowserContextKeyedServiceFactory { 24 class KioskDiagnosisRunner::Factory : public BrowserContextKeyedServiceFactory {
25 public: 25 public:
26 static KioskDiagnosisRunner* GetForProfile(Profile* profile) { 26 static KioskDiagnosisRunner* GetForProfile(Profile* profile) {
27 return static_cast<KioskDiagnosisRunner*>( 27 return static_cast<KioskDiagnosisRunner*>(
28 GetInstance()->GetServiceForBrowserContext(profile, true)); 28 GetInstance()->GetServiceForBrowserContext(profile, true));
29 } 29 }
30 30
31 static Factory* GetInstance() { 31 static Factory* GetInstance() { return base::Singleton<Factory>::get(); }
32 return Singleton<Factory>::get();
33 }
34 32
35 private: 33 private:
36 friend struct DefaultSingletonTraits<Factory>; 34 friend struct base::DefaultSingletonTraits<Factory>;
37 35
38 Factory() 36 Factory()
39 : BrowserContextKeyedServiceFactory( 37 : BrowserContextKeyedServiceFactory(
40 "KioskDiagnosisRunner", 38 "KioskDiagnosisRunner",
41 BrowserContextDependencyManager::GetInstance()) { 39 BrowserContextDependencyManager::GetInstance()) {
42 DependsOn(extensions::ExtensionsBrowserClient::Get() 40 DependsOn(extensions::ExtensionsBrowserClient::Get()
43 ->GetExtensionSystemFactory()); 41 ->GetExtensionSystemFactory());
44 DependsOn(extensions::FeedbackPrivateAPI::GetFactoryInstance()); 42 DependsOn(extensions::FeedbackPrivateAPI::GetFactoryInstance());
45 } 43 }
46 44
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 feedback_data, 118 feedback_data,
121 base::Bind(&KioskDiagnosisRunner::OnFeedbackSent, 119 base::Bind(&KioskDiagnosisRunner::OnFeedbackSent,
122 weak_factory_.GetWeakPtr())); 120 weak_factory_.GetWeakPtr()));
123 } 121 }
124 122
125 void KioskDiagnosisRunner::OnFeedbackSent(bool) { 123 void KioskDiagnosisRunner::OnFeedbackSent(bool) {
126 // Do nothing. 124 // Do nothing.
127 } 125 }
128 126
129 } // namespace chromeos 127 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc ('k') | chrome/browser/chromeos/camera_presence_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698