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

Side by Side Diff: components/cronet/android/api/src/org/chromium/net/CronetProvider.java

Issue 2626523003: Cronet: a framework for providing alternative Cronet implementations (Closed)
Patch Set: Fixed JavaDoc links 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 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;
6
7 import android.content.Context;
8
9 /**
10 *
pauljensen 2017/01/20 17:13:35 empty line
kapishnikov 2017/01/20 21:48:38 Done.
11 * A Cronet implementation provider. Note: every implementation of CronetProvide r
pauljensen 2017/01/20 17:13:35 I don't understand the "Note"...there is only one
pauljensen 2017/01/20 17:13:35 I think we need to add more description here. Lik
kapishnikov 2017/01/20 21:48:38 A subclass can have a different constructor that a
12 * must have a public constructor that accepts a single {@link Context} paramete r.
13 * <p/>
14 * <b>NOTE:</b> This class is for advanced users that want to select a particula r
15 * Cronet implementation. Most users should simply use {@code new} {@link
16 * CronetEngine.Builder#CronetEngine.Builder(android.content.Context)}.
pauljensen 2017/01/20 17:13:35 Might want to put this NOTE at the top.
kapishnikov 2017/01/20 21:48:38 Javadoc uses the first sentence to create the shor
17 */
18 public abstract class CronetProvider {
19 protected final Context mContext;
20
21 protected CronetProvider(Context context) {
22 mContext = context;
23 }
24
25 /**
26 * Creates and returns {@link CronetEngine.Builder}.
pauljensen 2017/01/20 17:13:35 returns->returns an instance of
kapishnikov 2017/01/20 21:48:38 Done.
27 *
28 * @return {@code CronetEngine.Builder}.
29 */
30 public abstract CronetEngine.Builder createBuilder();
31
32 /**
33 * Returns the provider name.
pauljensen 2017/01/20 17:13:35 Include @links to statically defined names.
kapishnikov 2017/01/20 21:48:38 Done.
34 *
35 * @return provider name.
36 */
37 public abstract String getName();
38
39 /**
40 * Returns the provider version.
pauljensen 2017/01/20 17:13:35 Mention that this can be used to select newest (i.
kapishnikov 2017/01/20 21:48:38 Done.
41 *
42 * @return provider version.
43 */
44 public abstract String getVersion();
45
46 /**
47 * Returns whether the provider is enabled and can be used to instantiate th e Cronet engine.
pauljensen 2017/01/20 17:13:35 Mention that if isEnabled() returns false there ar
kapishnikov 2017/01/20 21:48:38 Done.
48 *
49 * @return true if the provider is enabled.
50 */
51 public abstract boolean isEnabled();
52
53 @Override
54 public String toString() {
55 StringBuilder b = new StringBuilder("[");
56 b.append("class=").append(getClass().getName());
57 b.append(", ").append("name=").append(getName());
58 b.append(", ").append("version=").append(getVersion());
59 b.append(", ").append("enabled=").append(isEnabled());
60 b.append("]");
61 return b.toString();
62 }
63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698