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

Side by Side Diff: net/http/http_server_properties_manager_unittest.cc

Issue 1139843002: HttpServerProperties - Track UpdatePrefs callers. In offical builds, on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for patch set 2 Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_server_properties_manager.h" 5 #include "net/http/http_server_properties_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void StartCacheUpdateTimerOnPrefThread(base::TimeDelta delay) override { 60 void StartCacheUpdateTimerOnPrefThread(base::TimeDelta delay) override {
61 HttpServerPropertiesManager::StartCacheUpdateTimerOnPrefThread( 61 HttpServerPropertiesManager::StartCacheUpdateTimerOnPrefThread(
62 base::TimeDelta()); 62 base::TimeDelta());
63 } 63 }
64 64
65 void UpdatePrefsFromCacheOnNetworkThreadConcrete( 65 void UpdatePrefsFromCacheOnNetworkThreadConcrete(
66 const base::Closure& callback) { 66 const base::Closure& callback) {
67 HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(callback); 67 HttpServerPropertiesManager::UpdatePrefsFromCacheOnNetworkThread(callback);
68 } 68 }
69 69
70 void ScheduleUpdatePrefsOnNetworkThread() {
71 // Picked a random Location as caller.
72 HttpServerPropertiesManager::ScheduleUpdatePrefsOnNetworkThread(
73 DETECTED_CORRUPTED_PREFS);
74 }
75
70 MOCK_METHOD0(UpdateCacheFromPrefsOnPrefThread, void()); 76 MOCK_METHOD0(UpdateCacheFromPrefsOnPrefThread, void());
71 MOCK_METHOD1(UpdatePrefsFromCacheOnNetworkThread, void(const base::Closure&)); 77 MOCK_METHOD1(UpdatePrefsFromCacheOnNetworkThread, void(const base::Closure&));
72 MOCK_METHOD6(UpdateCacheFromPrefsOnNetworkThread, 78 MOCK_METHOD6(UpdateCacheFromPrefsOnNetworkThread,
73 void(std::vector<std::string>* spdy_servers, 79 void(std::vector<std::string>* spdy_servers,
74 SpdySettingsMap* spdy_settings_map, 80 SpdySettingsMap* spdy_settings_map,
75 AlternativeServiceMap* alternative_service_map, 81 AlternativeServiceMap* alternative_service_map,
76 IPAddressNumber* last_quic_address, 82 IPAddressNumber* last_quic_address,
77 ServerNetworkStatsMap* server_network_stats_map, 83 ServerNetworkStatsMap* server_network_stats_map,
78 bool detected_corrupted_prefs)); 84 bool detected_corrupted_prefs));
79 MOCK_METHOD5(UpdatePrefsOnPref, 85 MOCK_METHOD5(UpdatePrefsOnPref,
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 // Run the task after shutdown, but before deletion. 780 // Run the task after shutdown, but before deletion.
775 base::RunLoop().RunUntilIdle(); 781 base::RunLoop().RunUntilIdle();
776 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 782 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
777 http_server_props_manager_.reset(); 783 http_server_props_manager_.reset();
778 base::RunLoop().RunUntilIdle(); 784 base::RunLoop().RunUntilIdle();
779 } 785 }
780 786
781 } // namespace 787 } // namespace
782 788
783 } // namespace net 789 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698