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

Side by Side Diff: trunk/src/webkit/plugins/npapi/plugin_list_posix.cc

Issue 14824006: Revert 198820 "Move FileEnumerator to its own file, do some refa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
« no previous file with comments | « trunk/src/webkit/plugins/npapi/plugin_list_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Deleted: svn:mergeinfo
Reverse-merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/npapi/plugin_list_posix.cc:r3734-4217,4606-5108,5177-5263
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/npapi/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/file_enumerator.h"
12 #include "base/path_service.h" 11 #include "base/path_service.h"
13 #include "base/sha1.h" 12 #include "base/sha1.h"
14 #include "base/string_util.h" 13 #include "base/string_util.h"
15 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
16 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
17 #include "build/build_config.h" 16 #include "build/build_config.h"
18 17
19 namespace webkit { 18 namespace webkit {
20 namespace npapi { 19 namespace npapi {
21 20
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 198 }
200 199
201 void PluginList::GetPluginsInDir( 200 void PluginList::GetPluginsInDir(
202 const base::FilePath& dir_path, std::vector<base::FilePath>* plugins) { 201 const base::FilePath& dir_path, std::vector<base::FilePath>* plugins) {
203 // See ScanPluginsDirectory near 202 // See ScanPluginsDirectory near
204 // http://mxr.mozilla.org/firefox/source/modules/plugin/base/src/nsPluginHostI mpl.cpp#5052 203 // http://mxr.mozilla.org/firefox/source/modules/plugin/base/src/nsPluginHostI mpl.cpp#5052
205 204
206 // Construct and stat a list of all filenames under consideration, for 205 // Construct and stat a list of all filenames under consideration, for
207 // later sorting by mtime. 206 // later sorting by mtime.
208 FileTimeList files; 207 FileTimeList files;
209 base::FileEnumerator enumerator(dir_path, 208 file_util::FileEnumerator enumerator(dir_path,
210 false, // not recursive 209 false, // not recursive
211 base::FileEnumerator::FILES); 210 file_util::FileEnumerator::FILES);
212 for (base::FilePath path = enumerator.Next(); !path.value().empty(); 211 for (base::FilePath path = enumerator.Next(); !path.value().empty();
213 path = enumerator.Next()) { 212 path = enumerator.Next()) {
214 // Skip over Mozilla .xpt files. 213 // Skip over Mozilla .xpt files.
215 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt"))) 214 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt")))
216 continue; 215 continue;
217 216
218 // Java doesn't like being loaded through a symlink, since it uses 217 // Java doesn't like being loaded through a symlink, since it uses
219 // its path to find dependent data files. 218 // its path to find dependent data files.
220 // MakeAbsoluteFilePath calls through to realpath(), which resolves 219 // MakeAbsoluteFilePath calls through to realpath(), which resolves
221 // symlinks. 220 // symlinks.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 293
295 // TODO(evanm): prefer the newest version of flash, etc. here? 294 // TODO(evanm): prefer the newest version of flash, etc. here?
296 295
297 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 296 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
298 297
299 return true; 298 return true;
300 } 299 }
301 300
302 } // namespace npapi 301 } // namespace npapi
303 } // namespace webkit 302 } // namespace webkit
OLDNEW
« no previous file with comments | « trunk/src/webkit/plugins/npapi/plugin_list_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698