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

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

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Updates and address Ojan's comments Created 3 years, 8 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
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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 user_initiated_info_.user_gesture = navigation_handle->HasUserGesture(); 456 user_initiated_info_.user_gesture = navigation_handle->HasUserGesture();
457 457
458 INVOKE_AND_PRUNE_OBSERVERS( 458 INVOKE_AND_PRUNE_OBSERVERS(
459 observers_, ShouldObserveMimeType, 459 observers_, ShouldObserveMimeType,
460 navigation_handle->GetWebContents()->GetContentsMimeType()); 460 navigation_handle->GetWebContents()->GetContentsMimeType());
461 461
462 INVOKE_AND_PRUNE_OBSERVERS(observers_, OnCommit, navigation_handle); 462 INVOKE_AND_PRUNE_OBSERVERS(observers_, OnCommit, navigation_handle);
463 LogAbortChainHistograms(navigation_handle); 463 LogAbortChainHistograms(navigation_handle);
464 } 464 }
465 465
466 void PageLoadTracker::CommitSubFrame(
467 content::NavigationHandle* navigation_handle) {
468 INVOKE_AND_PRUNE_OBSERVERS(observers_, OnCommitSubFrame, navigation_handle);
469 }
470
466 void PageLoadTracker::FailedProvisionalLoad( 471 void PageLoadTracker::FailedProvisionalLoad(
467 content::NavigationHandle* navigation_handle, 472 content::NavigationHandle* navigation_handle,
468 base::TimeTicks failed_load_time) { 473 base::TimeTicks failed_load_time) {
469 DCHECK(!failed_provisional_load_info_); 474 DCHECK(!failed_provisional_load_info_);
470 failed_provisional_load_info_.reset(new FailedProvisionalLoadInfo( 475 failed_provisional_load_info_.reset(new FailedProvisionalLoadInfo(
471 failed_load_time - navigation_handle->NavigationStart(), 476 failed_load_time - navigation_handle->NavigationStart(),
472 navigation_handle->GetNetErrorCode())); 477 navigation_handle->GetNetErrorCode()));
473 } 478 }
474 479
475 void PageLoadTracker::Redirect(content::NavigationHandle* navigation_handle) { 480 void PageLoadTracker::Redirect(content::NavigationHandle* navigation_handle) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 742 }
738 743
739 void PageLoadTracker::MediaStartedPlaying( 744 void PageLoadTracker::MediaStartedPlaying(
740 const content::WebContentsObserver::MediaPlayerInfo& video_type, 745 const content::WebContentsObserver::MediaPlayerInfo& video_type,
741 bool is_in_main_frame) { 746 bool is_in_main_frame) {
742 for (const auto& observer : observers_) 747 for (const auto& observer : observers_)
743 observer->MediaStartedPlaying(video_type, is_in_main_frame); 748 observer->MediaStartedPlaying(video_type, is_in_main_frame);
744 } 749 }
745 750
746 } // namespace page_load_metrics 751 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698