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

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

Issue 2936723002: Report frequency of single page app navigations to UMA (Closed)
Patch Set: update histograms.xml Created 3 years, 6 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 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "core/loader/ProgressTracker.h" 72 #include "core/loader/ProgressTracker.h"
73 #include "core/loader/appcache/ApplicationCacheHost.h" 73 #include "core/loader/appcache/ApplicationCacheHost.h"
74 #include "core/page/ChromeClient.h" 74 #include "core/page/ChromeClient.h"
75 #include "core/page/CreateWindow.h" 75 #include "core/page/CreateWindow.h"
76 #include "core/page/FrameTree.h" 76 #include "core/page/FrameTree.h"
77 #include "core/page/Page.h" 77 #include "core/page/Page.h"
78 #include "core/page/scrolling/ScrollingCoordinator.h" 78 #include "core/page/scrolling/ScrollingCoordinator.h"
79 #include "core/probe/CoreProbes.h" 79 #include "core/probe/CoreProbes.h"
80 #include "core/svg/graphics/SVGImage.h" 80 #include "core/svg/graphics/SVGImage.h"
81 #include "core/xml/parser/XMLDocumentParser.h" 81 #include "core/xml/parser/XMLDocumentParser.h"
82 #include "platform/Histogram.h"
82 #include "platform/InstanceCounters.h" 83 #include "platform/InstanceCounters.h"
83 #include "platform/PluginScriptForbiddenScope.h" 84 #include "platform/PluginScriptForbiddenScope.h"
84 #include "platform/ScriptForbiddenScope.h" 85 #include "platform/ScriptForbiddenScope.h"
85 #include "platform/bindings/DOMWrapperWorld.h" 86 #include "platform/bindings/DOMWrapperWorld.h"
86 #include "platform/instrumentation/tracing/TraceEvent.h" 87 #include "platform/instrumentation/tracing/TraceEvent.h"
87 #include "platform/loader/fetch/ResourceFetcher.h" 88 #include "platform/loader/fetch/ResourceFetcher.h"
88 #include "platform/loader/fetch/ResourceRequest.h" 89 #include "platform/loader/fetch/ResourceRequest.h"
89 #include "platform/network/HTTPParsers.h" 90 #include "platform/network/HTTPParsers.h"
90 #include "platform/network/NetworkUtils.h" 91 #include "platform/network/NetworkUtils.h"
91 #include "platform/scroll/ScrollAnimatorBase.h" 92 #include "platform/scroll/ScrollAnimatorBase.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 return allowed; 478 return allowed;
478 } 479 }
479 480
480 void FrameLoader::UpdateForSameDocumentNavigation( 481 void FrameLoader::UpdateForSameDocumentNavigation(
481 const KURL& new_url, 482 const KURL& new_url,
482 SameDocumentNavigationSource same_document_navigation_source, 483 SameDocumentNavigationSource same_document_navigation_source,
483 PassRefPtr<SerializedScriptValue> data, 484 PassRefPtr<SerializedScriptValue> data,
484 HistoryScrollRestorationType scroll_restoration_type, 485 HistoryScrollRestorationType scroll_restoration_type,
485 FrameLoadType type, 486 FrameLoadType type,
486 Document* initiating_document) { 487 Document* initiating_document) {
488 UMA_HISTOGRAM_ENUMERATION(
489 "RendererScheduler.UpdateForSameDocumentNavigationCount", type,
490 FrameLoadType::kFrameLoadTypeCount);
Nate Chapin 2017/06/14 18:10:50 FrameLoadTypes might be overloaded. For example, F
tdresser 2017/06/14 18:30:52 Great question. The high level question we want t
Liquan (Max) Gu 2017/06/20 23:35:39 Done.
487 TRACE_EVENT1("blink", "FrameLoader::updateForSameDocumentNavigation", "url", 491 TRACE_EVENT1("blink", "FrameLoader::updateForSameDocumentNavigation", "url",
488 new_url.GetString().Ascii().data()); 492 new_url.GetString().Ascii().data());
489 493
490 // Generate start and stop notifications only when loader is completed so that 494 // Generate start and stop notifications only when loader is completed so that
491 // we don't fire them for fragment redirection that happens in window.onload 495 // we don't fire them for fragment redirection that happens in window.onload
492 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838 496 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838
493 // Do not fire the notifications if the frame is concurrently navigating away 497 // Do not fire the notifications if the frame is concurrently navigating away
494 // from the document, since a new document is already loading. 498 // from the document, since a new document is already loading.
495 if (frame_->GetDocument()->LoadEventFinished() && 499 if (frame_->GetDocument()->LoadEventFinished() &&
496 !provisional_document_loader_) 500 !provisional_document_loader_)
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 // TODO(japhet): This is needed because the browser process DCHECKs if the 1688 // TODO(japhet): This is needed because the browser process DCHECKs if the
1685 // first entry we commit in a new frame has replacement set. It's unclear 1689 // first entry we commit in a new frame has replacement set. It's unclear
1686 // whether the DCHECK is right, investigate removing this special case. 1690 // whether the DCHECK is right, investigate removing this special case.
1687 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && 1691 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem &&
1688 (!Opener() || !request.Url().IsEmpty()); 1692 (!Opener() || !request.Url().IsEmpty());
1689 loader->SetReplacesCurrentHistoryItem(replace_current_item); 1693 loader->SetReplacesCurrentHistoryItem(replace_current_item);
1690 return loader; 1694 return loader;
1691 } 1695 }
1692 1696
1693 } // namespace blink 1697 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698