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

Side by Side Diff: chrome/browser/speech/extension_api/tts_engine_extension_observer.cc

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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/speech/extension_api/tts_engine_extension_observer.h" 5 #include "chrome/browser/speech/extension_api/tts_engine_extension_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system_factory.h" 10 #include "chrome/browser/extensions/extension_system_factory.h"
(...skipping 26 matching lines...) Expand all
37 TtsEngineExtensionObserverFactory() 37 TtsEngineExtensionObserverFactory()
38 : BrowserContextKeyedServiceFactory( 38 : BrowserContextKeyedServiceFactory(
39 "TtsEngineExtensionObserver", 39 "TtsEngineExtensionObserver",
40 BrowserContextDependencyManager::GetInstance()) { 40 BrowserContextDependencyManager::GetInstance()) {
41 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); 41 DependsOn(extensions::ExtensionSystemFactory::GetInstance());
42 } 42 }
43 43
44 virtual ~TtsEngineExtensionObserverFactory() {} 44 virtual ~TtsEngineExtensionObserverFactory() {}
45 45
46 virtual content::BrowserContext* GetBrowserContextToUse( 46 virtual content::BrowserContext* GetBrowserContextToUse(
47 content::BrowserContext* context) const OVERRIDE { 47 content::BrowserContext* context) const override {
48 // If given an incognito profile (including the Chrome OS login 48 // If given an incognito profile (including the Chrome OS login
49 // profile), share the service with the original profile. 49 // profile), share the service with the original profile.
50 return chrome::GetBrowserContextRedirectedInIncognito(context); 50 return chrome::GetBrowserContextRedirectedInIncognito(context);
51 } 51 }
52 52
53 virtual KeyedService* BuildServiceInstanceFor( 53 virtual KeyedService* BuildServiceInstanceFor(
54 content::BrowserContext* profile) const OVERRIDE { 54 content::BrowserContext* profile) const override {
55 return new TtsEngineExtensionObserver(static_cast<Profile*>(profile)); 55 return new TtsEngineExtensionObserver(static_cast<Profile*>(profile));
56 } 56 }
57 }; 57 };
58 58
59 TtsEngineExtensionObserver* TtsEngineExtensionObserver::GetInstance( 59 TtsEngineExtensionObserver* TtsEngineExtensionObserver::GetInstance(
60 Profile* profile) { 60 Profile* profile) {
61 return TtsEngineExtensionObserverFactory::GetInstance()->GetForProfile( 61 return TtsEngineExtensionObserverFactory::GetInstance()->GetForProfile(
62 profile); 62 profile);
63 } 63 }
64 64
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 void TtsEngineExtensionObserver::OnExtensionUnloaded( 124 void TtsEngineExtensionObserver::OnExtensionUnloaded(
125 content::BrowserContext* browser_context, 125 content::BrowserContext* browser_context,
126 const extensions::Extension* extension, 126 const extensions::Extension* extension,
127 extensions::UnloadedExtensionInfo::Reason reason) { 127 extensions::UnloadedExtensionInfo::Reason reason) {
128 if (engine_extension_ids_.find(extension->id()) != 128 if (engine_extension_ids_.find(extension->id()) !=
129 engine_extension_ids_.end()) { 129 engine_extension_ids_.end()) {
130 engine_extension_ids_.erase(extension->id()); 130 engine_extension_ids_.erase(extension->id());
131 TtsController::GetInstance()->VoicesChanged(); 131 TtsController::GetInstance()->VoicesChanged();
132 } 132 }
133 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698