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

Issue 2567893002: Pass pref_task_runner through HttpServerPropertiesManager's cxtor so that tests could inject a Test… (Closed)

Created:
4 years ago by Zhongyi Shi
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass pref_task_runner through HttpServerPropertiesManager's cxtor so that tests could inject a TestMockTimeTaskRunner. HttpServerPropertiesManager used to get pref_task_runner by calling base::ThreadTaskRunnerHandle::Get() itself, now changes to take the task runner passed in. No functional change. There are two SingleThreadTaskRunners in HttpServerPropertiesManager: pref_task_runner: which is used to post cache update on pref thread, and should be registered with pref_cache_update_timer_; network_task_runner: which is used to post pref update on network thread, and should be registered with network_prefs_update_timer. BUG=670519 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Committed: https://crrev.com/894658381ab6a524afa5ab08c780f8b4e4f3cb01 Cr-Commit-Position: refs/heads/master@{#439242}

Patch Set 1 #

Total comments: 8

Patch Set 2 : add comments to HttpServerPropertiesManager #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -8 lines) Patch
M chrome/browser/net/http_server_properties_manager_factory.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M components/cronet/android/cronet_url_request_context_adapter.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ios/chrome/browser/net/http_server_properties_manager_factory.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M net/http/http_server_properties_manager.h View 1 2 chunks +14 lines, -3 lines 0 comments Download
M net/http/http_server_properties_manager.cc View 2 chunks +3 lines, -1 line 0 comments Download
M net/http/http_server_properties_manager_unittest.cc View 2 chunks +7 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (37 generated)
Zhongyi Shi
Next cl will change the pref_task_runner in HttpServerPropertiesManager to TestMockTimeTaskRunner.
4 years ago (2016-12-13 21:39:05 UTC) #22
Ryan Hamilton
lgtm
4 years ago (2016-12-13 22:44:36 UTC) #25
Zhongyi Shi
xunjieli: please take a look components/cronet. brettw: chrome/browser and ios/chrome/browser, please!
4 years ago (2016-12-13 23:03:10 UTC) #27
brettw
https://codereview.chromium.org/2567893002/diff/140001/net/http/http_server_properties_manager.h File net/http/http_server_properties_manager.h (right): https://codereview.chromium.org/2567893002/diff/140001/net/http/http_server_properties_manager.h#newcode84 net/http/http_server_properties_manager.h:84: // Must be constructed on the Pref thread. Can ...
4 years ago (2016-12-13 23:26:13 UTC) #28
xunjieli
https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc File components/cronet/android/cronet_url_request_context_adapter.cc (right): https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc#newcode597 components/cronet/android/cronet_url_request_context_adapter.cc:597: base::ThreadTaskRunnerHandle::Get(), GetNetworkTaskRunner())); Hmm.. This method is invoked on the ...
4 years ago (2016-12-14 01:47:11 UTC) #29
Zhongyi Shi
https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc File components/cronet/android/cronet_url_request_context_adapter.cc (right): https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc#newcode597 components/cronet/android/cronet_url_request_context_adapter.cc:597: base::ThreadTaskRunnerHandle::Get(), GetNetworkTaskRunner())); On 2016/12/14 01:47:11, xunjieli wrote: > Hmm.. ...
4 years ago (2016-12-14 04:20:43 UTC) #30
xunjieli
https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc File components/cronet/android/cronet_url_request_context_adapter.cc (right): https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc#newcode597 components/cronet/android/cronet_url_request_context_adapter.cc:597: base::ThreadTaskRunnerHandle::Get(), GetNetworkTaskRunner())); On 2016/12/14 04:20:43, Zhongyi Shi wrote: > ...
4 years ago (2016-12-14 18:49:38 UTC) #31
Zhongyi Shi
Thanks for helping the review, updated the cl description, ptal! https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc File components/cronet/android/cronet_url_request_context_adapter.cc (right): https://codereview.chromium.org/2567893002/diff/140001/components/cronet/android/cronet_url_request_context_adapter.cc#newcode597 ...
4 years ago (2016-12-14 19:47:25 UTC) #34
brettw
https://codereview.chromium.org/2567893002/diff/140001/net/http/http_server_properties_manager.h File net/http/http_server_properties_manager.h (right): https://codereview.chromium.org/2567893002/diff/140001/net/http/http_server_properties_manager.h#newcode84 net/http/http_server_properties_manager.h:84: // Must be constructed on the Pref thread. Thanks ...
4 years ago (2016-12-14 23:16:54 UTC) #35
Zhongyi Shi
Update: add comments in HttpServerPropertiesManager header file to document the usage of two task runners. ...
4 years ago (2016-12-14 23:36:58 UTC) #36
brettw
lgtm
4 years ago (2016-12-15 17:30:16 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2567893002/160001
4 years ago (2016-12-15 18:54:48 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/357298)
4 years ago (2016-12-15 20:22:26 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2567893002/160001
4 years ago (2016-12-15 21:04:44 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/357434)
4 years ago (2016-12-15 22:41:01 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2567893002/160001
4 years ago (2016-12-15 23:11:11 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/357544)
4 years ago (2016-12-16 02:56:51 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2567893002/160001
4 years ago (2016-12-16 18:20:35 UTC) #52
commit-bot: I haz the power
Committed patchset #2 (id:160001)
4 years ago (2016-12-17 00:08:34 UTC) #55
commit-bot: I haz the power
4 years ago (2016-12-17 00:11:11 UTC) #57
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/894658381ab6a524afa5ab08c780f8b4e4f3cb01
Cr-Commit-Position: refs/heads/master@{#439242}

Powered by Google App Engine
This is Rietveld 408576698