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

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

Issue 8817013: Revert 113027 - Zygote most of the uses of the utility process on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/importer/external_process_importer_client.cc » ('j') | 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/sandboxed_extension_unpacker.h" 5 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 ReportFailure( 254 ReportFailure(
255 UTILITY_PROCESS_CRASHED_WHILE_TRYING_TO_INSTALL, 255 UTILITY_PROCESS_CRASHED_WHILE_TRYING_TO_INSTALL,
256 l10n_util::GetStringFUTF8( 256 l10n_util::GetStringFUTF8(
257 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 257 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
258 ASCIIToUTF16("UTILITY_PROCESS_CRASHED_WHILE_TRYING_TO_INSTALL"))); 258 ASCIIToUTF16("UTILITY_PROCESS_CRASHED_WHILE_TRYING_TO_INSTALL")));
259 } 259 }
260 260
261 void SandboxedExtensionUnpacker::StartProcessOnIOThread( 261 void SandboxedExtensionUnpacker::StartProcessOnIOThread(
262 const FilePath& temp_crx_path) { 262 const FilePath& temp_crx_path) {
263 UtilityProcessHost* host = new UtilityProcessHost(this, thread_identifier_); 263 UtilityProcessHost* host = new UtilityProcessHost(this, thread_identifier_);
264 // Don't launch the utility process from the zygote on Linux since
265 // extension unpacking needs FS access.
266 host->set_use_linux_zygote(false);
267 // Grant the subprocess access to the entire subdir the extension file is 264 // Grant the subprocess access to the entire subdir the extension file is
268 // in, so that it can unpack to that dir. 265 // in, so that it can unpack to that dir.
269 host->set_exposed_dir(temp_crx_path.DirName()); 266 host->set_exposed_dir(temp_crx_path.DirName());
270 host->Send( 267 host->Send(
271 new ChromeUtilityMsg_UnpackExtension( 268 new ChromeUtilityMsg_UnpackExtension(
272 temp_crx_path, location_, creation_flags_)); 269 temp_crx_path, location_, creation_flags_));
273 } 270 }
274 271
275 void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( 272 void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded(
276 const DictionaryValue& manifest) { 273 const DictionaryValue& manifest) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 ERROR_SAVING_CATALOG, 713 ERROR_SAVING_CATALOG,
717 l10n_util::GetStringFUTF8( 714 l10n_util::GetStringFUTF8(
718 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 715 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
719 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); 716 ASCIIToUTF16("ERROR_SAVING_CATALOG")));
720 return false; 717 return false;
721 } 718 }
722 } 719 }
723 720
724 return true; 721 return true;
725 } 722 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698