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

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: incorporated bmcquade's comment 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // didObserveLoadingBehavior() must be called after dispatchDidCommitLoad() is called for the metrics tracking logic to handle it properly.
kinuko 2016/04/26 13:15:43 nit: could we / do we have assertion somewhere to
horo 2016/04/27 02:30:15 DocumentLoader::didObserveLoadingBehavior() has "A
kinuko 2016/04/27 09:09:40 I know, but we don't take the document loader path
433 if (client()->isControlledByServiceWorker(*m_documentLoader))
434 client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr olled);
435
432 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE vent::data(m_frame)); 436 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE vent::data(m_frame));
433 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); 437 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get());
434 m_frame->page()->didCommitLoad(m_frame); 438 m_frame->page()->didCommitLoad(m_frame);
435 dispatchDidClearDocumentOfWindowObject(); 439 dispatchDidClearDocumentOfWindowObject();
436 } 440 }
437 441
438 void FrameLoader::didBeginDocument(bool dispatch) 442 void FrameLoader::didBeginDocument(bool dispatch)
439 { 443 {
440 ASSERT(m_frame); 444 ASSERT(m_frame);
441 ASSERT(m_frame->document()); 445 ASSERT(m_frame->document());
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // FIXME: We need a way to propagate insecure requests policy flags to 1568 // FIXME: We need a way to propagate insecure requests policy flags to
1565 // out-of-process frames. For now, we'll always use default behavior. 1569 // out-of-process frames. For now, we'll always use default behavior.
1566 if (!parentFrame->isLocalFrame()) 1570 if (!parentFrame->isLocalFrame())
1567 return nullptr; 1571 return nullptr;
1568 1572
1569 ASSERT(toLocalFrame(parentFrame)->document()); 1573 ASSERT(toLocalFrame(parentFrame)->document());
1570 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1574 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1571 } 1575 }
1572 1576
1573 } // namespace blink 1577 } // namespace blink
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698