Skip to content

Commit

Permalink
Convert //third_party from scoped_ptr to std::unique_ptr
Browse files Browse the repository at this point in the history
BUG=554298

Review URL: https://codereview.chromium.org/1911823002

Cr-Commit-Position: refs/heads/master@{#389307}
  • Loading branch information
zetafunction authored and Commit bot committed Apr 22, 2016
1 parent 3eee0c9 commit 91cdd51
Show file tree
Hide file tree
Showing 129 changed files with 651 additions and 1,033 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#ifndef GOOGLE_CACHEINVALIDATION_DEPS_SCOPED_PTR_H_
#define GOOGLE_CACHEINVALIDATION_DEPS_SCOPED_PTR_H_

#include "base/memory/scoped_ptr.h"
#include <memory>

namespace invalidation {

using ::scoped_ptr;
template <typename T, typename D = std::default_delete<T>>
using scoped_ptr = std::unique_ptr<T, D>;

} // namespace invalidation

Expand Down
1 change: 0 additions & 1 deletion third_party/cld/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ source_set("cld") {
"base/logging.h",
"base/macros.h",
"base/port.h",
"base/scoped_ptr.h",
"base/stl_decl_msvc.h",
"base/string_util.h",
"base/strtoint.h",
Expand Down
7 changes: 4 additions & 3 deletions third_party/cld/base/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <errno.h>
#include <string.h>
#include <time.h>

#include <memory>
#include <string>
#include <strstream>
#include <vector>
Expand All @@ -22,7 +24,6 @@
#include "base/crash.h"
#include "base/dynamic_annotations.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_decl_msvc.h"
#include "base/log_severity.h"
#include "base/vlog_is_on.h"
Expand Down Expand Up @@ -996,7 +997,7 @@ class LogMessage {
int preserved_errno_; // errno at Init() time
scoped_array<char> buf_; // buffer space for non FATAL messages
char* message_text_; // Complete message text
scoped_ptr<LogStream> stream_alloc_;
std::unique_ptr<LogStream> stream_alloc_;
LogStream* stream_;
char severity_; // level of LogMessage (ex. I, W, E, F)
int line_; // line number of file that called LOG
Expand All @@ -1023,7 +1024,7 @@ class LogMessage {
static LogMessageData fatal_msg_data_exclusive_;
static LogMessageData fatal_msg_data_shared_;

scoped_ptr<LogMessageData> allocated_;
std::unique_ptr<LogMessageData> allocated_;
LogMessageData* data_;

friend class LogDestination;
Expand Down
Loading

0 comments on commit 91cdd51

Please sign in to comment.