summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/dom_ui/imageburner_ui.cc')
-rw-r--r--chrome/browser/chromeos/dom_ui/imageburner_ui.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
index b827c93..24fc64a 100644
--- a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/dom_ui/imageburner_ui.h"
+#include <algorithm>
+
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/i18n/rtl.h"
@@ -17,7 +19,8 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/download/download_types.h"
#include "chrome/browser/download/download_util.h"
-#include "chrome/browser/profile.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
@@ -105,7 +108,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 +401,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 +467,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();
@@ -610,7 +618,7 @@ ImageBurnUI::ImageBurnUI(TabContents* contents) : DOMUI(contents) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>::get(),
+ ChromeURLDataManager::GetInstance(),
&ChromeURLDataManager::AddDataSource,
make_scoped_refptr(html_source)));
}