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

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

Issue 3941001: Convert LOG(INFO) to VLOG(1) - chrome/common/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
« no previous file with comments | « no previous file | chrome/common/chrome_switches.cc » ('j') | chrome/common/resource_dispatcher.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 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"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 CP_VersionNegotiate_(NULL), 191 CP_VersionNegotiate_(NULL),
192 CP_Initialize_(NULL), 192 CP_Initialize_(NULL),
193 CP_Test_(NULL) { 193 CP_Test_(NULL) {
194 memset((void*)&plugin_funcs_, 0, sizeof(plugin_funcs_)); 194 memset((void*)&plugin_funcs_, 0, sizeof(plugin_funcs_));
195 } 195 }
196 196
197 ChromePluginLib::~ChromePluginLib() { 197 ChromePluginLib::~ChromePluginLib() {
198 } 198 }
199 199
200 bool ChromePluginLib::CP_Initialize(const CPBrowserFuncs* bfuncs) { 200 bool ChromePluginLib::CP_Initialize(const CPBrowserFuncs* bfuncs) {
201 LOG(INFO) << "ChromePluginLib::CP_Initialize(" << filename_.value() << 201 VLOG(1) << "ChromePluginLib::CP_Initialize(" << filename_.value()
202 "): initialized=" << initialized_; 202 << "): initialized=" << initialized_;
203 if (initialized_) 203 if (initialized_)
204 return true; 204 return true;
205 205
206 if (!Load()) 206 if (!Load())
207 return false; 207 return false;
208 208
209 if (CP_VersionNegotiate_) { 209 if (CP_VersionNegotiate_) {
210 uint16 selected_version = 0; 210 uint16 selected_version = 0;
211 CPError rv = CP_VersionNegotiate_(CP_VERSION, CP_VERSION, 211 CPError rv = CP_VersionNegotiate_(CP_VERSION, CP_VERSION,
212 &selected_version); 212 &selected_version);
213 if ( (rv != CPERR_SUCCESS) || (selected_version != CP_VERSION)) 213 if ((rv != CPERR_SUCCESS) || (selected_version != CP_VERSION))
214 return false; 214 return false;
215 } 215 }
216 216
217 plugin_funcs_.size = sizeof(plugin_funcs_); 217 plugin_funcs_.size = sizeof(plugin_funcs_);
218 CPError rv = CP_Initialize_(cpid(), bfuncs, &plugin_funcs_); 218 CPError rv = CP_Initialize_(cpid(), bfuncs, &plugin_funcs_);
219 initialized_ = (rv == CPERR_SUCCESS) && 219 initialized_ = (rv == CPERR_SUCCESS) &&
220 (CP_GET_MAJOR_VERSION(plugin_funcs_.version) == CP_MAJOR_VERSION) && 220 (CP_GET_MAJOR_VERSION(plugin_funcs_.version) == CP_MAJOR_VERSION) &&
221 (CP_GET_MINOR_VERSION(plugin_funcs_.version) <= CP_MINOR_VERSION); 221 (CP_GET_MINOR_VERSION(plugin_funcs_.version) <= CP_MINOR_VERSION);
222 LOG(INFO) << "ChromePluginLib::CP_Initialize(" << filename_.value() << 222 VLOG(1) << "ChromePluginLib::CP_Initialize(" << filename_.value()
223 "): initialized=" << initialized_ << 223 << "): initialized=" << initialized_ << "): result=" << rv;
224 "): result=" << rv;
225 224
226 return initialized_; 225 return initialized_;
227 } 226 }
228 227
229 void ChromePluginLib::CP_Shutdown() { 228 void ChromePluginLib::CP_Shutdown() {
230 DCHECK(initialized_); 229 DCHECK(initialized_);
231 functions().shutdown(); 230 functions().shutdown();
232 initialized_ = false; 231 initialized_ = false;
233 memset((void*)&plugin_funcs_, 0, sizeof(plugin_funcs_)); 232 memset((void*)&plugin_funcs_, 0, sizeof(plugin_funcs_));
234 } 233 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 if (initialized_) 281 if (initialized_)
283 CP_Shutdown(); 282 CP_Shutdown();
284 283
285 #if defined(OS_WIN) 284 #if defined(OS_WIN)
286 if (module_) { 285 if (module_) {
287 FreeLibrary(module_); 286 FreeLibrary(module_);
288 module_ = 0; 287 module_ = 0;
289 } 288 }
290 #endif 289 #endif
291 } 290 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.cc » ('j') | chrome/common/resource_dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698