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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1871393002: Add NavigationToFirstContentfulPaint UMA for ServiceWorker controlled pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check page_timing_metrics_sender_ Created 4 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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 historyCommitType = HistoryInertCommit; 422 historyCommitType = HistoryInertCommit;
423 else if (historyCommitType == InitialCommitInChildFrame && MixedContentCheck er::isMixedContent(m_frame->tree().top()->securityContext()->getSecurityOrigin() , m_documentLoader->url())) 423 else if (historyCommitType == InitialCommitInChildFrame && MixedContentCheck er::isMixedContent(m_frame->tree().top()->securityContext()->getSecurityOrigin() , m_documentLoader->url()))
424 historyCommitType = HistoryInertCommit; 424 historyCommitType = HistoryInertCommit;
425 setHistoryItemStateForCommit(historyCommitType, HistoryNavigationType::Diffe rentDocument); 425 setHistoryItemStateForCommit(historyCommitType, HistoryNavigationType::Diffe rentDocument);
426 426
427 if (!m_stateMachine.committedMultipleRealLoads() && m_loadType == FrameLoadT ypeStandard) 427 if (!m_stateMachine.committedMultipleRealLoads() && m_loadType == FrameLoadT ypeStandard)
428 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedMultipleRealL oads); 428 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedMultipleRealL oads);
429 429
430 client()->dispatchDidCommitLoad(m_currentItem.get(), historyCommitType); 430 client()->dispatchDidCommitLoad(m_currentItem.get(), historyCommitType);
431 431
432 if (client()->isControlledByServiceWorker(*m_documentLoader))
Bryan McQuade 2016/04/14 15:10:26 i guess it's somewhat subtle, but this has to happ
horo 2016/04/14 15:46:31 Added comment.
433 client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr olled);
434
432 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE vent::data(m_frame)); 435 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE vent::data(m_frame));
433 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); 436 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get());
434 m_frame->page()->didCommitLoad(m_frame); 437 m_frame->page()->didCommitLoad(m_frame);
435 dispatchDidClearDocumentOfWindowObject(); 438 dispatchDidClearDocumentOfWindowObject();
436 } 439 }
437 440
438 void FrameLoader::didBeginDocument(bool dispatch) 441 void FrameLoader::didBeginDocument(bool dispatch)
439 { 442 {
440 ASSERT(m_frame); 443 ASSERT(m_frame);
441 ASSERT(m_frame->document()); 444 ASSERT(m_frame->document());
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 // FIXME: We need a way to propagate insecure requests policy flags to 1566 // FIXME: We need a way to propagate insecure requests policy flags to
1564 // out-of-process frames. For now, we'll always use default behavior. 1567 // out-of-process frames. For now, we'll always use default behavior.
1565 if (!parentFrame->isLocalFrame()) 1568 if (!parentFrame->isLocalFrame())
1566 return nullptr; 1569 return nullptr;
1567 1570
1568 ASSERT(toLocalFrame(parentFrame)->document()); 1571 ASSERT(toLocalFrame(parentFrame)->document());
1569 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1572 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1570 } 1573 }
1571 1574
1572 } // namespace blink 1575 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698