diff options
author | sungmann.cho@navercorp.com <sungmann.cho@navercorp.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-19 11:13:43 +0000 |
---|---|---|
committer | sungmann.cho@navercorp.com <sungmann.cho@navercorp.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-19 11:13:43 +0000 |
commit | 20088466072f55bc7daa91a96375275a30f0330f (patch) | |
tree | ab341443535bd7fe4b09435b076562b847e5383b /base/android | |
parent | 3bcaeac0630768e3c372b87f850735ced8b709c9 (diff) | |
download | chromium_src-20088466072f55bc7daa91a96375275a30f0330f.zip chromium_src-20088466072f55bc7daa91a96375275a30f0330f.tar.gz chromium_src-20088466072f55bc7daa91a96375275a30f0330f.tar.bz2 |
Remove a unused method and fix some styles according to the style guide.
Review URL: https://codereview.chromium.org/201543002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android')
-rw-r--r-- | base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java index 9dc77fc..4e15955 100644 --- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java +++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java @@ -41,14 +41,6 @@ public class LibraryLoader { // library_loader_hooks.cc). private static boolean sInitialized = false; - // TODO(cjhopman): Remove this once it's unused. - /** - * Doesn't do anything. - */ - @Deprecated - public static void setLibraryToLoad(String library) { - } - /** * This method blocks until the library is fully loaded and initialized. */ @@ -87,7 +79,6 @@ public class LibraryLoader { } } - /** * initializes the library here and now: must be called on the thread that the * native will call its "main" thread. The library must have previously been @@ -101,7 +92,6 @@ public class LibraryLoader { } } - // Invoke System.loadLibrary(...), triggering JNI_OnLoad in native code private static void loadAlreadyLocked() throws ProcessInitException { try { @@ -111,23 +101,22 @@ public class LibraryLoader { long startTime = SystemClock.uptimeMillis(); boolean useChromiumLinker = Linker.isUsed(); - if (useChromiumLinker) - Linker.prepareLibraryLoad(); + if (useChromiumLinker) Linker.prepareLibraryLoad(); for (String library : NativeLibraries.LIBRARIES) { Log.i(TAG, "Loading: " + library); - if (useChromiumLinker) + if (useChromiumLinker) { Linker.loadLibrary(library); - else + } else { System.loadLibrary(library); + } } - if (useChromiumLinker) - Linker.finishLibraryLoad(); + if (useChromiumLinker) Linker.finishLibraryLoad(); long stopTime = SystemClock.uptimeMillis(); Log.i(TAG, String.format("Time to load native libraries: %d ms (timestamps %d-%d)", - stopTime - startTime, - startTime % 10000, - stopTime % 10000)); + stopTime - startTime, + startTime % 10000, + stopTime % 10000)); sLoaded = true; } } catch (UnsatisfiedLinkError e) { @@ -142,10 +131,8 @@ public class LibraryLoader { if (!NativeLibraries.VERSION_NUMBER.equals(nativeGetVersionNumber())) { throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_WRONG_VERSION); } - } - // Invoke base::android::LibraryLoaded in library_loader_hooks.cc private static void initializeAlreadyLocked(String[] initCommandLine) throws ProcessInitException { @@ -163,9 +150,10 @@ public class LibraryLoader { CommandLine.enableNativeProxy(); TraceEvent.setEnabledToMatchNative(); // Record histogram for the Chromium linker. - if (Linker.isUsed()) + if (Linker.isUsed()) { nativeRecordChromiumAndroidLinkerHistogram(Linker.loadAtFixedAddressFailed(), - SysUtils.isLowEndDevice()); + SysUtils.isLowEndDevice()); + } } // Only methods needed before or during normal JNI registration are during System.OnLoad. @@ -180,8 +168,8 @@ public class LibraryLoader { // i.e. whether the library failed to be loaded at a fixed address, and // whether the device is 'low-memory'. private static native void nativeRecordChromiumAndroidLinkerHistogram( - boolean loadedAtFixedAddressFailed, - boolean isLowMemoryDevice); + boolean loadedAtFixedAddressFailed, + boolean isLowMemoryDevice); // Get the version of the native library. This is needed so that we can check we // have the right version before initializing the (rest of the) JNI. |