perf: cache whether or not ELECTRON_DEBUG_NOTIFICATIONS env var is set (#45162)
* perf: cache whether or not ELECTRON_DEBUG_NOTIFICATIONS env var is set Co-authored-by: Charles Kerr <charles@charleskerr.com> * chore: remove unused #include Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
b70d2944ff
commit
3a4edd7a2b
7 changed files with 12 additions and 12 deletions
|
@ -13,7 +13,6 @@
|
|||
#include <shlobj.h>
|
||||
#include <wrl\wrappers\corewrappers.h>
|
||||
|
||||
#include "base/environment.h"
|
||||
#include "base/hash/hash.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/strcat.h"
|
||||
|
@ -68,7 +67,7 @@ namespace {
|
|||
constexpr wchar_t kGroup[] = L"Notifications";
|
||||
|
||||
void DebugLog(std::string_view log_msg) {
|
||||
if (base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS"))
|
||||
if (electron::debug_notifications)
|
||||
LOG(INFO) << log_msg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue