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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_app_manager.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // static 164 // static
165 const char KioskAppManager::kKioskDictionaryName[] = "kiosk"; 165 const char KioskAppManager::kKioskDictionaryName[] = "kiosk";
166 const char KioskAppManager::kKeyApps[] = "apps"; 166 const char KioskAppManager::kKeyApps[] = "apps";
167 const char KioskAppManager::kKeyAutoLoginState[] = "auto_login_state"; 167 const char KioskAppManager::kKeyAutoLoginState[] = "auto_login_state";
168 const char KioskAppManager::kIconCacheDir[] = "kiosk/icon"; 168 const char KioskAppManager::kIconCacheDir[] = "kiosk/icon";
169 const char KioskAppManager::kCrxCacheDir[] = "kiosk/crx"; 169 const char KioskAppManager::kCrxCacheDir[] = "kiosk/crx";
170 const char KioskAppManager::kCrxUnpackDir[] = "kiosk_unpack"; 170 const char KioskAppManager::kCrxUnpackDir[] = "kiosk_unpack";
171 171
172 // static 172 // static
173 static base::LazyInstance<KioskAppManager> instance = LAZY_INSTANCE_INITIALIZER; 173 static base::LazyInstance<KioskAppManager>::DestructorAtExit instance =
174 LAZY_INSTANCE_INITIALIZER;
174 KioskAppManager* KioskAppManager::Get() { 175 KioskAppManager* KioskAppManager::Get() {
175 return instance.Pointer(); 176 return instance.Pointer();
176 } 177 }
177 178
178 // static 179 // static
179 void KioskAppManager::Shutdown() { 180 void KioskAppManager::Shutdown() {
180 if (instance == nullptr) 181 if (instance == nullptr)
181 return; 182 return;
182 183
183 instance.Pointer()->CleanUp(); 184 instance.Pointer()->CleanUp();
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const { 970 base::TimeDelta KioskAppManager::GetAutoLaunchDelay() const {
970 int delay; 971 int delay;
971 if (!CrosSettings::Get()->GetInteger( 972 if (!CrosSettings::Get()->GetInteger(
972 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { 973 kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) {
973 return base::TimeDelta(); // Default delay is 0ms. 974 return base::TimeDelta(); // Default delay is 0ms.
974 } 975 }
975 return base::TimeDelta::FromMilliseconds(delay); 976 return base::TimeDelta::FromMilliseconds(delay);
976 } 977 }
977 978
978 } // namespace chromeos 979 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698