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

Unified Diff: base/android/context_utils.h

Issue 1917193003: Revert of 🍈 Unify application context usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: base/android/context_utils.h
diff --git a/base/android/context_utils.h b/base/android/context_utils.h
index f172d932e969e82e71a8f99886267efd80afc325..52895a9a5306382d747942543e4492428f524a93 100644
--- a/base/android/context_utils.h
+++ b/base/android/context_utils.h
@@ -18,6 +18,14 @@
// must NOT release it.
BASE_EXPORT jobject GetApplicationContext();
+// Initialize the global application context object.
+// Either this or the Java equivalent ContextUtils.initApplicationContext must
+// be called once during startup. JNI bindings must have been initialized, as
+// the context is stored on both sides.
+BASE_EXPORT void InitApplicationContext(
+ JNIEnv* env,
+ const base::android::JavaRef<jobject>& context);
+
bool RegisterContextUtils(JNIEnv* env);
} // namespace android

Powered by Google App Engine
This is Rietveld 408576698