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

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

Issue 2212183004: Log to UMA when x-origin frames (1) are created and (2) become visible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use frameloader->stateMachine. kill racy DCHECK. rename histogram Created 4 years, 4 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 if (!init.shouldReuseDefaultView()) 688 if (!init.shouldReuseDefaultView())
689 frame->setDOMWindow(LocalDOMWindow::create(*frame)); 689 frame->setDOMWindow(LocalDOMWindow::create(*frame));
690 690
691 Document* document = frame->localDOMWindow()->installNewDocument(mimeType, i nit); 691 Document* document = frame->localDOMWindow()->installNewDocument(mimeType, i nit);
692 692
693 // This should be set before receivedFirstData(). 693 // This should be set before receivedFirstData().
694 if (!overridingURL.isEmpty()) 694 if (!overridingURL.isEmpty())
695 frame->document()->setBaseURLOverride(overridingURL); 695 frame->document()->setBaseURLOverride(overridingURL);
696 696
697 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable); 697 frame->loader().didInstallNewDocument(dispatchWindowObjectAvailable);
698 if (frame->loader().stateMachine()->committedFirstRealDocumentLoad())
699 frame->didInstallNewRealDocument();
dcheng 2016/08/26 18:28:29 I think it would be nicer if we could do this with
dgrogan 2016/08/26 18:54:06 This allowed the enum and logging code to live sol
698 700
699 // This must be called before DocumentWriter is created, otherwise HTML pars er 701 // This must be called before DocumentWriter is created, otherwise HTML pars er
700 // will use stale values from HTMLParserOption. 702 // will use stale values from HTMLParserOption.
701 if (!dispatchWindowObjectAvailable) 703 if (!dispatchWindowObjectAvailable)
702 frame->loader().receivedFirstData(); 704 frame->loader().receivedFirstData();
703 705
704 frame->loader().didBeginDocument(); 706 frame->loader().didBeginDocument();
705 707
706 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding); 708 return DocumentWriter::create(document, parsingPolicy, mimeType, encoding);
707 } 709 }
(...skipping 10 matching lines...) Expand all
718 { 720 {
719 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 721 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
720 if (!source.isNull()) 722 if (!source.isNull())
721 m_writer->appendReplacingData(source); 723 m_writer->appendReplacingData(source);
722 endWriting(m_writer.get()); 724 endWriting(m_writer.get());
723 } 725 }
724 726
725 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 727 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
726 728
727 } // namespace blink 729 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698