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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 2278823003: Change net::LOAD_MAIN_FRAME to net::LOAD_MAIN_FRAME_DEPRECATED to discourage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added deprecation flag to two recent tests. Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_handler.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/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 NOTREACHED(); 124 NOTREACHED();
125 } 125 }
126 126
127 // Record network errors that HTTP requests complete with, including OK and 127 // Record network errors that HTTP requests complete with, including OK and
128 // ABORTED. 128 // ABORTED.
129 void RecordNetworkErrorHistograms(const net::URLRequest* request) { 129 void RecordNetworkErrorHistograms(const net::URLRequest* request) {
130 if (request->url().SchemeIs("http")) { 130 if (request->url().SchemeIs("http")) {
131 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.HttpRequestCompletionErrorCodes", 131 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.HttpRequestCompletionErrorCodes",
132 std::abs(request->status().error())); 132 std::abs(request->status().error()));
133 133
134 if (request->load_flags() & net::LOAD_MAIN_FRAME) { 134 if (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) {
135 UMA_HISTOGRAM_SPARSE_SLOWLY( 135 UMA_HISTOGRAM_SPARSE_SLOWLY(
136 "Net.HttpRequestCompletionErrorCodes.MainFrame", 136 "Net.HttpRequestCompletionErrorCodes.MainFrame",
137 std::abs(request->status().error())); 137 std::abs(request->status().error()));
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 } // namespace 142 } // namespace
143 143
144 ChromeNetworkDelegate::ChromeNetworkDelegate( 144 ChromeNetworkDelegate::ChromeNetworkDelegate(
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 if (!data_use_aggregator_) 584 if (!data_use_aggregator_)
585 return; 585 return;
586 586
587 if (is_data_usage_off_the_record_) { 587 if (is_data_usage_off_the_record_) {
588 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); 588 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes);
589 return; 589 return;
590 } 590 }
591 591
592 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); 592 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes);
593 } 593 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698