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

Side by Side Diff: content/browser/cross_site_request_manager.cc

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/cross_site_request_manager.h"
6
7 #include "base/memory/singleton.h"
8
9 namespace content {
10
11 bool CrossSiteRequestManager::HasPendingCrossSiteRequest(int renderer_id,
12 int render_frame_id) {
13 base::AutoLock lock(lock_);
14
15 std::pair<int, int> key(renderer_id, render_frame_id);
16 return pending_cross_site_frames_.find(key) !=
17 pending_cross_site_frames_.end();
18 }
19
20 void CrossSiteRequestManager::SetHasPendingCrossSiteRequest(int renderer_id,
21 int render_frame_id,
22 bool has_pending) {
23 base::AutoLock lock(lock_);
24
25 std::pair<int, int> key(renderer_id, render_frame_id);
26 if (has_pending) {
27 pending_cross_site_frames_.insert(key);
28 } else {
29 pending_cross_site_frames_.erase(key);
30 }
31 }
32
33 CrossSiteRequestManager::CrossSiteRequestManager() {}
34
35 CrossSiteRequestManager::~CrossSiteRequestManager() {}
36
37 // static
38 CrossSiteRequestManager* CrossSiteRequestManager::GetInstance() {
39 return Singleton<CrossSiteRequestManager>::get();
40 }
41
42 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/cross_site_request_manager.h ('k') | content/browser/frame_host/cross_site_transferring_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698