2017-12-05 20:58:48 +00:00
|
|
|
#include "brightray/common/application_info.h"
|
|
|
|
|
2018-09-19 11:10:26 +00:00
|
|
|
#include "base/no_destructor.h"
|
|
|
|
|
2017-12-05 20:58:48 +00:00
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2018-09-13 00:25:56 +00:00
|
|
|
base::NoDestructor<std::string> g_overridden_application_name;
|
|
|
|
base::NoDestructor<std::string> g_overridden_application_version;
|
2017-12-05 20:58:48 +00:00
|
|
|
|
2018-03-12 00:33:06 +00:00
|
|
|
} // namespace
|
2017-12-05 20:58:48 +00:00
|
|
|
|
2018-03-12 00:33:06 +00:00
|
|
|
// name
|
2017-12-05 20:58:48 +00:00
|
|
|
void OverrideApplicationName(const std::string& name) {
|
2018-09-13 00:25:56 +00:00
|
|
|
*g_overridden_application_name = name;
|
2017-12-05 20:58:48 +00:00
|
|
|
}
|
2018-02-20 16:16:51 +00:00
|
|
|
std::string GetOverriddenApplicationName() {
|
2018-09-13 00:25:56 +00:00
|
|
|
return *g_overridden_application_name;
|
2018-02-20 16:16:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-12 00:33:06 +00:00
|
|
|
// version
|
2018-02-20 16:16:51 +00:00
|
|
|
void OverrideApplicationVersion(const std::string& version) {
|
2018-09-13 00:25:56 +00:00
|
|
|
*g_overridden_application_version = version;
|
2018-02-20 16:16:51 +00:00
|
|
|
}
|
|
|
|
std::string GetOverriddenApplicationVersion() {
|
2018-09-13 00:25:56 +00:00
|
|
|
return *g_overridden_application_version;
|
2017-12-05 20:58:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace brightray
|