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

Unified Diff: chrome/install_static/initialize_from_primary_module.cc

Issue 2635953002: Use loader-based binding of GetInstallDetailsPayload for install_static. (Closed)
Patch Set: better 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/install_static/initialize_from_primary_module.cc
diff --git a/chrome/install_static/initialize_from_primary_module.cc b/chrome/install_static/initialize_from_primary_module.cc
new file mode 100644
index 0000000000000000000000000000000000000000..58584ac7350fd80d762ea6f0f769c8d677b84db1
--- /dev/null
+++ b/chrome/install_static/initialize_from_primary_module.cc
@@ -0,0 +1,20 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/install_static/initialize_from_primary_module.h"
+
+#include "chrome/install_static/install_details.h"
+
+// A function exported by the primary module, which is expected to be built with
+// the "primary_module" source set.
+extern "C" const install_static::InstallDetails::Payload __declspec(dllimport) *
+ GetInstallDetailsPayload();
+
+namespace install_static {
+
+void InitializeFromPrimaryModule() {
+ InstallDetails::InitializeFromPayload(GetInstallDetailsPayload());
+}
+
+} // namespace install_static

Powered by Google App Engine
This is Rietveld 408576698