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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 | 1605 |
1606 // static | 1606 // static |
1607 Value* NetInternalsUI::GetConstants() { | 1607 Value* NetInternalsUI::GetConstants() { |
1608 DictionaryValue* constants_dict = new DictionaryValue(); | 1608 DictionaryValue* constants_dict = new DictionaryValue(); |
1609 | 1609 |
1610 // Version of the file format. | 1610 // Version of the file format. |
1611 constants_dict->SetInteger("logFormatVersion", kLogFormatVersion); | 1611 constants_dict->SetInteger("logFormatVersion", kLogFormatVersion); |
1612 | 1612 |
1613 // Add a dictionary with information on the relationship between event type | 1613 // Add a dictionary with information on the relationship between event type |
1614 // enums and their symbolic names. | 1614 // enums and their symbolic names. |
1615 constants_dict->Set("logEventTypes", net::NetLog::GetEventTypesAsValue()); | 1615 constants_dict->Set("eventType", net::NetLog::GetEventTypesAsValue()); |
1616 | 1616 |
1617 // Add a dictionary with the version of the client and its command line | 1617 // Add a dictionary with the version of the client and its command line |
1618 // arguments. | 1618 // arguments. |
1619 { | 1619 { |
1620 DictionaryValue* dict = new DictionaryValue(); | 1620 DictionaryValue* dict = new DictionaryValue(); |
1621 | 1621 |
1622 chrome::VersionInfo version_info; | 1622 chrome::VersionInfo version_info; |
1623 | 1623 |
1624 if (!version_info.is_valid()) { | 1624 if (!version_info.is_valid()) { |
1625 DLOG(ERROR) << "Unable to create chrome::VersionInfo"; | 1625 DLOG(ERROR) << "Unable to create chrome::VersionInfo"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 | 1669 |
1670 // Information about the relationship between event phase enums and their | 1670 // Information about the relationship between event phase enums and their |
1671 // symbolic names. | 1671 // symbolic names. |
1672 { | 1672 { |
1673 DictionaryValue* dict = new DictionaryValue(); | 1673 DictionaryValue* dict = new DictionaryValue(); |
1674 | 1674 |
1675 dict->SetInteger("PHASE_BEGIN", net::NetLog::PHASE_BEGIN); | 1675 dict->SetInteger("PHASE_BEGIN", net::NetLog::PHASE_BEGIN); |
1676 dict->SetInteger("PHASE_END", net::NetLog::PHASE_END); | 1676 dict->SetInteger("PHASE_END", net::NetLog::PHASE_END); |
1677 dict->SetInteger("PHASE_NONE", net::NetLog::PHASE_NONE); | 1677 dict->SetInteger("PHASE_NONE", net::NetLog::PHASE_NONE); |
1678 | 1678 |
1679 constants_dict->Set("logEventPhase", dict); | 1679 constants_dict->Set("eventPhase", dict); |
1680 } | 1680 } |
1681 | 1681 |
1682 // Information about the relationship between source type enums and | 1682 // Information about the relationship between source type enums and |
1683 // their symbolic names. | 1683 // their symbolic names. |
1684 constants_dict->Set("logSourceType", net::NetLog::GetSourceTypesAsValue()); | 1684 constants_dict->Set("sourceType", net::NetLog::GetSourceTypesAsValue()); |
1685 | 1685 |
1686 // Information about the relationship between LogLevel enums and their | 1686 // Information about the relationship between LogLevel enums and their |
1687 // symbolic names. | 1687 // symbolic names. |
1688 { | 1688 { |
1689 DictionaryValue* dict = new DictionaryValue(); | 1689 DictionaryValue* dict = new DictionaryValue(); |
1690 | 1690 |
1691 dict->SetInteger("LOG_ALL", net::NetLog::LOG_ALL); | 1691 dict->SetInteger("LOG_ALL", net::NetLog::LOG_ALL); |
1692 dict->SetInteger("LOG_ALL_BUT_BYTES", net::NetLog::LOG_ALL_BUT_BYTES); | 1692 dict->SetInteger("LOG_ALL_BUT_BYTES", net::NetLog::LOG_ALL_BUT_BYTES); |
1693 dict->SetInteger("LOG_BASIC", net::NetLog::LOG_BASIC); | 1693 dict->SetInteger("LOG_BASIC", net::NetLog::LOG_BASIC); |
1694 | 1694 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 } | 1737 } |
1738 | 1738 |
1739 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1739 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
1740 : WebUIController(web_ui) { | 1740 : WebUIController(web_ui) { |
1741 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1741 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
1742 | 1742 |
1743 // Set up the chrome://net-internals/ source. | 1743 // Set up the chrome://net-internals/ source. |
1744 Profile* profile = Profile::FromWebUI(web_ui); | 1744 Profile* profile = Profile::FromWebUI(web_ui); |
1745 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); | 1745 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); |
1746 } | 1746 } |
OLD | NEW |