Chromium Code Reviews| Index: chrome/browser/page_load_metrics/page_load_tracker.h |
| diff --git a/chrome/browser/page_load_metrics/page_load_tracker.h b/chrome/browser/page_load_metrics/page_load_tracker.h |
| index d12324a22eb944e738dd42335a866e64484a1878..df5d96486b902cf465965110d0152dc18dbfd45a 100644 |
| --- a/chrome/browser/page_load_metrics/page_load_tracker.h |
| +++ b/chrome/browser/page_load_metrics/page_load_tracker.h |
| @@ -198,10 +198,10 @@ class PageLoadTracker { |
| bool MatchesOriginalNavigation(content::NavigationHandle* navigation_handle); |
| - // Only valid to call post-commit. |
| - const GURL& committed_url() const { |
| - DCHECK(!committed_url_.is_empty()); |
| - return committed_url_; |
| + bool did_commit() const { return did_commit_; } |
| + const GURL& url() const { return url_; } |
| + const GURL& start_url() const { |
|
jkarlin
2017/02/15 19:55:36
With suggestion in .cc file this function can be r
Bryan McQuade
2017/02/15 20:27:10
Thanks! Removed.
|
| + return start_url_.is_empty() ? url_ : start_url_; |
| } |
| base::TimeTicks navigation_start() const { return navigation_start_; } |
| @@ -241,6 +241,8 @@ class PageLoadTracker { |
| // committed load. |
| void LogAbortChainHistograms(content::NavigationHandle* final_navigation); |
| + void MaybeUpdateURL(content::NavigationHandle* navigation_handle); |
| + |
| UserInputTracker input_tracker_; |
| // Whether we stopped tracking this navigation after it was initiated. We may |
| @@ -255,12 +257,17 @@ class PageLoadTracker { |
| // The navigation start in TimeTicks, not the wall time reported by Blink. |
| const base::TimeTicks navigation_start_; |
| - // The committed URL of this page load. |
| - GURL committed_url_; |
| + // The most recent URL of this page load. Updated at navigation start, upon |
| + // redirection, and at commit time. |
| + GURL url_; |
| - // The start URL for this page load (before redirects). |
| + // The start URL for this page load (before redirects), if different from |
| + // |url_|. |
| GURL start_url_; |
| + // Whether this page load committed. |
| + bool did_commit_; |
| + |
| std::unique_ptr<FailedProvisionalLoadInfo> failed_provisional_load_info_; |
| // Will be ABORT_NONE if we have not aborted this load yet. Otherwise will |