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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (!IsLoadedTtsEngine(details.extension_id)) 112 if (!IsLoadedTtsEngine(details.extension_id))
113 return; 113 return;
114 114
115 TtsController::GetInstance()->VoicesChanged(); 115 TtsController::GetInstance()->VoicesChanged();
116 engine_extension_ids_.insert(details.extension_id); 116 engine_extension_ids_.insert(details.extension_id);
117 } 117 }
118 118
119 void TtsEngineExtensionObserver::OnExtensionUnloaded( 119 void TtsEngineExtensionObserver::OnExtensionUnloaded(
120 content::BrowserContext* browser_context, 120 content::BrowserContext* browser_context,
121 const extensions::Extension* extension, 121 const extensions::Extension* extension,
122 extensions::UnloadedExtensionInfo::Reason reason) { 122 extensions::UnloadedExtensionReason reason) {
123 if (engine_extension_ids_.find(extension->id()) != 123 if (engine_extension_ids_.find(extension->id()) !=
124 engine_extension_ids_.end()) { 124 engine_extension_ids_.end()) {
125 engine_extension_ids_.erase(extension->id()); 125 engine_extension_ids_.erase(extension->id());
126 TtsController::GetInstance()->VoicesChanged(); 126 TtsController::GetInstance()->VoicesChanged();
127 } 127 }
128 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698