Skip to content

Commit

Permalink
Revert of Download doclava when building for Android and use to build…
Browse files Browse the repository at this point in the history
… cronet Javadocs (patchset chromium#10 id:180001 of https://codereview.chromium.org/1557233003/ )

Reason for revert:
Passes once and then subsequent builds fail with "javadoc: error - Cannot find doclet class com.google.doclava.Doclava".
My guess is download_from_google_storage is somehow not extracting the next time, and some script is clearing the extracted directory but not the downloaded archive.

BUG=601800

Original issue's description:
> [Cronet] Use doclava to build Cronet Javadocs
>
> During "gclient runhooks", download doclava from Google Storage when building for Android.
> Switching to doclava allows using the @hide tag instead of
> the @deprecated tag which leads to build warnings.
> Doclava does not have a nodeprecated option so deprecated
> types are @hide'd.
>
> BUG=539519
>
> Committed: https://crrev.com/62bd31bc7e6d863e87e167e4a6701b64cf584a54
> Cr-Commit-Position: refs/heads/master@{#386077}

TBR=mikecase@chromium.org,agrieve@chromium.org,xunjieli@chromium.org,jbudorick@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=539519

Review URL: https://codereview.chromium.org/1868203002

Cr-Commit-Position: refs/heads/master@{#386088}
  • Loading branch information
JensenPaul authored and Commit bot committed Apr 8, 2016
1 parent 7d09f9e commit 8151567
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 104 deletions.
8 changes: 0 additions & 8 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -853,14 +853,6 @@ hooks = [
'pattern': '\\.sha1',
'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'],
},
{
# Pull doclava binaries if building for Android.
'name': 'doclava',
'pattern': '.',
'action': ['python',
'src/build/android/download_doclava.py',
],
},
{
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
'name': 'gyp',
Expand Down
39 changes: 0 additions & 39 deletions build/android/download_doclava.py

This file was deleted.

18 changes: 6 additions & 12 deletions components/cronet/android/api/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@
<target name="doc" description="generate documentation">
<javadoc destdir="${doc.dir}"
overview="${overview}"
windowtitle="Cronet API"
nohelp="yes"
notree="yes"
nodeprecated="yes"
linkoffline="https://developer.android.com/reference ."
bootclasspath="../../../../third_party/android_tools/sdk/platforms/android-23/android.jar:../../../../third_party/android_tools/sdk/extras/android/support/annotations/android-support-annotations.jar:${lib.java.dir}/cronet_javadoc_classpath.jar"
docletpath="../../../../buildtools/android/doclava/jsilver.jar:../../../../buildtools/android/doclava/doclava.jar"
use="true"
>
<fileset dir="${source.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
<!-- exclude legacy API -->
<exclude name="**/Chromium*.java"/>
<exclude name="**/ChunkedWritableByteChannel*.java"/>
<exclude name="**/HttpUrl*.java"/>
<exclude name="**/ResponseTooLargeException.java"/>
<exclude name="**/UrlRequestContextConfig.java"/>
<exclude name="**/UserAgent.java"/>
</fileset>
<doclet name="com.google.doclava.Doclava">
<param name="-title" /><param name="Cronet API"/>
<!-- federation -->
<param name="-federate" /><param name="Android"/>
<param name="https://developer.android.com/"/>
<param name="-federationapi"/><param name="Android"/>
<param name="../../../../buildtools/android/doclava/current.txt"/>
</doclet>
</javadoc>
</target>
</project>
14 changes: 14 additions & 0 deletions components/cronet/android/api/package-list
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
android.content
android.net.http
android.util
java
java.io
java.lang
java.net
java.nio
java.security
java.security.cert
java.util
java.util.concurrent
javax.net.ssl
org.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ public Builder addHeader(String header, String value) {
return this;
}

/** @hide */
/** @deprecated not really deprecated but hidden. */
@IntDef({
STREAM_PRIORITY_IDLE, STREAM_PRIORITY_LOWEST, STREAM_PRIORITY_LOW,
STREAM_PRIORITY_MEDIUM, STREAM_PRIORITY_HIGHEST,
})
@Retention(RetentionPolicy.SOURCE)
@SuppressWarnings("DepAnn")
public @interface StreamPriority {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package org.chromium.net;

import android.content.Context;
import android.net.http.HttpResponseCache;
import android.support.annotation.IntDef;
import android.support.annotation.Nullable;
import android.util.Log;
Expand All @@ -31,8 +30,6 @@
import java.util.concurrent.Executor;
import java.util.regex.Pattern;

import javax.net.ssl.HttpsURLConnection;

/**
* An engine to process {@link UrlRequest}s, which uses the best HTTP stack
* available on the current platform.
Expand Down Expand Up @@ -201,7 +198,6 @@ String storagePath() {
* {@link java.net.HttpURLConnection} implementation.
* @return the builder to facilitate chaining.
* @deprecated Not supported by the new API.
* @hide
*/
@Deprecated
public Builder enableLegacyMode(boolean value) {
Expand Down Expand Up @@ -329,8 +325,11 @@ String dataReductionProxyKey() {
* @param secureProxyCheckUrl a URL to fetch to determine if using a secure
* proxy is allowed.
* @return the builder to facilitate chaining.
* @hide as it's a prototype.
* @deprecated Marked as deprecated because @hide doesn't properly hide but
* javadocs are built with nodeprecated="yes".
*/
@Deprecated
@SuppressWarnings("DepAnn")
public Builder setDataReductionProxyOptions(
String primaryProxy, String fallbackProxy, String secureProxyCheckUrl) {
if (primaryProxy.isEmpty() || fallbackProxy.isEmpty()
Expand All @@ -356,11 +355,12 @@ String dataReductionProxySecureProxyCheckUrl() {
return mDataReductionProxySecureProxyCheckUrl;
}

/** @hide */
/** @deprecated not really deprecated but hidden. */
@IntDef({
HTTP_CACHE_DISABLED, HTTP_CACHE_IN_MEMORY, HTTP_CACHE_DISK_NO_HTTP, HTTP_CACHE_DISK,
})
@Retention(RetentionPolicy.SOURCE)
@SuppressWarnings("DepAnn")
public @interface HttpCacheSetting {}

/**
Expand Down Expand Up @@ -639,7 +639,6 @@ public CronetEngine build() {
* @param executor {@link Executor} on which all callbacks will be invoked.
* @return new request.
* @deprecated Use {@link UrlRequest.Builder#build}.
* @hide
*/
@Deprecated
public final UrlRequest createRequest(
Expand All @@ -661,7 +660,6 @@ public final UrlRequest createRequest(
* values.
* @return new request.
* @deprecated Use {@link UrlRequest.Builder#build}.
* @hide
*/
@Deprecated
public final UrlRequest createRequest(String url, UrlRequest.Callback callback,
Expand All @@ -683,10 +681,7 @@ public final UrlRequest createRequest(String url, UrlRequest.Callback callback,
* values.
* @param requestAnnotations Objects to pass on to {@link CronetEngine.RequestFinishedListener}.
* @return new request.
* @deprecated Use {@link UrlRequest.Builder#build}.
* @hide as it references hidden CronetEngine.RequestFinishedListener
*/
@Deprecated
protected abstract UrlRequest createRequest(String url, UrlRequest.Callback callback,
Executor executor, int priority, Collection<Object> requestAnnotations);

Expand Down Expand Up @@ -787,9 +782,9 @@ abstract BidirectionalStream createBidirectionalStream(String url,
* only when enabled.
* @param executor an executor that will be used to notified all
* added RTT and throughput listeners.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
public abstract void enableNetworkQualityEstimator(Executor executor);
@Deprecated public abstract void enableNetworkQualityEstimator(Executor executor);

/**
* Enables the network quality estimator for testing. This must be called
Expand All @@ -799,8 +794,9 @@ abstract BidirectionalStream createBidirectionalStream(String url,
* @param useSmallerResponses include small responses in throughput estimates.
* @param executor an {@link java.util.concurrent.Executor} on which all
* listeners will be called.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
abstract void enableNetworkQualityEstimatorForTesting(
boolean useLocalHostRequests, boolean useSmallerResponses, Executor executor);

Expand All @@ -813,19 +809,19 @@ abstract void enableNetworkQualityEstimatorForTesting(
* The listener is called on the {@link java.util.concurrent.Executor} that
* is passed to {@link #enableNetworkQualityEstimator}.
* @param listener the listener of round trip times.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
public abstract void addRttListener(NetworkQualityRttListener listener);
@Deprecated public abstract void addRttListener(NetworkQualityRttListener listener);

/**
* Removes a listener of round trip times if previously registered with
* {@link #addRttListener}. This should be called after a
* {@link NetworkQualityRttListener} is added in order to stop receiving
* observations.
* @param listener the listener of round trip times.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
public abstract void removeRttListener(NetworkQualityRttListener listener);
@Deprecated public abstract void removeRttListener(NetworkQualityRttListener listener);

/**
* Registers a listener that gets called whenever the network quality
Expand All @@ -836,17 +832,19 @@ abstract void enableNetworkQualityEstimatorForTesting(
* is called on the {@link java.util.concurrent.Executor} that is passed to
* {@link #enableNetworkQualityEstimator}.
* @param listener the listener of throughput.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public abstract void addThroughputListener(NetworkQualityThroughputListener listener);

/**
* Removes a listener of throughput. This should be called after a
* {@link NetworkQualityThroughputListener} is added with
* {@link #addThroughputListener} in order to stop receiving observations.
* @param listener the listener of throughput.
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public abstract void removeThroughputListener(NetworkQualityThroughputListener listener);

/**
Expand All @@ -872,8 +870,12 @@ abstract void enableNetworkQualityEstimatorForTesting(
* @param proxy proxy to use when establishing connection.
* @return an {@link java.net.HttpURLConnection} instance implemented by this CronetEngine.
* @throws IOException if an error occurs while opening the connection.
* @hide TODO(pauljensen): Expose once implemented, http://crbug.com/418111
* @deprecated Marked as deprecated because @hide doesn't properly hide but
* javadocs are built with nodeprecated="yes".
* TODO(pauljensen): Expose once implemented, http://crbug.com/418111
*/
@Deprecated
@SuppressWarnings("DepAnn")
public abstract URLConnection openConnection(URL url, Proxy proxy) throws IOException;

/**
Expand All @@ -885,22 +887,23 @@ abstract void enableNetworkQualityEstimatorForTesting(
* Cronet does not use certain HTTP features provided via the system:
* <ul>
* <li>the HTTP cache installed via
* {@link HttpResponseCache#install(java.io.File, long) HttpResponseCache.install()}</li>
* {@link android.net.http.HttpResponseCache#install(java.io.File, long)
* HttpResponseCache.install()}</li>
* <li>the HTTP authentication method installed via
* {@link java.net.Authenticator#setDefault}</li>
* <li>the HTTP cookie storage installed via {@link java.net.CookieHandler#setDefault}</li>
* </ul>
* <p>
* While Cronet supports and encourages requests using the HTTPS protocol,
* Cronet does not provide support for the
* {@link HttpsURLConnection} API. This lack of support also
* {@link javax.net.ssl.HttpsURLConnection} API. This lack of support also
* includes not using certain HTTPS features provided via the system:
* <ul>
* <li>the HTTPS hostname verifier installed via {@link
* HttpsURLConnection#setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier)
* javax.net.ssl.HttpsURLConnection#setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier)
* HttpsURLConnection.setDefaultHostnameVerifier()}</li>
* <li>the HTTPS socket factory installed via {@link
* HttpsURLConnection#setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory)
* javax.net.ssl.HttpsURLConnection#setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory)
* HttpsURLConnection.setDefaultSSLSocketFactory()}</li>
* </ul>
*
Expand All @@ -915,7 +918,6 @@ abstract void enableNetworkQualityEstimatorForTesting(
* @param builder builder to used for creating the CronetEngine instance.
* @return the created CronetEngine instance.
* @deprecated Use {@link CronetEngine.Builder}.
* @hide
*/
@Deprecated
public static CronetEngine createContext(Builder builder) {
Expand Down Expand Up @@ -965,24 +967,26 @@ private static CronetEngine createCronetEngine(Builder builder) {
*
* @param listener the listener for finished requests.
*
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
public abstract void addRequestFinishedListener(RequestFinishedListener listener);
@Deprecated public abstract void addRequestFinishedListener(RequestFinishedListener listener);

/**
* Removes a finished request listener.
*
* @param listener the listener to remove.
*
* @hide it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public abstract void removeRequestFinishedListener(RequestFinishedListener listener);

/**
* Information about a finished request. Passed to {@link RequestFinishedListener}.
*
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public static final class UrlRequestInfo {
private final String mUrl;
private final Collection<Object> mAnnotations;
Expand Down Expand Up @@ -1040,8 +1044,9 @@ public UrlResponseInfo getResponseInfo() {
*
* <p>Must call {@link #enableNetworkQualityEstimator} to enable request metrics collection.
*
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public static final class UrlRequestMetrics {
@Nullable private final Long mTtfbMs;
@Nullable private final Long mTotalTimeMs;
Expand Down Expand Up @@ -1094,8 +1099,9 @@ public Long getReceivedBytesCount() {
/**
* Interface to listen for finished requests that were created via this CronetEngine instance.
*
* @hide as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@Deprecated
public interface RequestFinishedListener { // TODO(klm): Add a convenience abstract class.
/**
* Invoked with request info.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* various layers of the network stack. These include RTT estimates by QUIC
* and TCP, as well as the time between when a URL request is sent and when
* the first byte of the response is received.
* {@hide} as it's a prototype.
* @deprecated not really deprecated but hidden for now as it's a prototype.
*/
@SuppressWarnings("DepAnn")
public interface NetworkQualityRttListener {
/**
* Reports a new round trip time observation.
Expand All @@ -19,4 +20,4 @@ public interface NetworkQualityRttListener {
* @param source the observation source from {@link NetworkQualityObservationSource}.
*/
public void onRttObservation(int rttMs, long whenMs, int source);
}
}
Loading

0 comments on commit 8151567

Please sign in to comment.