mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
refactor: replace atom_version and friends with electron_version (#18847)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user