Rename Animate as Begin(Main)Frame
[chromium-blink-merge.git] / content / browser / cross_site_request_manager.cc
blob5ce71bf8f305343b25d2ec2d5e3e27f4936abc44
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.
5 #include "content/browser/cross_site_request_manager.h"
7 #include "base/memory/singleton.h"
9 namespace content {
11 bool CrossSiteRequestManager::HasPendingCrossSiteRequest(int renderer_id,
12 int render_frame_id) {
13 base::AutoLock lock(lock_);
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();
20 void CrossSiteRequestManager::SetHasPendingCrossSiteRequest(int renderer_id,
21 int render_frame_id,
22 bool has_pending) {
23 base::AutoLock lock(lock_);
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);
33 CrossSiteRequestManager::CrossSiteRequestManager() {}
35 CrossSiteRequestManager::~CrossSiteRequestManager() {}
37 // static
38 CrossSiteRequestManager* CrossSiteRequestManager::GetInstance() {
39 return Singleton<CrossSiteRequestManager>::get();
42 } // namespace content