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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/resource_dispatcher_host.h" 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 request->set_upload(request_data.upload_data); 471 request->set_upload(request_data.upload_data);
472 upload_size = request_data.upload_data->GetContentLength(); 472 upload_size = request_data.upload_data->GetContentLength();
473 } 473 }
474 474
475 // Install a CrossSiteResourceHandler if this request is coming from a 475 // Install a CrossSiteResourceHandler if this request is coming from a
476 // RenderViewHost with a pending cross-site request. We only check this for 476 // RenderViewHost with a pending cross-site request. We only check this for
477 // MAIN_FRAME requests. Unblock requests only come from a blocked page, do 477 // MAIN_FRAME requests. Unblock requests only come from a blocked page, do
478 // not count as cross-site, otherwise it gets blocked indefinitely. 478 // not count as cross-site, otherwise it gets blocked indefinitely.
479 if (request_data.resource_type == ResourceType::MAIN_FRAME && 479 if (request_data.resource_type == ResourceType::MAIN_FRAME &&
480 process_type == ChildProcessInfo::RENDER_PROCESS && 480 process_type == ChildProcessInfo::RENDER_PROCESS &&
481 Singleton<CrossSiteRequestManager>::get()-> 481 CrossSiteRequestManager::GetInstance()->
482 HasPendingCrossSiteRequest(child_id, route_id)) { 482 HasPendingCrossSiteRequest(child_id, route_id)) {
483 // Wrap the event handler to be sure the current page's onunload handler 483 // Wrap the event handler to be sure the current page's onunload handler
484 // has a chance to run before we render the new page. 484 // has a chance to run before we render the new page.
485 handler = new CrossSiteResourceHandler(handler, 485 handler = new CrossSiteResourceHandler(handler,
486 child_id, 486 child_id,
487 route_id, 487 route_id,
488 this); 488 this);
489 } 489 }
490 490
491 // Insert a buffered event handler before the actual one. 491 // Insert a buffered event handler before the actual one.
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 return is_prefetch_enabled_; 1960 return is_prefetch_enabled_;
1961 } 1961 }
1962 1962
1963 // static 1963 // static
1964 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1964 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1965 is_prefetch_enabled_ = value; 1965 is_prefetch_enabled_ = value;
1966 } 1966 }
1967 1967
1968 // static 1968 // static
1969 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1969 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/sync/sync_setup_wizard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698