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

Side by Side Diff: base/callback_unittest.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 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
« no previous file with comments | « base/callback_list_unittest.nc ('k') | base/command_line_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 #include "base/callback.h"
6
7 #include <memory>
8
5 #include "base/bind.h" 9 #include "base/bind.h"
6 #include "base/callback.h"
7 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
8 #include "base/callback_internal.h" 11 #include "base/callback_internal.h"
9 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
12 14
13 namespace base { 15 namespace base {
14 16
15 namespace { 17 namespace {
16 18
17 struct FakeInvoker { 19 struct FakeInvoker {
18 // MSVC 2013 doesn't support Type Alias of function types. 20 // MSVC 2013 doesn't support Type Alias of function types.
19 // Revisit this after we update it to newer version. 21 // Revisit this after we update it to newer version.
20 typedef void RunType(internal::BindStateBase*); 22 typedef void RunType(internal::BindStateBase*);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 182
181 TEST_F(CallbackTest, CallbackHasLastRefOnContainingObject) { 183 TEST_F(CallbackTest, CallbackHasLastRefOnContainingObject) {
182 bool deleted = false; 184 bool deleted = false;
183 CallbackOwner* owner = new CallbackOwner(&deleted); 185 CallbackOwner* owner = new CallbackOwner(&deleted);
184 owner->Reset(); 186 owner->Reset();
185 ASSERT_TRUE(deleted); 187 ASSERT_TRUE(deleted);
186 } 188 }
187 189
188 } // namespace 190 } // namespace
189 } // namespace base 191 } // namespace base
OLDNEW
« no previous file with comments | « base/callback_list_unittest.nc ('k') | base/command_line_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698