summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cross_site_request_manager.h
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 08:15:04 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 08:15:04 +0000
commitd3c6c0d77db083fbb68f81589acf4fc7c58a1fad (patch)
treec4f00bd9c7205cd3ec60533e86e2e2023acc6b83 /chrome/browser/cross_site_request_manager.h
parentee16679f293ca27ce3d822a97efad7d3fa8a049e (diff)
downloadchromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.zip
chromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.tar.gz
chromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.tar.bz2
Add a new GetInstance() method for singleton classes used in chrome/browser files.
This CL includes half of the files under chrome/browser using Singleton<T>. The rest of the files will be sent in a second CL. In one case I used a LazyInstance<T> instead of Singleton<T> as that was simpler and necessary since T was a typedef and can't add member functions to it. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5519016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cross_site_request_manager.h')
-rw-r--r--chrome/browser/cross_site_request_manager.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/cross_site_request_manager.h b/chrome/browser/cross_site_request_manager.h
index 84d07e9..6c90b24 100644
--- a/chrome/browser/cross_site_request_manager.h
+++ b/chrome/browser/cross_site_request_manager.h
@@ -11,7 +11,8 @@
#include "base/basictypes.h"
#include "base/lock.h"
-#include "base/singleton.h"
+
+template <typename T> struct DefaultSingletonTraits;
// CrossSiteRequestManager is used to handle bookkeeping for cross-site
// requests and responses between the UI and IO threads. Such requests involve
@@ -22,6 +23,9 @@
//
class CrossSiteRequestManager {
public:
+ // Returns the singleton instance.
+ static CrossSiteRequestManager* GetInstance();
+
// Returns whether the RenderViewHost specified by the given IDs currently
// has a pending cross-site request. If so, we will have to delay the
// response until the previous RenderViewHost runs its onunload handler.
@@ -38,8 +42,6 @@ class CrossSiteRequestManager {
friend struct DefaultSingletonTraits<CrossSiteRequestManager>;
typedef std::set<std::pair<int, int> > RenderViewSet;
- // Obtain an instance of CrossSiteRequestManager via
- // Singleton<CrossSiteRequestManager>().
CrossSiteRequestManager();
~CrossSiteRequestManager();