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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 6625066: Add pending preloads indexed by routing id. Start preloading once we navigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fetch/merge Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 if (request_data.upload_data) { 454 if (request_data.upload_data) {
455 request->set_upload(request_data.upload_data); 455 request->set_upload(request_data.upload_data);
456 upload_size = request_data.upload_data->GetContentLength(); 456 upload_size = request_data.upload_data->GetContentLength();
457 } 457 }
458 458
459 // Install a PrerenderResourceHandler if the requested URL could 459 // Install a PrerenderResourceHandler if the requested URL could
460 // be prerendered. This should be in front of the [a]syncResourceHandler, 460 // be prerendered. This should be in front of the [a]syncResourceHandler,
461 // but after the BufferedResourceHandler since it depends on the MIME 461 // but after the BufferedResourceHandler since it depends on the MIME
462 // sniffing capabilities in the BufferedResourceHandler. 462 // sniffing capabilities in the BufferedResourceHandler.
463 prerender::PrerenderResourceHandler* pre_handler = 463 prerender::PrerenderResourceHandler* pre_handler =
464 prerender::PrerenderResourceHandler::MaybeCreate(*request, 464 prerender::PrerenderResourceHandler::MaybeCreate(
cbentzel 2011/03/21 19:46:04 One argument per line in this case [many others ar
dominich 2011/03/21 20:25:51 Done.
465 context, 465 *request, context, handler, ((load_flags & net::LOAD_PRERENDER) != 0),
466 handler); 466 child_id, route_id);
467 if (pre_handler) 467 if (pre_handler)
468 handler = pre_handler; 468 handler = pre_handler;
469 469
470 // Install a CrossSiteResourceHandler if this request is coming from a 470 // Install a CrossSiteResourceHandler if this request is coming from a
471 // RenderViewHost with a pending cross-site request. We only check this for 471 // RenderViewHost with a pending cross-site request. We only check this for
472 // MAIN_FRAME requests. Unblock requests only come from a blocked page, do 472 // MAIN_FRAME requests. Unblock requests only come from a blocked page, do
473 // not count as cross-site, otherwise it gets blocked indefinitely. 473 // not count as cross-site, otherwise it gets blocked indefinitely.
474 if (request_data.resource_type == ResourceType::MAIN_FRAME && 474 if (request_data.resource_type == ResourceType::MAIN_FRAME &&
475 process_type == ChildProcessInfo::RENDER_PROCESS && 475 process_type == ChildProcessInfo::RENDER_PROCESS &&
476 CrossSiteRequestManager::GetInstance()-> 476 CrossSiteRequestManager::GetInstance()->
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 return is_prefetch_enabled_; 1941 return is_prefetch_enabled_;
1942 } 1942 }
1943 1943
1944 // static 1944 // static
1945 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1945 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1946 is_prefetch_enabled_ = value; 1946 is_prefetch_enabled_ = value;
1947 } 1947 }
1948 1948
1949 // static 1949 // static
1950 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1950 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698