diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-13 18:18:41 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-13 18:18:41 +0000 |
commit | f985f3c3cea99bb8e0a8d182cc9830b9fa4b0272 (patch) | |
tree | 0a76adc73990d836b008fa0974bcc60e7b3ac5eb /chrome/common/render_messages.h | |
parent | 8d76a4a3b1051c55c772f46fa9da8531ddb4efc3 (diff) | |
download | chromium_src-f985f3c3cea99bb8e0a8d182cc9830b9fa4b0272.zip chromium_src-f985f3c3cea99bb8e0a8d182cc9830b9fa4b0272.tar.gz chromium_src-f985f3c3cea99bb8e0a8d182cc9830b9fa4b0272.tar.bz2 |
Only ask the user on setItems whether they want to allow dom storage.
Also add some plumbing for popping up an icon when it's blocked.
TEST=Turn on the ask content setting for a domain and set local storage and then clear it. Only the set should prompt you.
BUG=34668
Review URL: http://codereview.chromium.org/600078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index cd6dd75..008e53e 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -35,6 +35,7 @@ #include "media/audio/audio_output.h" #include "net/base/upload_data.h" #include "net/http/http_response_headers.h" +#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" #include "webkit/appcache/appcache_interfaces.h" #include "webkit/glue/context_menu.h" #include "webkit/glue/form_data.h" @@ -2317,6 +2318,41 @@ struct ParamTraits<DOMStorageType> { } }; +// Traits for WebKit::WebStorageArea::Result enum. +template <> +struct ParamTraits<WebKit::WebStorageArea::Result> { + typedef WebKit::WebStorageArea::Result param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast<param_type>(type); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + std::wstring control; + switch (p) { + case WebKit::WebStorageArea::ResultOK: + control = L"WebKit::WebStorageArea::ResultOK"; + break; + case WebKit::WebStorageArea::ResultBlockedByQuota: + control = L"WebKit::WebStorageArea::ResultBlockedByQuota"; + break; + case WebKit::WebStorageArea::ResultBlockedByPolicy: + control = L"WebKit::WebStorageArea::ResultBlockedByPolicy"; + break; + default: + NOTIMPLEMENTED(); + control = L"UNKNOWN"; + break; + } + LogParam(control, l); + } +}; + // Traits for ViewMsg_DOMStorageEvent_Params. template <> struct ParamTraits<ViewMsg_DOMStorageEvent_Params> { |