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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.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/thread.h" | 13 #include "base/thread.h" |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 #include "base/registry.h" | 15 #include "base/win/registry.h" |
16 #endif | 16 #endif |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "chrome/common/chrome_counters.h" | 18 #include "chrome/common/chrome_counters.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/notification_service.h" | 20 #include "chrome/common/notification_service.h" |
21 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
22 #include "webkit/glue/plugins/plugin_list.h" | 22 #include "webkit/glue/plugins/plugin_list.h" |
23 | 23 |
24 using base::TimeDelta; | 24 using base::TimeDelta; |
25 | 25 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 // TODO(mpcomplete): disabled loading of plugins from the registry until we | 143 // TODO(mpcomplete): disabled loading of plugins from the registry until we |
144 // phase out registry keys from the gears installer. | 144 // phase out registry keys from the gears installer. |
145 #if 0 | 145 #if 0 |
146 for (RegistryKeyIterator iter(HKEY_CURRENT_USER, kRegistryChromePlugins); | 146 for (RegistryKeyIterator iter(HKEY_CURRENT_USER, kRegistryChromePlugins); |
147 iter.Valid(); ++iter) { | 147 iter.Valid(); ++iter) { |
148 // Use the registry to gather plugin across the file system. | 148 // Use the registry to gather plugin across the file system. |
149 std::wstring reg_path = kRegistryChromePlugins; | 149 std::wstring reg_path = kRegistryChromePlugins; |
150 reg_path.append(L"\\"); | 150 reg_path.append(L"\\"); |
151 reg_path.append(iter.Name()); | 151 reg_path.append(iter.Name()); |
152 RegKey key(HKEY_CURRENT_USER, reg_path.c_str()); | 152 base::win::RegKey key(HKEY_CURRENT_USER, reg_path.c_str()); |
153 | 153 |
154 DWORD is_persistent; | 154 DWORD is_persistent; |
155 if (key.ReadValueDW(kRegistryLoadOnStartup, &is_persistent) && | 155 if (key.ReadValueDW(kRegistryLoadOnStartup, &is_persistent) && |
156 is_persistent) { | 156 is_persistent) { |
157 std::wstring path; | 157 std::wstring path; |
158 if (key.ReadValue(kRegistryPath, &path)) { | 158 if (key.ReadValue(kRegistryPath, &path)) { |
159 ChromePluginLib::Create(path, bfuncs); | 159 ChromePluginLib::Create(path, bfuncs); |
160 } | 160 } |
161 } | 161 } |
162 } | 162 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 if (initialized_) | 282 if (initialized_) |
283 CP_Shutdown(); | 283 CP_Shutdown(); |
284 | 284 |
285 #if defined(OS_WIN) | 285 #if defined(OS_WIN) |
286 if (module_) { | 286 if (module_) { |
287 FreeLibrary(module_); | 287 FreeLibrary(module_); |
288 module_ = 0; | 288 module_ = 0; |
289 } | 289 } |
290 #endif | 290 #endif |
291 } | 291 } |
OLD | NEW |