[Cronet] Delay StartNetLog and StopNetLog until native request context is initialized
commitbb7cf7be5f6204564859331576e0e8b0364e038a
authorxunjieli <xunjieli@chromium.org>
Fri, 27 Mar 2015 14:58:08 +0000 (27 07:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 27 Mar 2015 14:58:57 +0000 (27 14:58 +0000)
treee2def4082dc272ad63261475f8aacd804299d7fd
parent1dc04bbeb5caf69a737aca89e69ba2898b1e4180
[Cronet] Delay StartNetLog and StopNetLog until native request context is initialized

Use CronetURLRequestAdapter::PostTaskToNetworkThread instead of posting the task
directly to network thread to make sure the start/stop netlog task is executed
after request context is fully initialized.

Also changed the test cases to make sure that we don't regress.

BUG=470196

Review URL: https://codereview.chromium.org/996163005

Cr-Commit-Position: refs/heads/master@{#322577}
components/cronet/android/cronet_url_request_context_adapter.cc
components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java