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

Side by Side Diff: chrome/browser/zygote_host_linux.cc

Issue 2836088: base: rename Environment::SetEnv to Environment::SetVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 4 months 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/shell_integration_unittest.cc ('k') | chrome/common/logging_chrome_uitest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/zygote_host_linux.h" 5 #include "chrome/browser/zygote_host_linux.h"
6 6
7 #include <sys/socket.h> 7 #include <sys/socket.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 26 matching lines...) Expand all
37 37
38 for (unsigned i = 0; kSUIDUnsafeEnvironmentVariables[i]; ++i) { 38 for (unsigned i = 0; kSUIDUnsafeEnvironmentVariables[i]; ++i) {
39 const char* const envvar = kSUIDUnsafeEnvironmentVariables[i]; 39 const char* const envvar = kSUIDUnsafeEnvironmentVariables[i];
40 char* const saved_envvar = SandboxSavedEnvironmentVariable(envvar); 40 char* const saved_envvar = SandboxSavedEnvironmentVariable(envvar);
41 if (!saved_envvar) 41 if (!saved_envvar)
42 continue; 42 continue;
43 43
44 scoped_ptr<base::Environment> env(base::Environment::Create()); 44 scoped_ptr<base::Environment> env(base::Environment::Create());
45 std::string value; 45 std::string value;
46 if (env->GetEnv(envvar, &value)) 46 if (env->GetEnv(envvar, &value))
47 env->SetEnv(saved_envvar, value); 47 env->SetVar(saved_envvar, value);
48 else 48 else
49 env->UnSetVar(saved_envvar); 49 env->UnSetVar(saved_envvar);
50 50
51 free(saved_envvar); 51 free(saved_envvar);
52 } 52 }
53 } 53 }
54 54
55 ZygoteHost::ZygoteHost() 55 ZygoteHost::ZygoteHost()
56 : pid_(-1), 56 : pid_(-1),
57 init_(false), 57 init_(false),
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 !read_pickle.ReadBool(&iter, &tmp_child_exited)) { 335 !read_pickle.ReadBool(&iter, &tmp_child_exited)) {
336 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote."; 336 LOG(WARNING) << "Error parsing DidProcessCrash response from zygote.";
337 return false; 337 return false;
338 } 338 }
339 339
340 if (child_exited) 340 if (child_exited)
341 *child_exited = tmp_child_exited; 341 *child_exited = tmp_child_exited;
342 342
343 return did_crash; 343 return did_crash;
344 } 344 }
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_unittest.cc ('k') | chrome/common/logging_chrome_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698