| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ | 5 #ifndef CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ |
| 6 #define CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ | 6 #define CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/common/page_load_metrics/page_track_decider.h" | 9 #include "chrome/common/page_load_metrics/page_track_decider.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 class WebDocument; | 12 class WebDocument; |
| 13 class WebDataSource; | 13 class WebDataSource; |
| 14 } // namespace blink | 14 } // namespace blink |
| 15 | 15 |
| 16 namespace page_load_metrics { | 16 namespace page_load_metrics { |
| 17 | 17 |
| 18 class RendererPageTrackDecider : public PageTrackDecider { | 18 class RendererPageTrackDecider : public PageTrackDecider { |
| 19 public: | 19 public: |
| 20 // document and data_source are not owned by RendererPageTrackDecider, | 20 // document and data_source are not owned by RendererPageTrackDecider, |
| 21 // and must outlive the RendererPageTrackDecider. | 21 // and must outlive the RendererPageTrackDecider. |
| 22 RendererPageTrackDecider(const blink::WebDocument* document, | 22 RendererPageTrackDecider(const blink::WebDocument* document, |
| 23 const blink::WebDataSource* data_source); | 23 const blink::WebDataSource* data_source); |
| 24 ~RendererPageTrackDecider() override; | 24 ~RendererPageTrackDecider() override; |
| 25 | 25 |
| 26 bool HasCommitted() override; | 26 bool HasCommitted() override; |
| 27 bool IsHttpOrHttpsUrl() override; | |
| 28 bool IsNewTabPageUrl() override; | 27 bool IsNewTabPageUrl() override; |
| 28 bool IsAboutBlankUrl() override; |
| 29 bool IsChromeErrorPage() override; | 29 bool IsChromeErrorPage() override; |
| 30 bool IsHtmlOrXhtmlPage() override; | 30 bool IsHtmlOrXhtmlPage() override; |
| 31 int GetHttpStatusCode() override; | 31 int GetHttpStatusCode() override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 const blink::WebDocument* const document_; | 34 const blink::WebDocument* const document_; |
| 35 const blink::WebDataSource* const data_source_; | 35 const blink::WebDataSource* const data_source_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(RendererPageTrackDecider); | 37 DISALLOW_COPY_AND_ASSIGN(RendererPageTrackDecider); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace page_load_metrics | 40 } // namespace page_load_metrics |
| 41 | 41 |
| 42 #endif // CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ | 42 #endif // CHROME_RENDERER_PAGE_LOAD_METRICS_RENDERER_PAGE_TRACK_DECIDER_H_ |
| OLD | NEW |