| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "ios/chrome/browser/net/metrics_network_client.h" | 5 #import "ios/chrome/browser/net/metrics_network_client.h" |
| 6 | 6 |
| 7 #import "base/ios/weak_nsobject.h" | 7 #import "base/ios/weak_nsobject.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #import "ios/chrome/browser/net/metrics_network_client_manager.h" | 11 #import "ios/chrome/browser/net/metrics_network_client_manager.h" |
| 12 #include "ios/web/public/url_util.h" | 12 #include "ios/web/public/url_util.h" |
| 13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 14 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
| 15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
| 16 | 16 |
| 17 @interface MetricsNetworkClient () { | 17 @interface MetricsNetworkClient () { |
| 18 BOOL _histogramUpdated; | 18 BOOL _histogramUpdated; |
| 19 // Pointer to the load time record for this request. This will be created | 19 // Pointer to the load time record for this request. This will be created |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 [self updateHistogram:netErrorCode]; | 76 [self updateHistogram:netErrorCode]; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 - (void)didFinishLoading { | 80 - (void)didFinishLoading { |
| 81 [super didFinishLoading]; | 81 [super didFinishLoading]; |
| 82 [self updateHistogram:net::OK]; | 82 [self updateHistogram:net::OK]; |
| 83 } | 83 } |
| 84 | 84 |
| 85 @end | 85 @end |
| OLD | NEW |