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

Unified Diff: chrome/browser/extensions/webstore_install_helper.cc

Issue 931993002: Make image_decoder a Leaky LazyInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename instance_ to image_decoder_instance_ for mac linker Created 5 years, 10 months 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/extensions/webstore_install_helper.cc
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
index 47926c6954258886f6a7ae4154a9f3638552dccc..ab6ec9d25b110ed2e6406c4ae1a950d95daffe46 100644
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -96,7 +96,8 @@ void WebstoreInstallHelper::OnURLFetchComplete(
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
- base::Bind(&WebstoreInstallHelper::OnDecodeImageFailed, this));
+ base::Bind(&WebstoreInstallHelper::OnDecodeImageFailed, this,
+ chromeutility::DUMMY_IMAGE_DELEGATE_ID));
} else {
std::string response_data;
source->GetResponseAsString(&response_data);
@@ -114,8 +115,9 @@ void WebstoreInstallHelper::OnURLFetchComplete(
void WebstoreInstallHelper::StartFetchedImageDecode() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
CHECK(utility_host_.get());
- utility_host_->Send(new ChromeUtilityMsg_DecodeImage(fetched_icon_data_,
- false));
+ utility_host_->Send(new ChromeUtilityMsg_DecodeImage(
+ fetched_icon_data_, false,
+ chromeutility::DUMMY_IMAGE_DELEGATE_ID));
dcheng 2015/02/27 16:47:17 Should this/can this be cleaned up to use ImageDec
Theresa 2015/03/04 03:10:06 I think it should be, but it may be a little trick
}
@@ -137,14 +139,14 @@ bool WebstoreInstallHelper::OnMessageReceived(const IPC::Message& message) {
void WebstoreInstallHelper::OnDecodeImageSucceeded(
- const SkBitmap& decoded_image) {
+ const SkBitmap& decoded_image, int id) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
icon_ = decoded_image;
icon_decode_complete_ = true;
ReportResultsIfComplete();
}
-void WebstoreInstallHelper::OnDecodeImageFailed() {
+void WebstoreInstallHelper::OnDecodeImageFailed(int id) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
icon_decode_complete_ = true;
error_ = kImageDecodeError;

Powered by Google App Engine
This is Rietveld 408576698