Index: net/http/http_server_properties_manager.h |
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h |
index 0b7dc11045eeef114ea5395029c30561b8bc64ea..0da2c365a8cd0df553e93f7123d1407f86bb6b5e 100644 |
--- a/net/http/http_server_properties_manager.h |
+++ b/net/http/http_server_properties_manager.h |
@@ -167,6 +167,8 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { |
static base::TimeDelta GetUpdatePrefsDelayForTesting(); |
protected: |
+ typedef std::vector<std::string> ServerList; |
+ |
// The location where ScheduleUpdatePrefsOnNetworkSequence was called. |
// Must be kept up to date with HttpServerPropertiesUpdatePrefsLocation in |
// histograms.xml. |
@@ -206,11 +208,11 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { |
// Starts the update of cached prefs in |http_server_properties_impl_| on the |
// network thread. Protected for testing. |
void UpdateCacheFromPrefsOnNetworkSequence( |
- std::vector<std::string>* spdy_servers, |
- AlternativeServiceMap* alternative_service_map, |
- IPAddress* last_quic_address, |
- ServerNetworkStatsMap* server_network_stats_map, |
- QuicServerInfoMap* quic_server_info_map, |
+ const ServerList* spdy_servers, |
Zhongyi Shi
2017/06/20 22:06:19
Could this be std::unique_ptr<ServerList>?
wangyix1
2017/06/21 18:45:33
Done.
|
+ std::unique_ptr<AlternativeServiceMap> alternative_service_map, |
+ const IPAddress* last_quic_address, |
+ std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map, |
+ std::unique_ptr<QuicServerInfoMap> quic_server_info_map, |
bool detected_corrupted_prefs); |
// These are used to delay updating the preferences when cached data in |
@@ -232,7 +234,7 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { |
// Update prefs::kHttpServerProperties preferences on pref thread. Executes an |
// optional |completion| callback when finished. Protected for testing. |
- void UpdatePrefsOnPrefThread(base::ListValue* spdy_server_list, |
+ void UpdatePrefsOnPrefThread(std::unique_ptr<ServerList> spdy_servers, |
Ryan Hamilton
2017/06/20 18:25:56
Instead of passing a unique_ptr here (where all th
Zhongyi Shi
2017/06/20 22:06:19
+1, right now it's a mix of the two. It will be mu
wangyix1
2017/06/21 18:45:33
Ah, I think I just forgot to update these. For Upd
Ryan Hamilton
2017/06/22 02:45:52
Sweet! Much cleaner!
|
AlternativeServiceMap* alternative_service_map, |
IPAddress* last_quic_address, |
ServerNetworkStatsMap* server_network_stats_map, |
@@ -240,8 +242,6 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { |
const base::Closure& completion); |
private: |
- typedef std::vector<std::string> ServerList; |
- |
FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |
AddToAlternativeServiceMap); |
FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, |