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

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

Issue 434077: Add regex escaping code to Mac sandbox implementation and re-enable the utility process on OS X. (Closed)
Patch Set: Sync to trunk 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 67
68 #if defined(OS_POSIX) 68 #if defined(OS_LINUX)
69 // TODO(port): Don't use a utility process on linux (crbug.com/22703) or 69 // TODO(port): Don't use a utility process on linux (crbug.com/22703).
70 // MacOS (crbug.com/8102) until problems related to autoupdate are fixed.
71 use_utility_process = false; 70 use_utility_process = false;
72 #endif 71 #endif
73 72
74 if (use_utility_process) { 73 if (use_utility_process) {
75 ChromeThread::PostTask( 74 ChromeThread::PostTask(
76 ChromeThread::IO, FROM_HERE, 75 ChromeThread::IO, FROM_HERE,
77 NewRunnableMethod( 76 NewRunnableMethod(
78 this, 77 this,
79 &SandboxedExtensionUnpacker::StartProcessOnIOThread, 78 &SandboxedExtensionUnpacker::StartProcessOnIOThread,
80 temp_crx_path)); 79 temp_crx_path));
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 if (!file_util::WriteFile(path, 364 if (!file_util::WriteFile(path,
366 catalog_json.c_str(), 365 catalog_json.c_str(),
367 catalog_json.size())) { 366 catalog_json.size())) {
368 ReportFailure("Error saving catalog."); 367 ReportFailure("Error saving catalog.");
369 return false; 368 return false;
370 } 369 }
371 } 370 }
372 371
373 return true; 372 return true;
374 } 373 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698