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

Side by Side Diff: third_party/leveldatabase/chromium_logger.h

Issue 20182002: Make inttypes.h and similar macro usage C++11-friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line Created 7 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/image_operations_bench.cc ('k') | ui/gfx/render_text_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 5 #ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 26 matching lines...) Expand all
37 bufsize = 30000; 37 bufsize = 30000;
38 base = new char[bufsize]; 38 base = new char[bufsize];
39 } 39 }
40 char* p = base; 40 char* p = base;
41 char* limit = base + bufsize; 41 char* limit = base + bufsize;
42 42
43 ::base::Time::Exploded t; 43 ::base::Time::Exploded t;
44 ::base::Time::Now().LocalExplode(&t); 44 ::base::Time::Now().LocalExplode(&t);
45 45
46 p += ::base::snprintf(p, limit - p, 46 p += ::base::snprintf(p, limit - p,
47 "%04d/%02d/%02d-%02d:%02d:%02d.%03d %"PRIu64" ", 47 "%04d/%02d/%02d-%02d:%02d:%02d.%03d %" PRIu64 " ",
48 t.year, 48 t.year,
49 t.month, 49 t.month,
50 t.day_of_month, 50 t.day_of_month,
51 t.hour, 51 t.hour,
52 t.minute, 52 t.minute,
53 t.second, 53 t.second,
54 t.millisecond, 54 t.millisecond,
55 thread_id); 55 thread_id);
56 56
57 // Print the message 57 // Print the message
(...skipping 27 matching lines...) Expand all
85 break; 85 break;
86 } 86 }
87 } 87 }
88 private: 88 private:
89 FILE* file_; 89 FILE* file_;
90 }; 90 };
91 91
92 } // namespace leveldb 92 } // namespace leveldb
93 93
94 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 94 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
OLDNEW
« no previous file with comments | « skia/ext/image_operations_bench.cc ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698