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

Side by Side Diff: base/task_unittest.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/task.h" 6 #include "base/task.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace { 9 namespace {
10 10
11 class CancelInDestructor : public base::RefCounted<CancelInDestructor> { 11 class CancelInDestructor : public base::RefCounted<CancelInDestructor> {
12 public: 12 public:
13 CancelInDestructor() : cancelable_task_(NULL) {} 13 CancelInDestructor() : cancelable_task_(NULL) {}
14 14
15 void Start() { 15 void Start() {
(...skipping 27 matching lines...) Expand all
43 TEST(TaskTest, TestCancelInDestructor) { 43 TEST(TaskTest, TestCancelInDestructor) {
44 // Intentionally not using a scoped_refptr for cancel_in_destructor. 44 // Intentionally not using a scoped_refptr for cancel_in_destructor.
45 CancelInDestructor* cancel_in_destructor = new CancelInDestructor(); 45 CancelInDestructor* cancel_in_destructor = new CancelInDestructor();
46 cancel_in_destructor->Start(); 46 cancel_in_destructor->Start();
47 CancelableTask* cancelable_task = cancel_in_destructor->cancelable_task(); 47 CancelableTask* cancelable_task = cancel_in_destructor->cancelable_task();
48 ASSERT_TRUE(cancelable_task); 48 ASSERT_TRUE(cancelable_task);
49 delete cancelable_task; 49 delete cancelable_task;
50 } 50 }
51 51
52 } // namespace 52 } // namespace
OLDNEW
« base/task.h ('K') | « base/task_queue_unittest.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698