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

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
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..42db73536a273910fddd3fe6fc2ced689970276e 100644
--- a/chrome/browser/browser_about_handler.h
+++ b/chrome/browser/browser_about_handler.h
@@ -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>;

Powered by Google App Engine
This is Rietveld 408576698