| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/glue/plugins/plugin_list.h" | 5 #include "webkit/glue/plugins/plugin_list.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/sha1.h" | 9 #include "base/sha1.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 path = orig_path; | 213 path = orig_path; |
| 214 } else { | 214 } else { |
| 215 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 215 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
| 216 << "Flash misbehaves when used from a directory containing " | 216 << "Flash misbehaves when used from a directory containing " |
| 217 << kNetscapeInPath << ", so skipping " << orig_path.value(); | 217 << kNetscapeInPath << ", so skipping " << orig_path.value(); |
| 218 continue; | 218 continue; |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 // Get mtime. | 222 // Get mtime. |
| 223 file_util::FileInfo info; | 223 base::PlatformFileInfo info; |
| 224 if (!file_util::GetFileInfo(path, &info)) | 224 if (!file_util::GetFileInfo(path, &info)) |
| 225 continue; | 225 continue; |
| 226 | 226 |
| 227 files.push_back(std::make_pair(path, info.last_modified)); | 227 files.push_back(std::make_pair(path, info.last_modified)); |
| 228 } | 228 } |
| 229 | 229 |
| 230 // Sort the file list by time (and filename). | 230 // Sort the file list by time (and filename). |
| 231 std::sort(files.begin(), files.end(), CompareTime); | 231 std::sort(files.begin(), files.end(), CompareTime); |
| 232 | 232 |
| 233 // Load the files in order. | 233 // Load the files in order. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 261 | 261 |
| 262 // TODO(evanm): prefer the newest version of flash, etc. here? | 262 // TODO(evanm): prefer the newest version of flash, etc. here? |
| 263 | 263 |
| 264 LOG_IF(INFO, PluginList::DebugPluginLoading()) | 264 LOG_IF(INFO, PluginList::DebugPluginLoading()) |
| 265 << "Using " << info.path.value(); | 265 << "Using " << info.path.value(); |
| 266 | 266 |
| 267 return true; | 267 return true; |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace NPAPI | 270 } // namespace NPAPI |
| OLD | NEW |