| 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 !base::FieldTrialList::Find("Prefetch")->group_name().empty(); | 1050 !base::FieldTrialList::Find("Prefetch")->group_name().empty(); |
| 1051 | 1051 |
| 1052 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start); | 1052 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start); |
| 1053 if (use_prefetch_histogram) { | 1053 if (use_prefetch_histogram) { |
| 1054 UMA_HISTOGRAM_MEDIUM_TIMES( | 1054 UMA_HISTOGRAM_MEDIUM_TIMES( |
| 1055 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte", | 1055 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte", |
| 1056 "Prefetch"), | 1056 "Prefetch"), |
| 1057 to_start); | 1057 to_start); |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 const bool is_prerender = !!(request_info_.load_flags & net::LOAD_PRERENDER); | 1060 const bool is_prerender = !!(request_info_.load_flags & LOAD_PRERENDER); |
| 1061 if (is_prerender) { | 1061 if (is_prerender) { |
| 1062 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte_Prerender", | 1062 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte_Prerender", |
| 1063 to_start); | 1063 to_start); |
| 1064 if (use_prefetch_histogram) { | 1064 if (use_prefetch_histogram) { |
| 1065 UMA_HISTOGRAM_MEDIUM_TIMES( | 1065 UMA_HISTOGRAM_MEDIUM_TIMES( |
| 1066 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte_Prerender", | 1066 base::FieldTrial::MakeName("Net.HttpTimeToFirstByte_Prerender", |
| 1067 "Prefetch"), | 1067 "Prefetch"), |
| 1068 to_start); | 1068 to_start); |
| 1069 } | 1069 } |
| 1070 } else { | 1070 } else { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 bool URLRequestHttpJob::IsCompressibleContent() const { | 1320 bool URLRequestHttpJob::IsCompressibleContent() const { |
| 1321 std::string mime_type; | 1321 std::string mime_type; |
| 1322 return GetMimeType(&mime_type) && | 1322 return GetMimeType(&mime_type) && |
| 1323 (IsSupportedJavascriptMimeType(mime_type.c_str()) || | 1323 (IsSupportedJavascriptMimeType(mime_type.c_str()) || |
| 1324 IsSupportedNonImageMimeType(mime_type.c_str())); | 1324 IsSupportedNonImageMimeType(mime_type.c_str())); |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 } // namespace net | 1327 } // namespace net |
| OLD | NEW |