| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 base::FieldTrialList::TrialExists("Prefetch"); | 1120 base::FieldTrialList::TrialExists("Prefetch"); |
| 1121 | 1121 |
| 1122 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start); | 1122 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start); |
| 1123 if (use_prefetch_histogram) { | 1123 if (use_prefetch_histogram) { |
| 1124 UMA_HISTOGRAM_MEDIUM_TIMES( | 1124 UMA_HISTOGRAM_MEDIUM_TIMES( |
| 1125 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte", | 1125 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte", |
| 1126 "Prefetch"), | 1126 "Prefetch"), |
| 1127 to_start); | 1127 to_start); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 const bool is_prerender = !!(request_info_.load_flags & LOAD_PRERENDER); | 1130 const bool is_prerender = !!(request_info_.load_flags & LOAD_PRERENDERING); |
| 1131 if (is_prerender) { | 1131 if (is_prerender) { |
| 1132 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte_Prerender", | 1132 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte_Prerender", |
| 1133 to_start); | 1133 to_start); |
| 1134 if (use_prefetch_histogram) { | 1134 if (use_prefetch_histogram) { |
| 1135 UMA_HISTOGRAM_MEDIUM_TIMES( | 1135 UMA_HISTOGRAM_MEDIUM_TIMES( |
| 1136 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte_Prerender", | 1136 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte_Prerender", |
| 1137 "Prefetch"), | 1137 "Prefetch"), |
| 1138 to_start); | 1138 to_start); |
| 1139 } | 1139 } |
| 1140 } else { | 1140 } else { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 bool URLRequestHttpJob::IsCompressibleContent() const { | 1390 bool URLRequestHttpJob::IsCompressibleContent() const { |
| 1391 std::string mime_type; | 1391 std::string mime_type; |
| 1392 return GetMimeType(&mime_type) && | 1392 return GetMimeType(&mime_type) && |
| 1393 (IsSupportedJavascriptMimeType(mime_type.c_str()) || | 1393 (IsSupportedJavascriptMimeType(mime_type.c_str()) || |
| 1394 IsSupportedNonImageMimeType(mime_type.c_str())); | 1394 IsSupportedNonImageMimeType(mime_type.c_str())); |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 } // namespace net | 1397 } // namespace net |
| OLD | NEW |