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

Side by Side Diff: base/bind_unittest.cc

Issue 614103004: replace 'virtual ... OVERRIDE' with '... override' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: process base/ Created 6 years, 2 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 #include "base/bind.h" 5 #include "base/bind.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 public: 59 public:
60 void AddRef(void) const {} 60 void AddRef(void) const {}
61 void Release(void) const {} 61 void Release(void) const {}
62 virtual void VirtualSet() { value = kParentValue; } 62 virtual void VirtualSet() { value = kParentValue; }
63 void NonVirtualSet() { value = kParentValue; } 63 void NonVirtualSet() { value = kParentValue; }
64 int value; 64 int value;
65 }; 65 };
66 66
67 class Child : public Parent { 67 class Child : public Parent {
68 public: 68 public:
69 virtual void VirtualSet() OVERRIDE { value = kChildValue; } 69 void VirtualSet() override { value = kChildValue; }
70 void NonVirtualSet() { value = kChildValue; } 70 void NonVirtualSet() { value = kChildValue; }
71 }; 71 };
72 72
73 class NoRefParent { 73 class NoRefParent {
74 public: 74 public:
75 virtual void VirtualSet() { value = kParentValue; } 75 virtual void VirtualSet() { value = kParentValue; }
76 void NonVirtualSet() { value = kParentValue; } 76 void NonVirtualSet() { value = kParentValue; }
77 int value; 77 int value;
78 }; 78 };
79 79
80 class NoRefChild : public NoRefParent { 80 class NoRefChild : public NoRefParent {
81 virtual void VirtualSet() OVERRIDE { value = kChildValue; } 81 void VirtualSet() override { value = kChildValue; }
82 void NonVirtualSet() { value = kChildValue; } 82 void NonVirtualSet() { value = kChildValue; }
83 }; 83 };
84 84
85 // Used for probing the number of copies that occur if a type must be coerced 85 // Used for probing the number of copies that occur if a type must be coerced
86 // during argument forwarding in the Run() methods. 86 // during argument forwarding in the Run() methods.
87 struct DerivedCopyCounter { 87 struct DerivedCopyCounter {
88 DerivedCopyCounter(int* copies, int* assigns) 88 DerivedCopyCounter(int* copies, int* assigns)
89 : copies_(copies), assigns_(assigns) { 89 : copies_(copies), assigns_(assigns) {
90 } 90 }
91 int* copies_; 91 int* copies_;
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 base::Callback<void(int)> null_cb; 820 base::Callback<void(int)> null_cb;
821 ASSERT_TRUE(null_cb.is_null()); 821 ASSERT_TRUE(null_cb.is_null());
822 EXPECT_DEATH(base::Bind(null_cb, 42), ""); 822 EXPECT_DEATH(base::Bind(null_cb, 42), "");
823 } 823 }
824 824
825 #endif // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && 825 #endif // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) &&
826 // GTEST_HAS_DEATH_TEST 826 // GTEST_HAS_DEATH_TEST
827 827
828 } // namespace 828 } // namespace
829 } // namespace base 829 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698