| Index: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
|
| ===================================================================
|
| --- chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (revision 22402)
|
| +++ chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (working copy)
|
| @@ -14,9 +14,11 @@
|
| #include "webkit/api/public/WebStorageArea.h"
|
| #include "webkit/api/public/WebStorageNamespace.h"
|
| #include "webkit/api/public/WebString.h"
|
| +#include "webkit/glue/webkit_glue.h"
|
|
|
| using WebKit::WebStorageArea;
|
| using WebKit::WebStorageNamespace;
|
| +using WebKit::WebString;
|
|
|
| DOMStorageDispatcherHost::DOMStorageDispatcherHost(
|
| IPC::Message::Sender* message_sender,
|
| @@ -281,7 +283,7 @@
|
| DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
|
| WebStorageArea* storage_area = GetStorageArea(storage_area_id);
|
| CHECK(storage_area); // TODO(jorlow): Do better than this.
|
| - WebKit::WebString value = storage_area->getItem(key);
|
| + WebString value = storage_area->getItem(key);
|
| ViewHostMsg_DOMStorageGetItem::WriteReplyParams(reply_msg, (string16)value,
|
| value.isNull());
|
| Send(reply_msg);
|
| @@ -375,8 +377,10 @@
|
| return new_namespace_id;
|
| }
|
|
|
| -string16 DOMStorageDispatcherHost::GetLocalStoragePath() {
|
| - // TODO(jorlow): Create a path based on the WebKitContext.
|
| - string16 path;
|
| - return path;
|
| +WebString DOMStorageDispatcherHost::GetLocalStoragePath() {
|
| + const FilePath& path = webkit_context_->data_path();
|
| + if (path.empty())
|
| + return WebString();
|
| + FilePath::StringType path_string = path.AppendASCII("localStorage").value();
|
| + return webkit_glue::FilePathStringToWebString(path_string);
|
| }
|
|
|