Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: Source/core/inspector/InspectorDOMStorageAgent.cpp

Issue 21163003: DevTools: Implement undo, redo operations for the DOMStorage views. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDOMStorageAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMStorageAgent.cpp b/Source/core/inspector/InspectorDOMStorageAgent.cpp
index 8656ada90f6451c89426239fb4d0e0f07ba49828..f076ea240df7ef8993c1c72797267ddd8b60f20c 100644
--- a/Source/core/inspector/InspectorDOMStorageAgent.cpp
+++ b/Source/core/inspector/InspectorDOMStorageAgent.cpp
@@ -106,6 +106,25 @@ void InspectorDOMStorageAgent::disable(ErrorString*)
m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, false);
}
+void InspectorDOMStorageAgent::getDOMStorageItem(ErrorString* errorString, const RefPtr<JSONObject>& storageId, const String& key, bool* exists, String* value)
+{
+ Frame* frame;
+ OwnPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame);
+ if (!storageArea)
+ return;
+
+ ExceptionCode ec = 0;
+ *exists = storageArea->contains(key, ec, frame);
+ if (hadException(ec, errorString))
+ return;
+
+ if (*exists) {
+ ec = 0;
apavlov 2013/07/31 12:51:35 This is not required, since hadException() would h
+ *value = storageArea->getItem(key, ec, frame);
+ hadException(ec, errorString);
+ }
+}
+
void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, const RefPtr<JSONObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items)
{
Frame* frame;

Powered by Google App Engine
This is Rietveld 408576698