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

Side by Side Diff: webkit/glue/plugins/plugin_list.cc

Issue 17393: Fix the regression where Gears didn't load. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
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) 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 <algorithm> 5 #include <algorithm>
6 #include <tchar.h> 6 #include <tchar.h>
7 7
8 #include "webkit/glue/plugins/plugin_list.h" 8 #include "webkit/glue/plugins/plugin_list.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 plugins_.clear(); 88 plugins_.clear();
89 plugins_loaded_ = true; 89 plugins_loaded_ = true;
90 90
91 TimeTicks start_time = TimeTicks::Now(); 91 TimeTicks start_time = TimeTicks::Now();
92 92
93 LoadInternalPlugins(); 93 LoadInternalPlugins();
94 94
95 std::set<FilePath> directories_to_scan; 95 std::set<FilePath> directories_to_scan;
96 96
97
98 // Load any plugins listed in the registry
99 if (extra_plugin_paths_) {
100 for (size_t i = 0; i < extra_plugin_paths_->size(); ++i)
101 directories_to_scan.insert((*extra_plugin_paths_)[i].DirName());
102 }
103
104 // Load from the application-specific area 97 // Load from the application-specific area
105 GetAppDirectory(&directories_to_scan); 98 GetAppDirectory(&directories_to_scan);
106 99
107 // Load from the executable area 100 // Load from the executable area
108 GetExeDirectory(&directories_to_scan); 101 GetExeDirectory(&directories_to_scan);
109 102
110 // Load Java 103 // Load Java
111 GetJavaDirectory(&directories_to_scan); 104 GetJavaDirectory(&directories_to_scan);
112 105
113 // Load firefox plugins too. This is mainly to try to locate 106 // Load firefox plugins too. This is mainly to try to locate
114 // a pre-installed Flash player. 107 // a pre-installed Flash player.
115 GetFirefoxDirectory(&directories_to_scan); 108 GetFirefoxDirectory(&directories_to_scan);
116 109
117 // Firefox hard-codes the paths of some popular plugins to ensure that 110 // Firefox hard-codes the paths of some popular plugins to ensure that
118 // the plugins are found. We are going to copy this as well. 111 // the plugins are found. We are going to copy this as well.
119 GetAcrobatDirectory(&directories_to_scan); 112 GetAcrobatDirectory(&directories_to_scan);
120 GetQuicktimeDirectory(&directories_to_scan); 113 GetQuicktimeDirectory(&directories_to_scan);
121 GetWindowsMediaDirectory(&directories_to_scan); 114 GetWindowsMediaDirectory(&directories_to_scan);
122 115
123 for (std::set<FilePath>::const_iterator iter = directories_to_scan.begin(); 116 for (std::set<FilePath>::const_iterator iter = directories_to_scan.begin();
124 iter != directories_to_scan.end(); ++iter) { 117 iter != directories_to_scan.end(); ++iter) {
125 LoadPluginsFromDir(*iter); 118 LoadPluginsFromDir(*iter);
126 } 119 }
127 120
121 if (extra_plugin_paths_) {
122 for (size_t i = 0; i < extra_plugin_paths_->size(); ++i)
123 LoadPlugin((*extra_plugin_paths_)[i]);
124 }
125
128 if (webkit_glue::IsDefaultPluginEnabled()) { 126 if (webkit_glue::IsDefaultPluginEnabled()) {
129 WebPluginInfo info; 127 WebPluginInfo info;
130 if (PluginLib::ReadWebPluginInfo(FilePath(kDefaultPluginLibraryName), 128 if (PluginLib::ReadWebPluginInfo(FilePath(kDefaultPluginLibraryName),
131 &info)) { 129 &info)) {
132 plugins_.push_back(info); 130 plugins_.push_back(info);
133 } 131 }
134 } 132 }
135 133
136 TimeTicks end_time = TimeTicks::Now(); 134 TimeTicks end_time = TimeTicks::Now();
137 TimeDelta elapsed = end_time - start_time; 135 TimeDelta elapsed = end_time - start_time;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 RegKey key(root_key, reg_path.c_str()); 525 RegKey key(root_key, reg_path.c_str());
528 526
529 std::wstring path; 527 std::wstring path;
530 if (key.ReadValue(kRegistryPath, &path)) 528 if (key.ReadValue(kRegistryPath, &path))
531 plugin_dirs->insert(FilePath(path).DirName()); 529 plugin_dirs->insert(FilePath(path).DirName());
532 } 530 }
533 } 531 }
534 532
535 } // namespace NPAPI 533 } // namespace NPAPI
536 534
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698