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

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

Issue 8770025: Zygote most of the uses of the utility process on Linux (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and adjusted comment in use_linux_zygote flag declaration. 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 | « 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);
264 // Grant the subprocess access to the entire subdir the extension file is 267 // Grant the subprocess access to the entire subdir the extension file is
265 // in, so that it can unpack to that dir. 268 // in, so that it can unpack to that dir.
266 host->set_exposed_dir(temp_crx_path.DirName()); 269 host->set_exposed_dir(temp_crx_path.DirName());
267 host->Send( 270 host->Send(
268 new ChromeUtilityMsg_UnpackExtension( 271 new ChromeUtilityMsg_UnpackExtension(
269 temp_crx_path, location_, creation_flags_)); 272 temp_crx_path, location_, creation_flags_));
270 } 273 }
271 274
272 void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( 275 void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded(
273 const DictionaryValue& manifest) { 276 const DictionaryValue& manifest) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 ERROR_SAVING_CATALOG, 716 ERROR_SAVING_CATALOG,
714 l10n_util::GetStringFUTF8( 717 l10n_util::GetStringFUTF8(
715 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 718 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
716 ASCIIToUTF16("ERROR_SAVING_CATALOG"))); 719 ASCIIToUTF16("ERROR_SAVING_CATALOG")));
717 return false; 720 return false;
718 } 721 }
719 } 722 }
720 723
721 return true; 724 return true;
722 } 725 }
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