Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: chrome/browser/page_load_metrics/page_load_tracker.cc

Issue 2886843006: servificied service worker interception
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/page_load_metrics/page_load_tracker.h" 5 #include "chrome/browser/page_load_metrics/page_load_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 ClampBrowserTimestampIfInterProcessTimeTickSkew(&foreground_time_); 519 ClampBrowserTimestampIfInterProcessTimeTickSkew(&foreground_time_);
520 } 520 }
521 521
522 INVOKE_AND_PRUNE_OBSERVERS(observers_, OnShown); 522 INVOKE_AND_PRUNE_OBSERVERS(observers_, OnShown);
523 } 523 }
524 524
525 void PageLoadTracker::WillProcessNavigationResponse( 525 void PageLoadTracker::WillProcessNavigationResponse(
526 content::NavigationHandle* navigation_handle) { 526 content::NavigationHandle* navigation_handle) {
527 DCHECK(!navigation_request_id_.has_value()); 527 DCHECK(!navigation_request_id_.has_value());
528 navigation_request_id_ = navigation_handle->GetGlobalRequestID(); 528 navigation_request_id_ = navigation_handle->GetGlobalRequestID();
529 DCHECK(navigation_request_id_.value() != content::GlobalRequestID()); 529 // DCHECK(navigation_request_id_.value() != content::GlobalRequestID());
530 } 530 }
531 531
532 void PageLoadTracker::Commit(content::NavigationHandle* navigation_handle) { 532 void PageLoadTracker::Commit(content::NavigationHandle* navigation_handle) {
533 did_commit_ = true; 533 did_commit_ = true;
534 url_ = navigation_handle->GetURL(); 534 url_ = navigation_handle->GetURL();
535 // Some transitions (like CLIENT_REDIRECT) are only known at commit time. 535 // Some transitions (like CLIENT_REDIRECT) are only known at commit time.
536 page_transition_ = navigation_handle->GetPageTransition(); 536 page_transition_ = navigation_handle->GetPageTransition();
537 user_initiated_info_.user_gesture = navigation_handle->HasUserGesture(); 537 user_initiated_info_.user_gesture = navigation_handle->HasUserGesture();
538 538
539 INVOKE_AND_PRUNE_OBSERVERS( 539 INVOKE_AND_PRUNE_OBSERVERS(
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 observer->MediaStartedPlaying(video_type, is_in_main_frame); 954 observer->MediaStartedPlaying(video_type, is_in_main_frame);
955 } 955 }
956 956
957 void PageLoadTracker::OnNavigationDelayComplete(base::TimeDelta scheduled_delay, 957 void PageLoadTracker::OnNavigationDelayComplete(base::TimeDelta scheduled_delay,
958 base::TimeDelta actual_delay) { 958 base::TimeDelta actual_delay) {
959 for (const auto& observer : observers_) 959 for (const auto& observer : observers_)
960 observer->OnNavigationDelayComplete(scheduled_delay, actual_delay); 960 observer->OnNavigationDelayComplete(scheduled_delay, actual_delay);
961 } 961 }
962 962
963 } // namespace page_load_metrics 963 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698