summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 20:02:23 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 20:02:23 +0000
commitf90ad12b2267b7ae90df254f95d47fd4aa437ef9 (patch)
tree4e79331b1a86d42b208c03a74f0e2dc8a3be98a0 /chrome/browser/dom_ui
parent4e7d9c64ed1d8be9c5626b3a8256da3bafe645b5 (diff)
downloadchromium_src-f90ad12b2267b7ae90df254f95d47fd4aa437ef9.zip
chromium_src-f90ad12b2267b7ae90df254f95d47fd4aa437ef9.tar.gz
chromium_src-f90ad12b2267b7ae90df254f95d47fd4aa437ef9.tar.bz2
Annotate load flags and net errors with their symbolic name.
Here are some examples showing what it looks like now (the stuff in parenthesis is new): --> load_flags = 8240 (DISABLE_CACHE | DISABLE_INTERCEPT | DO_NOT_SAVE_COOKIES) --> net_error = -105 (NAME_NOT_RESOLVED) BUG=37421 Review URL: http://codereview.chromium.org/2115007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/net_internals_ui.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc
index 8d65488..ef1d620 100644
--- a/chrome/browser/dom_ui/net_internals_ui.cc
+++ b/chrome/browser/dom_ui/net_internals_ui.cc
@@ -498,6 +498,32 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
CallJavascriptFunction(L"g_browser.receivedLogEventTypeConstants", dict);
}
+ // Tell the javascript about the relationship between load flag enums and
+ // their symbolic name.
+ {
+ DictionaryValue* dict = new DictionaryValue();
+
+#define LOAD_FLAG(label, value) \
+ dict->SetInteger(ASCIIToWide(# label), static_cast<int>(value));
+#include "net/base/load_flags_list.h"
+#undef LOAD_FLAG
+
+ CallJavascriptFunction(L"g_browser.receivedLoadFlagConstants", dict);
+ }
+
+ // Tell the javascript about the relationship between net error codes and
+ // their symbolic name.
+ {
+ DictionaryValue* dict = new DictionaryValue();
+
+#define NET_ERROR(label, value) \
+ dict->SetInteger(ASCIIToWide(# label), static_cast<int>(value));
+#include "net/base/net_error_list.h"
+#undef NET_ERROR
+
+ CallJavascriptFunction(L"g_browser.receivedNetErrorConstants", dict);
+ }
+
// Tell the javascript about the relationship between event phase enums and
// their symbolic name.
{