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

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

Issue 2284683002: PlzNavigate: support upgrade-insecure-navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adressed comments (Nate) Created 4 years, 3 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 if (!shouldLoadEmpty) 637 if (!shouldLoadEmpty)
638 return false; 638 return false;
639 639
640 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni tialEmptyDocument()) 640 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni tialEmptyDocument())
641 m_request.setURL(blankURL()); 641 m_request.setURL(blankURL());
642 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str ing()); 642 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str ing());
643 finishedLoading(monotonicallyIncreasingTime()); 643 finishedLoading(monotonicallyIncreasingTime());
644 return true; 644 return true;
645 } 645 }
646 646
647 void DocumentLoader::upgradeInsecureRequest()
648 {
649 fetcher()->context().upgradeInsecureRequest(m_request);
650 }
651
652 void DocumentLoader::startLoadingMainResource() 647 void DocumentLoader::startLoadingMainResource()
653 { 648 {
654 timing().markNavigationStart(); 649 timing().markNavigationStart();
655 ASSERT(!m_mainResource); 650 ASSERT(!m_mainResource);
656 ASSERT(m_state == NotStarted); 651 ASSERT(m_state == NotStarted);
657 m_state = Provisional; 652 m_state = Provisional;
658 653
659 if (maybeLoadEmpty()) 654 if (maybeLoadEmpty())
660 return; 655 return;
661 656
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 { 725 {
731 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 726 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
732 if (!source.isNull()) 727 if (!source.isNull())
733 m_writer->appendReplacingData(source); 728 m_writer->appendReplacingData(source);
734 endWriting(m_writer.get()); 729 endWriting(m_writer.get());
735 } 730 }
736 731
737 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 732 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
738 733
739 } // namespace blink 734 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698