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

Unified Diff: content/browser/devtools/protocol/storage_handler.cc

Issue 2576643003: Revert of [DevTools] Migrate storage domain to new generator. (Closed)
Patch Set: Created 4 years 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 | « content/browser/devtools/protocol/storage_handler.h ('k') | content/browser/devtools/protocol_config.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/storage_handler.cc
diff --git a/content/browser/devtools/protocol/storage_handler.cc b/content/browser/devtools/protocol/storage_handler.cc
index 9c3a06ce63d5d5110b8622da8ba206864be10dd6..94415de7615616893ac9e7b0c6b2077af5004c00 100644
--- a/content/browser/devtools/protocol/storage_handler.cc
+++ b/content/browser/devtools/protocol/storage_handler.cc
@@ -9,12 +9,14 @@
#include <vector>
#include "base/strings/string_split.h"
-#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
namespace content {
-namespace protocol {
+namespace devtools {
+namespace storage {
namespace {
static const char kAppCache[] = "appcache";
@@ -29,29 +31,23 @@
static const char kAll[] = "all";
}
+typedef DevToolsProtocolClient::Response Response;
+
StorageHandler::StorageHandler()
: host_(nullptr) {
}
StorageHandler::~StorageHandler() = default;
-void StorageHandler::Wire(UberDispatcher* dispatcher) {
- Storage::Dispatcher::wire(dispatcher, this);
-}
-
-void StorageHandler::SetRenderFrameHost(RenderFrameHostImpl* host) {
+void StorageHandler::SetRenderFrameHost(RenderFrameHost* host) {
host_ = host;
-}
-
-Response StorageHandler::Disable() {
- return Response::OK();
}
Response StorageHandler::ClearDataForOrigin(
const std::string& origin,
const std::string& storage_types) {
if (!host_)
- return Response::InternalError();
+ return Response::InternalError("Not connected to host");
StoragePartition* partition = host_->GetProcess()->GetStoragePartition();
std::vector<std::string> types = base::SplitString(
@@ -91,5 +87,6 @@
return Response::OK();
}
-} // namespace protocol
+} // namespace storage
+} // namespace devtools
} // namespace content
« no previous file with comments | « content/browser/devtools/protocol/storage_handler.h ('k') | content/browser/devtools/protocol_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698