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

Side by Side Diff: content/public/app/android_library_loader_hooks.h

Issue 59533009: Check library version and handle library load errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to second round of review comments. Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 5 #ifndef CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
6 #define CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 6 #define CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <string>
joth 2013/11/18 19:45:23 nit - remove
aberent 2013/11/25 18:31:47 Done.
11
10 #include "base/basictypes.h" 12 #include "base/basictypes.h"
11 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
12 14
13 namespace content { 15 namespace content {
14 16
15 // Registers the callbacks that allows the entry point of the library to be 17 // Registers the callbacks that allows the entry point of the library to be
16 // exposed to the calling java code. This handles only registering the content 18 // exposed to the calling java code. This handles only registering the content
17 // specific callbacks. Any application specific JNI bindings should happen 19 // specific callbacks. Any application specific JNI bindings should happen
18 // once the native library has fully loaded. 20 // once the native library has fully loaded.
19 CONTENT_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env); 21 CONTENT_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env);
20 22
21 // Register all content JNI functions now, rather than waiting for the process 23 // Register all content JNI functions now, rather than waiting for the process
22 // of fully loading the native library to complete. This must only be called 24 // of fully loading the native library to complete. This must only be called
23 // during JNI_OnLoad. 25 // during JNI_OnLoad.
24 CONTENT_EXPORT bool EnsureJniRegistered(JNIEnv* env); 26 CONTENT_EXPORT bool EnsureJniRegistered(JNIEnv* env);
25 27
28 // Pass the version name to Content. This used to check that the library version
29 // matches the version expected by Java before completing JNI registration.
30 // Note: argument must remain valid at least until library loading is complete.
31 CONTENT_EXPORT void SetVersionNumber(const char* version_number);
32
26 // Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread 33 // Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread
27 // created. 34 // created.
28 CONTENT_EXPORT void LibraryLoaderExitHook(); 35 CONTENT_EXPORT void LibraryLoaderExitHook();
29 36
30 } // namespace content 37 } // namespace content
31 38
32 #endif // CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_ 39 #endif // CONTENT_PUBLIC_APP_ANDROID_LIBRARY_LOADER_HOOKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698