Title: [100463] trunk/Source/WebKit/efl
Revision
100463
Author
commit-qu...@webkit.org
Date
2011-11-16 09:33:29 -0800 (Wed, 16 Nov 2011)

Log 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 <k...@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.

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (100462 => 100463)


--- trunk/Source/WebKit/efl/ChangeLog	2011-11-16 17:29:52 UTC (rev 100462)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-11-16 17:33:29 UTC (rev 100463)
@@ -1,5 +1,21 @@
 2011-11-16  Raphael Kubo da Costa  <k...@profusion.mobi>
 
+        [EFL] Clean up the web database-related functions in ewk_settings.
+        https://bugs.webkit.org/show_bug.cgi?id=72139
+
+        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.
+
+2011-11-16  Raphael Kubo da Costa  <k...@profusion.mobi>
+
         [EFL] Clean up the offline apps-related functions in ewk_settings.
         https://bugs.webkit.org/show_bug.cgi?id=72132
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_settings.cpp (100462 => 100463)


--- trunk/Source/WebKit/efl/ewk/ewk_settings.cpp	2011-11-16 17:29:52 UTC (rev 100462)
+++ trunk/Source/WebKit/efl/ewk/ewk_settings.cpp	2011-11-16 17:33:29 UTC (rev 100463)
@@ -21,10 +21,8 @@
 #include "config.h"
 #include "ewk_settings.h"
 
-#include "EWebKit.h"
-#if ENABLE(SQL_DATABASE)
 #include "DatabaseTracker.h"
-#endif
+#include "EWebKit.h"
 #include "FrameView.h"
 #include "IconDatabase.h"
 #include "Image.h"
@@ -49,11 +47,10 @@
 static const char* s_offlineAppCachePath = 0;
 
 static const char* _ewk_icon_database_path = 0;
-#if ENABLE(SQL_DATABASE)
-static const char* _ewk_default_web_database_path = 0;
-static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024;
-#endif
 
+static const char* s_webDatabasePath = 0;
+static uint64_t s_webDatabaseQuota = 1 * 1024 * 1024; // 1MB.
+
 static WTF::String _ewk_settings_webkit_platform_get()
 {
     WTF::String uaPlatform;
@@ -80,28 +77,20 @@
 
 uint64_t ewk_settings_web_database_default_quota_get()
 {
-#if ENABLE(SQL_DATABASE)
-    return _ewk_default_web_database_quota;
-#else
-    return 0;
-#endif
+    return s_webDatabaseQuota;
 }
 
 void ewk_settings_web_database_path_set(const char* path)
 {
 #if ENABLE(SQL_DATABASE)
     WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(WTF::String::fromUTF8(path));
-    eina_stringshare_replace(&_ewk_default_web_database_path, path);
+    eina_stringshare_replace(&s_webDatabasePath, path);
 #endif
 }
 
 const char* ewk_settings_web_database_path_get(void)
 {
-#if ENABLE(SQL_DATABASE)
-    return _ewk_default_web_database_path;
-#else
-    return 0;
-#endif
+    return s_webDatabasePath;
 }
 
 Eina_Bool ewk_settings_icon_database_path_set(const char* directory)

Modified: trunk/Source/WebKit/efl/ewk/ewk_settings.h (100462 => 100463)


--- trunk/Source/WebKit/efl/ewk/ewk_settings.h	2011-11-16 17:29:52 UTC (rev 100462)
+++ trunk/Source/WebKit/efl/ewk/ewk_settings.h	2011-11-16 17:33:29 UTC (rev 100463)
@@ -47,6 +47,8 @@
  * Sets the current path to the directory WebKit will write Web
  * Database databases.
  *
+ * By default, the value is @c ~/.webkit
+ *
  * @param path the new database directory path
  */
 EAPI void             ewk_settings_web_database_path_set(const char *path);
@@ -54,6 +56,8 @@
 /**
  * Returns directory path where web database is stored.
  *
+ * By default, the value is @c ~/.webkit
+ *
  * This is guaranteed to be eina_stringshare, so whenever possible
  * save yourself some cpu cycles and use eina_stringshare_ref()
  * instead of eina_stringshare_add() or strdup().
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to