Changeset 64812 in webkit


Ignore:
Timestamp:
Aug 5, 2010 7:51:19 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-08-05 Patrick Gansterer <paroga@paroga.com>

Reviewed by Adam Roben.

Make SearchPopupMenuWin more portable
https://bugs.webkit.org/show_bug.cgi?id=43527

Add #if PLATFORM(CF) around CoreFoundation code.

  • platform/win/SearchPopupMenuWin.cpp: (WebCore::SearchPopupMenuWin::enabled): (WebCore::SearchPopupMenuWin::saveRecentSearches): (WebCore::SearchPopupMenuWin::loadRecentSearches):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64810 r64812  
     12010-08-05  Patrick Gansterer  <paroga@paroga.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Make SearchPopupMenuWin more portable
     6        https://bugs.webkit.org/show_bug.cgi?id=43527
     7
     8        Add #if PLATFORM(CF) around CoreFoundation code.
     9
     10        * platform/win/SearchPopupMenuWin.cpp:
     11        (WebCore::SearchPopupMenuWin::enabled):
     12        (WebCore::SearchPopupMenuWin::saveRecentSearches):
     13        (WebCore::SearchPopupMenuWin::loadRecentSearches):
     14
    1152010-08-05  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/WebCore/platform/win/SearchPopupMenuWin.cpp

    r64513 r64812  
    2323
    2424#include "AtomicString.h"
     25
     26#if PLATFORM(CF)
    2527#include <wtf/RetainPtr.h>
     28#endif
    2629
    2730namespace WebCore {
     
    3942bool SearchPopupMenuWin::enabled()
    4043{
     44#if PLATFORM(CF)
    4145    return true;
     46#else
     47    return false;
     48#endif
    4249}
    4350
     51#if PLATFORM(CF)
    4452static RetainPtr<CFStringRef> autosaveKey(const String& name)
    4553{
     
    4755    return RetainPtr<CFStringRef>(AdoptCF, key.createCFString());
    4856}
     57#endif
    4958
    5059void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)
     
    5362        return;
    5463
     64#if PLATFORM(CF)
    5565    RetainPtr<CFMutableArrayRef> items;
    5666
     
    6676    CFPreferencesSetAppValue(autosaveKey(name).get(), items.get(), kCFPreferencesCurrentApplication);
    6777    CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
     78#endif
    6879}
    6980
     
    7384        return;
    7485
     86#if PLATFORM(CF)
    7587    searchItems.clear();
    7688    RetainPtr<CFArrayRef> items(AdoptCF, reinterpret_cast<CFArrayRef>(CFPreferencesCopyAppValue(autosaveKey(name).get(), kCFPreferencesCurrentApplication)));
     
    8597            searchItems.append(item);
    8698    }
     99#endif
    87100}
    88101
Note: See TracChangeset for help on using the changeset viewer.