| 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 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void RenderProcessGone(base::TerminationStatus status) override; | 65 void RenderProcessGone(base::TerminationStatus status) override; |
| 66 void RenderViewHostChanged(content::RenderViewHost* old_host, | 66 void RenderViewHostChanged(content::RenderViewHost* old_host, |
| 67 content::RenderViewHost* new_host) override; | 67 content::RenderViewHost* new_host) override; |
| 68 | 68 |
| 69 // This method is forwarded from the MetricsNavigationThrottle. | 69 // This method is forwarded from the MetricsNavigationThrottle. |
| 70 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); | 70 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); |
| 71 | 71 |
| 72 // A resource request completed on the IO thread. | 72 // A resource request completed on the IO thread. |
| 73 void OnRequestComplete(content::ResourceType resource_type, | 73 void OnRequestComplete(content::ResourceType resource_type, |
| 74 bool was_cached, | 74 bool was_cached, |
| 75 int net_error); | 75 int64_t raw_body_bytes, |
| 76 base::TimeTicks creation_time); |
| 76 | 77 |
| 77 // Flush any buffered metrics, as part of the metrics subsystem persisting | 78 // Flush any buffered metrics, as part of the metrics subsystem persisting |
| 78 // metrics as the application goes into the background. The application may be | 79 // metrics as the application goes into the background. The application may be |
| 79 // killed at any time after this method is invoked without further | 80 // killed at any time after this method is invoked without further |
| 80 // notification. | 81 // notification. |
| 81 void FlushMetricsOnAppEnterBackground(); | 82 void FlushMetricsOnAppEnterBackground(); |
| 82 | 83 |
| 83 // This getter function is required for testing. | 84 // This getter function is required for testing. |
| 84 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad(); | 85 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad(); |
| 85 | 86 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 148 |
| 148 // Has the MWCO observed at least one navigation? | 149 // Has the MWCO observed at least one navigation? |
| 149 bool has_navigated_; | 150 bool has_navigated_; |
| 150 | 151 |
| 151 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 152 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 } // namespace page_load_metrics | 155 } // namespace page_load_metrics |
| 155 | 156 |
| 156 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 157 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |