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

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

Issue 2653673006: Move loadType() to DocumentLoader (Closed)
Patch Set: Rebase Created 3 years, 10 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 DocumentLoader::DocumentLoader(LocalFrame* frame, 99 DocumentLoader::DocumentLoader(LocalFrame* frame,
100 const ResourceRequest& req, 100 const ResourceRequest& req,
101 const SubstituteData& substituteData, 101 const SubstituteData& substituteData,
102 ClientRedirectPolicy clientRedirectPolicy) 102 ClientRedirectPolicy clientRedirectPolicy)
103 : m_frame(frame), 103 : m_frame(frame),
104 m_fetcher(FrameFetchContext::createFetcherFromDocumentLoader(this)), 104 m_fetcher(FrameFetchContext::createFetcherFromDocumentLoader(this)),
105 m_originalRequest(req), 105 m_originalRequest(req),
106 m_substituteData(substituteData), 106 m_substituteData(substituteData),
107 m_request(req), 107 m_request(req),
108 m_loadType(FrameLoadTypeStandard),
108 m_isClientRedirect(clientRedirectPolicy == 109 m_isClientRedirect(clientRedirectPolicy ==
109 ClientRedirectPolicy::ClientRedirect), 110 ClientRedirectPolicy::ClientRedirect),
110 m_replacesCurrentHistoryItem(false), 111 m_replacesCurrentHistoryItem(false),
111 m_dataReceived(false), 112 m_dataReceived(false),
112 m_navigationType(NavigationTypeOther), 113 m_navigationType(NavigationTypeOther),
113 m_documentLoadTiming(*this), 114 m_documentLoadTiming(*this),
114 m_timeOfLastDataReceived(0.0), 115 m_timeOfLastDataReceived(0.0),
115 m_applicationCacheHost(ApplicationCacheHost::create(this)), 116 m_applicationCacheHost(ApplicationCacheHost::create(this)),
116 m_wasBlockedAfterCSP(false), 117 m_wasBlockedAfterCSP(false),
117 m_state(NotStarted), 118 m_state(NotStarted),
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 const KURL& requestURL = m_request.url(); 369 const KURL& requestURL = m_request.url();
369 RefPtr<SecurityOrigin> redirectingOrigin = 370 RefPtr<SecurityOrigin> redirectingOrigin =
370 SecurityOrigin::create(redirectResponse.url()); 371 SecurityOrigin::create(redirectResponse.url());
371 if (!redirectingOrigin->canDisplay(requestURL)) { 372 if (!redirectingOrigin->canDisplay(requestURL)) {
372 FrameLoader::reportLocalLoadFailed(m_frame, requestURL.getString()); 373 FrameLoader::reportLocalLoadFailed(m_frame, requestURL.getString());
373 m_fetcher->stopFetching(); 374 m_fetcher->stopFetching();
374 return false; 375 return false;
375 } 376 }
376 if (!frameLoader().shouldContinueForNavigationPolicy( 377 if (!frameLoader().shouldContinueForNavigationPolicy(
377 m_request, SubstituteData(), this, CheckContentSecurityPolicy, 378 m_request, SubstituteData(), this, CheckContentSecurityPolicy,
378 m_navigationType, NavigationPolicyCurrentTab, 379 m_navigationType, NavigationPolicyCurrentTab, m_loadType,
379 replacesCurrentHistoryItem(), isClientRedirect(), nullptr)) { 380 isClientRedirect(), nullptr)) {
380 m_fetcher->stopFetching(); 381 m_fetcher->stopFetching();
381 return false; 382 return false;
382 } 383 }
383 384
384 DCHECK(timing().fetchStart()); 385 DCHECK(timing().fetchStart());
385 appendRedirect(requestURL); 386 appendRedirect(requestURL);
386 didRedirect(redirectResponse.url(), requestURL); 387 didRedirect(redirectResponse.url(), requestURL);
387 frameLoaderClient().dispatchDidReceiveServerRedirectForProvisionalLoad(); 388 frameLoaderClient().dispatchDidReceiveServerRedirectForProvisionalLoad();
388 389
389 return true; 390 return true;
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 m_writer ? m_writer->encoding() : emptyAtom, true, 814 m_writer ? m_writer->encoding() : emptyAtom, true,
814 ForceSynchronousParsing); 815 ForceSynchronousParsing);
815 if (!source.isNull()) 816 if (!source.isNull())
816 m_writer->appendReplacingData(source); 817 m_writer->appendReplacingData(source);
817 endWriting(); 818 endWriting();
818 } 819 }
819 820
820 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 821 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
821 822
822 } // namespace blink 823 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698