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

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

Issue 2080016: Don't use command line flags for enabling the internal pdf plugin. Instead, ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // static 108 // static
109 void ChromePluginLib::RegisterPluginsWithNPAPI() { 109 void ChromePluginLib::RegisterPluginsWithNPAPI() {
110 // We don't support ChromePlugins in single-process mode. 110 // We don't support ChromePlugins in single-process mode.
111 if (IsSingleProcessMode()) 111 if (IsSingleProcessMode())
112 return; 112 return;
113 113
114 FilePath path; 114 FilePath path;
115 // Register Gears, if available. 115 // Register Gears, if available.
116 if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &path)) 116 if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &path))
117 NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); 117 NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
118
119 // Register the internal Flash, if available.
120 if (!CommandLine::ForCurrentProcess()->HasSwitch(
121 switches::kDisableInternalFlash) &&
122 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path))
123 NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
124 } 118 }
125 119
126 static void LogPluginLoadTime(const TimeDelta &time) { 120 static void LogPluginLoadTime(const TimeDelta &time) {
127 UMA_HISTOGRAM_TIMES("Gears.LoadTime", time); 121 UMA_HISTOGRAM_TIMES("Gears.LoadTime", time);
128 } 122 }
129 123
130 // static 124 // static
131 void ChromePluginLib::LoadChromePlugins(const CPBrowserFuncs* bfuncs) { 125 void ChromePluginLib::LoadChromePlugins(const CPBrowserFuncs* bfuncs) {
132 static bool loaded = false; 126 static bool loaded = false;
133 if (loaded) 127 if (loaded)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (initialized_) 281 if (initialized_)
288 CP_Shutdown(); 282 CP_Shutdown();
289 283
290 #if defined(OS_WIN) 284 #if defined(OS_WIN)
291 if (module_) { 285 if (module_) {
292 FreeLibrary(module_); 286 FreeLibrary(module_);
293 module_ = 0; 287 module_ = 0;
294 } 288 }
295 #endif 289 #endif
296 } 290 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698