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

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_api.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/speech/extension_api/tts_extension_api.h" 5 #include "chrome/browser/speech/extension_api/tts_extension_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 registry->RegisterFunction<TtsPauseFunction>(); 360 registry->RegisterFunction<TtsPauseFunction>();
361 registry->RegisterFunction<TtsResumeFunction>(); 361 registry->RegisterFunction<TtsResumeFunction>();
362 362
363 // Ensure we're observing newly added engines for the given context. 363 // Ensure we're observing newly added engines for the given context.
364 TtsEngineExtensionObserver::GetInstance(Profile::FromBrowserContext(context)); 364 TtsEngineExtensionObserver::GetInstance(Profile::FromBrowserContext(context));
365 } 365 }
366 366
367 TtsAPI::~TtsAPI() { 367 TtsAPI::~TtsAPI() {
368 } 368 }
369 369
370 static base::LazyInstance<BrowserContextKeyedAPIFactory<TtsAPI> > g_factory = 370 static base::LazyInstance<
371 BrowserContextKeyedAPIFactory<TtsAPI>>::DestructorAtExit g_factory =
371 LAZY_INSTANCE_INITIALIZER; 372 LAZY_INSTANCE_INITIALIZER;
372 373
373 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() { 374 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() {
374 return g_factory.Pointer(); 375 return g_factory.Pointer();
375 } 376 }
376 377
377 } // namespace extensions 378 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/threat_details.cc ('k') | chrome/browser/sync_file_system/logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698