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" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // the locking for us. We should not touch it anywhere else. | 124 // the locking for us. We should not touch it anywhere else. |
125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
126 NPAPI::PluginList::AddExtraPluginPath(path); | 126 NPAPI::PluginList::AddExtraPluginPath(path); |
127 #else | 127 #else |
128 // TODO(port): plugins not yet implemented | 128 // TODO(port): plugins not yet implemented |
129 NOTIMPLEMENTED(); | 129 NOTIMPLEMENTED(); |
130 #endif | 130 #endif |
131 } | 131 } |
132 | 132 |
133 static void LogPluginLoadTime(const TimeDelta &time) { | 133 static void LogPluginLoadTime(const TimeDelta &time) { |
134 UMA_HISTOGRAM_TIMES(L"Gears.LoadTime", time); | 134 UMA_HISTOGRAM_TIMES("Gears.LoadTime", time); |
135 } | 135 } |
136 | 136 |
137 // static | 137 // static |
138 void ChromePluginLib::LoadChromePlugins(const CPBrowserFuncs* bfuncs) { | 138 void ChromePluginLib::LoadChromePlugins(const CPBrowserFuncs* bfuncs) { |
139 static bool loaded = false; | 139 static bool loaded = false; |
140 if (loaded) | 140 if (loaded) |
141 return; | 141 return; |
142 loaded = true; | 142 loaded = true; |
143 | 143 |
144 // We don't support ChromePlugins in single-process mode. | 144 // We don't support ChromePlugins in single-process mode. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 if (initialized_) | 302 if (initialized_) |
303 CP_Shutdown(); | 303 CP_Shutdown(); |
304 | 304 |
305 #if defined(OS_WIN) | 305 #if defined(OS_WIN) |
306 if (module_) { | 306 if (module_) { |
307 FreeLibrary(module_); | 307 FreeLibrary(module_); |
308 module_ = 0; | 308 module_ = 0; |
309 } | 309 } |
310 #endif | 310 #endif |
311 } | 311 } |
OLD | NEW |