Commit 7e871f14 authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Migrate ModuleEventSink to the new Mojo types

Convert the remaining references to the old Mojo types from the
mojom::ModuleEventSink interface.

Bug: 955171
Change-Id: I130747ca282ac78fe4046ff50c3d942f51661d86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813324
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarPatrick Monette <pmonette@chromium.org>
Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698637}
parent 2eb7b4f7
......@@ -21,7 +21,7 @@
#include "base/threading/sequenced_task_runner_handle.h"
#include "chrome/browser/win/conflicts/module_database.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
namespace {
......@@ -157,15 +157,15 @@ void ModuleEventSinkImpl::Create(
GetProcessCallback get_process,
content::ProcessType process_type,
const OnModuleLoadCallback& on_module_load_callback,
mojom::ModuleEventSinkRequest request) {
mojo::PendingReceiver<mojom::ModuleEventSink> receiver) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
base::Process process = get_process.Run();
if (!process.IsValid())
return;
auto module_event_sink_impl = std::make_unique<ModuleEventSinkImpl>(
std::move(process), process_type, on_module_load_callback);
mojo::MakeStrongBinding(std::move(module_event_sink_impl),
std::move(request));
mojo::MakeSelfOwnedReceiver(std::move(module_event_sink_impl),
std::move(receiver));
}
void ModuleEventSinkImpl::OnModuleEvents(
......
......@@ -14,6 +14,7 @@
#include "base/process/process.h"
#include "chrome/common/conflicts/module_event_sink_win.mojom.h"
#include "content/public/common/process_type.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
namespace base {
class FilePath;
......@@ -49,7 +50,7 @@ class ModuleEventSinkImpl : public mojom::ModuleEventSink {
static void Create(GetProcessCallback get_process,
content::ProcessType process_type,
const OnModuleLoadCallback& on_module_load_callback,
mojom::ModuleEventSinkRequest request);
mojo::PendingReceiver<mojom::ModuleEventSink> receiver);
// mojom::ModuleEventSink implementation:
void OnModuleEvents(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment