OLD | NEW |
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" |
11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "leveldb/env.h" | 13 #include "leveldb/env.h" |
14 | 14 |
15 namespace leveldb { | 15 namespace leveldb { |
16 | 16 |
17 class ChromiumLogger : public Logger { | 17 class ChromiumLogger : public Logger { |
18 public: | 18 public: |
19 ChromiumLogger(FILE* f) : file_(f) { } | 19 ChromiumLogger(FILE* f) : file_(f) { } |
20 virtual ~ChromiumLogger() { | 20 virtual ~ChromiumLogger() { |
21 fclose(file_); | 21 fclose(file_); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ |
OLD | NEW |