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

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

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * otherwise throws an exception. 49 * otherwise throws an exception.
50 * 50 *
51 * Cannot be called on network thread - the thread Cronet calls into 51 * Cannot be called on network thread - the thread Cronet calls into
52 * Executor on (which is different from the thread the Executor invokes 52 * Executor on (which is different from the thread the Executor invokes
53 * callbacks on). May block until all the Context's resources have been 53 * callbacks on). May block until all the Context's resources have been
54 * cleaned up. 54 * cleaned up.
55 */ 55 */
56 public abstract void shutdown(); 56 public abstract void shutdown();
57 57
58 /** 58 /**
59 * Starts NetLog logging to a file. The NetLog log level used is 59 * Starts NetLog logging to a file. The NetLog capture mode used is
60 * LOG_ALL_BUT_BYTES. 60 * NetLogCaptureMode::Default().
61 * @param fileName The complete file path. It must not be empty. If file 61 * @param fileName The complete file path. It must not be empty. If file
62 * exists, it is truncated before starting. If actively logging, 62 * exists, it is truncated before starting. If actively logging,
63 * this method is ignored. 63 * this method is ignored.
64 */ 64 */
65 public abstract void startNetLogToFile(String fileName); 65 public abstract void startNetLogToFile(String fileName);
66 66
67 /** 67 /**
68 * Stops NetLog logging and flushes file to disk. If a logging session is 68 * Stops NetLog logging and flushes file to disk. If a logging session is
69 * not in progress, this call is ignored. 69 * not in progress, this call is ignored.
70 */ 70 */
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } catch (ClassNotFoundException e) { 115 } catch (ClassNotFoundException e) {
116 // Leave as null. 116 // Leave as null.
117 } catch (Exception e) { 117 } catch (Exception e) {
118 throw new IllegalStateException( 118 throw new IllegalStateException(
119 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT, 119 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT,
120 e); 120 e);
121 } 121 }
122 return urlRequestContext; 122 return urlRequestContext;
123 } 123 }
124 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698