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

Side by Side Diff: components/password_manager/core/browser/log_manager.cc

Issue 1852093002: components/password_manager: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and revert an accidental .proto change 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/password_manager/core/browser/log_manager.h" 5 #include "components/password_manager/core/browser/log_manager.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h"
8 #include "components/password_manager/core/browser/log_router.h" 9 #include "components/password_manager/core/browser/log_router.h"
9 10
10 namespace password_manager { 11 namespace password_manager {
11 12
12 namespace { 13 namespace {
13 14
14 class LogManagerImpl : public LogManager { 15 class LogManagerImpl : public LogManager {
15 public: 16 public:
16 LogManagerImpl(LogRouter* log_router, base::Closure notification_callback); 17 LogManagerImpl(LogRouter* log_router, base::Closure notification_callback);
17 18
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 log_router_->ProcessLog(text); 80 log_router_->ProcessLog(text);
80 } 81 }
81 82
82 bool LogManagerImpl::IsLoggingActive() const { 83 bool LogManagerImpl::IsLoggingActive() const {
83 return can_use_log_router_ && !is_suspended_; 84 return can_use_log_router_ && !is_suspended_;
84 } 85 }
85 86
86 } // namespace 87 } // namespace
87 88
88 // static 89 // static
89 scoped_ptr<LogManager> LogManager::Create(LogRouter* log_router, 90 std::unique_ptr<LogManager> LogManager::Create(
90 base::Closure notification_callback) { 91 LogRouter* log_router,
91 return make_scoped_ptr(new LogManagerImpl(log_router, notification_callback)); 92 base::Closure notification_callback) {
93 return base::WrapUnique(
94 new LogManagerImpl(log_router, notification_callback));
92 } 95 }
93 96
94 } // namespace password_manager 97 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698