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

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

Issue 337783003: DevTools: Preload HTML documents content before fetching resource content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.h ('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) 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 763
764 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) 764 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url)
765 { 765 {
766 ASSERT(!url.isEmpty()); 766 ASSERT(!url.isEmpty());
767 if (!frame) 767 if (!frame)
768 return; 768 return;
769 769
770 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve l, "Not allowed to load local resource: " + url); 770 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve l, "Not allowed to load local resource: " + url);
771 } 771 }
772 772
773 static ResourceRequest requestFromHistoryItem(HistoryItem* item, ResourceRequest CachePolicy cachePolicy) 773 // static
774 ResourceRequest FrameLoader::requestFromHistoryItem(HistoryItem* item, ResourceR equestCachePolicy cachePolicy)
774 { 775 {
775 RefPtr<FormData> formData = item->formData(); 776 RefPtr<FormData> formData = item->formData();
776 ResourceRequest request(item->url(), item->referrer()); 777 ResourceRequest request(item->url(), item->referrer());
777 request.setCachePolicy(cachePolicy); 778 request.setCachePolicy(cachePolicy);
778 if (formData) { 779 if (formData) {
779 request.setHTTPMethod("POST"); 780 request.setHTTPMethod("POST");
780 request.setHTTPBody(formData); 781 request.setHTTPBody(formData);
781 request.setHTTPContentType(item->formContentType()); 782 request.setHTTPContentType(item->formContentType());
782 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString (item->referrer().referrer); 783 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString (item->referrer().referrer);
783 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString()); 784 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString());
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. 1448 // FIXME: We need a way to propagate sandbox flags to out-of-process frames.
1448 Frame* parentFrame = m_frame->tree().parent(); 1449 Frame* parentFrame = m_frame->tree().parent();
1449 if (parentFrame && parentFrame->isLocalFrame()) 1450 if (parentFrame && parentFrame->isLocalFrame())
1450 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); 1451 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags();
1451 if (FrameOwner* frameOwner = m_frame->owner()) 1452 if (FrameOwner* frameOwner = m_frame->owner())
1452 flags |= frameOwner->sandboxFlags(); 1453 flags |= frameOwner->sandboxFlags();
1453 return flags; 1454 return flags;
1454 } 1455 }
1455 1456
1456 } // namespace WebCore 1457 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698