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

Side by Side Diff: chrome/browser/conflicts/module_event_sink_impl_win.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" 5 #include "chrome/browser/conflicts/module_event_sink_impl_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <psapi.h> 8 #include <psapi.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (!GetProcessCreationTime(process_, &creation_time_)) { 109 if (!GetProcessCreationTime(process_, &creation_time_)) {
110 in_error_ = true; 110 in_error_ = true;
111 return; 111 return;
112 } 112 }
113 module_database->OnProcessStarted(process_id_, creation_time_, process_type); 113 module_database->OnProcessStarted(process_id_, creation_time_, process_type);
114 } 114 }
115 115
116 ModuleEventSinkImpl::~ModuleEventSinkImpl() = default; 116 ModuleEventSinkImpl::~ModuleEventSinkImpl() = default;
117 117
118 // static 118 // static
119 void ModuleEventSinkImpl::Create(GetProcessHandleCallback get_process_handle, 119 void ModuleEventSinkImpl::Create(
120 content::ProcessType process_type, 120 GetProcessHandleCallback get_process_handle,
121 ModuleDatabase* module_database, 121 content::ProcessType process_type,
122 mojom::ModuleEventSinkRequest request) { 122 ModuleDatabase* module_database,
123 const service_manager::BindSourceInfo& source_info,
124 mojom::ModuleEventSinkRequest request) {
123 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 125 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
124 base::ProcessHandle process = get_process_handle.Run(); 126 base::ProcessHandle process = get_process_handle.Run();
125 auto module_event_sink_impl = base::MakeUnique<ModuleEventSinkImpl>( 127 auto module_event_sink_impl = base::MakeUnique<ModuleEventSinkImpl>(
126 process, process_type, module_database); 128 process, process_type, module_database);
127 base::Closure error_handler = base::Bind( 129 base::Closure error_handler = base::Bind(
128 &ModuleDatabase::OnProcessEnded, base::Unretained(module_database), 130 &ModuleDatabase::OnProcessEnded, base::Unretained(module_database),
129 module_event_sink_impl->process_id_, 131 module_event_sink_impl->process_id_,
130 module_event_sink_impl->creation_time_); 132 module_event_sink_impl->creation_time_);
131 auto binding = mojo::MakeStrongBinding(std::move(module_event_sink_impl), 133 auto binding = mojo::MakeStrongBinding(std::move(module_event_sink_impl),
132 std::move(request)); 134 std::move(request));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 module_database_->OnModuleLoad(process_id_, creation_time_, module_path, 204 module_database_->OnModuleLoad(process_id_, creation_time_, module_path,
203 module_size, module_time_date_stamp, 205 module_size, module_time_date_stamp,
204 load_address); 206 load_address);
205 } 207 }
206 208
207 void ModuleEventSinkImpl::OnModuleUnload(uint64_t load_address) { 209 void ModuleEventSinkImpl::OnModuleUnload(uint64_t load_address) {
208 // Forward this directly to the module database. 210 // Forward this directly to the module database.
209 module_database_->OnModuleUnload(process_id_, creation_time_, 211 module_database_->OnModuleUnload(process_id_, creation_time_,
210 static_cast<uintptr_t>(load_address)); 212 static_cast<uintptr_t>(load_address));
211 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/conflicts/module_event_sink_impl_win.h ('k') | chrome/browser/media/android/cdm/media_drm_storage_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698