OLD | NEW |
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 Loading... |
538 path = orig_path; | 538 path = orig_path; |
539 } else { | 539 } else { |
540 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 540 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
541 << "Flash misbehaves when used from a directory containing " | 541 << "Flash misbehaves when used from a directory containing " |
542 << kNetscapeInPath << ", so skipping " << orig_path.value(); | 542 << kNetscapeInPath << ", so skipping " << orig_path.value(); |
543 continue; | 543 continue; |
544 } | 544 } |
545 } | 545 } |
546 | 546 |
547 // Get mtime. | 547 // Get mtime. |
548 base::PlatformFileInfo info; | 548 base::File::Info info; |
549 if (!base::GetFileInfo(path, &info)) | 549 if (!base::GetFileInfo(path, &info)) |
550 continue; | 550 continue; |
551 | 551 |
552 files.push_back(std::make_pair(path, info.last_modified)); | 552 files.push_back(std::make_pair(path, info.last_modified)); |
553 } | 553 } |
554 | 554 |
555 // Sort the file list by time (and filename). | 555 // Sort the file list by time (and filename). |
556 std::sort(files.begin(), files.end(), CompareTime); | 556 std::sort(files.begin(), files.end(), CompareTime); |
557 | 557 |
558 // Load the files in order. | 558 // Load the files in order. |
(...skipping 26 matching lines...) Expand all Loading... |
585 } | 585 } |
586 | 586 |
587 // TODO(evanm): prefer the newest version of flash, etc. here? | 587 // TODO(evanm): prefer the newest version of flash, etc. here? |
588 | 588 |
589 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); | 589 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); |
590 | 590 |
591 return true; | 591 return true; |
592 } | 592 } |
593 | 593 |
594 } // namespace content | 594 } // namespace content |
OLD | NEW |