| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/domain_reliability/uploader.h" | 5 #include "components/domain_reliability/uploader.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
| 13 #include "components/data_use_measurement/core/data_use_user_data.h" | 13 #include "components/data_use_measurement/core/data_use_user_data.h" |
| 14 #include "components/domain_reliability/util.h" | 14 #include "components/domain_reliability/util.h" |
| 15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
| 16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 17 #include "net/http/http_response_headers.h" | 17 #include "net/http/http_response_headers.h" |
| 18 #include "net/http/http_util.h" | 18 #include "net/http/http_util.h" |
| 19 #include "net/url_request/url_fetcher.h" | 19 #include "net/url_request/url_fetcher.h" |
| 20 #include "net/url_request/url_fetcher_delegate.h" | 20 #include "net/url_request/url_fetcher_delegate.h" |
| 21 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 int DomainReliabilityUploader::GetURLRequestUploadDepth( | 173 int DomainReliabilityUploader::GetURLRequestUploadDepth( |
| 174 const net::URLRequest& request) { | 174 const net::URLRequest& request) { |
| 175 UploadUserData* data = static_cast<UploadUserData*>( | 175 UploadUserData* data = static_cast<UploadUserData*>( |
| 176 request.GetUserData(UploadUserData::kUserDataKey)); | 176 request.GetUserData(UploadUserData::kUserDataKey)); |
| 177 if (!data) | 177 if (!data) |
| 178 return 0; | 178 return 0; |
| 179 return data->depth(); | 179 return data->depth(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace domain_reliability | 182 } // namespace domain_reliability |
| OLD | NEW |