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

Unified Diff: content/browser/service_worker/service_worker_internals_ui.cc

Issue 1617143002: Remove "push" button from service worker internals UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « content/browser/service_worker/service_worker_internals_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_internals_ui.cc
diff --git a/content/browser/service_worker/service_worker_internals_ui.cc b/content/browser/service_worker/service_worker_internals_ui.cc
index ae899dca58d44108f095e745f2083862967ae021..c59d41f67f8c0a45a9ab81ea73f32fae1560142a 100644
--- a/content/browser/service_worker/service_worker_internals_ui.cc
+++ b/content/browser/service_worker/service_worker_internals_ui.cc
@@ -89,31 +89,6 @@ void CallServiceWorkerVersionMethodWithVersionID(
(*version.get().*method)(callback);
}
-void DispatchPushEventWithVersionID(
- scoped_refptr<ServiceWorkerContextWrapper> context,
- int64_t version_id,
- const ServiceWorkerInternalsUI::StatusCallback& callback) {
- if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(DispatchPushEventWithVersionID,
- context,
- version_id,
- callback));
- return;
- }
-
- scoped_refptr<ServiceWorkerVersion> version =
- context->GetLiveVersion(version_id);
- if (!version.get()) {
- callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
- return;
- }
- std::string data = "Test push message from ServiceWorkerInternals.";
- version->DispatchPushEvent(callback, data);
-}
-
void UpdateVersionInfo(const ServiceWorkerVersionInfo& version,
DictionaryValue* info) {
switch (version.running_status) {
@@ -358,10 +333,6 @@ ServiceWorkerInternalsUI::ServiceWorkerInternalsUI(WebUI* web_ui)
base::Unretained(this),
&ServiceWorkerVersion::StopWorker));
web_ui->RegisterMessageCallback(
- "push",
- base::Bind(&ServiceWorkerInternalsUI::DispatchPushEvent,
- base::Unretained(this)));
- web_ui->RegisterMessageCallback(
"inspect",
base::Bind(&ServiceWorkerInternalsUI::InspectWorker,
base::Unretained(this)));
@@ -510,29 +481,6 @@ void ServiceWorkerInternalsUI::CallServiceWorkerVersionMethod(
method, context, version_id, callback);
}
-void ServiceWorkerInternalsUI::DispatchPushEvent(
- const ListValue* args) {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- int callback_id;
- int partition_id;
- int64_t version_id = 0;
- std::string version_id_string;
- const DictionaryValue* cmd_args = NULL;
- scoped_refptr<ServiceWorkerContextWrapper> context;
- if (!args->GetInteger(0, &callback_id) ||
- !args->GetDictionary(1, &cmd_args) ||
- !cmd_args->GetInteger("partition_id", &partition_id) ||
- !GetServiceWorkerContext(partition_id, &context) ||
- !cmd_args->GetString("version_id", &version_id_string) ||
- !base::StringToInt64(version_id_string, &version_id)) {
- return;
- }
-
- base::Callback<void(ServiceWorkerStatusCode)> callback =
- base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id);
- DispatchPushEventWithVersionID(context, version_id, callback);
-}
-
void ServiceWorkerInternalsUI::InspectWorker(const ListValue* args) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
int callback_id;
« no previous file with comments | « content/browser/service_worker/service_worker_internals_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698