Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Unified Diff: mandoline/services/core_services/android_hooks.cc

Issue 1677293002: Bye bye Mandoline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mandoline/services/core_services/android_hooks.cc
diff --git a/mandoline/services/core_services/android_hooks.cc b/mandoline/services/core_services/android_hooks.cc
deleted file mode 100644
index beeab825f56a028b87911340f0a46c285077b924..0000000000000000000000000000000000000000
--- a/mandoline/services/core_services/android_hooks.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 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 <vector>
-
-#include "base/android/base_jni_onload.h"
-#include "base/android/context_utils.h"
-#include "base/android/jni_android.h"
-#include "base/android/library_loader/library_loader_hooks.h"
-#include "base/bind.h"
-#include "components/resource_provider/jni/Main_jni.h"
-#include "net/android/net_jni_registrar.h"
-
-namespace {
-bool RegisterJNI(JNIEnv* env) {
- return net::android::RegisterJni(env);
-}
-
-bool Init() {
- return true;
-}
-} // namespace
-
-
-// This is called by the VM when the shared library is first loaded.
-JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- std::vector<base::android::RegisterCallback> register_callbacks;
- register_callbacks.push_back(base::Bind(&RegisterJNI));
- register_callbacks.push_back(
- base::Bind(&resource_provider::RegisterNativesImpl));
-
- std::vector<base::android::InitCallback> init_callbacks;
- init_callbacks.push_back(base::Bind(&Init));
-
- if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) ||
- !base::android::OnJNIOnLoadInit(init_callbacks)) {
- return -1;
- }
-
- // There cannot be two AtExitManagers at the same time. Remove the one from
- // LibraryLoader as ApplicationRunner also uses one.
- base::android::LibraryLoaderExitHook();
-
- return JNI_VERSION_1_4;
-}
-
-extern "C" JNI_EXPORT void InitApplicationContext(
- const base::android::JavaRef<jobject>& context) {
- JNIEnv* env = base::android::AttachCurrentThread();
- base::android::InitApplicationContext(env, context);
- resource_provider::Java_Main_init(
- env, base::android::GetApplicationContext());
-}
« no previous file with comments | « mandoline/services/core_services/OWNERS ('k') | mandoline/services/core_services/application_delegate_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698