diff options
author | rtenneti <rtenneti@chromium.org> | 2015-06-05 16:36:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-05 23:37:05 +0000 |
commit | cce34d58dbec10d9d499e6b54e4a15d9fa66fcba (patch) | |
tree | b902b25f3b0f9dd3a24addb6abe0bb54f5b090e6 /net/http/http_server_properties_manager_unittest.cc | |
parent | 602c2ca843a3542928df1bae4f1fc7858f9e520a (diff) | |
download | chromium_src-cce34d58dbec10d9d499e6b54e4a15d9fa66fcba.zip chromium_src-cce34d58dbec10d9d499e6b54e4a15d9fa66fcba.tar.gz chromium_src-cce34d58dbec10d9d499e6b54e4a15d9fa66fcba.tar.bz2 |
HttpServerProperties - Don't persist if SetServerNetworkStats is called
with the same origin (HostPortPair) and value (ServerNetworkStats).
This change reduces the number of times SetServerNetworkStats tries
to persist HttpServerProperties to disk (currently 17% of persist calls
are due to SetServerNetworkStats).
BUG=451256
R=rch@chromium.org
Review URL: https://codereview.chromium.org/1158823005
Cr-Commit-Position: refs/heads/master@{#333173}
Diffstat (limited to 'net/http/http_server_properties_manager_unittest.cc')
-rw-r--r-- | net/http/http_server_properties_manager_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc index 8aaa9d1..77c4768 100644 --- a/net/http/http_server_properties_manager_unittest.cc +++ b/net/http/http_server_properties_manager_unittest.cc @@ -625,6 +625,8 @@ TEST_F(HttpServerPropertiesManagerTest, ServerNetworkStats) { ServerNetworkStats stats1; stats1.srtt = base::TimeDelta::FromMicroseconds(10); http_server_props_manager_->SetServerNetworkStats(mail_server, stats1); + // ExpectScheduleUpdatePrefsOnNetworkThread() should be called only once. + http_server_props_manager_->SetServerNetworkStats(mail_server, stats1); // Run the task. base::RunLoop().RunUntilIdle(); |