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

Side by Side Diff: chrome/common/chrome_plugin_lib.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // phase out registry keys from the gears installer. 146 // phase out registry keys from the gears installer.
147 #if 0 147 #if 0
148 for (RegistryKeyIterator iter(HKEY_CURRENT_USER, kRegistryChromePlugins); 148 for (RegistryKeyIterator iter(HKEY_CURRENT_USER, kRegistryChromePlugins);
149 iter.Valid(); ++iter) { 149 iter.Valid(); ++iter) {
150 // Use the registry to gather plugin across the file system. 150 // Use the registry to gather plugin across the file system.
151 std::wstring reg_path = kRegistryChromePlugins; 151 std::wstring reg_path = kRegistryChromePlugins;
152 reg_path.append(L"\\"); 152 reg_path.append(L"\\");
153 reg_path.append(iter.Name()); 153 reg_path.append(iter.Name());
154 base::win::RegKey key(HKEY_CURRENT_USER, reg_path.c_str()); 154 base::win::RegKey key(HKEY_CURRENT_USER, reg_path.c_str());
155 155
156 DWORD is_persistent; 156 DWORD is_persistent = 0;
157 if (key.ReadValueDW(kRegistryLoadOnStartup, &is_persistent) && 157 key.ReadValueDW(kRegistryLoadOnStartup, &is_persistent);
158 is_persistent) { 158 if (is_persistent) {
159 std::wstring path; 159 std::wstring path;
160 if (key.ReadValue(kRegistryPath, &path)) { 160 if (key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS) {
161 ChromePluginLib::Create(path, bfuncs); 161 ChromePluginLib::Create(path, bfuncs);
162 } 162 }
163 } 163 }
164 } 164 }
165 #endif 165 #endif
166 } 166 }
167 167
168 // static 168 // static
169 void ChromePluginLib::UnloadAllPlugins() { 169 void ChromePluginLib::UnloadAllPlugins() {
170 if (g_loaded_libs) { 170 if (g_loaded_libs) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if (initialized_) 283 if (initialized_)
284 CP_Shutdown(); 284 CP_Shutdown();
285 285
286 #if defined(OS_WIN) 286 #if defined(OS_WIN)
287 if (module_) { 287 if (module_) {
288 FreeLibrary(module_); 288 FreeLibrary(module_);
289 module_ = 0; 289 module_ = 0;
290 } 290 }
291 #endif 291 #endif
292 } 292 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/shell_dialogs_win.cc ('k') | chrome/installer/setup/chrome_frame_ready_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698