refactor: replace atom_version and friends with electron_version (#18847)

This commit is contained in:
Samuel Attard
2019-06-17 13:37:55 -07:00
committed by GitHub
parent c9bca78a7a
commit 4dc38d39e9
17 changed files with 71 additions and 70 deletions

View File

@@ -8,7 +8,7 @@
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/net/system_network_context_manager.h"
#include "atom/common/atom_version.h"
#include "atom/common/electron_version.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/node_includes.h"
@@ -77,7 +77,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(mate::Arguments* args) {
auto command_line_string =
base::CommandLine::ForCurrentProcess()->GetCommandLineString();
auto channel_string = std::string("Electron " ATOM_VERSION);
auto channel_string = std::string("Electron " ELECTRON_VERSION);
base::Value custom_constants = base::Value::FromUniquePtrValue(
net_log::ChromeNetLog::GetPlatformConstants(command_line_string,
channel_string));

View File

@@ -96,7 +96,7 @@ device::mojom::WakeLock* PowerSaveBlocker::GetWakeLock() {
wake_lock_provider->GetWakeLockWithoutContext(
device::mojom::WakeLockType::kPreventAppSuspension,
device::mojom::WakeLockReason::kOther, ATOM_PRODUCT_NAME,
device::mojom::WakeLockReason::kOther, ELECTRON_PRODUCT_NAME,
mojo::MakeRequest(&wake_lock_));
}
return wake_lock_.get();

View File

@@ -10,7 +10,7 @@
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
#include "atom/common/application_info.h"
#include "atom/common/atom_version.h"
#include "atom/common/electron_version.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/process/launch.h"

View File

@@ -12,7 +12,7 @@
#include "atom/browser/ui/win/jump_list.h"
#include "atom/common/application_info.h"
#include "atom/common/atom_version.h"
#include "atom/common/electron_version.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "base/base_paths.h"
#include "base/file_version_info.h"
@@ -338,7 +338,7 @@ std::string Browser::GetExecutableFileVersion() const {
return base::UTF16ToUTF8(version_info->product_version());
}
return ATOM_VERSION_STRING;
return ELECTRON_VERSION_STRING;
}
std::string Browser::GetExecutableFileProductName() const {

View File

@@ -71,7 +71,7 @@ struct RunState {
bool CreateDialogThread(RunState* run_state) {
auto thread =
std::make_unique<base::Thread>(ATOM_PRODUCT_NAME "FileDialogThread");
std::make_unique<base::Thread>(ELECTRON_PRODUCT_NAME "FileDialogThread");
thread->init_com_with_mta(false);
if (!thread->Start())
return false;

View File

@@ -226,7 +226,7 @@ int ShowMessageBoxSync(const MessageBoxSettings& settings) {
void ShowMessageBox(const MessageBoxSettings& settings,
MessageBoxCallback callback) {
auto thread =
std::make_unique<base::Thread>(ATOM_PRODUCT_NAME "MessageBoxThread");
std::make_unique<base::Thread>(ELECTRON_PRODUCT_NAME "MessageBoxThread");
thread->init_com_with_mta(false);
if (!thread->Start()) {
std::move(callback).Run(settings.cancel_id, settings.checkbox_checked);