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

Unified Diff: content/child/push_messaging/push_dispatcher.h

Issue 2690203003: Convert push_messaging IPC msgs into mojo interfaces (Closed)
Patch Set: code rebase Created 3 years, 10 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/child/child_thread_impl.cc ('k') | content/child/push_messaging/push_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/push_messaging/push_dispatcher.h
diff --git a/content/child/push_messaging/push_dispatcher.h b/content/child/push_messaging/push_dispatcher.h
deleted file mode 100644
index bdd8167d9ade299a783990e1a587eab99d5933e6..0000000000000000000000000000000000000000
--- a/content/child/push_messaging/push_dispatcher.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_CHILD_PUSH_MESSAGING_PUSH_DISPATCHER_H_
-#define CONTENT_CHILD_PUSH_MESSAGING_PUSH_DISPATCHER_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "base/synchronization/lock.h"
-#include "content/child/worker_thread_message_filter.h"
-
-namespace content {
-
-class PushDispatcher : public WorkerThreadMessageFilter {
- public:
- explicit PushDispatcher(ThreadSafeSender* thread_safe_sender);
-
- // Generates a process-unique new request id. Stores it in a map as key to
- // |thread_id| and returns it. This method can be called on any thread.
- // Note that the registration requests from document contexts do not go via
- // this class and their request ids may overlap with the ones generated here.
- int GenerateRequestId(int thread_id);
-
- protected:
- ~PushDispatcher() override;
-
- private:
- // WorkerThreadMessageFilter:
- bool ShouldHandleMessage(const IPC::Message& msg) const override;
- void OnFilteredMessageReceived(const IPC::Message& msg) override;
- bool GetWorkerThreadIdForMessage(const IPC::Message& msg,
- int* ipc_thread_id) override;
-
- base::Lock request_id_map_lock_;
- std::map<int, int> request_id_map_; // Maps request id to thread id.
- int next_request_id_;
-
- DISALLOW_COPY_AND_ASSIGN(PushDispatcher);
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_DISPATCHER_H_
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/child/push_messaging/push_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698