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

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

Issue 1093793002: Allow setting Cronet NetLog level to LOG_ALL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a doc comment that didn't get properly updated Created 5 years, 7 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.util.Log; 8 import android.util.Log;
9 9
10 import java.lang.reflect.Constructor; 10 import java.lang.reflect.Constructor;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 */ 57 */
58 public abstract HttpUrlRequest createRequest(String url, 58 public abstract HttpUrlRequest createRequest(String url,
59 int requestPriority, Map<String, String> headers, 59 int requestPriority, Map<String, String> headers,
60 WritableByteChannel channel, HttpUrlRequestListener listener); 60 WritableByteChannel channel, HttpUrlRequestListener listener);
61 61
62 /** 62 /**
63 * Starts NetLog logging to a file named |fileName| in the 63 * Starts NetLog logging to a file named |fileName| in the
64 * application temporary directory. |fileName| must not be empty. Log may 64 * application temporary directory. |fileName| must not be empty. Log may
65 * contain user's personal information (PII). If the file exists it is 65 * contain user's personal information (PII). If the file exists it is
66 * truncated before starting. If actively logging the call is ignored. 66 * truncated before starting. If actively logging the call is ignored.
67 * @param fileName The complete file path. It must not be empty. If file
68 * exists, it is truncated before starting.
69 * @param logAll {@code true} to also include all transferred bytes in the
70 * log.
67 */ 71 */
68 public abstract void startNetLogToFile(String fileName); 72 public abstract void startNetLogToFile(String fileName, boolean logAll);
69 73
70 /** 74 /**
71 * Stops NetLog logging and flushes file to disk. If a logging session is 75 * Stops NetLog logging and flushes file to disk. If a logging session is
72 * not in progress this call is ignored. 76 * not in progress this call is ignored.
73 */ 77 */
74 public abstract void stopNetLog(); 78 public abstract void stopNetLog();
75 79
76 private static HttpUrlRequestFactory createChromiumFactory( 80 private static HttpUrlRequestFactory createChromiumFactory(
77 Context context, UrlRequestContextConfig config) { 81 Context context, UrlRequestContextConfig config) {
78 HttpUrlRequestFactory factory = null; 82 HttpUrlRequestFactory factory = null;
(...skipping 13 matching lines...) Expand all
92 } catch (ClassNotFoundException e) { 96 } catch (ClassNotFoundException e) {
93 // Leave as null 97 // Leave as null
94 } catch (Exception e) { 98 } catch (Exception e) {
95 throw new IllegalStateException( 99 throw new IllegalStateException(
96 "Cannot instantiate: " + CHROMIUM_URL_REQUEST_FACTORY, 100 "Cannot instantiate: " + CHROMIUM_URL_REQUEST_FACTORY,
97 e); 101 e);
98 } 102 }
99 return factory; 103 return factory;
100 } 104 }
101 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698