OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 DictionaryValue* dict = new DictionaryValue(); | 1923 DictionaryValue* dict = new DictionaryValue(); |
1924 | 1924 |
1925 #define NET_ERROR(label, value) \ | 1925 #define NET_ERROR(label, value) \ |
1926 dict->SetInteger(# label, static_cast<int>(value)); | 1926 dict->SetInteger(# label, static_cast<int>(value)); |
1927 #include "net/base/net_error_list.h" | 1927 #include "net/base/net_error_list.h" |
1928 #undef NET_ERROR | 1928 #undef NET_ERROR |
1929 | 1929 |
1930 constants_dict->Set("netError", dict); | 1930 constants_dict->Set("netError", dict); |
1931 } | 1931 } |
1932 | 1932 |
| 1933 // Add information on the relationship between QUIC error codes and their |
| 1934 // symbolic names. |
| 1935 { |
| 1936 DictionaryValue* dict = new DictionaryValue(); |
| 1937 |
| 1938 #define QUIC_ERROR(error) \ |
| 1939 dict->SetInteger(# error, static_cast<int>(net::QUIC_ ## error)); |
| 1940 #include "net/quic/quic_error_list.h" |
| 1941 #undef QUIC_ERROR |
| 1942 |
| 1943 constants_dict->Set("quicError", dict); |
| 1944 } |
| 1945 |
| 1946 // Add information on the relationship between QUIC RST_STREAM error codes |
| 1947 // and their symbolic names. |
| 1948 { |
| 1949 DictionaryValue* dict = new DictionaryValue(); |
| 1950 |
| 1951 #define QUIC_RST_STREAM_ERROR(error) \ |
| 1952 dict->SetInteger(# error, static_cast<int>(net::QUIC_ ## error)); |
| 1953 #include "net/quic/quic_rst_stream_error_list.h" |
| 1954 #undef QUIC_RST_STREAM_ERROR |
| 1955 |
| 1956 constants_dict->Set("quicRstStreamError", dict); |
| 1957 } |
| 1958 |
1933 // Information about the relationship between event phase enums and their | 1959 // Information about the relationship between event phase enums and their |
1934 // symbolic names. | 1960 // symbolic names. |
1935 { | 1961 { |
1936 DictionaryValue* dict = new DictionaryValue(); | 1962 DictionaryValue* dict = new DictionaryValue(); |
1937 | 1963 |
1938 dict->SetInteger("PHASE_BEGIN", net::NetLog::PHASE_BEGIN); | 1964 dict->SetInteger("PHASE_BEGIN", net::NetLog::PHASE_BEGIN); |
1939 dict->SetInteger("PHASE_END", net::NetLog::PHASE_END); | 1965 dict->SetInteger("PHASE_END", net::NetLog::PHASE_END); |
1940 dict->SetInteger("PHASE_NONE", net::NetLog::PHASE_NONE); | 1966 dict->SetInteger("PHASE_NONE", net::NetLog::PHASE_NONE); |
1941 | 1967 |
1942 constants_dict->Set("logEventPhase", dict); | 1968 constants_dict->Set("logEventPhase", dict); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 } | 2026 } |
2001 | 2027 |
2002 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 2028 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
2003 : WebUIController(web_ui) { | 2029 : WebUIController(web_ui) { |
2004 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 2030 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
2005 | 2031 |
2006 // Set up the chrome://net-internals/ source. | 2032 // Set up the chrome://net-internals/ source. |
2007 Profile* profile = Profile::FromWebUI(web_ui); | 2033 Profile* profile = Profile::FromWebUI(web_ui); |
2008 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 2034 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
2009 } | 2035 } |
OLD | NEW |