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

Side by Side Diff: base/profiler.cc

Issue 552004: Style cleanup in preparation for auto-linting base/. (Closed)
Patch Set: Created 10 years, 11 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 | « base/process_util_win.cc ('k') | base/rand_util.h » ('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 "base/profiler.h" 5 #include "base/profiler.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 7
8 // When actually using quantify, uncomment the following line. 8 // When actually using quantify, uncomment the following line.
9 //#define QUANTIFY 9 // #define QUANTIFY
10 10
11 #ifdef QUANTIFY 11 #ifdef QUANTIFY
12 // this #define is used to prevent people from directly using pure.h 12 // this #define is used to prevent people from directly using pure.h
13 // instead of profiler.h 13 // instead of profiler.h
14 #define PURIFY_PRIVATE_INCLUDE 14 #define PURIFY_PRIVATE_INCLUDE
15 #include "base/third_party/purify/pure.h" 15 #include "base/third_party/purify/pure.h"
16 #endif // QUANTIFY 16 #endif // QUANTIFY
17 17
18 namespace base { 18 namespace base {
19 19
(...skipping 18 matching lines...) Expand all
38 void Profiler::SetThreadName(const char *name) { 38 void Profiler::SetThreadName(const char *name) {
39 #ifdef QUANTIFY 39 #ifdef QUANTIFY
40 // make a copy since the Quantify function takes a char*, not const char* 40 // make a copy since the Quantify function takes a char*, not const char*
41 char buffer[512]; 41 char buffer[512];
42 base::snprintf(buffer, sizeof(buffer)-1, "%s", name); 42 base::snprintf(buffer, sizeof(buffer)-1, "%s", name);
43 QuantifySetThreadName(buffer); 43 QuantifySetThreadName(buffer);
44 #endif 44 #endif
45 } 45 }
46 46
47 } // namespace base 47 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util_win.cc ('k') | base/rand_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698