Commit 71c31f56 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

Explain why GetKeyValueFromOSReleaseFileForTesting() has BASE_EXPORT in the .cc file

Follow-up to commit 5b9b01f7 ("Get the distribution name from os-release
instead of lsb_release").

Borrow the comment from commit e4b86646 ("Store SupportedCodecs in
KeySystemInfo and KeySystems") to explain why we need to have BASE_EXPORT in
both the function's declaration in the header as well as its definition in
the .cc file.

Bug: 420439
Change-Id: I3616fe8a8db138a66e29df1d2debaa022a170404
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796549
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695659}
parent ca9afa66
...@@ -148,6 +148,11 @@ char g_linux_distro[kDistroSize] = ...@@ -148,6 +148,11 @@ char g_linux_distro[kDistroSize] =
"Unknown"; "Unknown";
#endif #endif
// This function is only supposed to be used in tests. The declaration in the
// header file is guarded by "#if defined(UNIT_TEST)" so that they can be used
// by tests but not non-test code. However, this .cc file is compiled as part
// of "base" where "UNIT_TEST" is not defined. So we need to specify
// "BASE_EXPORT" here again so that they are visible to tests.
BASE_EXPORT std::string GetKeyValueFromOSReleaseFileForTesting( BASE_EXPORT std::string GetKeyValueFromOSReleaseFileForTesting(
const std::string& input, const std::string& input,
const char* key) { const char* key) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment