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

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

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 7 years, 8 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 | « webkit/glue/webfileutilities_impl.cc ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | 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) 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"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 false, // not recursive 209 false, // not recursive
210 file_util::FileEnumerator::FILES); 210 file_util::FileEnumerator::FILES);
211 for (base::FilePath path = enumerator.Next(); !path.value().empty(); 211 for (base::FilePath path = enumerator.Next(); !path.value().empty();
212 path = enumerator.Next()) { 212 path = enumerator.Next()) {
213 // Skip over Mozilla .xpt files. 213 // Skip over Mozilla .xpt files.
214 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt"))) 214 if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt")))
215 continue; 215 continue;
216 216
217 // 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
218 // its path to find dependent data files. 218 // its path to find dependent data files.
219 // file_util::AbsolutePath calls through to realpath(), which resolves 219 // MakeAbsoluteFilePath calls through to realpath(), which resolves
220 // symlinks. 220 // symlinks.
221 base::FilePath orig_path = path; 221 base::FilePath orig_path = base::MakeAbsoluteFilePath(path);
Steve Block 2013/05/07 06:46:28 Shouldn't this be 'path = ...', and orig_path shou
222 file_util::AbsolutePath(&path);
223 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 222 LOG_IF(ERROR, PluginList::DebugPluginLoading())
224 << "Resolved " << orig_path.value() << " -> " << path.value(); 223 << "Resolved " << orig_path.value() << " -> " << path.value();
225 224
226 if (std::find(plugins->begin(), plugins->end(), path) != plugins->end()) { 225 if (std::find(plugins->begin(), plugins->end(), path) != plugins->end()) {
227 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 226 LOG_IF(ERROR, PluginList::DebugPluginLoading())
228 << "Skipping duplicate instance of " << path.value(); 227 << "Skipping duplicate instance of " << path.value();
229 continue; 228 continue;
230 } 229 }
231 230
232 if (IsBlacklistedPlugin(path)) { 231 if (IsBlacklistedPlugin(path)) {
(...skipping 61 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 | « webkit/glue/webfileutilities_impl.cc ('k') | webkit/plugins/npapi/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698