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

Side by Side Diff: Source/core/loader/cache/CachedResourceLoader.cpp

Issue 14054023: Add loadedNonEmptyDocument flag in FrameLoader for Resource Timing (Closed) Base URL: http://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set loadedNonEmptyDocument in setDocumentLoader Created 7 years, 7 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 | « Source/core/loader/FrameLoaderStateMachine.cpp ('k') | no next file » | 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!memoryCache()->add(resource.get())) 564 if (!memoryCache()->add(resource.get()))
565 resource->setOwningCachedResourceLoader(this); 565 resource->setOwningCachedResourceLoader(this);
566 storeResourceTimingInitiatorInformation(resource, request); 566 storeResourceTimingInitiatorInformation(resource, request);
567 return resource; 567 return resource;
568 } 568 }
569 569
570 void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedR esourceHandle<CachedResource>& resource, const CachedResourceRequest& request) 570 void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedR esourceHandle<CachedResource>& resource, const CachedResourceRequest& request)
571 { 571 {
572 if (resource->type() == CachedResource::MainResource) { 572 if (resource->type() == CachedResource::MainResource) {
573 // <iframe>s should report the initial navigation requested by the paren t document, but not subsequent navigations. 573 // <iframe>s should report the initial navigation requested by the paren t document, but not subsequent navigations.
574 if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMac hine()->committingFirstRealLoad()) { 574 if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyD ocument()) {
Nate Chapin 2013/05/07 16:40:55 Could we set loadedNonEmptyDocument here, rather t
Pan 2013/05/07 23:39:28 great, why not? I was in trouble to find a place i
575 InitiatorInfo info = { frame()->ownerElement()->localName(), monoton icallyIncreasingTime() }; 575 InitiatorInfo info = { frame()->ownerElement()->localName(), monoton icallyIncreasingTime() };
576 m_initiatorMap.add(resource.get(), info); 576 m_initiatorMap.add(resource.get(), info);
577 } 577 }
578 } else { 578 } else {
579 InitiatorInfo info = { request.initiatorName(), monotonicallyIncreasingT ime() }; 579 InitiatorInfo info = { request.initiatorName(), monotonicallyIncreasingT ime() };
580 m_initiatorMap.add(resource.get(), info); 580 m_initiatorMap.add(resource.get(), info);
581 } 581 }
582 } 582 }
583 583
584 CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida tionPolicy(CachedResource::Type type, ResourceRequest& request, bool forPreload, CachedResource* existingResource, CachedResourceRequest::DeferOption defer) con st 584 CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida tionPolicy(CachedResource::Type type, ResourceRequest& request, bool forPreload, CachedResource* existingResource, CachedResourceRequest::DeferOption defer) con st
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 info.ignoreMember(m_initiatorMap); 1011 info.ignoreMember(m_initiatorMap);
1012 } 1012 }
1013 1013
1014 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( ) 1014 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( )
1015 { 1015 {
1016 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); 1016 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck);
1017 return options; 1017 return options;
1018 } 1018 }
1019 1019
1020 } 1020 }
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoaderStateMachine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698