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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp

Issue 1366883002: [Reland] Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF in BackgroundHTMLParser Created 5 years, 2 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, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 if (m_state == Terminated) 137 if (m_state == Terminated)
138 return; 138 return;
139 139
140 RELEASE_ASSERT(m_connectionState == ConnectionStateNew); 140 RELEASE_ASSERT(m_connectionState == ConnectionStateNew);
141 m_connectionState = ConnectionStateStarted; 141 m_connectionState = ConnectionStateStarted;
142 142
143 m_loader = adoptPtr(Platform::current()->createURLLoader()); 143 m_loader = adoptPtr(Platform::current()->createURLLoader());
144 ASSERT(m_loader); 144 ASSERT(m_loader);
145 m_loader->setLoadingTaskRunner(m_fetcher->loadingTaskRunner());
145 WrappedResourceRequest wrappedRequest(m_request); 146 WrappedResourceRequest wrappedRequest(m_request);
146 m_loader->loadAsynchronously(wrappedRequest, this); 147 m_loader->loadAsynchronously(wrappedRequest, this);
147 } 148 }
148 149
149 void ResourceLoader::changeToSynchronous() 150 void ResourceLoader::changeToSynchronous()
150 { 151 {
151 ASSERT(m_options.synchronousPolicy == RequestAsynchronously); 152 ASSERT(m_options.synchronousPolicy == RequestAsynchronously);
152 ASSERT(m_loader); 153 ASSERT(m_loader);
153 m_loader->cancel(); 154 m_loader->cancel();
154 m_loader.clear(); 155 m_loader.clear();
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); 519 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
519 } 520 }
520 521
521 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const 522 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const
522 { 523 {
523 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 524 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
524 return request; 525 return request;
525 } 526 }
526 527
527 } 528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698