| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/page_load_metrics/metrics_web_contents_observer.h" | 5 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram_macros.h" |
| 16 #include "base/metrics/user_metrics.h" | 16 #include "base/metrics/user_metrics.h" |
| 17 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" | 17 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" |
| 18 #include "chrome/common/page_load_metrics/page_load_metrics_messages.h" | 18 #include "chrome/common/page_load_metrics/page_load_metrics_messages.h" |
| 19 #include "chrome/common/page_load_metrics/page_load_timing.h" | 19 #include "chrome/common/page_load_metrics/page_load_timing.h" |
| 20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 21 #include "content/public/browser/navigation_details.h" | 21 #include "content/public/browser/navigation_details.h" |
| 22 #include "content/public/browser/navigation_handle.h" | 22 #include "content/public/browser/navigation_handle.h" |
| 23 #include "content/public/browser/render_frame_host.h" | 23 #include "content/public/browser/render_frame_host.h" |
| 24 #include "content/public/browser/render_view_host.h" | 24 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) | 1052 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) |
| 1053 return false; | 1053 return false; |
| 1054 const std::string& mime_type = web_contents()->GetContentsMimeType(); | 1054 const std::string& mime_type = web_contents()->GetContentsMimeType(); |
| 1055 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") | 1055 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") |
| 1056 return false; | 1056 return false; |
| 1057 } | 1057 } |
| 1058 return true; | 1058 return true; |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 } // namespace page_load_metrics | 1061 } // namespace page_load_metrics |
| OLD | NEW |