| 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 "chrome/browser/net/resource_prefetch_predictor_observer.h" | 5 #include "chrome/browser/net/resource_prefetch_predictor_observer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
| 12 #include "content/public/browser/resource_request_info.h" | 12 #include "content/public/browser/resource_request_info.h" |
| 13 #include "net/url_request/url_request.h" | 13 #include "net/url_request/url_request.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 using predictors::ResourcePrefetchPredictor; | 17 using predictors::ResourcePrefetchPredictor; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 summary)); | 163 summary)); |
| 164 | 164 |
| 165 ReportRequestStats(REQUEST_STATS_TOTAL_PROCESSED_RESPONSES); | 165 ReportRequestStats(REQUEST_STATS_TOTAL_PROCESSED_RESPONSES); |
| 166 if (request_info && | 166 if (request_info && |
| 167 request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { | 167 request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { |
| 168 ReportMainFrameRequestStats(MAIN_FRAME_REQUEST_STATS_PROCESSED_RESPONSES); | 168 ReportMainFrameRequestStats(MAIN_FRAME_REQUEST_STATS_PROCESSED_RESPONSES); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace chrome_browser_net | 172 } // namespace chrome_browser_net |
| OLD | NEW |