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

Unified Diff: chrome/browser/chromeos/dom_ui/imageburner_ui.h

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (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/chromeos/dom_ui/imageburner_ui.h
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.h b/chrome/browser/chromeos/dom_ui/imageburner_ui.h
index 0f2560a3ed690d55b0b6ee203046aaa6af2d448c..58037625fdee750b6d2a9d9a3153249c748c6cea 100644
--- a/chrome/browser/chromeos/dom_ui/imageburner_ui.h
+++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.h
@@ -26,6 +26,8 @@
#include "googleurl/src/gurl.h"
#include "net/base/file_stream.h"
+template <typename T> struct DefaultSingletonTraits;
+
static const std::string kPropertyPath = "path";
static const std::string kPropertyTitle = "title";
static const std::string kPropertyDirectory = "isDirectory";
@@ -158,8 +160,8 @@ class ImageBurnTaskProxy
class ImageBurnResourceManager : public DownloadManager::Observer,
public DownloadItem::Observer {
public:
- ImageBurnResourceManager();
- ~ImageBurnResourceManager();
+ // Returns the singleton instance.
+ static ImageBurnResourceManager* GetInstance();
// DownloadItem::Observer interface
virtual void OnDownloadUpdated(DownloadItem* download);
@@ -190,6 +192,11 @@ class ImageBurnResourceManager : public DownloadManager::Observer,
net::FileStream* CreateFileStream(FilePath* file_path);
private:
+ friend struct DefaultSingletonTraits<ImageBurnResourceManager>;
+
+ ImageBurnResourceManager();
+ ~ImageBurnResourceManager();
+
FilePath local_image_dir_file_path_;
FilePath image_fecher_local_path_;
bool image_download_started_;

Powered by Google App Engine
This is Rietveld 408576698