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

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/impl/NativeCronetProvider.java

Issue 2660963002: Cronet: a framework to provide alternative Cronet implementations (Closed)
Patch Set: Created 3 years, 10 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net.impl;
6
7 import android.content.Context;
8
9 import org.chromium.base.annotations.UsedByReflection;
10 import org.chromium.net.CronetEngine;
11 import org.chromium.net.CronetProvider;
12 import org.chromium.net.ExperimentalCronetEngine;
13 import org.chromium.net.ICronetEngineBuilder;
14
15 /**
16 * Implementation of {@link CronetProvider} that creates {@link CronetEngine.Bui lder}
17 * for building the native implementation of {@link CronetEngine}.
18 */
19 public class NativeCronetProvider extends CronetProvider {
20 /**
21 * Constructor.
22 *
23 * @param context Android context to use.
24 */
25 @UsedByReflection("CronetProvider.java")
26 public NativeCronetProvider(Context context) {
27 super(context);
28 }
29
30 @Override
31 public CronetEngine.Builder createBuilder() {
32 ICronetEngineBuilder impl = new NativeCronetEngineBuilderImpl(mContext);
33 return new ExperimentalCronetEngine.Builder(impl);
34 }
35
36 @Override
37 public String getName() {
38 return CronetProvider.PROVIDER_NAME_APP_PACKAGED;
39 }
40
41 @Override
42 public String getVersion() {
43 return ImplVersion.getCronetVersion();
44 }
45
46 @Override
47 public boolean isEnabled() {
48 return true;
49 }
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698