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

Issue 2319753002: Optimize NetworkChangeNotifierAutoDetect construction (Closed)

Created:
4 years, 3 months ago by pauljensen
Modified:
4 years, 3 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize NetworkChangeNotifierAutoDetect construction 1) Avoid doing duplicated work, like fetching Wifi SSID twice. 2) When app has ACCESS_WIFI_STATE permission, call WifiManager directly to get SSID as this is faster than calling AndroidNetworkLibrary.getWifiSSID(). BUG=647691

Patch Set 1 #

Patch Set 2 : update test #

Patch Set 3 : add comments #

Patch Set 4 : simplify #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -27 lines) Patch
M net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java View 1 2 3 8 chunks +84 lines, -25 lines 2 comments Download
M net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java View 1 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
pauljensen
Helen, PTAL. I think this should greatly improve startup time. This is an attempt to ...
4 years, 3 months ago (2016-09-16 14:40:11 UTC) #3
xunjieli
This is a great improvement! I just have one small request. It seems that there ...
4 years, 3 months ago (2016-09-16 17:22:03 UTC) #4
pauljensen
I'm happy to split into multiple CLs. https://codereview.chromium.org/2319753002/diff/60001/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java File net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java (right): https://codereview.chromium.org/2319753002/diff/60001/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java#newcode240 net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java:240: static class ...
4 years, 3 months ago (2016-09-19 13:55:42 UTC) #5
xunjieli
> How about I make it part of NetworkState? NetworkState does seem to be a ...
4 years, 3 months ago (2016-09-19 14:11:46 UTC) #6
pauljensen
4 years, 3 months ago (2016-09-22 15:15:10 UTC) #7
Ok, I've split this into five different CLs that is each much more palatable. 
This also allowed for some optimization I didn't think of previously.  One of
the CLs I can also send to someone else for review to better distribute the
review load.  I'm abandoning and closing this original one.

Powered by Google App Engine
This is Rietveld 408576698