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

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

Issue 2572933002: [DevTools] Migrate storage domain to new generator. (Closed)
Patch Set: fixed 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 94415de7615616893ac9e7b0c6b2077af5004c00..9c3a06ce63d5d5110b8622da8ba206864be10dd6 100644
--- a/content/browser/devtools/protocol/storage_handler.cc
+++ b/content/browser/devtools/protocol/storage_handler.cc
@@ -9,14 +9,12 @@
#include <vector>
#include "base/strings/string_split.h"
-#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
-#include "content/public/browser/render_frame_host.h"
+#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
namespace content {
-namespace devtools {
-namespace storage {
+namespace protocol {
namespace {
static const char kAppCache[] = "appcache";
@@ -31,23 +29,29 @@ static const char kCacheStorage[] = "cache_storage";
static const char kAll[] = "all";
}
-typedef DevToolsProtocolClient::Response Response;
-
StorageHandler::StorageHandler()
: host_(nullptr) {
}
StorageHandler::~StorageHandler() = default;
-void StorageHandler::SetRenderFrameHost(RenderFrameHost* host) {
+void StorageHandler::Wire(UberDispatcher* dispatcher) {
+ Storage::Dispatcher::wire(dispatcher, this);
+}
+
+void StorageHandler::SetRenderFrameHost(RenderFrameHostImpl* 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("Not connected to host");
+ return Response::InternalError();
StoragePartition* partition = host_->GetProcess()->GetStoragePartition();
std::vector<std::string> types = base::SplitString(
@@ -87,6 +91,5 @@ Response StorageHandler::ClearDataForOrigin(
return Response::OK();
}
-} // namespace storage
-} // namespace devtools
+} // namespace protocol
} // 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