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

Issue 10928193: Add native-side unit test for Android NetworkChangeNotifier (Closed)

Created:
8 years, 3 months ago by gone
Modified:
8 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add native-side unit test for Android NetworkChangeNotifier * Renames some classes to move them out of the android namespace. * Changes singleton handling in the Java NetworkChangeNotifier. The singleton is unfortunately still required for Android to turn the AutoDetector on. * Adds a native-side unit test to track that the JNI calls are correctly plumbed to alert native-side observers of connection changes. BUG=136984 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157687

Patch Set 1 #

Patch Set 2 : Removed Java-side observers for now #

Total comments: 24

Patch Set 3 : Comment addressing #

Total comments: 4

Patch Set 4 : Addressing benm's comments #

Total comments: 5

Patch Set 5 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -113 lines) Patch
M chrome/browser/chrome_browser_main_android.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/shell/shell_browser_main_parts.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M net/android/java/src/org/chromium/net/NetworkChangeNotifier.java View 1 2 4 chunks +42 lines, -20 lines 0 comments Download
M net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java View 1 1 chunk +1 line, -1 line 0 comments Download
M net/android/net_jni_registrar.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M net/android/network_change_notifier_android.h View 1 2 1 chunk +11 lines, -9 lines 0 comments Download
M net/android/network_change_notifier_android.cc View 1 2 2 chunks +19 lines, -18 lines 0 comments Download
A net/android/network_change_notifier_android_unittest.cc View 1 2 3 1 chunk +104 lines, -0 lines 0 comments Download
D net/android/network_change_notifier_factory.h View 1 2 1 chunk +0 lines, -30 lines 0 comments Download
D net/android/network_change_notifier_factory.cc View 1 2 1 chunk +0 lines, -19 lines 0 comments Download
A + net/android/network_change_notifier_factory_android.h View 1 2 2 chunks +7 lines, -9 lines 0 comments Download
A net/android/network_change_notifier_factory_android.cc View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M net/base/network_change_notifier.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
gone
Er, take 2: Hey guys, This CL further expands the Java NetworkChangeNotifier so that it ...
8 years, 3 months ago (2012-09-13 22:47:08 UTC) #1
gone
On 2012/09/13 22:47:08, dfalcantara wrote: > Er, take 2: > Hey guys, > This CL ...
8 years, 3 months ago (2012-09-13 23:03:56 UTC) #2
gone
On 2012/09/13 23:03:56, dfalcantara wrote: > On 2012/09/13 22:47:08, dfalcantara wrote: > > Er, take ...
8 years, 3 months ago (2012-09-14 00:48:25 UTC) #3
szym
http://codereview.chromium.org/10928193/diff/3003/net/android/network_change_notifier_android.cc File net/android/network_change_notifier_android.cc (right): http://codereview.chromium.org/10928193/diff/3003/net/android/network_change_notifier_android.cc#newcode29 net/android/network_change_notifier_android.cc:29: void NetworkChangeNotifier::NotifyObserversOfConnectionTypeChange(JNIEnv* env, watch out for conflict with http://codereview.chromium.org/10905264 ...
8 years, 3 months ago (2012-09-14 19:07:29 UTC) #4
szym
http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h File net/base/network_change_notifier.h (right): http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h#newcode20 net/base/network_change_notifier.h:20: #if defined(OS_ANDROID) On 2012/09/14 19:07:29, szym wrote: > You ...
8 years, 3 months ago (2012-09-14 19:26:34 UTC) #5
szym
http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h File net/base/network_change_notifier.h (right): http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h#newcode20 net/base/network_change_notifier.h:20: #if defined(OS_ANDROID) On 2012/09/14 19:26:34, szym wrote: > On ...
8 years, 3 months ago (2012-09-14 19:28:38 UTC) #6
Ryan Sleevi
On 2012/09/14 19:28:38, szym wrote: > http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h > File net/base/network_change_notifier.h (right): > > http://codereview.chromium.org/10928193/diff/3003/net/base/network_change_notifier.h#newcode20 > ...
8 years, 3 months ago (2012-09-14 19:43:08 UTC) #7
szym
On 2012/09/14 19:43:08, Ryan Sleevi wrote: > On 2012/09/14 19:28:38, szym wrote: > > > ...
8 years, 3 months ago (2012-09-14 19:47:11 UTC) #8
gone
Ended up changing the namespace in this CL, which fixes and cleans up a few ...
8 years, 3 months ago (2012-09-15 01:01:55 UTC) #9
benm (inactive)
https://chromiumcodereview.appspot.com/10928193/diff/4003/net/android/network_change_notifier_android_unittest.cc File net/android/network_change_notifier_android_unittest.cc (right): https://chromiumcodereview.appspot.com/10928193/diff/4003/net/android/network_change_notifier_android_unittest.cc#newcode75 net/android/network_change_notifier_android_unittest.cc:75: TEST_F(NetworkChangeNotifierAndroidTest, ObserverNotified) { Perhaps a comment here that this ...
8 years, 3 months ago (2012-09-17 10:35:43 UTC) #10
szym
lgtm
8 years, 3 months ago (2012-09-17 22:08:54 UTC) #11
gone
https://chromiumcodereview.appspot.com/10928193/diff/4003/net/android/network_change_notifier_android_unittest.cc File net/android/network_change_notifier_android_unittest.cc (right): https://chromiumcodereview.appspot.com/10928193/diff/4003/net/android/network_change_notifier_android_unittest.cc#newcode75 net/android/network_change_notifier_android_unittest.cc:75: TEST_F(NetworkChangeNotifierAndroidTest, ObserverNotified) { On 2012/09/17 10:35:43, benm wrote: > ...
8 years, 3 months ago (2012-09-17 23:34:21 UTC) #12
gone
Adding additional OWNERS for the newly touched directories.
8 years, 3 months ago (2012-09-17 23:40:16 UTC) #13
benm (inactive)
lgtm
8 years, 3 months ago (2012-09-18 10:23:53 UTC) #14
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc File content/shell/shell_browser_main_parts.cc (right): https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc#newcode88 content/shell/shell_browser_main_parts.cc:88: new net::NetworkChangeNotifierFactoryAndroid()); why is this needed? ShellBrowserMainPartsAndroid already sets ...
8 years, 3 months ago (2012-09-18 13:25:43 UTC) #15
gone
https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc File content/shell/shell_browser_main_parts.cc (right): https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc#newcode88 content/shell/shell_browser_main_parts.cc:88: new net::NetworkChangeNotifierFactoryAndroid()); On 2012/09/18 13:25:43, jochen wrote: > why ...
8 years, 3 months ago (2012-09-18 17:05:46 UTC) #16
jochen (gone - plz use gerrit)
content/shell lgtm https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc File content/shell/shell_browser_main_parts.cc (right): https://chromiumcodereview.appspot.com/10928193/diff/13004/content/shell/shell_browser_main_parts.cc#newcode88 content/shell/shell_browser_main_parts.cc:88: new net::NetworkChangeNotifierFactoryAndroid()); On 2012/09/18 17:05:46, dfalcantara wrote: ...
8 years, 3 months ago (2012-09-18 19:21:05 UTC) #17
gone
Adding another OWNER for the chrome/browser change. PTAL if you can.
8 years, 3 months ago (2012-09-19 17:29:09 UTC) #18
Yaron
lgtm for net/android I think you can just tbr the chrome/browser change as it's a ...
8 years, 3 months ago (2012-09-19 23:23:11 UTC) #19
gone
https://chromiumcodereview.appspot.com/10928193/diff/13004/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java File net/android/java/src/org/chromium/net/NetworkChangeNotifier.java (right): https://chromiumcodereview.appspot.com/10928193/diff/13004/net/android/java/src/org/chromium/net/NetworkChangeNotifier.java#newcode58 net/android/java/src/org/chromium/net/NetworkChangeNotifier.java:58: static NetworkChangeNotifier createInstance(Context context, int nativeChangeNotifier) { On 2012/09/19 ...
8 years, 3 months ago (2012-09-19 23:26:26 UTC) #20
Nico
chrome lgtm
8 years, 3 months ago (2012-09-19 23:38:23 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dfalcantara@chromium.org/10928193/20002
8 years, 3 months ago (2012-09-20 00:01:49 UTC) #22
Philippe
On 2012/09/20 00:01:49, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
8 years, 3 months ago (2012-09-20 01:27:00 UTC) #23
szym
On 2012/09/20 01:27:00, Philippe wrote: > On 2012/09/20 00:01:49, I haz the power (commit-bot) wrote: ...
8 years, 3 months ago (2012-09-20 01:58:09 UTC) #24
commit-bot: I haz the power
8 years, 3 months ago (2012-09-20 02:27:15 UTC) #25
Change committed as 157687

Powered by Google App Engine
This is Rietveld 408576698