diff options
44 files changed, 180 insertions, 154 deletions
diff --git a/base/bind_unittest.cc b/base/bind_unittest.cc index 354b225..9a6e23f 100644 --- a/base/bind_unittest.cc +++ b/base/bind_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -66,7 +66,7 @@ class Parent { class Child : public Parent { public: - virtual void VirtualSet() { value = kChildValue; } + virtual void VirtualSet() OVERRIDE { value = kChildValue; } void NonVirtualSet() { value = kChildValue; } }; @@ -78,7 +78,7 @@ class NoRefParent { }; class NoRefChild : public NoRefParent { - virtual void VirtualSet() { value = kChildValue; } + virtual void VirtualSet() OVERRIDE { value = kChildValue; } void NonVirtualSet() { value = kChildValue; } }; diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc index f9a8b7a..b85b468 100644 --- a/base/debug/trace_event_unittest.cc +++ b/base/debug/trace_event_unittest.cc @@ -58,10 +58,10 @@ class TraceEventTestFixture : public testing::Test { json_output_.json_output.clear(); } - virtual void SetUp() { + virtual void SetUp() OVERRIDE { old_thread_name_ = PlatformThread::GetName(); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { if (TraceLog::GetInstance()) EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled()); PlatformThread::SetName(old_thread_name_ ? old_thread_name_ : ""); diff --git a/base/environment.cc b/base/environment.cc index 0bfc68e..8c61591 100644 --- a/base/environment.cc +++ b/base/environment.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,7 +21,8 @@ namespace { class EnvironmentImpl : public base::Environment { public: - virtual bool GetVar(const char* variable_name, std::string* result) { + virtual bool GetVar(const char* variable_name, + std::string* result) OVERRIDE { if (GetVarImpl(variable_name, result)) return true; @@ -40,11 +41,12 @@ class EnvironmentImpl : public base::Environment { return GetVarImpl(alternate_case_var.c_str(), result); } - virtual bool SetVar(const char* variable_name, const std::string& new_value) { + virtual bool SetVar(const char* variable_name, + const std::string& new_value) OVERRIDE { return SetVarImpl(variable_name, new_value); } - virtual bool UnSetVar(const char* variable_name) { + virtual bool UnSetVar(const char* variable_name) OVERRIDE { return UnSetVarImpl(variable_name); } diff --git a/base/file_descriptor_shuffle_unittest.cc b/base/file_descriptor_shuffle_unittest.cc index 9b3f959..943df55 100644 --- a/base/file_descriptor_shuffle_unittest.cc +++ b/base/file_descriptor_shuffle_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,18 +44,18 @@ class InjectionTracer : public InjectionDelegate { : next_duplicate_(kDuplicateBase) { } - bool Duplicate(int* result, int fd) { + virtual bool Duplicate(int* result, int fd) OVERRIDE { *result = next_duplicate_++; actions_.push_back(Action(Action::DUPLICATE, *result, fd)); return true; } - bool Move(int src, int dest) { + virtual bool Move(int src, int dest) OVERRIDE { actions_.push_back(Action(Action::MOVE, src, dest)); return true; } - void Close(int fd) { + virtual void Close(int fd) OVERRIDE { actions_.push_back(Action(Action::CLOSE, fd)); } @@ -250,16 +250,15 @@ TEST(FileDescriptorShuffleTest, FanoutAndClose3) { class FailingDelegate : public InjectionDelegate { public: - bool Duplicate(int* result, int fd) { + virtual bool Duplicate(int* result, int fd) OVERRIDE { return false; } - bool Move(int src, int dest) { + virtual bool Move(int src, int dest) OVERRIDE { return false; } - void Close(int fd) { - } + virtual void Close(int fd) OVERRIDE {} }; TEST(FileDescriptorShuffleTest, EmptyWithFailure) { diff --git a/base/file_path_unittest.cc b/base/file_path_unittest.cc index 49fd1e0..71bff29 100644 --- a/base/file_path_unittest.cc +++ b/base/file_path_unittest.cc @@ -46,10 +46,10 @@ struct UTF8TestData { // to be a PlatformTest class FilePathTest : public PlatformTest { protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { PlatformTest::SetUp(); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { PlatformTest::TearDown(); } }; diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 5430a2d..4542af4 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -142,7 +142,7 @@ const file_util::FileEnumerator::FileType FILES_AND_DIRECTORIES = // to be a PlatformTest class FileUtilTest : public PlatformTest { protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { PlatformTest::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } @@ -1896,7 +1896,7 @@ TEST_F(FileUtilTest, IsDirectoryEmpty) { // with a common SetUp() method. class VerifyPathControlledByUserTest : public FileUtilTest { protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { FileUtilTest::SetUp(); // Create a basic structure used by each test. diff --git a/base/lazy_instance_unittest.cc b/base/lazy_instance_unittest.cc index b3106a4..e25366e 100644 --- a/base/lazy_instance_unittest.cc +++ b/base/lazy_instance_unittest.cc @@ -46,7 +46,7 @@ class SlowDelegate : public base::DelegateSimpleThread::Delegate { explicit SlowDelegate(base::LazyInstance<SlowConstructor>* lazy) : lazy_(lazy) {} - virtual void Run() { + virtual void Run() OVERRIDE { EXPECT_EQ(12, lazy_->Get().some_int()); EXPECT_EQ(12, lazy_->Pointer()->some_int()); } diff --git a/base/memory/linked_ptr_unittest.cc b/base/memory/linked_ptr_unittest.cc index ae10fc28..4550350 100644 --- a/base/memory/linked_ptr_unittest.cc +++ b/base/memory/linked_ptr_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,8 +25,10 @@ struct A { // Subclass struct B: public A { B() { history += base::StringPrintf("B%d ctor\n", mynum); } - ~B() { history += base::StringPrintf("B%d dtor\n", mynum); } - virtual void Use() { history += base::StringPrintf("B%d use\n", mynum); } + virtual ~B() { history += base::StringPrintf("B%d dtor\n", mynum); } + virtual void Use() OVERRIDE { + history += base::StringPrintf("B%d use\n", mynum); + } }; } // namespace diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc index 63125db..06c6a50 100644 --- a/base/memory/scoped_ptr_unittest.cc +++ b/base/memory/scoped_ptr_unittest.cc @@ -23,9 +23,9 @@ class ConDecLogger : public ConDecLoggerParent { explicit ConDecLogger(int* ptr) { set_ptr(ptr); } virtual ~ConDecLogger() { --*ptr_; } - virtual void set_ptr(int* ptr) { ptr_ = ptr; ++*ptr_; } + virtual void set_ptr(int* ptr) OVERRIDE { ptr_ = ptr; ++*ptr_; } - virtual int SomeMeth(int x) const { return x; } + virtual int SomeMeth(int x) const OVERRIDE { return x; } private: int* ptr_; diff --git a/base/memory/scoped_vector_unittest.cc b/base/memory/scoped_vector_unittest.cc index e10cb83..f6c7167 100644 --- a/base/memory/scoped_vector_unittest.cc +++ b/base/memory/scoped_vector_unittest.cc @@ -62,12 +62,11 @@ class LifeCycleWatcher : public LifeCycleObject::Observer { LifeCycleWatcher() : life_cycle_state_(LC_INITIAL), constructed_life_cycle_object_(NULL) {} - ~LifeCycleWatcher() { - } + virtual ~LifeCycleWatcher() {} // Assert INITIAL -> CONSTRUCTED and no LifeCycleObject associated with this // LifeCycleWatcher. - virtual void OnLifeCycleConstruct(LifeCycleObject* object) { + virtual void OnLifeCycleConstruct(LifeCycleObject* object) OVERRIDE { ASSERT_EQ(LC_INITIAL, life_cycle_state_); ASSERT_EQ(NULL, constructed_life_cycle_object_.get()); life_cycle_state_ = LC_CONSTRUCTED; @@ -76,7 +75,7 @@ class LifeCycleWatcher : public LifeCycleObject::Observer { // Assert CONSTRUCTED -> DESTROYED and the |object| being destroyed is the // same one we saw constructed. - virtual void OnLifeCycleDestroy(LifeCycleObject* object) { + virtual void OnLifeCycleDestroy(LifeCycleObject* object) OVERRIDE { ASSERT_EQ(LC_CONSTRUCTED, life_cycle_state_); LifeCycleObject* constructed_life_cycle_object = constructed_life_cycle_object_.release(); diff --git a/base/memory/singleton_unittest.cc b/base/memory/singleton_unittest.cc index 33928a7..d9892cb 100644 --- a/base/memory/singleton_unittest.cc +++ b/base/memory/singleton_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -153,9 +153,9 @@ CallbackFunc* GetStaticSingleton() { class SingletonTest : public testing::Test { public: - SingletonTest() { } + SingletonTest() {} - virtual void SetUp() { + virtual void SetUp() OVERRIDE { non_leak_called_ = false; leaky_called_ = false; static_called_ = false; diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc index 8f42664..f2e53ef 100644 --- a/base/memory/weak_ptr_unittest.cc +++ b/base/memory/weak_ptr_unittest.cc @@ -44,11 +44,9 @@ struct Consumer { WeakPtr<Producer> producer; }; // and delete objects on a background thread. class BackgroundThread : public Thread { public: - BackgroundThread() - : Thread("owner_thread") { - } + BackgroundThread() : Thread("owner_thread") {} - ~BackgroundThread() { + virtual ~BackgroundThread() { Stop(); } diff --git a/base/message_loop_proxy_impl_unittest.cc b/base/message_loop_proxy_impl_unittest.cc index 612312a..e97d8f1 100644 --- a/base/message_loop_proxy_impl_unittest.cc +++ b/base/message_loop_proxy_impl_unittest.cc @@ -37,14 +37,14 @@ class MessageLoopProxyImplTest : public testing::Test { } protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { io_thread_.reset(new base::Thread("MessageLoopProxyImplTest_IO")); file_thread_.reset(new base::Thread("MessageLoopProxyImplTest_File")); io_thread_->Start(); file_thread_->Start(); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { io_thread_->Stop(); file_thread_->Stop(); } diff --git a/base/message_loop_proxy_unittest.cc b/base/message_loop_proxy_unittest.cc index 2fdef13..4776502 100644 --- a/base/message_loop_proxy_unittest.cc +++ b/base/message_loop_proxy_unittest.cc @@ -31,7 +31,7 @@ class MessageLoopProxyTest : public testing::Test { } protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { // Use SetUp() instead of the constructor to avoid posting a task to a // partialy constructed object. task_thread_.Start(); @@ -42,7 +42,7 @@ class MessageLoopProxyTest : public testing::Test { Bind(&MessageLoopProxyTest::BlockTaskThreadHelper, Unretained(this))); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { // Make sure the |task_thread_| is not blocked, and stop the thread // fully before destuction because its tasks may still depend on the // |thread_sync_| event. diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc index b404dc8..883a805 100644 --- a/base/message_loop_unittest.cc +++ b/base/message_loop_unittest.cc @@ -1546,10 +1546,10 @@ namespace { class QuitDelegate : public MessageLoopForIO::Watcher { public: - virtual void OnFileCanWriteWithoutBlocking(int fd) { + virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { MessageLoop::current()->Quit(); } - virtual void OnFileCanReadWithoutBlocking(int fd) { + virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE { MessageLoop::current()->Quit(); } }; @@ -1644,7 +1644,7 @@ class MLDestructionObserver : public MessageLoop::DestructionObserver { destruction_observer_called_(destruction_observer_called), task_destroyed_before_message_loop_(false) { } - virtual void WillDestroyCurrentMessageLoop() { + virtual void WillDestroyCurrentMessageLoop() OVERRIDE { task_destroyed_before_message_loop_ = *task_destroyed_; *destruction_observer_called_ = true; } diff --git a/base/message_pump_libevent_unittest.cc b/base/message_pump_libevent_unittest.cc index c3ec97e..19a2084 100644 --- a/base/message_pump_libevent_unittest.cc +++ b/base/message_pump_libevent_unittest.cc @@ -25,7 +25,7 @@ class MessagePumpLibeventTest : public testing::Test { io_thread_("MessagePumpLibeventTestIOThread") {} virtual ~MessagePumpLibeventTest() {} - virtual void SetUp() { + virtual void SetUp() OVERRIDE { Thread::Options options(MessageLoop::TYPE_IO, 0); ASSERT_TRUE(io_thread_.StartWithOptions(options)); ASSERT_EQ(MessageLoop::TYPE_IO, io_thread_.message_loop()->type()); @@ -55,8 +55,8 @@ class StupidWatcher : public MessagePumpLibevent::Watcher { virtual ~StupidWatcher() {} // base:MessagePumpLibevent::Watcher interface - virtual void OnFileCanReadWithoutBlocking(int fd) {} - virtual void OnFileCanWriteWithoutBlocking(int fd) {} + virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE {} + virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE {} }; #if GTEST_HAS_DEATH_TEST && !defined(NDEBUG) @@ -85,10 +85,10 @@ class DeleteWatcher : public MessagePumpLibevent::Watcher { virtual ~DeleteWatcher() {} // base:MessagePumpLibevent::Watcher interface - virtual void OnFileCanReadWithoutBlocking(int /* fd */) { + virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE { NOTREACHED(); } - virtual void OnFileCanWriteWithoutBlocking(int /* fd */) { + virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE { delete controller_; } @@ -118,10 +118,10 @@ class StopWatcher : public MessagePumpLibevent::Watcher { virtual ~StopWatcher() {} // base:MessagePumpLibevent::Watcher interface - virtual void OnFileCanReadWithoutBlocking(int /* fd */) { + virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE { NOTREACHED(); } - virtual void OnFileCanWriteWithoutBlocking(int /* fd */) { + virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE { controller_->StopWatchingFileDescriptor(); } diff --git a/base/metrics/stats_table_unittest.cc b/base/metrics/stats_table_unittest.cc index 447769c..62a5839 100644 --- a/base/metrics/stats_table_unittest.cc +++ b/base/metrics/stats_table_unittest.cc @@ -76,8 +76,10 @@ class StatsTableThread : public SimpleThread { public: StatsTableThread(std::string name, int id) : SimpleThread(name), - id_(id) {} - virtual void Run(); + id_(id) {} + + virtual void Run() OVERRIDE; + private: int id_; }; diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc index d77414e..f8aff5a 100644 --- a/base/observer_list_unittest.cc +++ b/base/observer_list_unittest.cc @@ -27,11 +27,12 @@ class Foo { class Adder : public Foo { public: explicit Adder(int scaler) : total(0), scaler_(scaler) {} - virtual void Observe(int x) { + virtual void Observe(int x) OVERRIDE { total += x * scaler_; } - virtual ~Adder() { } + virtual ~Adder() {} int total; + private: int scaler_; }; @@ -39,11 +40,14 @@ class Adder : public Foo { class Disrupter : public Foo { public: Disrupter(ObserverList<Foo>* list, Foo* doomed) - : list_(list), doomed_(doomed) { } - virtual ~Disrupter() { } - virtual void Observe(int x) { + : list_(list), + doomed_(doomed) { + } + virtual ~Disrupter() {} + virtual void Observe(int x) OVERRIDE { list_->RemoveObserver(doomed_); } + private: ObserverList<Foo>* list_; Foo* doomed_; @@ -52,11 +56,14 @@ class Disrupter : public Foo { class ThreadSafeDisrupter : public Foo { public: ThreadSafeDisrupter(ObserverListThreadSafe<Foo>* list, Foo* doomed) - : list_(list), doomed_(doomed) { } - virtual ~ThreadSafeDisrupter() { } - virtual void Observe(int x) { + : list_(list), + doomed_(doomed) { + } + virtual ~ThreadSafeDisrupter() {} + virtual void Observe(int x) OVERRIDE { list_->RemoveObserver(doomed_); } + private: ObserverListThreadSafe<Foo>* list_; Foo* doomed_; @@ -70,7 +77,8 @@ class AddInObserve : public Foo { observer_list(observer_list), adder(1) { } - virtual void Observe(int x) { + + virtual void Observe(int x) OVERRIDE { if (!added) { added = true; observer_list->AddObserver(&adder); @@ -104,7 +112,7 @@ class AddRemoveThread : public PlatformThread::Delegate, virtual ~AddRemoveThread() { } - void ThreadMain() { + virtual void ThreadMain() OVERRIDE { loop_ = new MessageLoop(); // Fire up a message loop. loop_->PostTask( FROM_HERE, @@ -145,7 +153,7 @@ class AddRemoveThread : public PlatformThread::Delegate, loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); } - virtual void Observe(int x) { + virtual void Observe(int x) OVERRIDE { count_observes_++; // If we're getting called after we removed ourselves from @@ -321,7 +329,7 @@ class FooRemover : public Foo { foos_.push_back(foo); } - virtual void Observe(int x) { + virtual void Observe(int x) OVERRIDE { std::vector<Foo*> tmp; tmp.swap(foos_); for (std::vector<Foo*>::iterator it = tmp.begin(); @@ -473,7 +481,7 @@ class AddInClearObserve : public Foo { explicit AddInClearObserve(ObserverList<Foo>* list) : list_(list), added_(false), adder_(1) {} - virtual void Observe(int /* x */) { + virtual void Observe(int /* x */) OVERRIDE { list_->Clear(); list_->AddObserver(&adder_); added_ = true; @@ -516,10 +524,11 @@ TEST(ObserverListTest, ClearNotifyExistingOnly) { class ListDestructor : public Foo { public: explicit ListDestructor(ObserverList<Foo>* list) : list_(list) {} - virtual void Observe(int x) { + virtual ~ListDestructor() {} + + virtual void Observe(int x) OVERRIDE { delete list_; } - virtual ~ListDestructor() { } int total; private: ObserverList<Foo>* list_; diff --git a/base/pr_time_unittest.cc b/base/pr_time_unittest.cc index 5c8bad1..4000afd 100644 --- a/base/pr_time_unittest.cc +++ b/base/pr_time_unittest.cc @@ -1,9 +1,10 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <time.h> +#include "base/compiler_specific.h" #include "base/third_party/nspr/prtime.h" #include "base/time.h" #include "testing/gtest/include/gtest/gtest.h" @@ -19,7 +20,7 @@ PRTime comparison_time_pdt = 1192477500 * Time::kMicrosecondsPerSecond; // tested by comparing them to a known time in the local zone. class PRTimeTest : public testing::Test { protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { // Use mktime to get a time_t, and turn it into a PRTime by converting // seconds to microseconds. Use 15th Oct 2007 12:45:00 local. This // must be a time guaranteed to be outside of a DST fallback hour in diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 0b6c135..b74a3fb 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -963,15 +963,15 @@ class OutOfMemoryDeathTest : public testing::Test { signed_test_size_(std::numeric_limits<ssize_t>::max()) { } - virtual void SetUp() { #if defined(USE_TCMALLOC) + virtual void SetUp() OVERRIDE { tc_set_new_mode(1); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { tc_set_new_mode(0); -#endif // defined(USE_TCMALLOC) } +#endif // defined(USE_TCMALLOC) void SetUpInDeathAssert() { // Must call EnableTerminationOnOutOfMemory() because that is called from diff --git a/base/shared_memory_unittest.cc b/base/shared_memory_unittest.cc index fd88274..b8b5d80 100644 --- a/base/shared_memory_unittest.cc +++ b/base/shared_memory_unittest.cc @@ -35,7 +35,7 @@ namespace { class MultipleThreadMain : public PlatformThread::Delegate { public: explicit MultipleThreadMain(int16 id) : id_(id) {} - ~MultipleThreadMain() {} + virtual ~MultipleThreadMain() {} static void CleanUp() { SharedMemory memory; @@ -43,7 +43,7 @@ class MultipleThreadMain : public PlatformThread::Delegate { } // PlatformThread::Delegate interface. - void ThreadMain() { + virtual void ThreadMain() OVERRIDE { #if defined(OS_MACOSX) mac::ScopedNSAutoreleasePool pool; #endif @@ -89,10 +89,10 @@ const char* const MultipleThreadMain::s_test_name_ = class MultipleLockThread : public PlatformThread::Delegate { public: explicit MultipleLockThread(int id) : id_(id) {} - ~MultipleLockThread() {} + virtual ~MultipleLockThread() {} // PlatformThread::Delegate interface. - void ThreadMain() { + virtual void ThreadMain() OVERRIDE { const uint32 kDataSize = sizeof(int); SharedMemoryHandle handle = NULL; { diff --git a/base/synchronization/condition_variable_unittest.cc b/base/synchronization/condition_variable_unittest.cc index 49716e1..4162d4f 100644 --- a/base/synchronization/condition_variable_unittest.cc +++ b/base/synchronization/condition_variable_unittest.cc @@ -62,10 +62,10 @@ class ConditionVariableTest : public PlatformTest { class WorkQueue : public PlatformThread::Delegate { public: explicit WorkQueue(int thread_count); - ~WorkQueue(); + virtual ~WorkQueue(); // PlatformThread::Delegate interface. - void ThreadMain(); + virtual void ThreadMain() OVERRIDE; //---------------------------------------------------------------------------- // Worker threads only call the following methods. diff --git a/base/synchronization/lock_unittest.cc b/base/synchronization/lock_unittest.cc index 1dae49b..a048f85 100644 --- a/base/synchronization/lock_unittest.cc +++ b/base/synchronization/lock_unittest.cc @@ -1,10 +1,12 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/synchronization/lock.h" + #include <stdlib.h> -#include "base/synchronization/lock.h" +#include "base/compiler_specific.h" #include "base/threading/platform_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -16,7 +18,7 @@ class BasicLockTestThread : public PlatformThread::Delegate { public: BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} - virtual void ThreadMain() { + virtual void ThreadMain() OVERRIDE { for (int i = 0; i < 10; i++) { lock_->Acquire(); acquired_++; @@ -91,7 +93,7 @@ class TryLockTestThread : public PlatformThread::Delegate { public: TryLockTestThread(Lock* lock) : lock_(lock), got_lock_(false) {} - virtual void ThreadMain() { + virtual void ThreadMain() OVERRIDE { got_lock_ = lock_->Try(); if (got_lock_) lock_->Release(); @@ -160,7 +162,7 @@ class MutexLockTestThread : public PlatformThread::Delegate { } } - virtual void ThreadMain() { + virtual void ThreadMain() OVERRIDE { DoStuff(lock_, value_); } diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc index 01077ff..fbf8d10 100644 --- a/base/synchronization/waitable_event_posix.cc +++ b/base/synchronization/waitable_event_posix.cc @@ -91,7 +91,7 @@ class SyncWaiter : public WaitableEvent::Waiter { cv_(&lock_) { } - bool Fire(WaitableEvent* signaling_event) { + virtual bool Fire(WaitableEvent* signaling_event) OVERRIDE { base::AutoLock locked(lock_); if (fired_) @@ -117,7 +117,7 @@ class SyncWaiter : public WaitableEvent::Waiter { // These waiters are always stack allocated and don't delete themselves. Thus // there's no problem and the ABA tag is the same as the object pointer. // --------------------------------------------------------------------------- - bool Compare(void* tag) { + virtual bool Compare(void* tag) OVERRIDE { return this == tag; } diff --git a/base/synchronization/waitable_event_unittest.cc b/base/synchronization/waitable_event_unittest.cc index f253265..d00adc7 100644 --- a/base/synchronization/waitable_event_unittest.cc +++ b/base/synchronization/waitable_event_unittest.cc @@ -1,9 +1,11 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/time.h" #include "base/synchronization/waitable_event.h" + +#include "base/compiler_specific.h" +#include "base/time.h" #include "base/threading/platform_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -76,7 +78,7 @@ class WaitableEventSignaler : public PlatformThread::Delegate { ev_(ev) { } - void ThreadMain() { + virtual void ThreadMain() OVERRIDE { PlatformThread::Sleep(TimeDelta::FromSeconds(static_cast<int>(seconds_))); ev_->Signal(); } diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc index 5a17999..3180b4b 100644 --- a/base/synchronization/waitable_event_watcher_posix.cc +++ b/base/synchronization/waitable_event_watcher_posix.cc @@ -65,7 +65,7 @@ class AsyncWaiter : public WaitableEvent::Waiter { callback_(callback), flag_(flag) { } - bool Fire(WaitableEvent* event) { + virtual bool Fire(WaitableEvent* event) OVERRIDE { // Post the callback if we haven't been cancelled. if (!flag_->value()) { message_loop_->PostTask(FROM_HERE, callback_); @@ -81,7 +81,7 @@ class AsyncWaiter : public WaitableEvent::Waiter { } // See StopWatching for discussion - bool Compare(void* tag) { + virtual bool Compare(void* tag) OVERRIDE { return tag == flag_.get(); } diff --git a/base/synchronization/waitable_event_watcher_unittest.cc b/base/synchronization/waitable_event_watcher_unittest.cc index ee9478a..c48333a 100644 --- a/base/synchronization/waitable_event_watcher_unittest.cc +++ b/base/synchronization/waitable_event_watcher_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,7 +14,7 @@ namespace { class QuitDelegate : public WaitableEventWatcher::Delegate { public: - virtual void OnWaitableEventSignaled(WaitableEvent* event) { + virtual void OnWaitableEventSignaled(WaitableEvent* event) OVERRIDE { MessageLoop::current()->Quit(); } }; @@ -23,7 +23,7 @@ class DecrementCountDelegate : public WaitableEventWatcher::Delegate { public: explicit DecrementCountDelegate(int* counter) : counter_(counter) { } - virtual void OnWaitableEventSignaled(WaitableEvent* object) { + virtual void OnWaitableEventSignaled(WaitableEvent* object) OVERRIDE { --(*counter_); } private: diff --git a/base/system_monitor/system_monitor_unittest.cc b/base/system_monitor/system_monitor_unittest.cc index eaed974..4f94ce5 100644 --- a/base/system_monitor/system_monitor_unittest.cc +++ b/base/system_monitor/system_monitor_unittest.cc @@ -20,15 +20,15 @@ class PowerTest : public SystemMonitor::PowerObserver { } // PowerObserver callbacks. - void OnPowerStateChange(bool on_battery_power) { + virtual void OnPowerStateChange(bool on_battery_power) OVERRIDE { power_state_changes_++; } - void OnSuspend() { + virtual void OnSuspend() OVERRIDE { suspends_++; } - void OnResume() { + virtual void OnResume() OVERRIDE { resumes_++; } diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc index 7df146f..a1af2c5 100644 --- a/base/test/test_suite.cc +++ b/base/test/test_suite.cc @@ -39,7 +39,7 @@ namespace { class MaybeTestDisabler : public testing::EmptyTestEventListener { public: - virtual void OnTestStart(const testing::TestInfo& test_info) { + virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { ASSERT_FALSE(TestSuite::IsMarkedMaybe(test_info)) << "Probably the OS #ifdefs don't include all of the necessary " "platforms.\nPlease ensure that no tests have the MAYBE_ prefix " diff --git a/base/threading/non_thread_safe_unittest.cc b/base/threading/non_thread_safe_unittest.cc index 3236278..b8376f3 100644 --- a/base/threading/non_thread_safe_unittest.cc +++ b/base/threading/non_thread_safe_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -42,7 +42,7 @@ class CallDoStuffOnThread : public SimpleThread { non_thread_safe_class_(non_thread_safe_class) { } - virtual void Run() { + virtual void Run() OVERRIDE { non_thread_safe_class_->DoStuff(); } @@ -60,7 +60,7 @@ class DeleteNonThreadSafeClassOnThread : public SimpleThread { non_thread_safe_class_(non_thread_safe_class) { } - virtual void Run() { + virtual void Run() OVERRIDE { non_thread_safe_class_.reset(); } diff --git a/base/threading/sequenced_worker_pool_unittest.cc b/base/threading/sequenced_worker_pool_unittest.cc index 1c29c34..2becd09 100644 --- a/base/threading/sequenced_worker_pool_unittest.cc +++ b/base/threading/sequenced_worker_pool_unittest.cc @@ -152,11 +152,11 @@ class SequencedWorkerPoolTest : public testing::Test { : pool_owner_(kNumWorkerThreads, "test"), tracker_(new TestTracker) {} - ~SequencedWorkerPoolTest() {} + virtual ~SequencedWorkerPoolTest() {} - virtual void SetUp() {} + virtual void SetUp() OVERRIDE {} - virtual void TearDown() { + virtual void TearDown() OVERRIDE { pool()->Shutdown(); } diff --git a/base/threading/simple_thread_unittest.cc b/base/threading/simple_thread_unittest.cc index 4014d70..169e2d7 100644 --- a/base/threading/simple_thread_unittest.cc +++ b/base/threading/simple_thread_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -15,9 +15,9 @@ namespace { class SetIntRunner : public DelegateSimpleThread::Delegate { public: SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { } - ~SetIntRunner() { } + virtual ~SetIntRunner() { } - virtual void Run() { + virtual void Run() OVERRIDE { *ptr_ = val_; } @@ -29,9 +29,9 @@ class SetIntRunner : public DelegateSimpleThread::Delegate { class WaitEventRunner : public DelegateSimpleThread::Delegate { public: explicit WaitEventRunner(WaitableEvent* event) : event_(event) { } - ~WaitEventRunner() { } + virtual ~WaitEventRunner() { } - virtual void Run() { + virtual void Run() OVERRIDE { EXPECT_FALSE(event_->IsSignaled()); event_->Signal(); EXPECT_TRUE(event_->IsSignaled()); @@ -43,7 +43,7 @@ class WaitEventRunner : public DelegateSimpleThread::Delegate { class SeqRunner : public DelegateSimpleThread::Delegate { public: explicit SeqRunner(AtomicSequenceNumber* seq) : seq_(seq) { } - virtual void Run() { + virtual void Run() OVERRIDE { seq_->GetNext(); } @@ -60,7 +60,7 @@ class VerifyPoolRunner : public DelegateSimpleThread::Delegate { int total, WaitableEvent* event) : seq_(seq), total_(total), event_(event) { } - virtual void Run() { + virtual void Run() OVERRIDE { if (seq_->GetNext() == total_) { event_->Signal(); } else { diff --git a/base/threading/thread_checker_unittest.cc b/base/threading/thread_checker_unittest.cc index 1760cd0..0dadcf01 100644 --- a/base/threading/thread_checker_unittest.cc +++ b/base/threading/thread_checker_unittest.cc @@ -46,7 +46,7 @@ class CallDoStuffOnThread : public base::SimpleThread { thread_checker_class_(thread_checker_class) { } - virtual void Run() { + virtual void Run() OVERRIDE { thread_checker_class_->DoStuff(); } @@ -64,7 +64,7 @@ class DeleteThreadCheckerClassOnThread : public base::SimpleThread { thread_checker_class_(thread_checker_class) { } - virtual void Run() { + virtual void Run() OVERRIDE { thread_checker_class_.reset(); } diff --git a/base/threading/thread_collision_warner_unittest.cc b/base/threading/thread_collision_warner_unittest.cc index d9e535b8..48710a7 100644 --- a/base/threading/thread_collision_warner_unittest.cc +++ b/base/threading/thread_collision_warner_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,7 +41,7 @@ class AssertReporter : public base::AsserterBase { AssertReporter() : failed_(false) {} - virtual void warn() { + virtual void warn() OVERRIDE { failed_ = true; } @@ -151,7 +151,7 @@ TEST(ThreadCollisionTest, MTBookCriticalSectionTest) { explicit QueueUser(NonThreadSafeQueue& queue) : queue_(queue) {} - virtual void Run() { + virtual void Run() OVERRIDE { queue_.push(0); queue_.pop(); } @@ -209,7 +209,7 @@ TEST(ThreadCollisionTest, MTScopedBookCriticalSectionTest) { explicit QueueUser(NonThreadSafeQueue& queue) : queue_(queue) {} - virtual void Run() { + virtual void Run() OVERRIDE { queue_.push(0); queue_.pop(); } @@ -270,7 +270,7 @@ TEST(ThreadCollisionTest, MTSynchedScopedBookCriticalSectionTest) { : queue_(queue), lock_(lock) {} - virtual void Run() { + virtual void Run() OVERRIDE { { base::AutoLock auto_lock(lock_); queue_.push(0); @@ -344,7 +344,7 @@ TEST(ThreadCollisionTest, MTSynchedScopedRecursiveBookCriticalSectionTest) { : queue_(queue), lock_(lock) {} - virtual void Run() { + virtual void Run() OVERRIDE { { base::AutoLock auto_lock(lock_); queue_.push(0); diff --git a/base/threading/thread_local_storage_unittest.cc b/base/threading/thread_local_storage_unittest.cc index 0a6ba6b..8e222ee 100644 --- a/base/threading/thread_local_storage_unittest.cc +++ b/base/threading/thread_local_storage_unittest.cc @@ -35,7 +35,7 @@ class ThreadLocalStorageRunner : public DelegateSimpleThread::Delegate { virtual ~ThreadLocalStorageRunner() {} - virtual void Run() { + virtual void Run() OVERRIDE { *tls_value_ptr_ = kInitialTlsValue; tls_slot.Set(tls_value_ptr_); diff --git a/base/threading/thread_local_unittest.cc b/base/threading/thread_local_unittest.cc index ba12898..b125a48 100644 --- a/base/threading/thread_local_unittest.cc +++ b/base/threading/thread_local_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,8 +17,10 @@ class ThreadLocalTesterBase : public base::DelegateSimpleThreadPool::Delegate { typedef base::ThreadLocalPointer<ThreadLocalTesterBase> TLPType; ThreadLocalTesterBase(TLPType* tlp, base::WaitableEvent* done) - : tlp_(tlp), done_(done) { } - ~ThreadLocalTesterBase() { } + : tlp_(tlp), + done_(done) { + } + virtual ~ThreadLocalTesterBase() {} protected: TLPType* tlp_; @@ -28,12 +30,14 @@ class ThreadLocalTesterBase : public base::DelegateSimpleThreadPool::Delegate { class SetThreadLocal : public ThreadLocalTesterBase { public: SetThreadLocal(TLPType* tlp, base::WaitableEvent* done) - : ThreadLocalTesterBase(tlp, done), val_(NULL) { } - ~SetThreadLocal() { } + : ThreadLocalTesterBase(tlp, done), + val_(NULL) { + } + virtual ~SetThreadLocal() {} void set_value(ThreadLocalTesterBase* val) { val_ = val; } - virtual void Run() { + virtual void Run() OVERRIDE { DCHECK(!done_->IsSignaled()); tlp_->Set(val_); done_->Signal(); @@ -46,12 +50,14 @@ class SetThreadLocal : public ThreadLocalTesterBase { class GetThreadLocal : public ThreadLocalTesterBase { public: GetThreadLocal(TLPType* tlp, base::WaitableEvent* done) - : ThreadLocalTesterBase(tlp, done), ptr_(NULL) { } - ~GetThreadLocal() { } + : ThreadLocalTesterBase(tlp, done), + ptr_(NULL) { + } + virtual ~GetThreadLocal() {} void set_ptr(ThreadLocalTesterBase** ptr) { ptr_ = ptr; } - virtual void Run() { + virtual void Run() OVERRIDE { DCHECK(!done_->IsSignaled()); *ptr_ = tlp_->Get(); done_->Signal(); diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc index 87df252..28696d9 100644 --- a/base/threading/thread_unittest.cc +++ b/base/threading/thread_unittest.cc @@ -35,7 +35,7 @@ class SleepInsideInitThread : public Thread { Stop(); } - virtual void Init() { + virtual void Init() OVERRIDE { base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(500)); init_called_ = true; } @@ -66,18 +66,19 @@ class CaptureToEventList : public Thread { // the order they occured in. |event_list| must remain valid for the // lifetime of this thread. explicit CaptureToEventList(EventList* event_list) - : Thread("none"), event_list_(event_list) { + : Thread("none"), + event_list_(event_list) { } virtual ~CaptureToEventList() { Stop(); } - virtual void Init() { + virtual void Init() OVERRIDE { event_list_->push_back(THREAD_EVENT_INIT); } - virtual void CleanUp() { + virtual void CleanUp() OVERRIDE { event_list_->push_back(THREAD_EVENT_CLEANUP); } @@ -95,7 +96,7 @@ class CapturingDestructionObserver : public MessageLoop::DestructionObserver { } // DestructionObserver implementation: - virtual void WillDestroyCurrentMessageLoop() { + virtual void WillDestroyCurrentMessageLoop() OVERRIDE { event_list_->push_back(THREAD_EVENT_MESSAGE_LOOP_DESTROYED); event_list_ = NULL; } diff --git a/base/threading/watchdog_unittest.cc b/base/threading/watchdog_unittest.cc index 51e49df..92ab02c 100644 --- a/base/threading/watchdog_unittest.cc +++ b/base/threading/watchdog_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -22,12 +22,13 @@ class WatchdogCounter : public Watchdog { WatchdogCounter(const TimeDelta& duration, const std::string& thread_watched_name, bool enabled) - : Watchdog(duration, thread_watched_name, enabled), alarm_counter_(0) { + : Watchdog(duration, thread_watched_name, enabled), + alarm_counter_(0) { } virtual ~WatchdogCounter() {} - virtual void Alarm() { + virtual void Alarm() OVERRIDE { alarm_counter_++; Watchdog::Alarm(); } @@ -42,7 +43,7 @@ class WatchdogCounter : public Watchdog { class WatchdogTest : public testing::Test { public: - void SetUp() { + virtual void SetUp() OVERRIDE { Watchdog::ResetStaticData(); } }; diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc index 6d83bda..c758845 100644 --- a/base/threading/worker_pool_posix.cc +++ b/base/threading/worker_pool_posix.cc @@ -62,7 +62,7 @@ class WorkerThread : public PlatformThread::Delegate { : name_prefix_(name_prefix), pool_(pool) {} - virtual void ThreadMain(); + virtual void ThreadMain() OVERRIDE; private: const std::string name_prefix_; diff --git a/base/threading/worker_pool_posix_unittest.cc b/base/threading/worker_pool_posix_unittest.cc index a8d9218..49f6570a 100644 --- a/base/threading/worker_pool_posix_unittest.cc +++ b/base/threading/worker_pool_posix_unittest.cc @@ -97,11 +97,11 @@ class PosixDynamicThreadPoolTest : public testing::Test { num_waiting_to_start_cv_(&num_waiting_to_start_lock_), start_(true, false) {} - virtual void SetUp() { + virtual void SetUp() OVERRIDE { peer_.set_num_idle_threads_cv(new ConditionVariable(peer_.lock())); } - virtual void TearDown() { + virtual void TearDown() OVERRIDE { // Wake up the idle threads so they can terminate. if (pool_.get()) pool_->Terminate(); } diff --git a/base/time_unittest.cc b/base/time_unittest.cc index b81ef44..9823147 100644 --- a/base/time_unittest.cc +++ b/base/time_unittest.cc @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/time.h" + #include <time.h> +#include "base/compiler_specific.h" #include "base/threading/platform_thread.h" -#include "base/time.h" #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" @@ -18,7 +20,7 @@ using base::TimeTicks; // See also pr_time_unittests.cc class TimeTest : public testing::Test { protected: - virtual void SetUp() { + virtual void SetUp() OVERRIDE { // Use mktime to get a time_t, and turn it into a PRTime by converting // seconds to microseconds. Use 15th Oct 2007 12:45:00 local. This // must be a time guaranteed to be outside of a DST fallback hour in diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc index 60ac015..499ff88 100644 --- a/base/tools_sanity_unittest.cc +++ b/base/tools_sanity_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -163,8 +163,8 @@ namespace { class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate { public: explicit TOOLS_SANITY_TEST_CONCURRENT_THREAD(bool *value) : value_(value) {} - ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() {} - void ThreadMain() { + virtual ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() {} + virtual void ThreadMain() OVERRIDE { *value_ = true; // Sleep for a few milliseconds so the two threads are more likely to live @@ -179,8 +179,8 @@ class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate { class ReleaseStoreThread : public PlatformThread::Delegate { public: explicit ReleaseStoreThread(base::subtle::Atomic32 *value) : value_(value) {} - ~ReleaseStoreThread() {} - void ThreadMain() { + virtual ~ReleaseStoreThread() {} + virtual void ThreadMain() OVERRIDE { base::subtle::Release_Store(value_, kMagicValue); // Sleep for a few milliseconds so the two threads are more likely to live @@ -195,8 +195,8 @@ class ReleaseStoreThread : public PlatformThread::Delegate { class AcquireLoadThread : public PlatformThread::Delegate { public: explicit AcquireLoadThread(base::subtle::Atomic32 *value) : value_(value) {} - ~AcquireLoadThread() {} - void ThreadMain() { + virtual ~AcquireLoadThread() {} + virtual void ThreadMain() OVERRIDE { // Wait for the other thread to make Release_Store PlatformThread::Sleep(TimeDelta::FromMilliseconds(100)); base::subtle::Acquire_Load(value_); diff --git a/base/tracked_objects_unittest.cc b/base/tracked_objects_unittest.cc index 0e188b1..386dc05 100644 --- a/base/tracked_objects_unittest.cc +++ b/base/tracked_objects_unittest.cc @@ -21,7 +21,7 @@ class TrackedObjectsTest : public testing::Test { ThreadData::ShutdownSingleThreadedCleanup(true); } - ~TrackedObjectsTest() { + virtual ~TrackedObjectsTest() { // We should not need to leak any structures we create, since we are // single threaded, and carefully accounting for items. ThreadData::ShutdownSingleThreadedCleanup(false); diff --git a/base/values_unittest.cc b/base/values_unittest.cc index ff6f4a5..bbc53f9 100644 --- a/base/values_unittest.cc +++ b/base/values_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -175,7 +175,7 @@ class DeletionTestValue : public Value { *deletion_flag_ = false; } - ~DeletionTestValue() { + virtual ~DeletionTestValue() { *deletion_flag_ = true; } |