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

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

Issue 2660963002: Cronet: a framework to provide alternative Cronet implementations (Closed)
Patch Set: Created 3 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
Index: components/cronet/android/api/src/org/chromium/net/ImplLoader.java
diff --git a/components/cronet/android/api/src/org/chromium/net/ImplLoader.java b/components/cronet/android/api/src/org/chromium/net/ImplLoader.java
deleted file mode 100644
index 1c14f52b9a8f395b7773840c44c7c5184e579596..0000000000000000000000000000000000000000
--- a/components/cronet/android/api/src/org/chromium/net/ImplLoader.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.net;
-
-import android.content.Context;
-
-import java.lang.reflect.Constructor;
-
-/**
- * Replaceable class providing ability to load Cronet implementation.
- */
-final class ImplLoader {
- // The class name of the Cronet Engine Builder implementation.
- private static final String CRONET_ENGINE_BUILDER_IMPL =
- "org.chromium.net.impl.CronetEngineBuilderImpl";
-
- /**
- * Load implementation of {@link ICronetEngineBuilder}.
- * @param context Android {@link Context} to use for loading.
- * @return {@link ICronetEngineBuilder} implementation.
- */
- static ICronetEngineBuilder load(Context context) {
- try {
- Class<? extends ICronetEngineBuilder> delegateImplClass =
- Class.forName(CRONET_ENGINE_BUILDER_IMPL)
- .asSubclass(ICronetEngineBuilder.class);
- Constructor<? extends ICronetEngineBuilder> ctor =
- delegateImplClass.getConstructor(Context.class);
- return ctor.newInstance(context);
- } catch (Exception e) {
- throw new RuntimeException(
- "Unable to construct the implementation of the Cronet Engine Builder: "
- + CRONET_ENGINE_BUILDER_IMPL,
- e);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698