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

Unified Diff: chrome/browser/browser_about_handler.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/automation/testing_automation_provider.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.h
diff --git a/chrome/browser/browser_about_handler.h b/chrome/browser/browser_about_handler.h
index de8f1bf0a5ce9d439047f7a849e22f1782be2ef3..e0a0dbf458db995cd7f1f15fed20ce316023a0c2 100644
--- a/chrome/browser/browser_about_handler.h
+++ b/chrome/browser/browser_about_handler.h
@@ -12,9 +12,9 @@
#include <string>
#include "base/process.h"
-#include "base/singleton.h"
#include "base/string_util.h"
+template <typename T> struct DefaultSingletonTraits;
class GURL;
class Profile;
@@ -38,7 +38,8 @@ typedef std::map<std::string, std::string> AboutTcmallocOutputsType;
class AboutTcmallocOutputs {
public:
- AboutTcmallocOutputs() {}
+ // Returns the singleton instance.
+ static AboutTcmallocOutputs* GetInstance();
AboutTcmallocOutputsType* outputs() { return &outputs_; }
@@ -55,6 +56,8 @@ class AboutTcmallocOutputs {
}
private:
+ AboutTcmallocOutputs() {}
+
AboutTcmallocOutputsType outputs_;
friend struct DefaultSingletonTraits<AboutTcmallocOutputs>;
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698