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

Side by Side Diff: base/allocator/allocator_shim.cc

Issue 8368009: Replace most LOG statements with DLOG statements in base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/allocator/allocator_unittests.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 "base/allocator/allocator_shim.h" 5 #include "base/allocator/allocator_shim.h"
6 6
7 #include <config.h> 7 #include <config.h>
8 #include "base/sysinfo.h" 8 #include "base/sysinfo.h"
9 9
10 // When defined, different heap allocators can be used via an environment 10 // When defined, different heap allocators can be used via an environment
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 size_t secondary_length = 0; 290 size_t secondary_length = 0;
291 char buffer[20]; 291 char buffer[20];
292 getenv_s(&secondary_length, buffer, sizeof(buffer), secondary_name); 292 getenv_s(&secondary_length, buffer, sizeof(buffer), secondary_name);
293 DCHECK_GT(sizeof(buffer), secondary_length); 293 DCHECK_GT(sizeof(buffer), secondary_length);
294 buffer[sizeof(buffer) - 1] = '\0'; 294 buffer[sizeof(buffer) - 1] = '\0';
295 295
296 if (secondary_length || !primary_length) { 296 if (secondary_length || !primary_length) {
297 char* secondary_value = secondary_length ? buffer : "TCMALLOC"; 297 char* secondary_value = secondary_length ? buffer : "TCMALLOC";
298 // Force renderer (or other subprocesses) to use secondary_value. 298 // Force renderer (or other subprocesses) to use secondary_value.
299 int ret_val = _putenv_s(primary_name, secondary_value); 299 int ret_val = _putenv_s(primary_name, secondary_value);
300 CHECK_EQ(0, ret_val); 300 DCHECK_EQ(0, ret_val);
301 } 301 }
302 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING 302 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING
303 } 303 }
304 304
305 } // namespace base. 305 } // namespace base.
306 } // namespace allocator. 306 } // namespace allocator.
OLDNEW
« no previous file with comments | « no previous file | base/allocator/allocator_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698