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

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

Issue 1911823002: Convert //third_party from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update crashpad's README.chromium Created 4 years, 8 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/files/file.h" 12 #include "base/files/file.h"
11 #include "base/format_macros.h" 13 #include "base/format_macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
14 #include "base/time/time.h" 15 #include "base/time/time.h"
15 #include "third_party/leveldatabase/src/include/leveldb/env.h" 16 #include "third_party/leveldatabase/src/include/leveldb/env.h"
16 17
17 namespace leveldb { 18 namespace leveldb {
18 19
19 class ChromiumLogger : public Logger { 20 class ChromiumLogger : public Logger {
20 public: 21 public:
21 explicit ChromiumLogger(base::File* f) : file_(f) {} 22 explicit ChromiumLogger(base::File* f) : file_(f) {}
22 virtual ~ChromiumLogger() {} 23 virtual ~ChromiumLogger() {}
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 assert(p <= limit); 79 assert(p <= limit);
79 file_->WriteAtCurrentPos(base, p - base); 80 file_->WriteAtCurrentPos(base, p - base);
80 if (base != buffer) { 81 if (base != buffer) {
81 delete[] base; 82 delete[] base;
82 } 83 }
83 break; 84 break;
84 } 85 }
85 } 86 }
86 87
87 private: 88 private:
88 scoped_ptr<base::File> file_; 89 std::unique_ptr<base::File> file_;
89 }; 90 };
90 91
91 } // namespace leveldb 92 } // namespace leveldb
92 93
93 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 94 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/util/win/scoped_process_suspend_test.cc ('k') | third_party/leveldatabase/env_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698