Changeset 100463 in webkit


Ignore:
Timestamp:
Nov 16, 2011 9:33:29 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Clean up the web database-related functions in ewk_settings.
https://bugs.webkit.org/show_bug.cgi?id=72139

Patch by Raphael Kubo da Costa <kubo@profusion.mobi> on 2011-11-16
Reviewed by Kenneth Rohde Christiansen.

Mostly remove some unnecessary ENABLE(SQL_DATABASE) checks and use a
more standard naming scheme for the related static variables.

  • ewk/ewk_settings.cpp:

(ewk_settings_web_database_default_quota_get):
(ewk_settings_web_database_path_set):
(ewk_settings_web_database_path_get):

  • ewk/ewk_settings.h: Document the default web database path on disk.
Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r100452 r100463  
     12011-11-16  Raphael Kubo da Costa  <kubo@profusion.mobi>
     2
     3        [EFL] Clean up the web database-related functions in ewk_settings.
     4        https://bugs.webkit.org/show_bug.cgi?id=72139
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Mostly remove some unnecessary ENABLE(SQL_DATABASE) checks and use a
     9        more standard naming scheme for the related static variables.
     10
     11        * ewk/ewk_settings.cpp:
     12        (ewk_settings_web_database_default_quota_get):
     13        (ewk_settings_web_database_path_set):
     14        (ewk_settings_web_database_path_get):
     15        * ewk/ewk_settings.h: Document the default web database path on disk.
     16
    1172011-11-16  Raphael Kubo da Costa  <kubo@profusion.mobi>
    218
  • trunk/Source/WebKit/efl/ewk/ewk_settings.cpp

    r100452 r100463  
    2222#include "ewk_settings.h"
    2323
     24#include "DatabaseTracker.h"
    2425#include "EWebKit.h"
    25 #if ENABLE(SQL_DATABASE)
    26 #include "DatabaseTracker.h"
    27 #endif
    2826#include "FrameView.h"
    2927#include "IconDatabase.h"
     
    5048
    5149static const char* _ewk_icon_database_path = 0;
    52 #if ENABLE(SQL_DATABASE)
    53 static const char* _ewk_default_web_database_path = 0;
    54 static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024;
    55 #endif
     50
     51static const char* s_webDatabasePath = 0;
     52static uint64_t s_webDatabaseQuota = 1 * 1024 * 1024; // 1MB.
    5653
    5754static WTF::String _ewk_settings_webkit_platform_get()
     
    8178uint64_t ewk_settings_web_database_default_quota_get()
    8279{
    83 #if ENABLE(SQL_DATABASE)
    84     return _ewk_default_web_database_quota;
    85 #else
    86     return 0;
    87 #endif
     80    return s_webDatabaseQuota;
    8881}
    8982
     
    9285#if ENABLE(SQL_DATABASE)
    9386    WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(WTF::String::fromUTF8(path));
    94     eina_stringshare_replace(&_ewk_default_web_database_path, path);
     87    eina_stringshare_replace(&s_webDatabasePath, path);
    9588#endif
    9689}
     
    9891const char* ewk_settings_web_database_path_get(void)
    9992{
    100 #if ENABLE(SQL_DATABASE)
    101     return _ewk_default_web_database_path;
    102 #else
    103     return 0;
    104 #endif
     93    return s_webDatabasePath;
    10594}
    10695
  • trunk/Source/WebKit/efl/ewk/ewk_settings.h

    r100452 r100463  
    4848 * Database databases.
    4949 *
     50 * By default, the value is @c ~/.webkit
     51 *
    5052 * @param path the new database directory path
    5153 */
     
    5456/**
    5557 * Returns directory path where web database is stored.
     58 *
     59 * By default, the value is @c ~/.webkit
    5660 *
    5761 * This is guaranteed to be eina_stringshare, so whenever possible
Note: See TracChangeset for help on using the changeset viewer.