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