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

Unified Diff: chrome/browser/conflicts/module_event_sink_impl_win.h

Issue 2613803005: [win] Enable ModuleDatabase behind a flag. (Closed)
Patch Set: Created 3 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
Index: chrome/browser/conflicts/module_event_sink_impl_win.h
diff --git a/chrome/browser/conflicts/module_event_sink_impl_win.h b/chrome/browser/conflicts/module_event_sink_impl_win.h
index f06fe849f2d078fede9a862f1872b009b4015759..f285fbb021e5dbdd079246071ace25d9b433f47b 100644
--- a/chrome/browser/conflicts/module_event_sink_impl_win.h
+++ b/chrome/browser/conflicts/module_event_sink_impl_win.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include "base/callback.h"
grt (UTC plus 2) 2017/01/06 09:44:58 will callback_forward.h work here?
chrisha 2017/01/10 21:01:46 Indeed it will!
#include "base/process/process_handle.h"
#include "chrome/common/conflicts/module_event_sink_win.mojom.h"
#include "content/public/common/process_type.h"
@@ -18,6 +19,10 @@ class ModuleDatabase;
// object.
class ModuleEventSinkImpl : public mojom::ModuleEventSink {
public:
+ // Callback for retrieving the handle associated with a process. This is used
+ // by "Create" to get a handle to the remote process.
+ using GetProcessHandleCallback = base::Callback<base::ProcessHandle()>;
+
// Creates a service endpoint that forwards notifications from the remote
// |process| of the provided |process_type| to the provided |module_database|.
// The |module_database| must outlive this object.
@@ -30,7 +35,7 @@ class ModuleEventSinkImpl : public mojom::ModuleEventSink {
// creates a concrete implementation of mojom::ModuleDatabase interface in the
// current process, for the remote process represented by the provided
// |request|. This should only be called on the UI thread.
- static void Create(base::ProcessHandle process,
+ static void Create(const GetProcessHandleCallback& get_process_handle,
grt (UTC plus 2) 2017/01/06 09:44:58 should this be passed by value as per https://chro
chrisha 2017/01/10 21:01:46 Yup... old habits die hard.
content::ProcessType process_type,
ModuleDatabase* module_database,
mojom::ModuleEventSinkRequest request);
@@ -41,6 +46,10 @@ class ModuleEventSinkImpl : public mojom::ModuleEventSink {
bool in_error() const { return in_error_; }
+ // Gets the process creation time associated with the given process.
+ static bool GetProcessCreationTime(base::ProcessHandle process,
+ uint64_t* creation_time);
+
private:
friend class ModuleEventSinkImplTest;

Powered by Google App Engine
This is Rietveld 408576698