OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/default_plugin/plugin_database_handler.h" | 5 #include "webkit/default_plugin/plugin_database_handler.h" |
6 | 6 |
7 #if defined(USE_SYSTEM_LIBXML) | 7 #if defined(USE_SYSTEM_LIBXML) |
8 #include <parser.h> | 8 #include <parser.h> |
9 #include <xpath.h> | 9 #include <xpath.h> |
10 #else | 10 #else |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // The time in days for which the plugins list is cached. | 42 // The time in days for which the plugins list is cached. |
43 // TODO(iyengar) Make this configurable. | 43 // TODO(iyengar) Make this configurable. |
44 const int kPluginsListCacheTimeInDays = 3; | 44 const int kPluginsListCacheTimeInDays = 3; |
45 | 45 |
46 plugin_finder_url_ = plugin_finder_url; | 46 plugin_finder_url_ = plugin_finder_url; |
47 | 47 |
48 PathService::Get(base::DIR_MODULE, &plugins_file_); | 48 PathService::Get(base::DIR_MODULE, &plugins_file_); |
49 plugins_file_ += L"\\chrome_plugins_file.xml"; | 49 plugins_file_ += L"\\chrome_plugins_file.xml"; |
50 | 50 |
51 bool initiate_download = false; | 51 bool initiate_download = false; |
52 if (!file_util::PathExists(FilePath::FromWStringHack(plugins_file_))) { | 52 if (!file_util::PathExists(plugins_file_)) { |
53 initiate_download = true; | 53 initiate_download = true; |
54 } else { | 54 } else { |
55 SYSTEMTIME creation_system_time = {0}; | 55 SYSTEMTIME creation_system_time = {0}; |
56 if (!file_util::GetFileCreationLocalTime(plugins_file_, | 56 if (!file_util::GetFileCreationLocalTime(plugins_file_, |
57 &creation_system_time)) { | 57 &creation_system_time)) { |
58 NOTREACHED(); | 58 NOTREACHED(); |
59 return false; | 59 return false; |
60 } | 60 } |
61 | 61 |
62 FILETIME creation_file_time = {0}; | 62 FILETIME creation_file_time = {0}; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 reinterpret_cast<const char*>(plugin_download_url_val->content); | 348 reinterpret_cast<const char*>(plugin_download_url_val->content); |
349 | 349 |
350 SplitString(reinterpret_cast<const char*>(plugin_mime_type_vals->content), | 350 SplitString(reinterpret_cast<const char*>(plugin_mime_type_vals->content), |
351 kMimeTypeSeparator, &plugin_detail->mime_types); | 351 kMimeTypeSeparator, &plugin_detail->mime_types); |
352 | 352 |
353 plugin_detail->language = | 353 plugin_detail->language = |
354 reinterpret_cast<const char*>(plugin_lang_val->content); | 354 reinterpret_cast<const char*>(plugin_lang_val->content); |
355 | 355 |
356 return true; | 356 return true; |
357 } | 357 } |
OLD | NEW |