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

Side by Side Diff: chrome/browser/extensions/plugin_manager.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 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/extensions/plugin_manager.h" 5 #include "chrome/browser/extensions/plugin_manager.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 PluginService::GetInstance()->RegisterInternalPlugin(info, true); 90 PluginService::GetInstance()->RegisterInternalPlugin(info, true);
91 } 91 }
92 92
93 if (plugins_or_nacl_changed) 93 if (plugins_or_nacl_changed)
94 PluginService::GetInstance()->PurgePluginListCache(profile_, false); 94 PluginService::GetInstance()->PurgePluginListCache(profile_, false);
95 } 95 }
96 96
97 void PluginManager::OnExtensionUnloaded( 97 void PluginManager::OnExtensionUnloaded(
98 content::BrowserContext* browser_context, 98 content::BrowserContext* browser_context,
99 const Extension* extension, 99 const Extension* extension,
100 UnloadedExtensionInfo::Reason reason) { 100 UnloadedExtensionReason reason) {
101 bool plugins_or_nacl_changed = false; 101 bool plugins_or_nacl_changed = false;
102 #if !defined(DISABLE_NACL) 102 #if !defined(DISABLE_NACL)
103 const NaClModuleInfo::List* nacl_modules = 103 const NaClModuleInfo::List* nacl_modules =
104 NaClModuleInfo::GetNaClModules(extension); 104 NaClModuleInfo::GetNaClModules(extension);
105 if (nacl_modules) { 105 if (nacl_modules) {
106 plugins_or_nacl_changed = true; 106 plugins_or_nacl_changed = true;
107 for (NaClModuleInfo::List::const_iterator module = nacl_modules->begin(); 107 for (NaClModuleInfo::List::const_iterator module = nacl_modules->begin();
108 module != nacl_modules->end(); 108 module != nacl_modules->end();
109 ++module) { 109 ++module) {
110 UnregisterNaClModule(*module); 110 UnregisterNaClModule(*module);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 iter != nacl_module_list_.end(); ++iter) { 191 iter != nacl_module_list_.end(); ++iter) {
192 if (iter->url == url) 192 if (iter->url == url)
193 return iter; 193 return iter;
194 } 194 }
195 return nacl_module_list_.end(); 195 return nacl_module_list_.end();
196 } 196 }
197 197
198 #endif // !defined(DISABLE_NACL) 198 #endif // !defined(DISABLE_NACL)
199 199
200 } // namespace extensions 200 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/plugin_manager.h ('k') | chrome/browser/extensions/renderer_initialization_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698