Changeset 107260 in webkit
- Timestamp:
- Feb 9, 2012 10:38:06 AM (12 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/CMakeListsEfl.txt
r104960 r107260 74 74 efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp 75 75 efl/WebCoreSupport/IconDatabaseClientEfl.cpp 76 efl/WebCoreSupport/StorageTrackerClientEfl.cpp 76 77 efl/WebCoreSupport/InspectorClientEfl.cpp 77 78 efl/WebCoreSupport/NotificationPresenterClientEfl.cpp -
trunk/Source/WebKit/efl/ChangeLog
r107010 r107260 1 2012-02-09 Gustavo Lima Chaves <glima@profusion.mobi> 2 3 [EFL] Introducing functions to set local storage db path and clear 4 those dbs. 5 https://bugs.webkit.org/show_bug.cgi?id=77107 6 7 This patch exposes the web local storage tracker database path 8 setting cabability, introduced on bug 77006, to the EFL port of 9 WebKit. Particularly, we have our own storage tracker client 10 object, to initialize the storage tracker backend on ewk_init(). 11 12 Reviewed by Kenneth Rohde Christiansen. 13 14 * CMakeListsEfl.txt: 15 * WebCoreSupport/StorageTrackerClientEfl.cpp: Added. 16 (WebCore): 17 (WebCore::StorageTrackerClientEfl::dispatchDidModifyOrigin): 18 (WebCore::StorageTrackerClientEfl::didFinishLoadingOrigins): 19 * WebCoreSupport/StorageTrackerClientEfl.h: Added. 20 (WebCore): 21 (StorageTrackerClientEfl): 22 * ewk/ewk_main.cpp: 23 (trackerClient): 24 (_ewk_init_body): 25 * ewk/ewk_settings.cpp: 26 (ewk_settings_local_storage_path_set): 27 (ewk_settings_local_storage_path_get): 28 (ewk_settings_local_storage_database_clear): 29 (ewk_settings_local_storage_database_origin_clear): 30 * ewk/ewk_settings.h: 31 1 32 2012-02-07 Krzysztof Czech <k.czech@samsung.com> 2 33 -
trunk/Source/WebKit/efl/ewk/ewk_main.cpp
r106760 r107260 28 28 #include "ScriptController.h" 29 29 #include "Settings.h" 30 #include "StorageTracker.h" 31 #include "StorageTrackerClientEfl.h" 30 32 #include "ewk_logging.h" 31 33 #include "ewk_network.h" … … 136 138 } 137 139 140 static WebCore::StorageTrackerClientEfl* trackerClient() 141 { 142 DEFINE_STATIC_LOCAL(WebCore::StorageTrackerClientEfl, trackerClient, ()); 143 return &trackerClient; 144 } 145 138 146 Eina_Bool _ewk_init_body(void) 139 147 { … … 175 183 ewk_network_tls_certificate_check_set(false); 176 184 185 WebCore::StorageTracker::initializeTracker(webkitDirectory.utf8().data(), trackerClient()); 186 177 187 // TODO: this should move to WebCore, already reported to webkit-gtk folks: 178 188 #if USE(SOUP) -
trunk/Source/WebKit/efl/ewk/ewk_settings.cpp
r102971 r107260 25 25 #include "CrossOriginPreflightResultCache.h" 26 26 #include "DatabaseTracker.h" 27 #include "StorageTracker.h" 27 28 #include "FontCache.h" 28 29 #include "FrameView.h" … … 58 59 59 60 static const char* s_webDatabasePath = 0; 61 static const char* s_localStoragePath = 0; 60 62 static uint64_t s_webDatabaseQuota = 1 * 1024 * 1024; // 1MB. 61 63 … … 112 114 } 113 115 116 void ewk_settings_local_storage_path_set(const char* path) 117 { 118 WebCore::StorageTracker::tracker().setDatabaseDirectoryPath(WTF::String::fromUTF8(path)); 119 eina_stringshare_replace(&s_localStoragePath, path); 120 } 121 122 const char* ewk_settings_local_storage_path_get(void) 123 { 124 return s_localStoragePath; 125 } 126 127 void ewk_settings_local_storage_database_clear() 128 { 129 WebCore::StorageTracker::tracker().deleteAllOrigins(); 130 } 131 132 void ewk_settings_local_storage_database_origin_clear(const char* url) 133 { 134 EINA_SAFETY_ON_NULL_RETURN(url); 135 136 const WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url)); 137 WebCore::StorageTracker::tracker().deleteOrigin(WebCore::SecurityOrigin::create(kurl).get()); 138 } 139 114 140 void ewk_settings_web_database_path_set(const char* path) 115 141 { -
trunk/Source/WebKit/efl/ewk/ewk_settings.h
r102971 r107260 67 67 */ 68 68 EAPI void ewk_settings_web_database_path_set(const char *path); 69 70 /** 71 * Sets the current path to the directory where WebKit will write the 72 * HTML5 local storage indexing database (the one keeping track of 73 * individual views' local storage databases). 74 * 75 * By default, the value is @c ~/.webkit 76 * 77 * @param path the new local storage database directory path 78 * 79 * @note You may want to call 80 * ewk_view_setting_local_storage_database_path_set() on the same @p 81 * path, here, for your views. 82 */ 83 EAPI void ewk_settings_local_storage_path_set(const char* path); 84 85 /** 86 * Returns directory's path where the HTML5 local storage indexing 87 * database is stored. 88 * 89 * This is guaranteed to be eina-stringshared, so whenever possible 90 * save yourself some cpu cycles and use eina_stringshare_ref() 91 * instead of eina_stringshare_add() or strdup(). 92 * 93 * @return database path or @c NULL, on errors. 94 * 95 * @see ewk_settings_local_storage_path_set() 96 */ 97 EAPI const char* ewk_settings_local_storage_path_get(void); 98 99 /** 100 * Removes @b all HTML 5 local storage databases. 101 */ 102 EAPI void ewk_settings_local_storage_database_clear(); 103 104 /** 105 * Clears the HTML 5 local storage database for the given URL 106 * (origin). 107 * 108 * @param url which URL to clear local storage to. 109 * 110 * After this call, the file holding the local storage database for 111 * that origin will be deleted, along with its entry on the local 112 * storage files database (a file stored under the path returned by 113 * ewk_settings_local_storage_path_get()). 114 */ 115 EAPI void ewk_settings_local_storage_database_origin_clear(const char *url); 69 116 70 117 /**
Note: See TracChangeset
for help on using the changeset viewer.