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

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

Issue 464073: Have the utility process run out of process on Linux again by (Closed)
Patch Set: fix Created 11 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/extension_updater.cc ('k') | chrome/browser/utility_process_host.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/gfx/codec/png_codec.h" 9 #include "app/gfx/codec/png_codec.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return; 57 return;
58 } 58 }
59 59
60 // If we are supposed to use a subprocess, copy the crx to the temp directory 60 // If we are supposed to use a subprocess, copy the crx to the temp directory
61 // and kick off the subprocess. 61 // and kick off the subprocess.
62 // 62 //
63 // TODO(asargent) we shouldn't need to do this branch here - instead 63 // TODO(asargent) we shouldn't need to do this branch here - instead
64 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) 64 // UtilityProcessHost should handle it for us. (http://crbug.com/19192)
65 bool use_utility_process = rdh_ && 65 bool use_utility_process = rdh_ &&
66 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); 66 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
67
68 #if defined(OS_LINUX)
69 // TODO(port): Don't use a utility process on linux (crbug.com/22703).
70 use_utility_process = false;
71 #endif
72
73 if (use_utility_process) { 67 if (use_utility_process) {
74 ChromeThread::PostTask( 68 ChromeThread::PostTask(
75 ChromeThread::IO, FROM_HERE, 69 ChromeThread::IO, FROM_HERE,
76 NewRunnableMethod( 70 NewRunnableMethod(
77 this, 71 this,
78 &SandboxedExtensionUnpacker::StartProcessOnIOThread, 72 &SandboxedExtensionUnpacker::StartProcessOnIOThread,
79 temp_crx_path)); 73 temp_crx_path));
80 } else { 74 } else {
81 // Otherwise, unpack the extension in this process. 75 // Otherwise, unpack the extension in this process.
82 ExtensionUnpacker unpacker(temp_crx_path); 76 ExtensionUnpacker unpacker(temp_crx_path);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 if (!file_util::WriteFile(path, 358 if (!file_util::WriteFile(path,
365 catalog_json.c_str(), 359 catalog_json.c_str(),
366 catalog_json.size())) { 360 catalog_json.size())) {
367 ReportFailure("Error saving catalog."); 361 ReportFailure("Error saving catalog.");
368 return false; 362 return false;
369 } 363 }
370 } 364 }
371 365
372 return true; 366 return true;
373 } 367 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/utility_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698