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

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

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.cc
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
index c28516309a97ab495e4c56fd1850a72018c57c40..75d8b40fb9503fc677c6f5041b92feeb5416b645 100644
--- a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
@@ -105,7 +105,7 @@ ImageBurnHandler::ImageBurnHandler(TabContents* contents)
chromeos::CrosLibrary::Get()->GetBurnLibrary();
burn_lib->AddObserver(this);
local_image_file_path_.clear();
- burn_resource_manager_ = Singleton<ImageBurnResourceManager>::get();
+ burn_resource_manager_ = ImageBurnResourceManager::GetInstance();
}
ImageBurnHandler::~ImageBurnHandler() {
@@ -398,7 +398,7 @@ void ImageBurnHandler::CreateLocalImagePath() {
ImageBurnTaskProxy::ImageBurnTaskProxy(
const base::WeakPtr<ImageBurnHandler>& handler)
: handler_(handler) {
- resource_manager_ = Singleton<ImageBurnResourceManager>::get();
+ resource_manager_ = ImageBurnResourceManager::GetInstance();
}
bool ImageBurnTaskProxy::ReportDownloadInitialized() {
@@ -464,6 +464,11 @@ ImageBurnResourceManager::~ImageBurnResourceManager() {
download_manager_->RemoveObserver(this);
}
+// static
+ImageBurnResourceManager* ImageBurnResourceManager::GetInstance() {
+ return Singleton<ImageBurnResourceManager>::get();
+}
+
void ImageBurnResourceManager::OnDownloadUpdated(DownloadItem* download) {
if (download->state() == DownloadItem::CANCELLED) {
image_url_.reset();

Powered by Google App Engine
This is Rietveld 408576698