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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // sent us an IPC from a navigation we don't care about). | 66 // sent us an IPC from a navigation we don't care about). |
67 ERR_IPC_WITH_NO_RELEVANT_LOAD, | 67 ERR_IPC_WITH_NO_RELEVANT_LOAD, |
68 | 68 |
69 // Received a notification from a frame that has been navigated away from. | 69 // Received a notification from a frame that has been navigated away from. |
70 ERR_IPC_FROM_WRONG_FRAME, | 70 ERR_IPC_FROM_WRONG_FRAME, |
71 | 71 |
72 // We received an IPC even through the last committed url from the browser | 72 // We received an IPC even through the last committed url from the browser |
73 // was not http/s. This can happen with the renderer sending IPCs for the | 73 // was not http/s. This can happen with the renderer sending IPCs for the |
74 // new tab page. This will often come paired with | 74 // new tab page. This will often come paired with |
75 // ERR_IPC_WITH_NO_RELEVANT_LOAD. | 75 // ERR_IPC_WITH_NO_RELEVANT_LOAD. |
| 76 // |
| 77 // DEPRECATED: our IPC policy is now relaxed to enable logging metrics for |
| 78 // chrome URLs. |
76 ERR_IPC_FROM_BAD_URL_SCHEME, | 79 ERR_IPC_FROM_BAD_URL_SCHEME, |
77 | 80 |
78 // If we track a navigation, but the renderer sends us no IPCs. This could | 81 // If we track a navigation, but the renderer sends us no IPCs. This could |
79 // occur if the browser filters loads less aggressively than the renderer. | 82 // occur if the browser filters loads less aggressively than the renderer. |
80 ERR_NO_IPCS_RECEIVED, | 83 ERR_NO_IPCS_RECEIVED, |
81 | 84 |
82 // Tracks frequency with which we record an abort time that occurred before | 85 // Tracks frequency with which we record an abort time that occurred before |
83 // navigation start. This is expected to happen in some cases (see comments in | 86 // navigation start. This is expected to happen in some cases (see comments in |
84 // cc file for details). We use this error counter to understand how often it | 87 // cc file for details). We use this error counter to understand how often it |
85 // happens. | 88 // happens. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 void UpdateAbortInternal(UserAbortType abort_type, | 226 void UpdateAbortInternal(UserAbortType abort_type, |
224 bool user_initiated, | 227 bool user_initiated, |
225 base::TimeTicks timestamp, | 228 base::TimeTicks timestamp, |
226 bool is_certainly_browser_timestamp); | 229 bool is_certainly_browser_timestamp); |
227 | 230 |
228 // If |final_navigation| is null, then this is an "unparented" abort chain, | 231 // If |final_navigation| is null, then this is an "unparented" abort chain, |
229 // and represents a sequence of provisional aborts that never ends with a | 232 // and represents a sequence of provisional aborts that never ends with a |
230 // committed load. | 233 // committed load. |
231 void LogAbortChainHistograms(content::NavigationHandle* final_navigation); | 234 void LogAbortChainHistograms(content::NavigationHandle* final_navigation); |
232 | 235 |
| 236 void FilterObservers(content::NavigationHandle* navigation_handle); |
| 237 |
233 // Whether we stopped tracking this navigation after it was initiated. We may | 238 // Whether we stopped tracking this navigation after it was initiated. We may |
234 // stop tracking a navigation if it doesn't meet the criteria for tracking | 239 // stop tracking a navigation if it doesn't meet the criteria for tracking |
235 // metrics in DidFinishNavigation. | 240 // metrics in DidFinishNavigation. |
236 bool did_stop_tracking_; | 241 bool did_stop_tracking_; |
237 | 242 |
238 // Whether the application went into the background when this PageLoadTracker | 243 // Whether the application went into the background when this PageLoadTracker |
239 // was active. This is a temporary boolean for UMA tracking. | 244 // was active. This is a temporary boolean for UMA tracking. |
240 bool app_entered_background_; | 245 bool app_entered_background_; |
241 | 246 |
242 // The navigation start in TimeTicks, not the wall time reported by Blink. | 247 // The navigation start in TimeTicks, not the wall time reported by Blink. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 424 |
420 // Has the MWCO observed at least one navigation? | 425 // Has the MWCO observed at least one navigation? |
421 bool has_navigated_; | 426 bool has_navigated_; |
422 | 427 |
423 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 428 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
424 }; | 429 }; |
425 | 430 |
426 } // namespace page_load_metrics | 431 } // namespace page_load_metrics |
427 | 432 |
428 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 433 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |