Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index 46e0df995800347283bff89e3fb9f0b3c3aa3ac9..3ecb6b636323b0db301f66626a4883aa183240d4 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -100,6 +100,7 @@ |
| #include "chrome/browser/webshare/share_service_impl.h" |
| #include "chrome/common/channel_info.h" |
| #include "chrome/common/chrome_constants.h" |
| +#include "chrome/common/chrome_features.h" |
| #include "chrome/common/chrome_paths.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/env_vars.h" |
| @@ -209,6 +210,8 @@ |
| #if defined(OS_WIN) |
| #include "base/strings/string_tokenizer.h" |
| #include "chrome/browser/chrome_browser_main_win.h" |
| +#include "chrome/browser/conflicts/module_database_win.h" |
| +#include "chrome/browser/conflicts/module_event_sink_impl_win.h" |
| #include "sandbox/win/src/sandbox_policy.h" |
| #elif defined(OS_MACOSX) |
| #include "chrome/browser/chrome_browser_main_mac.h" |
| @@ -2965,6 +2968,23 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer( |
| g_browser_process->rappor_service()), |
| ui_task_runner); |
| +#if defined(OS_WIN) |
| + if (base::FeatureList::IsEnabled(features::kModuleDatabase)) { |
| + // Add the ModuleDatabase interface. This is the interface used by renderer |
| + // processes to notify the browser of modules in their address space. It |
| + // ultimately drives the chrome://conflicts UI. The process handle is not |
| + // yet available at this point so pass in a callback to allow it to be |
| + // retrieved at the time the interface is actually created. |
| + auto get_process = base::Bind(&content::RenderProcessHost::GetHandle, |
| + base::Unretained(render_process_host)); |
|
grt (UTC plus 2)
2017/01/11 15:07:54
is it guaranteed that |render_process_host| will s
chrisha
2017/01/11 21:14:11
Yes, it's guaranteed as "GetInstance" is called in
|
| + registry->AddInterface( |
| + base::Bind(&ModuleEventSinkImpl::Create, std::move(get_process), |
| + content::PROCESS_TYPE_RENDERER, |
| + base::Unretained(ModuleDatabase::GetInstance())), |
| + ui_task_runner); |
| + } |
| +#endif |
| + |
| #if defined(OS_CHROMEOS) |
| registry->AddInterface<metrics::mojom::LeakDetector>( |
| base::Bind(&metrics::LeakDetectorRemoteController::Create), |