Changeset 31460 in webkit


Ignore:
Timestamp:
Mar 31, 2008 9:53:06 AM (16 years ago)
Author:
Adam Roben
Message:

Change PlatformFileTime on Windows to be time_t

This matches other platforms and our existing functions in
FileSystem.h. It will also let us get rid of PlatformFileTime
altogether.

Reviewed by Mitz Pettel.

  • platform/FileSystem.h: Change PlatformFileTime to time_t on Windows.
  • plugins/win/PluginDatabaseWin.cpp: (WebCore::addPluginsFromRegistry): Use getFileModificationTime to get the modification time to pass to PluginPackage::create. (WebCore::PluginDatabase::getPluginsInPaths): Ditto.
  • plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::hash): Updated to use m_lastModified as a time_t. (WebCore::PluginPackage::equal): Ditto.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r31459 r31460  
     12008-03-29  Adam Roben  <aroben@apple.com>
     2
     3        Change PlatformFileTime on Windows to be time_t
     4
     5        This matches other platforms and our existing functions in
     6        FileSystem.h. It will also let us get rid of PlatformFileTime
     7        altogether.
     8
     9        Reviewed by Mitz Pettel.
     10
     11        * platform/FileSystem.h: Change PlatformFileTime to time_t on Windows.
     12        * plugins/win/PluginDatabaseWin.cpp:
     13        (WebCore::addPluginsFromRegistry): Use getFileModificationTime to get
     14        the modification time to pass to PluginPackage::create.
     15        (WebCore::PluginDatabase::getPluginsInPaths): Ditto.
     16        * plugins/win/PluginPackageWin.cpp:
     17        (WebCore::PluginPackage::hash): Updated to use m_lastModified as a
     18        time_t.
     19        (WebCore::PluginPackage::equal): Ditto.
     20
    1212008-03-29  Adam Roben  <aroben@apple.com>
    222
  • trunk/WebCore/platform/FileSystem.h

    r30574 r31460  
    4848#if PLATFORM(WIN)
    4949typedef HANDLE PlatformFileHandle;
    50 typedef FILETIME PlatformFileTime;
     50typedef time_t PlatformFileTime;
    5151typedef HMODULE PlatformModule;
    5252const PlatformFileHandle invalidPlatformFileHandle = INVALID_HANDLE_VALUE;
  • trunk/WebCore/plugins/win/PluginDatabaseWin.cpp

    r31459 r31460  
    6363            continue;
    6464
    65         WIN32_FILE_ATTRIBUTE_DATA attributes;
    66         if (GetFileAttributesEx(pathStr, GetFileExInfoStandard, &attributes) == 0)
     65        String path(pathStr, pathStrSize / sizeof(WCHAR) - 1);
     66
     67        time_t modifiedTime;
     68        if (!getFileModificationTime(path, modifiedTime))
    6769            continue;
    6870
    69         RefPtr<PluginPackage> package = PluginPackage::createPackage(String(pathStr, pathStrSize / sizeof(WCHAR) - 1), attributes.ftLastWriteTime);
     71        RefPtr<PluginPackage> package = PluginPackage::createPackage(path, modifiedTime);
    7072
    7173        if (package)
     
    109111            if (!uniqueFilenames.add(fullPath).second)
    110112                continue;
     113
     114            time_t modifiedTime;
     115            if (!getFileModificationTime(fullPath, modifiedTime))
     116                continue;
    111117       
    112             RefPtr<PluginPackage> pluginPackage = PluginPackage::createPackage(fullPath, findFileData.ftLastWriteTime);
     118            RefPtr<PluginPackage> pluginPackage = PluginPackage::createPackage(fullPath, modifiedTime);
    113119
    114120            if (pluginPackage) {
Note: See TracChangeset for help on using the changeset viewer.