OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/install_static/install_details.h" | 5 #include "chrome/install_static/install_details.h" |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <type_traits> | 10 #include <type_traits> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 assert(payload_getter); | 81 assert(payload_getter); |
82 // Intentionally leaked at shutdown. | 82 // Intentionally leaked at shutdown. |
83 g_module_details = new InstallDetails(payload_getter()); | 83 g_module_details = new InstallDetails(payload_getter()); |
84 } | 84 } |
85 | 85 |
86 PrimaryInstallDetails::PrimaryInstallDetails() : InstallDetails(&payload_) { | 86 PrimaryInstallDetails::PrimaryInstallDetails() : InstallDetails(&payload_) { |
87 payload_.size = sizeof(payload_); | 87 payload_.size = sizeof(payload_); |
88 payload_.product_version = &kProductVersion[0]; | 88 payload_.product_version = &kProductVersion[0]; |
89 } | 89 } |
90 | 90 |
| 91 // static |
| 92 PrimaryInstallDetails* PrimaryInstallDetails::GetMutable() { |
| 93 return static_cast<PrimaryInstallDetails*>(g_module_details); |
| 94 } |
| 95 |
91 } // namespace install_static | 96 } // namespace install_static |
OLD | NEW |