2018-10-24 10:49:10 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "atom/common/application_info.h"
|
2017-12-05 20:58:48 +00:00
|
|
|
|
2018-09-19 11:10:26 +00:00
|
|
|
#include "base/no_destructor.h"
|
|
|
|
|
2018-10-24 10:49:10 +00:00
|
|
|
namespace atom {
|
2017-12-05 20:58:48 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2018-10-24 10:49:10 +00:00
|
|
|
} // namespace atom
|