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

Side by Side Diff: chrome/browser/extensions/webstore_install_helper.cc

Issue 482163002: Large wallpaper decoding in utility process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add space Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/webstore_install_helper.h" 5 #include "chrome/browser/extensions/webstore_install_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 BrowserThread::IO, 107 BrowserThread::IO,
108 FROM_HERE, 108 FROM_HERE,
109 base::Bind(&WebstoreInstallHelper::StartFetchedImageDecode, this)); 109 base::Bind(&WebstoreInstallHelper::StartFetchedImageDecode, this));
110 } 110 }
111 url_fetcher_.reset(); 111 url_fetcher_.reset();
112 } 112 }
113 113
114 void WebstoreInstallHelper::StartFetchedImageDecode() { 114 void WebstoreInstallHelper::StartFetchedImageDecode() {
115 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 115 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
116 CHECK(utility_host_.get()); 116 CHECK(utility_host_.get());
117 utility_host_->Send(new ChromeUtilityMsg_DecodeImage(fetched_icon_data_)); 117 utility_host_->Send(new ChromeUtilityMsg_DecodeImage(fetched_icon_data_,
118 false));
118 } 119 }
119 120
120 121
121 bool WebstoreInstallHelper::OnMessageReceived(const IPC::Message& message) { 122 bool WebstoreInstallHelper::OnMessageReceived(const IPC::Message& message) {
122 bool handled = true; 123 bool handled = true;
123 IPC_BEGIN_MESSAGE_MAP(WebstoreInstallHelper, message) 124 IPC_BEGIN_MESSAGE_MAP(WebstoreInstallHelper, message)
124 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Succeeded, 125 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Succeeded,
125 OnDecodeImageSucceeded) 126 OnDecodeImageSucceeded)
126 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Failed, 127 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Failed,
127 OnDecodeImageFailed) 128 OnDecodeImageFailed)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 196
196 void WebstoreInstallHelper::ReportResultFromUIThread() { 197 void WebstoreInstallHelper::ReportResultFromUIThread() {
197 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 198 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
198 if (error_.empty() && parsed_manifest_) 199 if (error_.empty() && parsed_manifest_)
199 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); 200 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release());
200 else 201 else
201 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); 202 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_);
202 } 203 }
203 204
204 } // namespace extensions 205 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_function_base.cc ('k') | chrome/browser/image_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698