Chromium changes: https://chromium.googlesource.com/chromium/src/+/37865ec47270489182e954bb9a6dc32c04fd51d7 commit 37865ec47270489182e954bb9a6dc32c04fd51d7 Author: Martin Kong <martinkong@google.com> Date: Mon Dec 1 08:47:18 2025 -0800 Add DEFINE_JNI macro to the end of every file (part 1) This CL adds DEFINE_JNI(ClassName) macro to the end of every file that includes ClassName_jni.h. Currently the macro expands to nothing. Bug: 346596940 Change-Id: I61da4d1cc46f71d8ede30f74b267237a5f8cf14f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206009 Commit-Queue: Andrew Grieve <agrieve@chromium.org> Auto-Submit: Martin Kong <martinkong@google.com> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Owners-Override: Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/main@{#1552186}
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
// Copyright (c) 2023 The Brave Authors. All rights reserved.
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
#include <string>
|
|
|
|
#include "base/android/jni_android.h"
|
|
#include "base/android/jni_string.h"
|
|
#include "brave/browser/android/safe_browsing/buildflags.h"
|
|
#include "brave/browser/brave_browser_process.h"
|
|
#include "brave/browser/brave_stats/brave_stats_updater.h"
|
|
#include "chrome/android/chrome_jni_headers/BraveActivity_jni.h"
|
|
|
|
namespace chrome {
|
|
namespace android {
|
|
|
|
static void JNI_BraveActivity_RestartStatsUpdater(JNIEnv* env) {
|
|
g_brave_browser_process->brave_stats_updater()->Stop();
|
|
g_brave_browser_process->brave_stats_updater()->Start();
|
|
}
|
|
|
|
static base::android::ScopedJavaLocalRef<jstring>
|
|
JNI_BraveActivity_GetSafeBrowsingApiKey(JNIEnv* env) {
|
|
return base::android::ConvertUTF8ToJavaString(
|
|
env, BUILDFLAG(SAFEBROWSING_API_KEY));
|
|
}
|
|
|
|
} // namespace android
|
|
} // namespace chrome
|
|
|
|
DEFINE_JNI(BraveActivity)
|