Commit 4e274ffd authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Rename "error" field in HostCache::Entry::ToValue() to "net_error".

The NetLogViewer automatically resolves "net_error" fields to net::Error
errors, but does do that for "error".

I believe this will require a followup CL to update where the
NetLogViewer's DNS tab gets network error string from.

Fixed: 1122054
Change-Id: Ifd74a988999d6142634f412e73929f568af536ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375602
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801830}
parent 6b7a1d6c
...@@ -43,7 +43,7 @@ const char kNetworkIsolationKeyKey[] = "network_isolation_key"; ...@@ -43,7 +43,7 @@ const char kNetworkIsolationKeyKey[] = "network_isolation_key";
const char kExpirationKey[] = "expiration"; const char kExpirationKey[] = "expiration";
const char kTtlKey[] = "ttl"; const char kTtlKey[] = "ttl";
const char kNetworkChangesKey[] = "network_changes"; const char kNetworkChangesKey[] = "network_changes";
const char kErrorKey[] = "error"; const char kNetErrorKey[] = "net_error";
const char kAddressesKey[] = "addresses"; const char kAddressesKey[] = "addresses";
const char kTextRecordsKey[] = "text_records"; const char kTextRecordsKey[] = "text_records";
const char kHostnameResultsKey[] = "hostname_results"; const char kHostnameResultsKey[] = "hostname_results";
...@@ -324,7 +324,7 @@ base::DictionaryValue HostCache::Entry::GetAsValue( ...@@ -324,7 +324,7 @@ base::DictionaryValue HostCache::Entry::GetAsValue(
} }
if (error() != OK) { if (error() != OK) {
entry_dict.SetInteger(kErrorKey, error()); entry_dict.SetInteger(kNetErrorKey, error());
} else { } else {
if (addresses()) { if (addresses()) {
// Append all of the resolved addresses. // Append all of the resolved addresses.
...@@ -721,7 +721,7 @@ bool HostCache::RestoreFromListValue(const base::ListValue& old_cache) { ...@@ -721,7 +721,7 @@ bool HostCache::RestoreFromListValue(const base::ListValue& old_cache) {
const base::ListValue* text_records_value = nullptr; const base::ListValue* text_records_value = nullptr;
const base::ListValue* hostname_records_value = nullptr; const base::ListValue* hostname_records_value = nullptr;
const base::ListValue* host_ports_value = nullptr; const base::ListValue* host_ports_value = nullptr;
if (!entry_dict->GetInteger(kErrorKey, &error)) { if (!entry_dict->GetInteger(kNetErrorKey, &error)) {
entry_dict->GetList(kAddressesKey, &addresses_value); entry_dict->GetList(kAddressesKey, &addresses_value);
entry_dict->GetList(kTextRecordsKey, &text_records_value); entry_dict->GetList(kTextRecordsKey, &text_records_value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment