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

Unified Diff: components/cronet/android/api/src/org/chromium/net/CronetEngine.java

Issue 1635033002: Revert of Add API for custom library loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/api/src/org/chromium/net/CronetEngine.java
diff --git a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
index 0ede759184fa5decfd91dce0ff15a1dd508523fe..6336533491fe1c048429edb41211dcd51e33b7d6 100644
--- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
+++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
@@ -41,21 +41,6 @@
* then {@link #build} is called to create the {@code CronetEngine}.
*/
public static class Builder {
- /**
- * A class which provides a method for loading the cronet native library. Apps needing to
- * implement custom library loading logic can inherit from this class and pass an instance
- * to {@link CronetEngine.Builder#setLibraryLoader}. For example, this might be required
- * to work around {@code UnsatisfiedLinkError}s caused by flaky installation on certain
- * older devices.
- */
- public abstract static class LibraryLoader {
- /**
- * Loads the native library.
- * @param libName name of the library to load
- */
- public abstract void loadLibrary(String libName);
- }
-
// A hint that a host supports QUIC.
static class QuicHint {
// The host.
@@ -101,7 +86,6 @@
private String mUserAgent;
private String mStoragePath;
private boolean mLegacyModeEnabled;
- private LibraryLoader mLibraryLoader;
private String mLibraryName;
private boolean mQuicEnabled;
private boolean mHttp2Enabled;
@@ -203,22 +187,8 @@
return this;
}
- /**
- * Sets a {@link LibraryLoader} to be used to load the native library.
- * If not set, the library will be loaded using {@link System#loadLibrary}.
- * @return the builder to facilitate chaining.
- */
- public Builder setLibraryLoader(LibraryLoader loader) {
- mLibraryLoader = loader;
- return this;
- }
-
- void loadLibrary() {
- if (mLibraryLoader == null) {
- System.loadLibrary(mLibraryName);
- } else {
- mLibraryLoader.loadLibrary(mLibraryName);
- }
+ String libraryName() {
+ return mLibraryName;
}
/**
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698