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

Side by Side Diff: content/common/plugin_list_posix.cc

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « content/child/npapi/plugin_host.cc ('k') | net/base/upload_data_stream_unittest.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 "content/common/plugin_list.h" 5 #include "content/common/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 #if defined(OS_OPENBSD) 9 #if defined(OS_OPENBSD)
10 #include <sys/exec_elf.h> 10 #include <sys/exec_elf.h>
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } else { 538 } else {
539 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 539 LOG_IF(ERROR, PluginList::DebugPluginLoading())
540 << "Flash misbehaves when used from a directory containing " 540 << "Flash misbehaves when used from a directory containing "
541 << kNetscapeInPath << ", so skipping " << orig_path.value(); 541 << kNetscapeInPath << ", so skipping " << orig_path.value();
542 continue; 542 continue;
543 } 543 }
544 } 544 }
545 545
546 // Get mtime. 546 // Get mtime.
547 base::PlatformFileInfo info; 547 base::PlatformFileInfo info;
548 if (!file_util::GetFileInfo(path, &info)) 548 if (!base::GetFileInfo(path, &info))
549 continue; 549 continue;
550 550
551 files.push_back(std::make_pair(path, info.last_modified)); 551 files.push_back(std::make_pair(path, info.last_modified));
552 } 552 }
553 553
554 // Sort the file list by time (and filename). 554 // Sort the file list by time (and filename).
555 std::sort(files.begin(), files.end(), CompareTime); 555 std::sort(files.begin(), files.end(), CompareTime);
556 556
557 // Load the files in order. 557 // Load the files in order.
558 for (FileTimeList::const_iterator i = files.begin(); i != files.end(); ++i) { 558 for (FileTimeList::const_iterator i = files.begin(); i != files.end(); ++i) {
(...skipping 25 matching lines...) Expand all
584 } 584 }
585 585
586 // TODO(evanm): prefer the newest version of flash, etc. here? 586 // TODO(evanm): prefer the newest version of flash, etc. here?
587 587
588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
589 589
590 return true; 590 return true;
591 } 591 }
592 592
593 } // namespace content 593 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/plugin_host.cc ('k') | net/base/upload_data_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698