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"
11 bool CrossSiteRequestManager::HasPendingCrossSiteRequest(int renderer_id
,
13 base::AutoLock
lock(lock_
);
15 std::pair
<int, int> key(renderer_id
, render_view_id
);
16 return pending_cross_site_views_
.find(key
) !=
17 pending_cross_site_views_
.end();
20 void CrossSiteRequestManager::SetHasPendingCrossSiteRequest(int renderer_id
,
23 base::AutoLock
lock(lock_
);
25 std::pair
<int, int> key(renderer_id
, render_view_id
);
27 pending_cross_site_views_
.insert(key
);
29 pending_cross_site_views_
.erase(key
);
33 CrossSiteRequestManager::CrossSiteRequestManager() {}
35 CrossSiteRequestManager::~CrossSiteRequestManager() {}
38 CrossSiteRequestManager
* CrossSiteRequestManager::GetInstance() {
39 return Singleton
<CrossSiteRequestManager
>::get();
42 } // namespace content