FoxiGram/TMessagesProj/jni/voip/webrtc/base/debug/crash_logging.cc
instant992 8e79f2ee9c FoxiGram: Telegram client with built-in Xray VLESS proxy
Based on Nekogram. Key additions:
- Rebrand to FoxiGram (app name, APK name, applicationId com.foxigram.app)
- Embedded Xray (VLESS+Reality) proxy client via JNI libxray.so
- Bundled hidden one-tap proxies (LTE + WiFi), read-only in UI
- Auto-restore proxy on restart, rebind to active network (LTE/WiFi)
- Server credentials externalized to git-ignored XrayServers.java (+ template)
- libxray Go source included; compiled .so, keystore, google-services.json ignored
2026-06-08 16:41:07 +04:00

54 lines
1.3 KiB
C++

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/debug/crash_logging.h"
namespace base {
namespace debug {
namespace {
CrashKeyImplementation* g_crash_key_impl = nullptr;
} // namespace
CrashKeyString* AllocateCrashKeyString(const char name[],
CrashKeySize value_length) {
if (!g_crash_key_impl)
return nullptr;
return g_crash_key_impl->Allocate(name, value_length);
}
void SetCrashKeyString(CrashKeyString* crash_key, base::StringPiece value) {
if (!g_crash_key_impl || !crash_key)
return;
g_crash_key_impl->Set(crash_key, value);
}
void ClearCrashKeyString(CrashKeyString* crash_key) {
if (!g_crash_key_impl || !crash_key)
return;
g_crash_key_impl->Clear(crash_key);
}
ScopedCrashKeyString::ScopedCrashKeyString(CrashKeyString* crash_key,
base::StringPiece value)
: crash_key_(crash_key) {
SetCrashKeyString(crash_key_, value);
}
ScopedCrashKeyString::~ScopedCrashKeyString() {
ClearCrashKeyString(crash_key_);
}
void SetCrashKeyImplementation(std::unique_ptr<CrashKeyImplementation> impl) {
delete g_crash_key_impl;
g_crash_key_impl = impl.release();
}
} // namespace debug
} // namespace base