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

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

Issue 2123993002: Fixed CronetHttpURLConnectionTest failure on Android N (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.os.Build; 8 import android.os.Build;
9 9
10 import org.chromium.base.annotations.UsedByReflection; 10 import org.chromium.base.annotations.UsedByReflection;
(...skipping 18 matching lines...) Expand all
29 // Cannot use config.getDefaultUserAgent() as config.mContext ma y be null. 29 // Cannot use config.getDefaultUserAgent() as config.mContext ma y be null.
30 userAgent = new CronetEngine.Builder(context).getDefaultUserAgen t(); 30 userAgent = new CronetEngine.Builder(context).getDefaultUserAgen t();
31 } 31 }
32 mRequestContext = new ChromiumUrlRequestContext(context, 32 mRequestContext = new ChromiumUrlRequestContext(context,
33 userAgent, config); 33 userAgent, config);
34 } 34 }
35 } 35 }
36 36
37 @Override 37 @Override
38 public boolean isEnabled() { 38 public boolean isEnabled() {
39 return Build.VERSION.SDK_INT >= 14; 39 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
40 } 40 }
41 41
42 @Override 42 @Override
43 public String getName() { 43 public String getName() {
44 return "Chromium/" + ChromiumUrlRequestContext.getVersion(); 44 return "Chromium/" + ChromiumUrlRequestContext.getVersion();
45 } 45 }
46 46
47 @Override 47 @Override
48 public ChromiumUrlRequest createRequest(String url, int requestPriority, 48 public ChromiumUrlRequest createRequest(String url, int requestPriority,
49 Map<String, String> headers, HttpUrlRequestListener listener) { 49 Map<String, String> headers, HttpUrlRequestListener listener) {
(...skipping 16 matching lines...) Expand all
66 66
67 @Override 67 @Override
68 public void stopNetLog() { 68 public void stopNetLog() {
69 mRequestContext.stopNetLog(); 69 mRequestContext.stopNetLog();
70 } 70 }
71 71
72 public ChromiumUrlRequestContext getRequestContext() { 72 public ChromiumUrlRequestContext getRequestContext() {
73 return mRequestContext; 73 return mRequestContext;
74 } 74 }
75 } 75 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698