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

Unified Diff: chrome/browser/dom_ui/chrome_url_data_manager.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_ui/bug_report_ui.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/chrome_url_data_manager.h
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h
index c6b6e76f8c0833c7e6c85c5081a1db414014833a..709cdcbdaf5196cbf57ab89f53d4d54196e9f9af 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.h
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.h
@@ -9,6 +9,7 @@
#include <map>
#include <string>
+#include "base/singleton.h"
#include "base/task.h"
#include "base/ref_counted.h"
@@ -32,8 +33,8 @@ class URLRequestJob;
// it from the UI thread needs to go through an InvokeLater.
class ChromeURLDataManager {
public:
- ChromeURLDataManager();
- ~ChromeURLDataManager();
+ // Returns the singleton instance.
+ static ChromeURLDataManager* GetInstance();
typedef int RequestID;
@@ -122,6 +123,10 @@ class ChromeURLDataManager {
private:
friend class URLRequestChromeJob;
+ friend struct DefaultSingletonTraits<ChromeURLDataManager>;
+
+ ChromeURLDataManager();
+ ~ChromeURLDataManager();
// Parse a URL into the components used to resolve its request.
static void URLToRequest(const GURL& url,
« no previous file with comments | « chrome/browser/dom_ui/bug_report_ui.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698