diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 12:43:36 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 12:43:36 +0000 |
commit | a4b146fa78f4676a695f93ad4f27a7d6661cbdd3 (patch) | |
tree | 2bb81cd065fa9f50632b12c0d462af5fbd89364f /webkit/plugins/npapi | |
parent | bb7f4d3e98d48d9930502dcbf9b8eaf6f58f174d (diff) | |
download | chromium_src-a4b146fa78f4676a695f93ad4f27a7d6661cbdd3.zip chromium_src-a4b146fa78f4676a695f93ad4f27a7d6661cbdd3.tar.gz chromium_src-a4b146fa78f4676a695f93ad4f27a7d6661cbdd3.tar.bz2 |
Update our use of the NPAPI ClearSiteData API.
BUG=58235
TEST=none
Review URL: http://codereview.chromium.org/6148006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi')
-rw-r--r-- | webkit/plugins/npapi/plugin_instance.cc | 8 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_instance.h | 1 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_lib.cc | 16 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_lib.h | 7 |
4 files changed, 23 insertions, 9 deletions
diff --git a/webkit/plugins/npapi/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc index 6f65456..ca14c28 100644 --- a/webkit/plugins/npapi/plugin_instance.cc +++ b/webkit/plugins/npapi/plugin_instance.cc @@ -349,14 +349,6 @@ bool PluginInstance::NPP_Print(NPPrint* platform_print) { return false; } -NPError PluginInstance::NPP_ClearSiteData(uint64 flags, - const char* domain, - uint64 max_age) { - DCHECK(npp_functions_ != 0); - // TODO(bauerb): Call NPAPI function when it is defined in the header. - return NPERR_NO_ERROR; -} - void PluginInstance::NPP_URLRedirectNotify(const char* url, int32_t status, void* notify_data) { DCHECK(npp_functions_ != 0); diff --git a/webkit/plugins/npapi/plugin_instance.h b/webkit/plugins/npapi/plugin_instance.h index 98a5838..1161391 100644 --- a/webkit/plugins/npapi/plugin_instance.h +++ b/webkit/plugins/npapi/plugin_instance.h @@ -197,7 +197,6 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> { short NPP_HandleEvent(void*); void NPP_Destroy(); bool NPP_Print(NPPrint* platform_print); - NPError NPP_ClearSiteData(uint64, const char*, uint64); void NPP_URLRedirectNotify(const char* url, int32_t status, void* notify_data); diff --git a/webkit/plugins/npapi/plugin_lib.cc b/webkit/plugins/npapi/plugin_lib.cc index d801ee0..f0793c5 100644 --- a/webkit/plugins/npapi/plugin_lib.cc +++ b/webkit/plugins/npapi/plugin_lib.cc @@ -137,6 +137,22 @@ void PluginLib::NP_Shutdown(void) { entry_points_.np_shutdown(); } +NPError PluginLib::NP_ClearSiteData(const char* site, + uint64 flags, + uint64 max_age) { + DCHECK(initialized_); + if (plugin_funcs_.clearsitedata) + return plugin_funcs_.clearsitedata(site, flags, max_age); + return NPERR_INVALID_FUNCTABLE_ERROR; +} + +char** PluginLib::NP_GetSitesWithData() { + DCHECK(initialized_); + if (plugin_funcs_.getsiteswithdata) + return plugin_funcs_.getsiteswithdata(); + return NULL; +} + void PluginLib::PreventLibraryUnload() { skip_unload_ = true; } diff --git a/webkit/plugins/npapi/plugin_lib.h b/webkit/plugins/npapi/plugin_lib.h index 67f5d82..0eab710 100644 --- a/webkit/plugins/npapi/plugin_lib.h +++ b/webkit/plugins/npapi/plugin_lib.h @@ -78,6 +78,13 @@ class PluginLib : public base::RefCounted<PluginLib> { // NPAPI method to shutdown a Plugin. void NP_Shutdown(void); + // NPAPI method to clear locally stored data (LSO's or "Flash cookies"). + NPError NP_ClearSiteData(const char* site, uint64 flags, uint64 max_age); + + // NPAPI method to get a NULL-terminated list of all sites under which data + // is stored. + char** NP_GetSitesWithData(); + int instance_count() const { return instance_count_; } // Prevents the library code from being unload when Unload() is called (since |