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

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

Issue 19599012: Add detailed histograms for DownloadProtectionService URLFetcher errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 5 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
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 <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 break; 182 break;
183 case net::URLRequestStatus::IO_PENDING: 183 case net::URLRequestStatus::IO_PENDING:
184 dict->SetString("status", "IO_PENDING"); 184 dict->SetString("status", "IO_PENDING");
185 break; 185 break;
186 case net::URLRequestStatus::CANCELED: 186 case net::URLRequestStatus::CANCELED:
187 dict->SetString("status", "CANCELED"); 187 dict->SetString("status", "CANCELED");
188 break; 188 break;
189 case net::URLRequestStatus::FAILED: 189 case net::URLRequestStatus::FAILED:
190 dict->SetString("status", "FAILED"); 190 dict->SetString("status", "FAILED");
191 break; 191 break;
192 case net::URLRequestStatus::STATUS_MAX:
193 NOTREACHED();
194 break;
192 } 195 }
193 if (request->status().error() != net::OK) 196 if (request->status().error() != net::OK)
194 dict->SetInteger("net_error", request->status().error()); 197 dict->SetInteger("net_error", request->status().error());
195 return dict; 198 return dict;
196 } 199 }
197 200
198 // Returns true if |request1| was created before |request2|. 201 // Returns true if |request1| was created before |request2|.
199 bool RequestCreatedBefore(const net::URLRequest* request1, 202 bool RequestCreatedBefore(const net::URLRequest* request1,
200 const net::URLRequest* request2) { 203 const net::URLRequest* request2) {
201 return request1->creation_time() < request2->creation_time(); 204 return request1->creation_time() < request2->creation_time();
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1871 }
1869 1872
1870 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1873 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1871 : WebUIController(web_ui) { 1874 : WebUIController(web_ui) {
1872 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1875 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1873 1876
1874 // Set up the chrome://net-internals/ source. 1877 // Set up the chrome://net-internals/ source.
1875 Profile* profile = Profile::FromWebUI(web_ui); 1878 Profile* profile = Profile::FromWebUI(web_ui);
1876 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1879 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1877 } 1880 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698