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

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: Patch for landing after arv's changes for ExceptionState Created 7 years, 4 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
« no previous file with comments | « Source/core/inspector/InspectorDOMStorageAgent.h ('k') | Source/devtools/front_end/DOMStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMStorageAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMStorageAgent.cpp b/Source/core/inspector/InspectorDOMStorageAgent.cpp
index fd079bb7778a3204c4afe23cbf0048b354637a2f..675fff62f93b41d6f6fe6b5ce6146d2f608d662c 100644
--- a/Source/core/inspector/InspectorDOMStorageAgent.cpp
+++ b/Source/core/inspector/InspectorDOMStorageAgent.cpp
@@ -107,6 +107,22 @@ void InspectorDOMStorageAgent::disable(ErrorString*)
m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, false);
}
+void InspectorDOMStorageAgent::getValue(ErrorString* errorString, const RefPtr<JSONObject>& storageId, const String& key, TypeBuilder::OptOutput<WTF::String>* value)
+{
+ Frame* frame;
+ OwnPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame);
+ if (!storageArea)
+ return;
+
+ TrackExceptionState es;
+ bool keyPresent = storageArea->contains(key, es, frame);
+ if (hadException(es, errorString) || !keyPresent)
+ return;
+
+ *value = storageArea->getItem(key, es, frame);
+ hadException(es, errorString);
+}
+
void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, const RefPtr<JSONObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items)
{
Frame* frame;
« no previous file with comments | « Source/core/inspector/InspectorDOMStorageAgent.h ('k') | Source/devtools/front_end/DOMStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698