electron/shell/browser/auto_updater.cc
Samuel Attard a9ef68f126
refactor: change defined(MAS_BUILD) to IS_MAS_BUILD() (#36332)
* refactor: change defined(MAS_BUILD) to IS_MAS_BUILD()

This is missing-definition safe and thus allows us to move the definition of this macro away from "all compilation targets" to "just the compilation targets that depend on this macro".

In turn this makes the rebuild time changing from mas <-> darwin only 80 seconds on my machine, instead of the 12-15 minutes it used to take.  This will also allow us in the future to build both MAS and darwin on the same CI machine.  Costing us ~2 minutes on one machine but saving us anywhere from 30 minutes to an hour of CI time on other parts of the matrix.

* build: always define IS_MAS_BUILD even on non-mac builds

* build: use extra_configs
2022-11-14 12:46:52 -08:00

31 lines
656 B
C++

// 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 "shell/browser/auto_updater.h"
namespace auto_updater {
Delegate* AutoUpdater::delegate_ = nullptr;
Delegate* AutoUpdater::GetDelegate() {
return delegate_;
}
void AutoUpdater::SetDelegate(Delegate* delegate) {
delegate_ = delegate;
}
#if !BUILDFLAG(IS_MAC) || IS_MAS_BUILD()
std::string AutoUpdater::GetFeedURL() {
return "";
}
void AutoUpdater::SetFeedURL(gin::Arguments* args) {}
void AutoUpdater::CheckForUpdates() {}
void AutoUpdater::QuitAndInstall() {}
#endif
} // namespace auto_updater