| Index: chrome/browser/net/http_server_properties_manager.cc
|
| diff --git a/chrome/browser/net/http_server_properties_manager.cc b/chrome/browser/net/http_server_properties_manager.cc
|
| index 7796e6c829651dc3f3c84b4e0c97314580673a94..0f2de16025bbc7ca505a42ceb7d30941a96f3131 100644
|
| --- a/chrome/browser/net/http_server_properties_manager.cc
|
| +++ b/chrome/browser/net/http_server_properties_manager.cc
|
| @@ -281,11 +281,10 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
|
| scoped_ptr<net::AlternateProtocolMap> alternate_protocol_map(
|
| new net::AlternateProtocolMap);
|
|
|
| - for (base::DictionaryValue::key_iterator it = servers_dict->begin_keys();
|
| - it != servers_dict->end_keys();
|
| - ++it) {
|
| + for (base::DictionaryValue::Iterator it(*servers_dict); !it.IsAtEnd();
|
| + it.Advance()) {
|
| // Get server's host/pair.
|
| - const std::string& server_str = *it;
|
| + const std::string& server_str = it.key();
|
| net::HostPortPair server = net::HostPortPair::FromString(server_str);
|
| if (server.host().empty()) {
|
| DVLOG(1) << "Malformed http_server_properties for server: " << server_str;
|
| @@ -294,8 +293,7 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
|
| }
|
|
|
| const base::DictionaryValue* server_pref_dict = NULL;
|
| - if (!servers_dict->GetDictionaryWithoutPathExpansion(
|
| - server_str, &server_pref_dict)) {
|
| + if (!it.value().GetAsDictionary(&server_pref_dict)) {
|
| DVLOG(1) << "Malformed http_server_properties server: " << server_str;
|
| detected_corrupted_prefs = true;
|
| continue;
|
| @@ -315,10 +313,9 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
|
| if (server_pref_dict->GetDictionaryWithoutPathExpansion(
|
| "settings", &spdy_settings_dict)) {
|
| net::SettingsMap settings_map;
|
| - for (base::DictionaryValue::key_iterator dict_it =
|
| - spdy_settings_dict->begin_keys();
|
| - dict_it != spdy_settings_dict->end_keys(); ++dict_it) {
|
| - const std::string& id_str = *dict_it;
|
| + for (base::DictionaryValue::Iterator dict_it(*spdy_settings_dict);
|
| + !dict_it.IsAtEnd(); dict_it.Advance()) {
|
| + const std::string& id_str = dict_it.key();
|
| int id = 0;
|
| if (!base::StringToInt(id_str, &id)) {
|
| DVLOG(1) << "Malformed id in SpdySettings for server: " <<
|
| @@ -327,8 +324,7 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
|
| continue;
|
| }
|
| int value = 0;
|
| - if (!spdy_settings_dict->GetIntegerWithoutPathExpansion(id_str,
|
| - &value)) {
|
| + if (!dict_it.value().GetAsInteger(&value)) {
|
| DVLOG(1) << "Malformed value in SpdySettings for server: " <<
|
| server_str;
|
| NOTREACHED();
|
|
|