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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2647643004: Report nav timing 2 instance as soon as it's requested. (Closed)
Patch Set: got rid of test cases that don't apply anymore Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index da7d65d99f6abaa313a92c605a8a13a52b99c444..6f0f46397d605674f2279d5e17aefd9fb41e1264 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -653,6 +653,10 @@ void ResourceFetcher::initializeResourceRequest(
(type == Resource::MainResource) ? FetchMainResource : FetchSubresource);
}
+std::unique_ptr<ResourceTimingInfo> ResourceFetcher::getNavigationTimingInfo() {
+ return std::move(m_navigationTimingInfo);
Kunihiko Sakamoto 2017/02/03 01:28:07 Scripts can be executed from partially loaded main
sunjian 2017/02/03 20:15:21 Added an extra field which is raw pointer of m_nav
panicker 2017/02/03 23:27:43 This is strange. I think your intention is shared_
sunjian 2017/02/04 00:08:36 A shared smart pointer probably makes things easie
panicker 2017/02/07 00:45:05 I think shared_ptr is the right thing here. We wan
+}
+
void ResourceFetcher::initializeRevalidation(
ResourceRequest& revalidatingRequest,
Resource* resource) {
@@ -1114,10 +1118,6 @@ ArchiveResource* ResourceFetcher::createArchive(Resource* resource) {
return m_archive ? m_archive->mainResource() : nullptr;
}
-ResourceTimingInfo* ResourceFetcher::getNavigationTimingInfo() {
- return m_navigationTimingInfo.get();
-}
-
void ResourceFetcher::handleLoadCompletion(Resource* resource) {
context().didLoadResource(resource);

Powered by Google App Engine
This is Rietveld 408576698