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

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

Issue 309693002: Add a value for end-to-end reloads in Cache policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed Przemek's comments Created 6 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
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/platform/network/ResourceRequest.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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques t) 645 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques t)
646 { 646 {
647 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo ad()) 647 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo ad())
648 return FrameLoadTypeInitialInChildFrame; 648 return FrameLoadTypeInitialInChildFrame;
649 if (!m_frame->tree().parent() && !m_frame->page()->backForward().backForward ListCount()) 649 if (!m_frame->tree().parent() && !m_frame->page()->backForward().backForward ListCount())
650 return FrameLoadTypeStandard; 650 return FrameLoadTypeStandard;
651 if (m_provisionalDocumentLoader && request.substituteData().failingURL() == m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward) 651 if (m_provisionalDocumentLoader && request.substituteData().failingURL() == m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward)
652 return FrameLoadTypeBackForward; 652 return FrameLoadTypeBackForward;
653 if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData) 653 if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData)
654 return FrameLoadTypeReload; 654 return FrameLoadTypeReload;
655 if (request.resourceRequest().cachePolicy() == ReloadBypassingCache)
656 return FrameLoadTypeReloadFromOrigin;
655 if (request.lockBackForwardList() || isScriptTriggeredFormSubmissionInChildF rame(request)) 657 if (request.lockBackForwardList() || isScriptTriggeredFormSubmissionInChildF rame(request))
656 return FrameLoadTypeRedirectWithLockedBackForwardList; 658 return FrameLoadTypeRedirectWithLockedBackForwardList;
657 if (!request.originDocument() && request.resourceRequest().url() == m_docume ntLoader->urlForHistory()) 659 if (!request.originDocument() && request.resourceRequest().url() == m_docume ntLoader->urlForHistory())
658 return FrameLoadTypeSame; 660 return FrameLoadTypeSame;
659 if (request.substituteData().failingURL() == m_documentLoader->urlForHistory () && m_loadType == FrameLoadTypeReload) 661 if (request.substituteData().failingURL() == m_documentLoader->urlForHistory () && m_loadType == FrameLoadTypeReload)
660 return FrameLoadTypeReload; 662 return FrameLoadTypeReload;
661 return FrameLoadTypeStandard; 663 return FrameLoadTypeStandard;
662 } 664 }
663 665
664 bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request) 666 bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request)
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 { 1441 {
1440 SandboxFlags flags = m_forcedSandboxFlags; 1442 SandboxFlags flags = m_forcedSandboxFlags;
1441 if (LocalFrame* parentFrame = m_frame->tree().parent()) 1443 if (LocalFrame* parentFrame = m_frame->tree().parent())
1442 flags |= parentFrame->document()->sandboxFlags(); 1444 flags |= parentFrame->document()->sandboxFlags();
1443 if (FrameOwner* frameOwner = m_frame->ownerElement()) 1445 if (FrameOwner* frameOwner = m_frame->ownerElement())
1444 flags |= frameOwner->sandboxFlags(); 1446 flags |= frameOwner->sandboxFlags();
1445 return flags; 1447 return flags;
1446 } 1448 }
1447 1449
1448 } // namespace WebCore 1450 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/platform/network/ResourceRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698