Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 10879058: Experiment to make net_error_list more greppable Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/download/base_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <list> 7 #include <list>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 #undef LOAD_FLAG 1658 #undef LOAD_FLAG
1659 1659
1660 constants_dict->Set("loadFlag", dict); 1660 constants_dict->Set("loadFlag", dict);
1661 } 1661 }
1662 1662
1663 // Add information on the relationship between net error codes and their 1663 // Add information on the relationship between net error codes and their
1664 // symbolic names. 1664 // symbolic names.
1665 { 1665 {
1666 DictionaryValue* dict = new DictionaryValue(); 1666 DictionaryValue* dict = new DictionaryValue();
1667 1667
1668 const size_t kSkipErrPrefix = strlen("ERR_");
1668 #define NET_ERROR(label, value) \ 1669 #define NET_ERROR(label, value) \
1669 dict->SetInteger(# label, static_cast<int>(value)); 1670 DCHECK(strlen(#label) > kSkipErrPrefix); \
1671 dict->SetInteger(# label + kSkipErrPrefix, static_cast<int>(value));
1670 #include "net/base/net_error_list.h" 1672 #include "net/base/net_error_list.h"
1671 #undef NET_ERROR 1673 #undef NET_ERROR
1672 1674
1673 constants_dict->Set("netError", dict); 1675 constants_dict->Set("netError", dict);
1674 } 1676 }
1675 1677
1676 // Information about the relationship between event phase enums and their 1678 // Information about the relationship between event phase enums and their
1677 // symbolic names. 1679 // symbolic names.
1678 { 1680 {
1679 DictionaryValue* dict = new DictionaryValue(); 1681 DictionaryValue* dict = new DictionaryValue();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 } 1745 }
1744 1746
1745 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1747 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1746 : WebUIController(web_ui) { 1748 : WebUIController(web_ui) {
1747 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1749 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1748 1750
1749 // Set up the chrome://net-internals/ source. 1751 // Set up the chrome://net-internals/ source.
1750 Profile* profile = Profile::FromWebUI(web_ui); 1752 Profile* profile = Profile::FromWebUI(web_ui);
1751 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource()); 1753 ChromeURLDataManager::AddDataSource(profile, CreateNetInternalsHTMLSource());
1752 } 1754 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/base_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698