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

Side by Side Diff: base/android/library_loader/library_loader_hooks.h

Issue 611393002: Rationalize and fix chromium android linker histogram recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_ 5 #ifndef BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
6 #define BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_ 6 #define BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
11 11
12 namespace base { 12 namespace base {
13 namespace android { 13 namespace android {
14 14
15 // Register whether loading a renderer at a fixed address failed in the
16 // chromium android linker. This value cannot be recorded when it arises
17 // because histogram reporting is not available that early in the process
18 // lifecycle. A call to this function retains the value, for later recording
19 // as a histogram.
20 BASE_EXPORT void RegisterChromiumAndroidLinkerRendererHistogram(
21 bool load_at_fixed_address_failed);
22
23 // Record a value passed to RegisterChromiumAndroidLinkerRendererHistogram
24 // as a histogram.
25 BASE_EXPORT void RecordChromiumAndroidLinkerRendererHistogram();
26
15 // Registers the callbacks that allows the entry point of the library to be 27 // 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 28 // exposed to the calling java code. This handles only registering the
17 // the callbacks needed by the loader. Any application specific JNI bindings 29 // the callbacks needed by the loader. Any application specific JNI bindings
18 // should happen once the native library has fully loaded, either in the library 30 // should happen once the native library has fully loaded, either in the library
19 // loaded hook function or later. 31 // loaded hook function or later.
20 BASE_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env); 32 BASE_EXPORT bool RegisterLibraryLoaderEntryHook(JNIEnv* env);
21 33
22 // Typedef for hook function to be called (indirectly from Java) once the 34 // Typedef for hook function to be called (indirectly from Java) once the
23 // libraries are loaded. The hook function should register the JNI bindings 35 // libraries are loaded. The hook function should register the JNI bindings
24 // required to start the application. It should return true for success and 36 // required to start the application. It should return true for success and
(...skipping 16 matching lines...) Expand all
41 BASE_EXPORT void SetVersionNumber(const char* version_number); 53 BASE_EXPORT void SetVersionNumber(const char* version_number);
42 54
43 // Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread 55 // Call on exit to delete the AtExitManager which OnLibraryLoadedOnUIThread
44 // created. 56 // created.
45 BASE_EXPORT void LibraryLoaderExitHook(); 57 BASE_EXPORT void LibraryLoaderExitHook();
46 58
47 } // namespace android 59 } // namespace android
48 } // namespace base 60 } // namespace base
49 61
50 #endif // BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_ 62 #endif // BASE_ANDROID_LIBRARY_LOADER_HOOKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698