OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/chrome_plugin_lib.h" | 5 #include "chrome/common/chrome_plugin_lib.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/perftimer.h" | 12 #include "base/perftimer.h" |
13 #include "base/registry.h" | 13 #include "base/registry.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "chrome/common/chrome_counters.h" | 15 #include "chrome/common/chrome_counters.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/notification_service.h" | 17 #include "chrome/common/notification_service.h" |
18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
19 #include "webkit/glue/plugins/plugin_list.h" | 19 #include "webkit/glue/plugins/plugin_list.h" |
20 | 20 |
| 21 using base::TimeDelta; |
| 22 |
21 const TCHAR ChromePluginLib::kRegistryChromePlugins[] = | 23 const TCHAR ChromePluginLib::kRegistryChromePlugins[] = |
22 _T("Software\\Google\\Chrome\\Plugins"); | 24 _T("Software\\Google\\Chrome\\Plugins"); |
23 static const TCHAR kRegistryLoadOnStartup[] = _T("LoadOnStartup"); | 25 static const TCHAR kRegistryLoadOnStartup[] = _T("LoadOnStartup"); |
24 static const TCHAR kRegistryPath[] = _T("Path"); | 26 static const TCHAR kRegistryPath[] = _T("Path"); |
25 | 27 |
26 typedef base::hash_map<std::wstring, scoped_refptr<ChromePluginLib> > | 28 typedef base::hash_map<std::wstring, scoped_refptr<ChromePluginLib> > |
27 PluginMap; | 29 PluginMap; |
28 | 30 |
29 // A map of all the instantiated plugins. | 31 // A map of all the instantiated plugins. |
30 static PluginMap* g_loaded_libs; | 32 static PluginMap* g_loaded_libs; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 NotificationService::NoDetails()); | 261 NotificationService::NoDetails()); |
260 | 262 |
261 if (initialized_) | 263 if (initialized_) |
262 CP_Shutdown(); | 264 CP_Shutdown(); |
263 | 265 |
264 if (module_) { | 266 if (module_) { |
265 FreeLibrary(module_); | 267 FreeLibrary(module_); |
266 module_ = 0; | 268 module_ = 0; |
267 } | 269 } |
268 } | 270 } |
OLD | NEW |