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

Unified Diff: chrome/install_static/install_details.cc

Issue 2635953002: Use loader-based binding of GetInstallDetailsPayload for install_static. (Closed)
Patch Set: sync to position 444298 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
« no previous file with comments | « chrome/install_static/install_details.h ('k') | chrome_elf/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_details.cc
diff --git a/chrome/install_static/install_details.cc b/chrome/install_static/install_details.cc
index b0fda62fb9a5a397271e31f7510a67e93ba75d0a..688b0792db0312aee3f967b108135c031bc01d93 100644
--- a/chrome/install_static/install_details.cc
+++ b/chrome/install_static/install_details.cc
@@ -67,16 +67,11 @@ const InstallDetails::Payload* InstallDetails::GetPayload() {
}
// static
-void InstallDetails::InitializeFromPrimaryModule(
- const wchar_t* primary_module_name) {
+void InstallDetails::InitializeFromPayload(
+ const InstallDetails::Payload* payload) {
assert(!g_module_details);
- using GetInstallDetailsPayloadFunction = const Payload*(__cdecl*)();
- GetInstallDetailsPayloadFunction payload_getter =
- reinterpret_cast<GetInstallDetailsPayloadFunction>(::GetProcAddress(
- ::GetModuleHandle(primary_module_name), "GetInstallDetailsPayload"));
- assert(payload_getter);
// Intentionally leaked at shutdown.
- g_module_details = new InstallDetails(payload_getter());
+ g_module_details = new InstallDetails(payload);
}
PrimaryInstallDetails::PrimaryInstallDetails() : InstallDetails(&payload_) {
« no previous file with comments | « chrome/install_static/install_details.h ('k') | chrome_elf/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698