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

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

Issue 8921023: Convert calls to the utility process in extension code to use the zygote on Linux. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 url_fetcher_->SetRequestContext(context_getter_); 61 url_fetcher_->SetRequestContext(context_getter_);
62 62
63 url_fetcher_->Start(); 63 url_fetcher_->Start();
64 // We'll get called back in OnURLFetchComplete. 64 // We'll get called back in OnURLFetchComplete.
65 } 65 }
66 } 66 }
67 67
68 void WebstoreInstallHelper::StartWorkOnIOThread() { 68 void WebstoreInstallHelper::StartWorkOnIOThread() {
69 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 69 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
70 utility_host_ = new UtilityProcessHost(this, BrowserThread::IO); 70 utility_host_ = new UtilityProcessHost(this, BrowserThread::IO);
71 utility_host_->set_use_linux_zygote(true);
71 utility_host_->StartBatchMode(); 72 utility_host_->StartBatchMode();
72 73
73 if (!icon_base64_data_.empty()) 74 if (!icon_base64_data_.empty())
74 utility_host_->Send( 75 utility_host_->Send(
75 new ChromeUtilityMsg_DecodeImageBase64(icon_base64_data_)); 76 new ChromeUtilityMsg_DecodeImageBase64(icon_base64_data_));
76 77
77 utility_host_->Send(new ChromeUtilityMsg_ParseJSON(manifest_)); 78 utility_host_->Send(new ChromeUtilityMsg_ParseJSON(manifest_));
78 } 79 }
79 80
80 void WebstoreInstallHelper::OnURLFetchComplete( 81 void WebstoreInstallHelper::OnURLFetchComplete(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); 181 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this));
181 } 182 }
182 183
183 void WebstoreInstallHelper::ReportResultFromUIThread() { 184 void WebstoreInstallHelper::ReportResultFromUIThread() {
184 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 185 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
185 if (error_.empty() && parsed_manifest_.get()) 186 if (error_.empty() && parsed_manifest_.get())
186 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); 187 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release());
187 else 188 else
188 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); 189 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_);
189 } 190 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698