Revved to chromium 0e1d34edba6a5d8f7fe43c5b675880a36f4b3861 refs/remotes/origin/HEAD
filter gyp out of build/landmines.py
filter pepper out of mojo/examples/BUILD.gn
filter html_viewer out of mojo/services/BUILD.gn
filter js out of mojo/BUILD.gn and mojo/tools/data/unittests
filter js/bindings out of mojo/public/BUILD.gn
applied patch gpu_media.patch
applied patch cc_strip_video.patch
applied patch ui_test_support.patch
applied patch remove_ipc_deps.patch
applied patch ui_compositor.patch
applied patch net_sql.patch
diff --git a/AUTHORS b/AUTHORS
index a61c7a6..5f2cd73 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -105,6 +105,7 @@
David Benjamin <davidben@mit.edu>
David Erceg <erceg.david@gmail.com>
David Futcher <david.mike.futcher@gmail.com>
+David McAllister <mcdavid@amazon.com>
Deepak Dilip Borade <deepak.db@samsung.com>
Deepak Mittal <deepak.m1@samsung.com>
Deepak Singla <deepak.sa@samsung.com>
@@ -412,6 +413,7 @@
Shez Baig <sbaig1@bloomberg.net>
Shiliu Wang <aofdwsl@gmail.com>
Shiliu Wang <shiliu.wang@intel.com>
+Shilpa Shri <shilpa.shri@samsung.com>
Shouqun Liu <shouqun.liu@intel.com>
Shreeram Kushwaha <shreeram.k@samsung.com>
Shreyas Gopal <shreyas.g@samsung.com>
diff --git a/DEPS b/DEPS
index 0811444..df7cf13 100644
--- a/DEPS
+++ b/DEPS
@@ -30,12 +30,12 @@
'skia_git': 'https://skia.googlesource.com',
'boringssl_git': 'https://boringssl.googlesource.com',
'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
- 'skia_revision': '43b8b36b20ae00e2d78421c4cda1f3f922983a20',
+ 'skia_revision': 'dd5a1e094c19fa10202c37c50a1f799e5af5dac0',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling Skia
# and V8 without interference from each other.
'v8_branch': 'trunk',
- 'v8_revision': '2f51c28a975ceaa07ce8f8b2e42ac0f0c5a57802', # from svn revision 24723
+ 'v8_revision': '233fccf1872781e1f8ac2314511de15ca7a232ad', # from svn revision 24772
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
@@ -109,7 +109,7 @@
Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '034e9a9747e0983bc19808ea70e469bc8342081f',
'src/third_party/libyuv':
- Var('chromium_git') + '/external/libyuv.git' + '@' + '9107460c7f76a10cc4122d91e62b0580eacd376e',
+ Var('chromium_git') + '/external/libyuv.git' + '@' + '5a09c3ef2aa3e6b6da4007746fdde04ca56dae7c', # from svn revision 1130
'src/third_party/smhasher/src':
Var('chromium_git') + '/external/smhasher.git' + '@' + 'e87738e57558e0ec472b2fc3a643b838e5b6e88f',
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 444f5bb..eafc8fe 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1601,7 +1601,6 @@
],
'ios_rel_device': ['compile'],
'ios_rel_device_ninja': ['compile'],
- 'linux_asan': ['compile'],
'mac_asan': ['compile'],
#TODO(stip): Change the name of this builder to reflect that it's release.
'linux_gtk': standard_tests,
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 0bbc91b..669d739 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -852,11 +852,15 @@
#cflags = [ "/wd4267" ]
libs = [
+ "cfgmgr32.lib",
"netapi32.lib",
"powrprof.lib",
+ "setupapi.lib",
]
ldflags = [
+ "/DELAYLOAD:cfgmgr32.dll",
"/DELAYLOAD:powrprof.dll",
+ "/DELAYLOAD:setupapi.dll",
]
} else if (!is_nacl) {
# Non-Windows.
diff --git a/base/async_socket_io_handler.h b/base/async_socket_io_handler.h
index 71ca5f4..bedb00f 100644
--- a/base/async_socket_io_handler.h
+++ b/base/async_socket_io_handler.h
@@ -54,7 +54,7 @@
#endif
public:
AsyncSocketIoHandler();
- virtual ~AsyncSocketIoHandler();
+ ~AsyncSocketIoHandler() override;
// Type definition for the callback. The parameter tells how many
// bytes were read and is 0 if an error occurred.
@@ -81,8 +81,8 @@
DWORD error) override;
#elif defined(OS_POSIX)
// Implementation of base::MessageLoopForIO::Watcher.
- virtual void OnFileCanWriteWithoutBlocking(int socket) override {}
- virtual void OnFileCanReadWithoutBlocking(int socket) override;
+ void OnFileCanWriteWithoutBlocking(int socket) override {}
+ void OnFileCanReadWithoutBlocking(int socket) override;
void EnsureWatchingSocket();
#endif
diff --git a/base/base.gyp b/base/base.gyp
index 871b8e5..1a4b54e 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -160,10 +160,14 @@
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
+ 'cfgmgr32.dll',
'powrprof.dll',
+ 'setupapi.dll',
],
'AdditionalDependencies': [
+ 'cfgmgr32.lib',
'powrprof.lib',
+ 'setupapi.lib',
],
},
},
@@ -172,10 +176,14 @@
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
+ 'cfgmgr32.dll',
'powrprof.dll',
+ 'setupapi.dll',
],
'AdditionalDependencies': [
+ 'cfgmgr32.lib',
'powrprof.lib',
+ 'setupapi.lib',
],
},
},
@@ -1072,10 +1080,14 @@
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
+ 'cfgmgr32.dll',
'powrprof.dll',
+ 'setupapi.dll',
],
'AdditionalDependencies': [
+ 'cfgmgr32.lib',
'powrprof.lib',
+ 'setupapi.lib',
],
},
},
@@ -1084,10 +1096,14 @@
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
+ 'cfgmgr32.dll',
'powrprof.dll',
+ 'setupapi.dll',
],
'AdditionalDependencies': [
+ 'cfgmgr32.lib',
'powrprof.lib',
+ 'setupapi.lib',
],
},
},
diff --git a/base/bind_unittest.cc b/base/bind_unittest.cc
index ce1af1b..a30b775 100644
--- a/base/bind_unittest.cc
+++ b/base/bind_unittest.cc
@@ -66,7 +66,7 @@
class Child : public Parent {
public:
- virtual void VirtualSet() override { value = kChildValue; }
+ void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};
@@ -78,7 +78,7 @@
};
class NoRefChild : public NoRefParent {
- virtual void VirtualSet() override { value = kChildValue; }
+ void VirtualSet() override { value = kChildValue; }
void NonVirtualSet() { value = kChildValue; }
};
diff --git a/base/callback_list.h b/base/callback_list.h
index aeed5f1..5b911fd 100644
--- a/base/callback_list.h
+++ b/base/callback_list.h
@@ -1,3 +1,8 @@
+// This file was GENERATED by command:
+// pump.py callback_list.h.pump
+// DO NOT EDIT BY HAND!!!
+
+
// Copyright 2013 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.
@@ -203,21 +208,192 @@
template <typename Sig> class CallbackList;
-template <typename... Args>
-class CallbackList<void(Args...)>
- : public internal::CallbackListBase<Callback<void(Args...)> > {
+template <>
+class CallbackList<void(void)>
+ : public internal::CallbackListBase<Callback<void(void)> > {
public:
- typedef Callback<void(Args...)> CallbackType;
+ typedef Callback<void(void)> CallbackType;
CallbackList() {}
- void Notify(
- typename internal::CallbackParamTraits<Args>::ForwardType... args) {
+ void Notify() {
+ internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run();
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1>
+class CallbackList<void(A1)>
+ : public internal::CallbackListBase<Callback<void(A1)> > {
+ public:
+ typedef Callback<void(A1)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1) {
typename internal::CallbackListBase<CallbackType>::Iterator it =
this->GetIterator();
CallbackType* cb;
while ((cb = it.GetNext()) != NULL) {
- cb->Run(args...);
+ cb->Run(a1);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2>
+class CallbackList<void(A1, A2)>
+ : public internal::CallbackListBase<Callback<void(A1, A2)> > {
+ public:
+ typedef Callback<void(A1, A2)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2, typename A3>
+class CallbackList<void(A1, A2, A3)>
+ : public internal::CallbackListBase<Callback<void(A1, A2, A3)> > {
+ public:
+ typedef Callback<void(A1, A2, A3)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2,
+ typename internal::CallbackParamTraits<A3>::ForwardType a3) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2, a3);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2, typename A3, typename A4>
+class CallbackList<void(A1, A2, A3, A4)>
+ : public internal::CallbackListBase<Callback<void(A1, A2, A3, A4)> > {
+ public:
+ typedef Callback<void(A1, A2, A3, A4)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2,
+ typename internal::CallbackParamTraits<A3>::ForwardType a3,
+ typename internal::CallbackParamTraits<A4>::ForwardType a4) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2, a3, a4);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2, typename A3, typename A4, typename A5>
+class CallbackList<void(A1, A2, A3, A4, A5)>
+ : public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5)> > {
+ public:
+ typedef Callback<void(A1, A2, A3, A4, A5)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2,
+ typename internal::CallbackParamTraits<A3>::ForwardType a3,
+ typename internal::CallbackParamTraits<A4>::ForwardType a4,
+ typename internal::CallbackParamTraits<A5>::ForwardType a5) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2, a3, a4, a5);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2, typename A3, typename A4, typename A5,
+ typename A6>
+class CallbackList<void(A1, A2, A3, A4, A5, A6)>
+ : public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5,
+ A6)> > {
+ public:
+ typedef Callback<void(A1, A2, A3, A4, A5, A6)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2,
+ typename internal::CallbackParamTraits<A3>::ForwardType a3,
+ typename internal::CallbackParamTraits<A4>::ForwardType a4,
+ typename internal::CallbackParamTraits<A5>::ForwardType a5,
+ typename internal::CallbackParamTraits<A6>::ForwardType a6) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2, a3, a4, a5, a6);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+template <typename A1, typename A2, typename A3, typename A4, typename A5,
+ typename A6, typename A7>
+class CallbackList<void(A1, A2, A3, A4, A5, A6, A7)>
+ : public internal::CallbackListBase<Callback<void(A1, A2, A3, A4, A5, A6,
+ A7)> > {
+ public:
+ typedef Callback<void(A1, A2, A3, A4, A5, A6, A7)> CallbackType;
+
+ CallbackList() {}
+
+ void Notify(typename internal::CallbackParamTraits<A1>::ForwardType a1,
+ typename internal::CallbackParamTraits<A2>::ForwardType a2,
+ typename internal::CallbackParamTraits<A3>::ForwardType a3,
+ typename internal::CallbackParamTraits<A4>::ForwardType a4,
+ typename internal::CallbackParamTraits<A5>::ForwardType a5,
+ typename internal::CallbackParamTraits<A6>::ForwardType a6,
+ typename internal::CallbackParamTraits<A7>::ForwardType a7) {
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run(a1, a2, a3, a4, a5, a6, a7);
}
}
diff --git a/base/callback_list.h.pump b/base/callback_list.h.pump
new file mode 100644
index 0000000..d7f8473
--- /dev/null
+++ b/base/callback_list.h.pump
@@ -0,0 +1,269 @@
+$$ This is a pump file for generating file templates. Pump is a python
+$$ script that is part of the Google Test suite of utilities. Description
+$$ can be found here:
+$$
+$$ http://code.google.com/p/googletest/wiki/PumpManual
+$$
+
+$$ See comment for MAX_ARITY in base/bind.h.pump.
+$var MAX_ARITY = 7
+
+// Copyright 2013 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.
+
+#ifndef BASE_CALLBACK_LIST_H_
+#define BASE_CALLBACK_LIST_H_
+
+#include <list>
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/callback_internal.h"
+#include "base/compiler_specific.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+
+// OVERVIEW:
+//
+// A container for a list of callbacks. Unlike a normal STL vector or list,
+// this container can be modified during iteration without invalidating the
+// iterator. It safely handles the case of a callback removing itself
+// or another callback from the list while callbacks are being run.
+//
+// TYPICAL USAGE:
+//
+// class MyWidget {
+// public:
+// ...
+//
+// typedef base::Callback<void(const Foo&)> OnFooCallback;
+//
+// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>
+// RegisterCallback(const OnFooCallback& cb) {
+// return callback_list_.Add(cb);
+// }
+//
+// private:
+// void NotifyFoo(const Foo& foo) {
+// callback_list_.Notify(foo);
+// }
+//
+// base::CallbackList<void(const Foo&)> callback_list_;
+//
+// DISALLOW_COPY_AND_ASSIGN(MyWidget);
+// };
+//
+//
+// class MyWidgetListener {
+// public:
+// MyWidgetListener::MyWidgetListener() {
+// foo_subscription_ = MyWidget::GetCurrent()->RegisterCallback(
+// base::Bind(&MyWidgetListener::OnFoo, this)));
+// }
+//
+// MyWidgetListener::~MyWidgetListener() {
+// // Subscription gets deleted automatically and will deregister
+// // the callback in the process.
+// }
+//
+// private:
+// void OnFoo(const Foo& foo) {
+// // Do something.
+// }
+//
+// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription>
+// foo_subscription_;
+//
+// DISALLOW_COPY_AND_ASSIGN(MyWidgetListener);
+// };
+
+namespace base {
+
+namespace internal {
+
+template <typename CallbackType>
+class CallbackListBase {
+ public:
+ class Subscription {
+ public:
+ Subscription(CallbackListBase<CallbackType>* list,
+ typename std::list<CallbackType>::iterator iter)
+ : list_(list),
+ iter_(iter) {
+ }
+
+ ~Subscription() {
+ if (list_->active_iterator_count_) {
+ iter_->Reset();
+ } else {
+ list_->callbacks_.erase(iter_);
+ if (!list_->removal_callback_.is_null())
+ list_->removal_callback_.Run();
+ }
+ }
+
+ private:
+ CallbackListBase<CallbackType>* list_;
+ typename std::list<CallbackType>::iterator iter_;
+
+ DISALLOW_COPY_AND_ASSIGN(Subscription);
+ };
+
+ // Add a callback to the list. The callback will remain registered until the
+ // returned Subscription is destroyed, which must occur before the
+ // CallbackList is destroyed.
+ scoped_ptr<Subscription> Add(const CallbackType& cb) WARN_UNUSED_RESULT {
+ DCHECK(!cb.is_null());
+ return scoped_ptr<Subscription>(
+ new Subscription(this, callbacks_.insert(callbacks_.end(), cb)));
+ }
+
+ // Sets a callback which will be run when a subscription list is changed.
+ void set_removal_callback(const Closure& callback) {
+ removal_callback_ = callback;
+ }
+
+ // Returns true if there are no subscriptions. This is only valid to call when
+ // not looping through the list.
+ bool empty() {
+ DCHECK_EQ(0, active_iterator_count_);
+ return callbacks_.empty();
+ }
+
+ protected:
+ // An iterator class that can be used to access the list of callbacks.
+ class Iterator {
+ public:
+ explicit Iterator(CallbackListBase<CallbackType>* list)
+ : list_(list),
+ list_iter_(list_->callbacks_.begin()) {
+ ++list_->active_iterator_count_;
+ }
+
+ Iterator(const Iterator& iter)
+ : list_(iter.list_),
+ list_iter_(iter.list_iter_) {
+ ++list_->active_iterator_count_;
+ }
+
+ ~Iterator() {
+ if (list_ && --list_->active_iterator_count_ == 0) {
+ list_->Compact();
+ }
+ }
+
+ CallbackType* GetNext() {
+ while ((list_iter_ != list_->callbacks_.end()) && list_iter_->is_null())
+ ++list_iter_;
+
+ CallbackType* cb = NULL;
+ if (list_iter_ != list_->callbacks_.end()) {
+ cb = &(*list_iter_);
+ ++list_iter_;
+ }
+ return cb;
+ }
+
+ private:
+ CallbackListBase<CallbackType>* list_;
+ typename std::list<CallbackType>::iterator list_iter_;
+ };
+
+ CallbackListBase() : active_iterator_count_(0) {}
+
+ ~CallbackListBase() {
+ DCHECK_EQ(0, active_iterator_count_);
+ DCHECK_EQ(0U, callbacks_.size());
+ }
+
+ // Returns an instance of a CallbackListBase::Iterator which can be used
+ // to run callbacks.
+ Iterator GetIterator() {
+ return Iterator(this);
+ }
+
+ // Compact the list: remove any entries which were NULLed out during
+ // iteration.
+ void Compact() {
+ typename std::list<CallbackType>::iterator it = callbacks_.begin();
+ bool updated = false;
+ while (it != callbacks_.end()) {
+ if ((*it).is_null()) {
+ updated = true;
+ it = callbacks_.erase(it);
+ } else {
+ ++it;
+ }
+
+ if (updated && !removal_callback_.is_null())
+ removal_callback_.Run();
+ }
+ }
+
+ private:
+ std::list<CallbackType> callbacks_;
+ int active_iterator_count_;
+ Closure removal_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(CallbackListBase);
+};
+
+} // namespace internal
+
+template <typename Sig> class CallbackList;
+
+
+$range ARITY 0..MAX_ARITY
+$for ARITY [[
+$range ARG 1..ARITY
+
+$if ARITY == 0 [[
+template <>
+class CallbackList<void(void)>
+ : public internal::CallbackListBase<Callback<void(void)> > {
+]] $else [[
+template <$for ARG , [[typename A$(ARG)]]>
+class CallbackList<void($for ARG , [[A$(ARG)]])>
+ : public internal::CallbackListBase<Callback<void($for ARG , [[A$(ARG)]])> > {
+]]
+
+ public:
+$if ARITY == 0 [[
+
+ typedef Callback<void(void)> CallbackType;
+]] $else [[
+
+ typedef Callback<void($for ARG , [[A$(ARG)]])> CallbackType;
+]]
+
+
+ CallbackList() {}
+
+ void Notify($for ARG ,
+ [[typename internal::CallbackParamTraits<A$(ARG)>::ForwardType a$(ARG)]]) {
+$if ARITY == 0 [[
+
+ internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+]] $else [[
+
+ typename internal::CallbackListBase<CallbackType>::Iterator it =
+ this->GetIterator();
+]]
+
+ CallbackType* cb;
+ while ((cb = it.GetNext()) != NULL) {
+ cb->Run($for ARG , [[a$(ARG)]]);
+ }
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CallbackList);
+};
+
+
+]] $$ for ARITY
+} // namespace base
+
+#endif // BASE_CALLBACK_LIST_H_
diff --git a/base/debug/crash_logging_unittest.cc b/base/debug/crash_logging_unittest.cc
index 8c252f0..cb11f13 100644
--- a/base/debug/crash_logging_unittest.cc
+++ b/base/debug/crash_logging_unittest.cc
@@ -44,7 +44,7 @@
};
TEST_F(CrashLoggingTest, SetClearSingle) {
- const char* kTestKey = "test-key";
+ const char kTestKey[] = "test-key";
base::debug::CrashKey keys[] = { { kTestKey, 255 } };
base::debug::InitCrashKeys(keys, arraysize(keys), 255);
@@ -56,10 +56,10 @@
}
TEST_F(CrashLoggingTest, SetChunked) {
- const char* kTestKey = "chunky";
- const char* kChunk1 = "chunky-1";
- const char* kChunk2 = "chunky-2";
- const char* kChunk3 = "chunky-3";
+ const char kTestKey[] = "chunky";
+ const char kChunk1[] = "chunky-1";
+ const char kChunk2[] = "chunky-2";
+ const char kChunk3[] = "chunky-3";
base::debug::CrashKey keys[] = { { kTestKey, 15 } };
base::debug::InitCrashKeys(keys, arraysize(keys), 5);
@@ -104,7 +104,7 @@
}
TEST_F(CrashLoggingTest, ScopedCrashKey) {
- const char* kTestKey = "test-key";
+ const char kTestKey[] = "test-key";
base::debug::CrashKey keys[] = { { kTestKey, 255 } };
base::debug::InitCrashKeys(keys, arraysize(keys), 255);
diff --git a/base/debug/proc_maps_linux_unittest.cc b/base/debug/proc_maps_linux_unittest.cc
index 4be5a0f..d5d1b83 100644
--- a/base/debug/proc_maps_linux_unittest.cc
+++ b/base/debug/proc_maps_linux_unittest.cc
@@ -239,7 +239,7 @@
}
TEST(ProcMapsTest, MissingFields) {
- static const char* kTestCases[] = {
+ static const char* const kTestCases[] = {
"00400000\n", // Missing end + beyond.
"00400000-0040b000\n", // Missing perms + beyond.
"00400000-0040b000 r-xp\n", // Missing offset + beyond.
@@ -261,7 +261,7 @@
}
TEST(ProcMapsTest, InvalidInput) {
- static const char* kTestCases[] = {
+ static const char* const kTestCases[] = {
"thisisal-0040b000 rwxp 00000000 fc:00 794418 /bin/cat\n",
"0040000d-linvalid rwxp 00000000 fc:00 794418 /bin/cat\n",
"00400000-0040b000 inpu 00000000 fc:00 794418 /bin/cat\n",
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 25acbe0..2eac14e 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -402,7 +402,7 @@
public:
PrintBacktraceOutputHandler() {}
- virtual void HandleOutput(const char* output) override {
+ void HandleOutput(const char* output) override {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
PrintToStderr(output);
@@ -417,9 +417,7 @@
explicit StreamBacktraceOutputHandler(std::ostream* os) : os_(os) {
}
- virtual void HandleOutput(const char* output) override {
- (*os_) << output;
- }
+ void HandleOutput(const char* output) override { (*os_) << output; }
private:
std::ostream* os_;
diff --git a/base/debug/trace_event_android.cc b/base/debug/trace_event_android.cc
index 1e78b45..f08fffc 100644
--- a/base/debug/trace_event_android.cc
+++ b/base/debug/trace_event_android.cc
@@ -15,7 +15,7 @@
namespace {
int g_atrace_fd = -1;
-const char* kATraceMarkerFile = "/sys/kernel/debug/tracing/trace_marker";
+const char kATraceMarkerFile[] = "/sys/kernel/debug/tracing/trace_marker";
void WriteEvent(
char phase,
diff --git a/base/debug/trace_event_argument.h b/base/debug/trace_event_argument.h
index 7aa7c87..98f1bcf 100644
--- a/base/debug/trace_event_argument.h
+++ b/base/debug/trace_event_argument.h
@@ -40,10 +40,10 @@
void BeginArray();
void BeginDictionary();
- virtual void AppendAsTraceFormat(std::string* out) const override;
+ void AppendAsTraceFormat(std::string* out) const override;
private:
- virtual ~TracedValue();
+ ~TracedValue() override;
DictionaryValue* GetCurrentDictionary();
ListValue* GetCurrentArray();
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index d8f32cc..ce62766 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -140,7 +140,7 @@
recyclable_chunks_queue_[i] = i;
}
- virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
+ scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
// Because the number of threads is much less than the number of chunks,
// the queue should never be empty.
DCHECK(!QueueIsEmpty());
@@ -162,8 +162,7 @@
return scoped_ptr<TraceBufferChunk>(chunk);
}
- virtual void ReturnChunk(size_t index,
- scoped_ptr<TraceBufferChunk> chunk) override {
+ void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk> chunk) override {
// When this method is called, the queue should not be full because it
// can contain all chunks including the one to be returned.
DCHECK(!QueueIsFull());
@@ -175,20 +174,18 @@
queue_tail_ = NextQueueIndex(queue_tail_);
}
- virtual bool IsFull() const override {
- return false;
- }
+ bool IsFull() const override { return false; }
- virtual size_t Size() const override {
+ size_t Size() const override {
// This is approximate because not all of the chunks are full.
return chunks_.size() * kTraceBufferChunkSize;
}
- virtual size_t Capacity() const override {
+ size_t Capacity() const override {
return max_chunks_ * kTraceBufferChunkSize;
}
- virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
+ TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
if (handle.chunk_index >= chunks_.size())
return NULL;
TraceBufferChunk* chunk = chunks_[handle.chunk_index];
@@ -197,7 +194,7 @@
return chunk->GetEventAt(handle.event_index);
}
- virtual const TraceBufferChunk* NextChunk() override {
+ const TraceBufferChunk* NextChunk() override {
if (chunks_.empty())
return NULL;
@@ -212,7 +209,7 @@
return NULL;
}
- virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
+ scoped_ptr<TraceBuffer> CloneForIteration() const override {
scoped_ptr<ClonedTraceBuffer> cloned_buffer(new ClonedTraceBuffer());
for (size_t queue_index = queue_head_; queue_index != queue_tail_;
queue_index = NextQueueIndex(queue_index)) {
@@ -231,26 +228,25 @@
ClonedTraceBuffer() : current_iteration_index_(0) {}
// The only implemented method.
- virtual const TraceBufferChunk* NextChunk() override {
+ const TraceBufferChunk* NextChunk() override {
return current_iteration_index_ < chunks_.size() ?
chunks_[current_iteration_index_++] : NULL;
}
- virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
+ scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBufferChunk>();
}
- virtual void ReturnChunk(size_t index,
- scoped_ptr<TraceBufferChunk>) override {
+ void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk>) override {
NOTIMPLEMENTED();
}
- virtual bool IsFull() const override { return false; }
- virtual size_t Size() const override { return 0; }
- virtual size_t Capacity() const override { return 0; }
- virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
+ bool IsFull() const override { return false; }
+ size_t Size() const override { return 0; }
+ size_t Capacity() const override { return 0; }
+ TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
return NULL;
}
- virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
+ scoped_ptr<TraceBuffer> CloneForIteration() const override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBuffer>();
}
@@ -306,7 +302,7 @@
chunks_.reserve(max_chunks_);
}
- virtual scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
+ scoped_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
// This function may be called when adding normal events or indirectly from
// AddMetadataEventsWhileLocked(). We can not DECHECK(!IsFull()) because we
// have to add the metadata events and flush thread-local buffers even if
@@ -319,8 +315,7 @@
new TraceBufferChunk(static_cast<uint32>(*index) + 1));
}
- virtual void ReturnChunk(size_t index,
- scoped_ptr<TraceBufferChunk> chunk) override {
+ void ReturnChunk(size_t index, scoped_ptr<TraceBufferChunk> chunk) override {
DCHECK_GT(in_flight_chunk_count_, 0u);
DCHECK_LT(index, chunks_.size());
DCHECK(!chunks_[index]);
@@ -328,20 +323,18 @@
chunks_[index] = chunk.release();
}
- virtual bool IsFull() const override {
- return chunks_.size() >= max_chunks_;
- }
+ bool IsFull() const override { return chunks_.size() >= max_chunks_; }
- virtual size_t Size() const override {
+ size_t Size() const override {
// This is approximate because not all of the chunks are full.
return chunks_.size() * kTraceBufferChunkSize;
}
- virtual size_t Capacity() const override {
+ size_t Capacity() const override {
return max_chunks_ * kTraceBufferChunkSize;
}
- virtual TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
+ TraceEvent* GetEventByHandle(TraceEventHandle handle) override {
if (handle.chunk_index >= chunks_.size())
return NULL;
TraceBufferChunk* chunk = chunks_[handle.chunk_index];
@@ -350,7 +343,7 @@
return chunk->GetEventAt(handle.event_index);
}
- virtual const TraceBufferChunk* NextChunk() override {
+ const TraceBufferChunk* NextChunk() override {
while (current_iteration_index_ < chunks_.size()) {
// Skip in-flight chunks.
const TraceBufferChunk* chunk = chunks_[current_iteration_index_++];
@@ -360,7 +353,7 @@
return NULL;
}
- virtual scoped_ptr<TraceBuffer> CloneForIteration() const override {
+ scoped_ptr<TraceBuffer> CloneForIteration() const override {
NOTIMPLEMENTED();
return scoped_ptr<TraceBuffer>();
}
@@ -866,10 +859,10 @@
class TraceSamplingThread : public PlatformThread::Delegate {
public:
TraceSamplingThread();
- virtual ~TraceSamplingThread();
+ ~TraceSamplingThread() override;
// Implementation of PlatformThread::Delegate:
- virtual void ThreadMain() override;
+ void ThreadMain() override;
static void DefaultSamplingCallback(TraceBucketData* bucekt_data);
@@ -1047,7 +1040,7 @@
: public MessageLoop::DestructionObserver {
public:
ThreadLocalEventBuffer(TraceLog* trace_log);
- virtual ~ThreadLocalEventBuffer();
+ ~ThreadLocalEventBuffer() override;
TraceEvent* AddTraceEvent(TraceEventHandle* handle);
@@ -1066,7 +1059,7 @@
private:
// MessageLoop::DestructionObserver
- virtual void WillDestroyCurrentMessageLoop() override;
+ void WillDestroyCurrentMessageLoop() override;
void FlushWhileLocked();
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index bac74e3..79bdc97 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -179,7 +179,7 @@
// TraceBufferChunk is the basic unit of TraceBuffer.
class BASE_EXPORT TraceBufferChunk {
public:
- TraceBufferChunk(uint32 seq)
+ explicit TraceBufferChunk(uint32 seq)
: next_free_(0),
seq_(seq) {
}
@@ -281,7 +281,7 @@
// The default category filter, used when none is provided.
// Allows all categories through, except if they end in the suffix 'Debug' or
// 'Test'.
- static const char* kDefaultCategoryFilterString;
+ static const char kDefaultCategoryFilterString[];
// |filter_string| is a comma-delimited list of category wildcards.
// A category can have an optional '-' prefix to make it an excluded category.
@@ -380,13 +380,12 @@
};
struct BASE_EXPORT TraceOptions {
-
TraceOptions()
: record_mode(RECORD_UNTIL_FULL),
enable_sampling(false),
enable_systrace(false) {}
- TraceOptions(TraceRecordMode record_mode)
+ explicit TraceOptions(TraceRecordMode record_mode)
: record_mode(record_mode),
enable_sampling(false),
enable_systrace(false) {}
diff --git a/base/debug/trace_event_impl_constants.cc b/base/debug/trace_event_impl_constants.cc
index 24d7af7..8e01411 100644
--- a/base/debug/trace_event_impl_constants.cc
+++ b/base/debug/trace_event_impl_constants.cc
@@ -8,7 +8,7 @@
namespace debug {
// Enable everything but debug and test categories by default.
-const char* CategoryFilter::kDefaultCategoryFilterString = "-*Debug,-*Test";
+const char CategoryFilter::kDefaultCategoryFilterString[] = "-*Debug,-*Test";
// Constant used by TraceLog's internal implementation of trace_option.
const TraceLog::InternalTraceOptions
diff --git a/base/debug/trace_event_memory.cc b/base/debug/trace_event_memory.cc
index 5cb0908..2831865 100644
--- a/base/debug/trace_event_memory.cc
+++ b/base/debug/trace_event_memory.cc
@@ -33,12 +33,12 @@
explicit MemoryDumpHolder(char* dump) : dump_(dump) {}
// base::debug::ConvertableToTraceFormat overrides:
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
AppendHeapProfileAsTraceFormat(dump_, out);
}
private:
- virtual ~MemoryDumpHolder() { free(dump_); }
+ ~MemoryDumpHolder() override { free(dump_); }
char* dump_;
diff --git a/base/debug/trace_event_memory.h b/base/debug/trace_event_memory.h
index 4caeef4..94c3f91 100644
--- a/base/debug/trace_event_memory.h
+++ b/base/debug/trace_event_memory.h
@@ -47,8 +47,8 @@
virtual ~TraceMemoryController();
// base::debug::TraceLog::EnabledStateChangedObserver overrides:
- virtual void OnTraceLogEnabled() override;
- virtual void OnTraceLogDisabled() override;
+ void OnTraceLogEnabled() override;
+ void OnTraceLogDisabled() override;
// Starts heap memory profiling.
void StartProfiling();
diff --git a/base/debug/trace_event_synthetic_delay.cc b/base/debug/trace_event_synthetic_delay.cc
index efb797a..6abfe18 100644
--- a/base/debug/trace_event_synthetic_delay.cc
+++ b/base/debug/trace_event_synthetic_delay.cc
@@ -23,7 +23,7 @@
void ResetAllDelays();
// TraceEventSyntheticDelayClock implementation.
- virtual base::TimeTicks Now() override;
+ base::TimeTicks Now() override;
private:
TraceEventSyntheticDelayRegistry();
diff --git a/base/debug/trace_event_synthetic_delay_unittest.cc b/base/debug/trace_event_synthetic_delay_unittest.cc
index 124706f..60e4d20 100644
--- a/base/debug/trace_event_synthetic_delay_unittest.cc
+++ b/base/debug/trace_event_synthetic_delay_unittest.cc
@@ -26,7 +26,7 @@
}
// TraceEventSyntheticDelayClock implementation.
- virtual base::TimeTicks Now() override {
+ base::TimeTicks Now() override {
AdvanceTime(base::TimeDelta::FromMilliseconds(kShortDurationMs / 10));
return now_;
}
diff --git a/base/debug/trace_event_system_stats_monitor.cc b/base/debug/trace_event_system_stats_monitor.cc
index b2bf2ae..9cbefd8 100644
--- a/base/debug/trace_event_system_stats_monitor.cc
+++ b/base/debug/trace_event_system_stats_monitor.cc
@@ -31,12 +31,12 @@
void GetSystemProfilingStats();
// base::debug::ConvertableToTraceFormat overrides:
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
AppendSystemProfileAsTraceFormat(system_stats_, out);
}
private:
- virtual ~SystemStatsHolder() { }
+ ~SystemStatsHolder() override {}
SystemMetrics system_stats_;
diff --git a/base/debug/trace_event_system_stats_monitor.h b/base/debug/trace_event_system_stats_monitor.h
index f676fce..143f187 100644
--- a/base/debug/trace_event_system_stats_monitor.h
+++ b/base/debug/trace_event_system_stats_monitor.h
@@ -36,8 +36,8 @@
virtual ~TraceEventSystemStatsMonitor();
// base::debug::TraceLog::EnabledStateChangedObserver overrides:
- virtual void OnTraceLogEnabled() override;
- virtual void OnTraceLogDisabled() override;
+ void OnTraceLogEnabled() override;
+ void OnTraceLogDisabled() override;
// Retrieves system profiling at the current time.
void DumpSystemStats();
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc
index 90be070..69b5743 100644
--- a/base/debug/trace_event_unittest.cc
+++ b/base/debug/trace_event_unittest.cc
@@ -252,7 +252,6 @@
}
void TraceEventTestFixture::DropTracedMetadataRecords() {
-
scoped_ptr<ListValue> old_trace_parsed(trace_parsed_.DeepCopy());
size_t old_trace_parsed_size = old_trace_parsed->GetSize();
trace_parsed_.Clear();
@@ -266,7 +265,7 @@
}
DictionaryValue* dict = static_cast<DictionaryValue*>(value);
std::string tmp;
- if(dict->GetString("ph", &tmp) && tmp == "M")
+ if (dict->GetString("ph", &tmp) && tmp == "M")
continue;
trace_parsed_.Append(value->DeepCopy());
@@ -377,7 +376,7 @@
return hits;
}
-const char* kControlCharacters = "\001\002\003\n\r";
+const char kControlCharacters[] = "\001\002\003\n\r";
void TraceWithAllMacroVariants(WaitableEvent* task_complete_event) {
{
@@ -478,7 +477,7 @@
TRACE_EVENT1(kControlCharacters, kControlCharacters,
kControlCharacters, kControlCharacters);
- } // Scope close causes TRACE_EVENT0 etc to send their END events.
+ } // Scope close causes TRACE_EVENT0 etc to send their END events.
if (task_complete_event)
task_complete_event->Signal();
@@ -996,11 +995,11 @@
virtual ~AfterStateChangeEnabledStateObserver() {}
// TraceLog::EnabledStateObserver overrides:
- virtual void OnTraceLogEnabled() override {
+ void OnTraceLogEnabled() override {
EXPECT_TRUE(TraceLog::GetInstance()->IsEnabled());
}
- virtual void OnTraceLogDisabled() override {
+ void OnTraceLogDisabled() override {
EXPECT_FALSE(TraceLog::GetInstance()->IsEnabled());
}
};
@@ -1029,9 +1028,9 @@
virtual ~SelfRemovingEnabledStateObserver() {}
// TraceLog::EnabledStateObserver overrides:
- virtual void OnTraceLogEnabled() override {}
+ void OnTraceLogEnabled() override {}
- virtual void OnTraceLogDisabled() override {
+ void OnTraceLogDisabled() override {
TraceLog::GetInstance()->RemoveEnabledStateObserver(this);
}
};
@@ -1300,12 +1299,12 @@
BeginTrace();
unsigned long long id = 0xfeedbeeffeedbeefull;
- TRACE_EVENT_ASYNC_BEGIN0( "cat", "name1", id);
- TRACE_EVENT_ASYNC_STEP_INTO0( "cat", "name1", id, "step1");
+ TRACE_EVENT_ASYNC_BEGIN0("cat", "name1", id);
+ TRACE_EVENT_ASYNC_STEP_INTO0("cat", "name1", id, "step1");
TRACE_EVENT_ASYNC_END0("cat", "name1", id);
- TRACE_EVENT_BEGIN0( "cat", "name2");
- TRACE_EVENT_ASYNC_BEGIN0( "cat", "name3", 0);
- TRACE_EVENT_ASYNC_STEP_PAST0( "cat", "name3", 0, "step2");
+ TRACE_EVENT_BEGIN0("cat", "name2");
+ TRACE_EVENT_ASYNC_BEGIN0("cat", "name3", 0);
+ TRACE_EVENT_ASYNC_STEP_PAST0("cat", "name3", 0, "step2");
EndTraceAndFlush();
@@ -1332,13 +1331,13 @@
TraceLog::GetInstance()->SetProcessID(100);
BeginTrace();
- TRACE_EVENT_ASYNC_BEGIN0( "cat", "name1", ptr);
- TRACE_EVENT_ASYNC_BEGIN0( "cat", "name2", ptr);
+ TRACE_EVENT_ASYNC_BEGIN0("cat", "name1", ptr);
+ TRACE_EVENT_ASYNC_BEGIN0("cat", "name2", ptr);
EndTraceAndFlush();
TraceLog::GetInstance()->SetProcessID(200);
BeginTrace();
- TRACE_EVENT_ASYNC_END0( "cat", "name1", ptr);
+ TRACE_EVENT_ASYNC_END0("cat", "name1", ptr);
EndTraceAndFlush();
DictionaryValue* async_begin = FindNamePhase("name1", "S");
@@ -1490,32 +1489,32 @@
TEST_F(TraceEventTestFixture, ThreadNames) {
// Create threads before we enable tracing to make sure
// that tracelog still captures them.
- const int num_threads = 4;
- const int num_events = 10;
- Thread* threads[num_threads];
- PlatformThreadId thread_ids[num_threads];
- for (int i = 0; i < num_threads; i++)
+ const int kNumThreads = 4;
+ const int kNumEvents = 10;
+ Thread* threads[kNumThreads];
+ PlatformThreadId thread_ids[kNumThreads];
+ for (int i = 0; i < kNumThreads; i++)
threads[i] = new Thread(StringPrintf("Thread %d", i));
// Enable tracing.
BeginTrace();
// Now run some trace code on these threads.
- WaitableEvent* task_complete_events[num_threads];
- for (int i = 0; i < num_threads; i++) {
+ WaitableEvent* task_complete_events[kNumThreads];
+ for (int i = 0; i < kNumThreads; i++) {
task_complete_events[i] = new WaitableEvent(false, false);
threads[i]->Start();
thread_ids[i] = threads[i]->thread_id();
threads[i]->message_loop()->PostTask(
FROM_HERE, base::Bind(&TraceManyInstantEvents,
- i, num_events, task_complete_events[i]));
+ i, kNumEvents, task_complete_events[i]));
}
- for (int i = 0; i < num_threads; i++) {
+ for (int i = 0; i < kNumThreads; i++) {
task_complete_events[i]->Wait();
}
// Shut things down.
- for (int i = 0; i < num_threads; i++) {
+ for (int i = 0; i < kNumThreads; i++) {
threads[i]->Stop();
delete threads[i];
delete task_complete_events[i];
@@ -1538,7 +1537,7 @@
EXPECT_TRUE(item->GetInteger("tid", &tmp_int));
// See if this thread name is one of the threads we just created
- for (int j = 0; j < num_threads; j++) {
+ for (int j = 0; j < kNumThreads; j++) {
if(static_cast<int>(thread_ids[j]) != tmp_int)
continue;
@@ -1919,12 +1918,12 @@
public:
MyData() {}
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
out->append("{\"foo\":1}");
}
private:
- virtual ~MyData() {}
+ ~MyData() override {}
DISALLOW_COPY_AND_ASSIGN(MyData);
};
@@ -2969,7 +2968,7 @@
}
TEST_F(TraceEventTestFixture, BadSyntheticDelayConfigurations) {
- const char* configs[] = {
+ const char* const configs[] = {
"",
"DELAY(",
"DELAY(;",
diff --git a/base/deferred_sequenced_task_runner.h b/base/deferred_sequenced_task_runner.h
index 3220ac1..bc8db7a 100644
--- a/base/deferred_sequenced_task_runner.h
+++ b/base/deferred_sequenced_task_runner.h
@@ -27,16 +27,15 @@
const scoped_refptr<SequencedTaskRunner>& target_runner);
// TaskRunner implementation
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
// SequencedTaskRunner implementation
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
// Start the execution - posts all queued tasks to the target executor. The
// deferred tasks are posted with their initial delay, meaning that the task
@@ -56,7 +55,7 @@
bool is_non_nestable;
};
- virtual ~DeferredSequencedTaskRunner();
+ ~DeferredSequencedTaskRunner() override;
// Creates a |Task| object and adds it to |deferred_tasks_queue_|.
void QueueDeferredTask(const tracked_objects::Location& from_here,
diff --git a/base/environment.cc b/base/environment.cc
index 94a766c..6cf7a18 100644
--- a/base/environment.cc
+++ b/base/environment.cc
@@ -22,8 +22,7 @@
class EnvironmentImpl : public base::Environment {
public:
- virtual bool GetVar(const char* variable_name,
- std::string* result) override {
+ bool GetVar(const char* variable_name, std::string* result) override {
if (GetVarImpl(variable_name, result))
return true;
@@ -42,12 +41,12 @@
return GetVarImpl(alternate_case_var.c_str(), result);
}
- virtual bool SetVar(const char* variable_name,
- const std::string& new_value) override {
+ 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) override {
+ bool UnSetVar(const char* variable_name) override {
return UnSetVarImpl(variable_name);
}
diff --git a/base/environment_unittest.cc b/base/environment_unittest.cc
index e8c1906..f0577a8 100644
--- a/base/environment_unittest.cc
+++ b/base/environment_unittest.cc
@@ -21,8 +21,8 @@
TEST_F(EnvironmentTest, GetVarReverse) {
scoped_ptr<Environment> env(Environment::Create());
- const char* kFooUpper = "FOO";
- const char* kFooLower = "foo";
+ const char kFooUpper[] = "FOO";
+ const char kFooLower[] = "foo";
// Set a variable in UPPER case.
EXPECT_TRUE(env->SetVar(kFooUpper, kFooLower));
@@ -35,7 +35,7 @@
EXPECT_TRUE(env->UnSetVar(kFooUpper));
- const char* kBar = "bar";
+ const char kBar[] = "bar";
// Now do the opposite, set the variable in the lower case.
EXPECT_TRUE(env->SetVar(kFooLower, kBar));
@@ -56,8 +56,8 @@
TEST_F(EnvironmentTest, SetVar) {
scoped_ptr<Environment> env(Environment::Create());
- const char* kFooUpper = "FOO";
- const char* kFooLower = "foo";
+ const char kFooUpper[] = "FOO";
+ const char kFooLower[] = "foo";
EXPECT_TRUE(env->SetVar(kFooUpper, kFooLower));
// Now verify that the environment has the new variable.
@@ -71,8 +71,8 @@
TEST_F(EnvironmentTest, UnSetVar) {
scoped_ptr<Environment> env(Environment::Create());
- const char* kFooUpper = "FOO";
- const char* kFooLower = "foo";
+ const char kFooUpper[] = "FOO";
+ const char kFooLower[] = "foo";
// First set some environment variable.
EXPECT_TRUE(env->SetVar(kFooUpper, kFooLower));
@@ -95,7 +95,7 @@
string16 e;
e = AlterEnvironment(empty, changes);
- EXPECT_TRUE(e[0] == 0);
+ EXPECT_EQ(0, e[0]);
changes[L"A"] = L"1";
e = AlterEnvironment(empty, changes);
diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h
index c730be6..376ad39 100644
--- a/base/file_descriptor_posix.h
+++ b/base/file_descriptor_posix.h
@@ -6,6 +6,7 @@
#define BASE_FILE_DESCRIPTOR_POSIX_H_
#include "base/files/file.h"
+#include "base/files/scoped_file.h"
namespace base {
@@ -24,6 +25,7 @@
}
FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {}
+ explicit FileDescriptor(ScopedFD fd) : fd(fd.release()), auto_close(true) {}
bool operator==(const FileDescriptor& other) const {
return (fd == other.fd && auto_close == other.auto_close);
diff --git a/base/file_version_info_mac.h b/base/file_version_info_mac.h
index 50a04eb..a18dbbd 100644
--- a/base/file_version_info_mac.h
+++ b/base/file_version_info_mac.h
@@ -19,26 +19,26 @@
class FileVersionInfoMac : public FileVersionInfo {
public:
explicit FileVersionInfoMac(NSBundle *bundle);
- virtual ~FileVersionInfoMac();
+ ~FileVersionInfoMac() override;
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- virtual base::string16 company_name() override;
- virtual base::string16 company_short_name() override;
- virtual base::string16 product_name() override;
- virtual base::string16 product_short_name() override;
- virtual base::string16 internal_name() override;
- virtual base::string16 product_version() override;
- virtual base::string16 private_build() override;
- virtual base::string16 special_build() override;
- virtual base::string16 comments() override;
- virtual base::string16 original_filename() override;
- virtual base::string16 file_description() override;
- virtual base::string16 file_version() override;
- virtual base::string16 legal_copyright() override;
- virtual base::string16 legal_trademarks() override;
- virtual base::string16 last_change() override;
- virtual bool is_official_build() override;
+ base::string16 company_name() override;
+ base::string16 company_short_name() override;
+ base::string16 product_name() override;
+ base::string16 product_short_name() override;
+ base::string16 internal_name() override;
+ base::string16 product_version() override;
+ base::string16 private_build() override;
+ base::string16 special_build() override;
+ base::string16 comments() override;
+ base::string16 original_filename() override;
+ base::string16 file_description() override;
+ base::string16 file_version() override;
+ base::string16 legal_copyright() override;
+ base::string16 legal_trademarks() override;
+ base::string16 last_change() override;
+ bool is_official_build() override;
private:
// Returns a base::string16 value for a property name.
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 11bf69d..bf37be6 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -35,8 +35,8 @@
namespace {
-const char* kCommonDoubleExtensionSuffixes[] = { "gz", "z", "bz2", "bz" };
-const char* kCommonDoubleExtensions[] = { "user.js" };
+const char* const kCommonDoubleExtensionSuffixes[] = { "gz", "z", "bz2", "bz" };
+const char* const kCommonDoubleExtensions[] = { "user.js" };
const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index f6d6d33..0e19b2e 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -111,9 +111,9 @@
: collector_(collector) {
collector_->Register(this);
}
- virtual ~TestDelegate() {}
+ ~TestDelegate() override {}
- virtual void OnFileChanged(const FilePath& path, bool error) override {
+ void OnFileChanged(const FilePath& path, bool error) override {
if (error)
ADD_FAILURE() << "Error " << path.value();
else
@@ -272,9 +272,9 @@
: watcher_(watcher),
loop_(loop) {
}
- virtual ~Deleter() {}
+ ~Deleter() override {}
- virtual void OnFileChanged(const FilePath&, bool) override {
+ void OnFileChanged(const FilePath&, bool) override {
watcher_.reset();
loop_->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
}
diff --git a/base/files/file_path_watcher_fsevents.cc b/base/files/file_path_watcher_fsevents.cc
index f658efe..f240e33 100644
--- a/base/files/file_path_watcher_fsevents.cc
+++ b/base/files/file_path_watcher_fsevents.cc
@@ -28,7 +28,7 @@
}
protected:
- virtual ~FSEventsTaskRunner() {}
+ ~FSEventsTaskRunner() override {}
};
static LazyInstance<FSEventsTaskRunner>::Leaky g_task_runner =
diff --git a/base/files/file_path_watcher_fsevents.h b/base/files/file_path_watcher_fsevents.h
index d2fb8da..800c5b4 100644
--- a/base/files/file_path_watcher_fsevents.h
+++ b/base/files/file_path_watcher_fsevents.h
@@ -36,13 +36,13 @@
bool ResolveTargetPath();
// FilePathWatcher::PlatformDelegate overrides.
- virtual bool Watch(const FilePath& path,
- bool recursive,
- const FilePathWatcher::Callback& callback) override;
- virtual void Cancel() override;
+ bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) override;
+ void Cancel() override;
private:
- virtual ~FilePathWatcherFSEvents();
+ ~FilePathWatcherFSEvents() override;
// Destroy the event stream.
void DestroyEventStream();
@@ -51,7 +51,7 @@
void StartEventStream(FSEventStreamEventId start_event);
// Cleans up and stops the event stream.
- virtual void CancelOnMessageLoopThread() override;
+ void CancelOnMessageLoopThread() override;
// Callback to notify upon changes.
FilePathWatcher::Callback callback_;
diff --git a/base/files/file_path_watcher_kqueue.h b/base/files/file_path_watcher_kqueue.h
index aa13af3..87af891 100644
--- a/base/files/file_path_watcher_kqueue.h
+++ b/base/files/file_path_watcher_kqueue.h
@@ -33,20 +33,20 @@
FilePathWatcherKQueue();
// MessageLoopForIO::Watcher overrides.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
// MessageLoop::DestructionObserver overrides.
- virtual void WillDestroyCurrentMessageLoop() override;
+ void WillDestroyCurrentMessageLoop() override;
// FilePathWatcher::PlatformDelegate overrides.
- virtual bool Watch(const FilePath& path,
- bool recursive,
- const FilePathWatcher::Callback& callback) override;
- virtual void Cancel() override;
+ bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) override;
+ void Cancel() override;
protected:
- virtual ~FilePathWatcherKQueue();
+ ~FilePathWatcherKQueue() override;
private:
class EventData {
@@ -60,7 +60,7 @@
typedef std::vector<struct kevent> EventVector;
// Can only be called on |io_message_loop_|'s thread.
- virtual void CancelOnMessageLoopThread() override;
+ void CancelOnMessageLoopThread() override;
// Returns true if the kevent values are error free.
bool AreKeventValuesValid(struct kevent* kevents, int count);
diff --git a/base/files/file_path_watcher_mac.cc b/base/files/file_path_watcher_mac.cc
index 58f78bd..6f55ba4 100644
--- a/base/files/file_path_watcher_mac.cc
+++ b/base/files/file_path_watcher_mac.cc
@@ -15,9 +15,9 @@
class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
public:
- virtual bool Watch(const FilePath& path,
- bool recursive,
- const FilePathWatcher::Callback& callback) override {
+ bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) override {
// Use kqueue for non-recursive watches and FSEvents for recursive ones.
DCHECK(!impl_.get());
if (recursive) {
@@ -33,20 +33,20 @@
return impl_->Watch(path, recursive, callback);
}
- virtual void Cancel() override {
+ void Cancel() override {
if (impl_.get())
impl_->Cancel();
set_cancelled();
}
- virtual void CancelOnMessageLoopThread() override {
+ void CancelOnMessageLoopThread() override {
if (impl_.get())
impl_->Cancel();
set_cancelled();
}
protected:
- virtual ~FilePathWatcherImpl() {}
+ ~FilePathWatcherImpl() override {}
scoped_refptr<PlatformDelegate> impl_;
};
diff --git a/base/files/file_util.cc b/base/files/file_util.cc
index 17b5969..e60dcd9 100644
--- a/base/files/file_util.cc
+++ b/base/files/file_util.cc
@@ -139,16 +139,17 @@
return false;
}
- char buf[1 << 16];
+ const size_t kBufferSize = 1 << 16;
+ scoped_ptr<char[]> buf(new char[kBufferSize]);
size_t len;
size_t size = 0;
bool read_status = true;
// Many files supplied in |path| have incorrect size (proc files etc).
// Hence, the file is read sequentially as opposed to a one-shot read.
- while ((len = fread(buf, 1, sizeof(buf), file)) > 0) {
+ while ((len = fread(buf.get(), 1, kBufferSize, file)) > 0) {
if (contents)
- contents->append(buf, std::min(len, max_size - size));
+ contents->append(buf.get(), std::min(len, max_size - size));
if ((max_size - size) < len) {
read_status = false;
diff --git a/base/files/important_file_writer_unittest.cc b/base/files/important_file_writer_unittest.cc
index 71242ee..96d0d05 100644
--- a/base/files/important_file_writer_unittest.cc
+++ b/base/files/important_file_writer_unittest.cc
@@ -33,7 +33,7 @@
explicit DataSerializer(const std::string& data) : data_(data) {
}
- virtual bool SerializeData(std::string* output) override {
+ bool SerializeData(std::string* output) override {
output->assign(data_);
return true;
}
diff --git a/base/i18n/break_iterator_unittest.cc b/base/i18n/break_iterator_unittest.cc
index 8569135..220a996 100644
--- a/base/i18n/break_iterator_unittest.cc
+++ b/base/i18n/break_iterator_unittest.cc
@@ -89,7 +89,7 @@
TEST(BreakIteratorTest, BreakWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 2));
@@ -194,7 +194,7 @@
TEST(BreakIteratorTest, BreakSpaceWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 3));
@@ -292,7 +292,7 @@
TEST(BreakIteratorTest, BreakLineWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s\na", very_wide_char)));
const string16 very_wide_line(str.substr(0, 3));
@@ -345,7 +345,7 @@
const string16 long_string(ASCIIToUTF16("another,string"));
EXPECT_TRUE(iter.SetText(long_string.c_str(), long_string.size()));
EXPECT_TRUE(iter.Advance());
- EXPECT_TRUE(iter.Advance()); // Advance to ',' in |long_string|
+ EXPECT_TRUE(iter.Advance()); // Advance to ',' in |long_string|
// Check that the current position is out of bounds of the |initial_string|.
EXPECT_LT(initial_string.size(), iter.pos());
diff --git a/base/json/json_file_value_serializer.cc b/base/json/json_file_value_serializer.cc
index d7d54f2..d60f800 100644
--- a/base/json/json_file_value_serializer.cc
+++ b/base/json/json_file_value_serializer.cc
@@ -10,10 +10,10 @@
using base::FilePath;
-const char* JSONFileValueSerializer::kAccessDenied = "Access denied.";
-const char* JSONFileValueSerializer::kCannotReadFile = "Can't read file.";
-const char* JSONFileValueSerializer::kFileLocked = "File locked.";
-const char* JSONFileValueSerializer::kNoSuchFile = "File doesn't exist.";
+const char JSONFileValueSerializer::kAccessDenied[] = "Access denied.";
+const char JSONFileValueSerializer::kCannotReadFile[] = "Can't read file.";
+const char JSONFileValueSerializer::kFileLocked[] = "File locked.";
+const char JSONFileValueSerializer::kNoSuchFile[] = "File doesn't exist.";
bool JSONFileValueSerializer::Serialize(const base::Value& root) {
return SerializeInternal(root, false);
diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h
index fc12b6b..f0f556c 100644
--- a/base/json/json_file_value_serializer.h
+++ b/base/json/json_file_value_serializer.h
@@ -22,7 +22,7 @@
: json_file_path_(json_file_path),
allow_trailing_comma_(false) {}
- virtual ~JSONFileValueSerializer() {}
+ ~JSONFileValueSerializer() override {}
// DO NOT USE except in unit tests to verify the file was written properly.
// We should never serialize directly to a file since this will block the
@@ -32,7 +32,7 @@
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the file whose name was passed into the constructor.
- virtual bool Serialize(const base::Value& root) override;
+ bool Serialize(const base::Value& root) override;
// Equivalent to Serialize(root) except binary values are omitted from the
// output.
@@ -45,8 +45,8 @@
// If |error_message| is non-null, it will be filled in with a formatted
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
- virtual base::Value* Deserialize(int* error_code,
- std::string* error_message) override;
+ base::Value* Deserialize(int* error_code,
+ std::string* error_message) override;
// This enum is designed to safely overlap with JSONReader::JsonParseError.
enum JsonFileError {
@@ -58,10 +58,10 @@
};
// File-specific error messages that can be returned.
- static const char* kAccessDenied;
- static const char* kCannotReadFile;
- static const char* kFileLocked;
- static const char* kNoSuchFile;
+ static const char kAccessDenied[];
+ static const char kCannotReadFile[];
+ static const char kFileLocked[];
+ static const char kNoSuchFile[];
// Convert an error code into an error message. |error_code| is assumed to
// be a JsonFileError.
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index a74da5f..6a25bc7 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -37,7 +37,7 @@
DictionaryValue::Swap(static_cast<DictionaryValue*>(root));
}
- virtual void Swap(DictionaryValue* other) override {
+ void Swap(DictionaryValue* other) override {
DVLOG(1) << "Swap()ing a DictionaryValue inefficiently.";
// First deep copy to convert JSONStringValue to std::string and swap that
@@ -55,8 +55,8 @@
// Not overriding DictionaryValue::Remove because it just calls through to
// the method below.
- virtual bool RemoveWithoutPathExpansion(const std::string& key,
- scoped_ptr<Value>* out) override {
+ bool RemoveWithoutPathExpansion(const std::string& key,
+ scoped_ptr<Value>* out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return DictionaryValue::RemoveWithoutPathExpansion(key, out);
@@ -87,7 +87,7 @@
ListValue::Swap(static_cast<ListValue*>(root));
}
- virtual void Swap(ListValue* other) override {
+ void Swap(ListValue* other) override {
DVLOG(1) << "Swap()ing a ListValue inefficiently.";
// First deep copy to convert JSONStringValue to std::string and swap that
@@ -102,7 +102,7 @@
ListValue::Swap(copy.get());
}
- virtual bool Remove(size_t index, scoped_ptr<Value>* out) override {
+ bool Remove(size_t index, scoped_ptr<Value>* out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return ListValue::Remove(index, out);
@@ -137,18 +137,18 @@
}
// Overridden from base::Value:
- virtual bool GetAsString(std::string* out_value) const override {
+ bool GetAsString(std::string* out_value) const override {
string_piece_.CopyToString(out_value);
return true;
}
- virtual bool GetAsString(string16* out_value) const override {
+ bool GetAsString(string16* out_value) const override {
*out_value = UTF8ToUTF16(string_piece_);
return true;
}
- virtual Value* DeepCopy() const override {
+ Value* DeepCopy() const override {
return new StringValue(string_piece_.as_string());
}
- virtual bool Equals(const Value* other) const override {
+ bool Equals(const Value* other) const override {
std::string other_string;
return other->IsType(TYPE_STRING) && other->GetAsString(&other_string) &&
StringPiece(other_string) == string_piece_;
@@ -901,7 +901,7 @@
Value* JSONParser::ConsumeLiteral() {
switch (*pos_) {
case 't': {
- const char* kTrueLiteral = "true";
+ const char kTrueLiteral[] = "true";
const int kTrueLen = static_cast<int>(strlen(kTrueLiteral));
if (!CanConsume(kTrueLen - 1) ||
!StringsAreEqual(pos_, kTrueLiteral, kTrueLen)) {
@@ -912,7 +912,7 @@
return new FundamentalValue(true);
}
case 'f': {
- const char* kFalseLiteral = "false";
+ const char kFalseLiteral[] = "false";
const int kFalseLen = static_cast<int>(strlen(kFalseLiteral));
if (!CanConsume(kFalseLen - 1) ||
!StringsAreEqual(pos_, kFalseLiteral, kFalseLen)) {
@@ -923,7 +923,7 @@
return new FundamentalValue(false);
}
case 'n': {
- const char* kNullLiteral = "null";
+ const char kNullLiteral[] = "null";
const int kNullLen = static_cast<int>(strlen(kNullLiteral));
if (!CanConsume(kNullLen - 1) ||
!StringsAreEqual(pos_, kNullLiteral, kNullLen)) {
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc
index cbf6c99..ad5a9d5 100644
--- a/base/json/json_reader.cc
+++ b/base/json/json_reader.cc
@@ -13,21 +13,21 @@
COMPILE_ASSERT(JSONReader::JSON_PARSE_ERROR_COUNT < 1000,
json_reader_error_out_of_bounds);
-const char* JSONReader::kInvalidEscape =
+const char JSONReader::kInvalidEscape[] =
"Invalid escape sequence.";
-const char* JSONReader::kSyntaxError =
+const char JSONReader::kSyntaxError[] =
"Syntax error.";
-const char* JSONReader::kUnexpectedToken =
+const char JSONReader::kUnexpectedToken[] =
"Unexpected token.";
-const char* JSONReader::kTrailingComma =
+const char JSONReader::kTrailingComma[] =
"Trailing comma not allowed.";
-const char* JSONReader::kTooMuchNesting =
+const char JSONReader::kTooMuchNesting[] =
"Too much nesting.";
-const char* JSONReader::kUnexpectedDataAfterRoot =
+const char JSONReader::kUnexpectedDataAfterRoot[] =
"Unexpected data after root element.";
-const char* JSONReader::kUnsupportedEncoding =
+const char JSONReader::kUnsupportedEncoding[] =
"Unsupported encoding. JSON must be UTF-8.";
-const char* JSONReader::kUnquotedDictionaryKey =
+const char JSONReader::kUnquotedDictionaryKey[] =
"Dictionary keys must be quoted.";
JSONReader::JSONReader()
diff --git a/base/json/json_reader.h b/base/json/json_reader.h
index 79129ce..fd053d4 100644
--- a/base/json/json_reader.h
+++ b/base/json/json_reader.h
@@ -75,14 +75,14 @@
};
// String versions of parse error codes.
- static const char* kInvalidEscape;
- static const char* kSyntaxError;
- static const char* kUnexpectedToken;
- static const char* kTrailingComma;
- static const char* kTooMuchNesting;
- static const char* kUnexpectedDataAfterRoot;
- static const char* kUnsupportedEncoding;
- static const char* kUnquotedDictionaryKey;
+ static const char kInvalidEscape[];
+ static const char kSyntaxError[];
+ static const char kUnexpectedToken[];
+ static const char kTrailingComma[];
+ static const char kTooMuchNesting[];
+ static const char kUnexpectedDataAfterRoot[];
+ static const char kUnsupportedEncoding[];
+ static const char kUnquotedDictionaryKey[];
// Constructs a reader with the default options, JSON_PARSE_RFC.
JSONReader();
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc
index 67070ff..a3ec4f7 100644
--- a/base/json/json_reader_unittest.cc
+++ b/base/json/json_reader_unittest.cc
@@ -505,7 +505,7 @@
EXPECT_EQ("\xf0\x9f\x92\xa9\xf0\x9f\x91\xac", str_val);
// Test invalid utf16 strings.
- const char* cases[] = {
+ const char* const cases[] = {
"\"\\u123\"", // Invalid scalar.
"\"\\ud83d\"", // Invalid scalar.
"\"\\u$%@!\"", // Invalid scalar.
@@ -627,7 +627,7 @@
// parser implementation against buffer overflow. Best run with DCHECKs so
// that the one in NextChar fires.
TEST(JSONReaderTest, InvalidSanity) {
- const char* invalid_json[] = {
+ const char* const invalid_json[] = {
"/* test *",
"{\"foo\"",
"{\"foo\":",
diff --git a/base/json/json_string_value_serializer.h b/base/json/json_string_value_serializer.h
index 7fc5c6e..6435051 100644
--- a/base/json/json_string_value_serializer.h
+++ b/base/json/json_string_value_serializer.h
@@ -33,12 +33,12 @@
allow_trailing_comma_(false) {
}
- virtual ~JSONStringValueSerializer();
+ ~JSONStringValueSerializer() override;
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the string passed into the constructor.
- virtual bool Serialize(const base::Value& root) override;
+ bool Serialize(const base::Value& root) override;
// Equivalent to Serialize(root) except binary values are omitted from the
// output.
@@ -51,8 +51,8 @@
// If |error_message| is non-null, it will be filled in with a formatted
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
- virtual base::Value* Deserialize(int* error_code,
- std::string* error_message) override;
+ base::Value* Deserialize(int* error_code,
+ std::string* error_message) override;
void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
bool pretty_print() { return pretty_print_; }
diff --git a/base/lazy_instance_unittest.cc b/base/lazy_instance_unittest.cc
index bf293c7..ec9ef26 100644
--- a/base/lazy_instance_unittest.cc
+++ b/base/lazy_instance_unittest.cc
@@ -46,7 +46,7 @@
explicit SlowDelegate(base::LazyInstance<SlowConstructor>* lazy)
: lazy_(lazy) {}
- virtual void Run() override {
+ void Run() override {
EXPECT_EQ(12, lazy_->Get().some_int());
EXPECT_EQ(12, lazy_->Pointer()->some_int());
}
diff --git a/base/mac/libdispatch_task_runner.h b/base/mac/libdispatch_task_runner.h
index afe1fb7..f5fd866 100644
--- a/base/mac/libdispatch_task_runner.h
+++ b/base/mac/libdispatch_task_runner.h
@@ -38,16 +38,15 @@
explicit LibDispatchTaskRunner(const char* name);
// base::TaskRunner:
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- base::TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ base::TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
// base::SequencedTaskRunner:
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const Closure& task,
- base::TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ base::TimeDelta delay) override;
// This blocks the calling thread until all work on the dispatch queue has
// been run and the queue has been destroyed. Destroying a queue requires
@@ -64,7 +63,7 @@
dispatch_queue_t GetDispatchQueue() const;
protected:
- virtual ~LibDispatchTaskRunner();
+ ~LibDispatchTaskRunner() override;
private:
static void Finalizer(void* context);
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index 6a1acb3..3b23e53 100644
--- a/base/mac/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -64,7 +64,7 @@
EXPECT_TRUE(out.empty());
// Some more invalid inputs.
- const char* invalid_inputs[] = {
+ const char* const invalid_inputs[] = {
"/", "/foo", "foo", "/foo/bar.", "foo/bar.", "/foo/bar./bazquux",
"foo/bar./bazquux", "foo/.app", "//foo",
};
diff --git a/base/macros.h b/base/macros.h
index f89d7d1..b6240da 100644
--- a/base/macros.h
+++ b/base/macros.h
@@ -67,15 +67,6 @@
#define arraysize(array) (sizeof(ArraySizeHelper(array)))
-// DEPRECATED: Just use |arraysize()|, now that C++11 has removed the
-// limitations that forced the use of |ARRAYSIZE_UNSAFE()|.
-// TODO(viettrungluu): Convert all instances and delete. (The only uses are now
-// in Blink; the ifdef is to prevent it from reappearing in Chromium.)
-// crbug.com/423134
-#if defined(BLINK_PLATFORM) || defined(BLINK_PLATFORM_IMPLEMENTATION)
-#define ARRAYSIZE_UNSAFE(a) arraysize(a)
-#endif
-
// Use implicit_cast as a safe version of static_cast or const_cast
// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
diff --git a/base/md5_unittest.cc b/base/md5_unittest.cc
index 3e7f2ad..8d817e9 100644
--- a/base/md5_unittest.cc
+++ b/base/md5_unittest.cc
@@ -33,7 +33,7 @@
TEST(MD5, MD5SumEmtpyData) {
MD5Digest digest;
- const char* data = "";
+ const char data[] = "";
MD5Sum(data, strlen(data), &digest);
@@ -50,7 +50,7 @@
TEST(MD5, MD5SumOneByteData) {
MD5Digest digest;
- const char* data = "a";
+ const char data[] = "a";
MD5Sum(data, strlen(data), &digest);
diff --git a/base/memory/discardable_memory_emulated.h b/base/memory/discardable_memory_emulated.h
index 33889ad..0dc15e3 100644
--- a/base/memory/discardable_memory_emulated.h
+++ b/base/memory/discardable_memory_emulated.h
@@ -17,7 +17,7 @@
public internal::DiscardableMemoryManagerAllocation {
public:
explicit DiscardableMemoryEmulated(size_t bytes);
- virtual ~DiscardableMemoryEmulated();
+ ~DiscardableMemoryEmulated() override;
static bool ReduceMemoryUsage();
@@ -31,14 +31,14 @@
bool Initialize();
// Overridden from DiscardableMemory:
- virtual DiscardableMemoryLockStatus Lock() override;
- virtual void Unlock() override;
- virtual void* Memory() const override;
+ DiscardableMemoryLockStatus Lock() override;
+ void Unlock() override;
+ void* Memory() const override;
// Overridden from internal::DiscardableMemoryManagerAllocation:
- virtual bool AllocateAndAcquireLock() override;
- virtual void ReleaseLock() override {}
- virtual void Purge() override;
+ bool AllocateAndAcquireLock() override;
+ void ReleaseLock() override {}
+ void Purge() override;
private:
const size_t bytes_;
diff --git a/base/memory/discardable_memory_mach.h b/base/memory/discardable_memory_mach.h
index a409047..4da13d3 100644
--- a/base/memory/discardable_memory_mach.h
+++ b/base/memory/discardable_memory_mach.h
@@ -18,21 +18,21 @@
public internal::DiscardableMemoryManagerAllocation {
public:
explicit DiscardableMemoryMach(size_t bytes);
- virtual ~DiscardableMemoryMach();
+ ~DiscardableMemoryMach() override;
static void PurgeForTesting();
bool Initialize();
// Overridden from DiscardableMemory:
- virtual DiscardableMemoryLockStatus Lock() override;
- virtual void Unlock() override;
- virtual void* Memory() const override;
+ DiscardableMemoryLockStatus Lock() override;
+ void Unlock() override;
+ void* Memory() const override;
// Overridden from internal::DiscardableMemoryManagerAllocation:
- virtual bool AllocateAndAcquireLock() override;
- virtual void ReleaseLock() override;
- virtual void Purge() override;
+ bool AllocateAndAcquireLock() override;
+ void ReleaseLock() override;
+ void Purge() override;
private:
mac::ScopedMachVM memory_;
diff --git a/base/memory/discardable_memory_manager_unittest.cc b/base/memory/discardable_memory_manager_unittest.cc
index 18ceec3..fce7593 100644
--- a/base/memory/discardable_memory_manager_unittest.cc
+++ b/base/memory/discardable_memory_manager_unittest.cc
@@ -15,21 +15,21 @@
class TestAllocationImpl : public internal::DiscardableMemoryManagerAllocation {
public:
TestAllocationImpl() : is_allocated_(false), is_locked_(false) {}
- virtual ~TestAllocationImpl() { DCHECK(!is_locked_); }
+ ~TestAllocationImpl() override { DCHECK(!is_locked_); }
// Overridden from internal::DiscardableMemoryManagerAllocation:
- virtual bool AllocateAndAcquireLock() override {
+ bool AllocateAndAcquireLock() override {
bool was_allocated = is_allocated_;
is_allocated_ = true;
DCHECK(!is_locked_);
is_locked_ = true;
return was_allocated;
}
- virtual void ReleaseLock() override {
+ void ReleaseLock() override {
DCHECK(is_locked_);
is_locked_ = false;
}
- virtual void Purge() override {
+ void Purge() override {
DCHECK(is_allocated_);
is_allocated_ = false;
}
@@ -58,7 +58,7 @@
private:
// Overriden from internal::DiscardableMemoryManager:
- virtual TimeTicks Now() const override { return now_; }
+ TimeTicks Now() const override { return now_; }
TimeTicks now_;
};
diff --git a/base/memory/linked_ptr_unittest.cc b/base/memory/linked_ptr_unittest.cc
index 2dbc4bd..f6bc410 100644
--- a/base/memory/linked_ptr_unittest.cc
+++ b/base/memory/linked_ptr_unittest.cc
@@ -25,10 +25,8 @@
// Subclass
struct B: public A {
B() { history += base::StringPrintf("B%d ctor\n", mynum); }
- virtual ~B() { history += base::StringPrintf("B%d dtor\n", mynum); }
- virtual void Use() override {
- history += base::StringPrintf("B%d use\n", mynum);
- }
+ ~B() override { history += base::StringPrintf("B%d dtor\n", mynum); }
+ void Use() override { history += base::StringPrintf("B%d use\n", mynum); }
};
} // namespace
diff --git a/base/memory/ref_counted_memory.h b/base/memory/ref_counted_memory.h
index f7acc65..66dc65f 100644
--- a/base/memory/ref_counted_memory.h
+++ b/base/memory/ref_counted_memory.h
@@ -52,11 +52,11 @@
length_(length) {}
// Overridden from RefCountedMemory:
- virtual const unsigned char* front() const override;
- virtual size_t size() const override;
+ const unsigned char* front() const override;
+ size_t size() const override;
private:
- virtual ~RefCountedStaticMemory();
+ ~RefCountedStaticMemory() override;
const unsigned char* data_;
size_t length_;
@@ -81,14 +81,14 @@
static RefCountedBytes* TakeVector(std::vector<unsigned char>* to_destroy);
// Overridden from RefCountedMemory:
- virtual const unsigned char* front() const override;
- virtual size_t size() const override;
+ const unsigned char* front() const override;
+ size_t size() const override;
const std::vector<unsigned char>& data() const { return data_; }
std::vector<unsigned char>& data() { return data_; }
private:
- virtual ~RefCountedBytes();
+ ~RefCountedBytes() override;
std::vector<unsigned char> data_;
@@ -107,14 +107,14 @@
static RefCountedString* TakeString(std::string* to_destroy);
// Overridden from RefCountedMemory:
- virtual const unsigned char* front() const override;
- virtual size_t size() const override;
+ const unsigned char* front() const override;
+ size_t size() const override;
const std::string& data() const { return data_; }
std::string& data() { return data_; }
private:
- virtual ~RefCountedString();
+ ~RefCountedString() override;
std::string data_;
@@ -129,11 +129,11 @@
RefCountedMallocedMemory(void* data, size_t length);
// Overridden from RefCountedMemory:
- virtual const unsigned char* front() const override;
- virtual size_t size() const override;
+ const unsigned char* front() const override;
+ size_t size() const override;
private:
- virtual ~RefCountedMallocedMemory();
+ ~RefCountedMallocedMemory() override;
unsigned char* data_;
size_t length_;
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc
index 3da8d3b..6af19b6 100644
--- a/base/memory/scoped_ptr_unittest.cc
+++ b/base/memory/scoped_ptr_unittest.cc
@@ -25,11 +25,14 @@
public:
ConDecLogger() : ptr_(NULL) { }
explicit ConDecLogger(int* ptr) { SetPtr(ptr); }
- virtual ~ConDecLogger() { --*ptr_; }
+ ~ConDecLogger() override { --*ptr_; }
- virtual void SetPtr(int* ptr) override { ptr_ = ptr; ++*ptr_; }
+ void SetPtr(int* ptr) override {
+ ptr_ = ptr;
+ ++*ptr_;
+ }
- virtual int SomeMeth(int x) const override { return x; }
+ 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 ae870d5..b60ca14 100644
--- a/base/memory/scoped_vector_unittest.cc
+++ b/base/memory/scoped_vector_unittest.cc
@@ -62,11 +62,11 @@
class LifeCycleWatcher : public LifeCycleObject::Observer {
public:
LifeCycleWatcher() : life_cycle_state_(LC_INITIAL) {}
- virtual ~LifeCycleWatcher() {}
+ ~LifeCycleWatcher() override {}
// Assert INITIAL -> CONSTRUCTED and no LifeCycleObject associated with this
// LifeCycleWatcher.
- virtual void OnLifeCycleConstruct(LifeCycleObject* object) override {
+ 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;
@@ -75,7 +75,7 @@
// Assert CONSTRUCTED -> DESTROYED and the |object| being destroyed is the
// same one we saw constructed.
- virtual void OnLifeCycleDestroy(LifeCycleObject* object) override {
+ 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/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index 775e1c8..0b3fd7b 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -47,7 +47,7 @@
class MultipleThreadMain : public PlatformThread::Delegate {
public:
explicit MultipleThreadMain(int16 id) : id_(id) {}
- virtual ~MultipleThreadMain() {}
+ ~MultipleThreadMain() override {}
static void CleanUp() {
SharedMemory memory;
@@ -55,7 +55,7 @@
}
// PlatformThread::Delegate interface.
- virtual void ThreadMain() override {
+ void ThreadMain() override {
#if defined(OS_MACOSX)
mac::ScopedNSAutoreleasePool pool;
#endif
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index d79e8d4..d89a5c6 100644
--- a/base/memory/weak_ptr_unittest.cc
+++ b/base/memory/weak_ptr_unittest.cc
@@ -62,9 +62,7 @@
public:
BackgroundThread() : Thread("owner_thread") {}
- virtual ~BackgroundThread() {
- Stop();
- }
+ ~BackgroundThread() override { Stop(); }
void CreateArrowFromTarget(Arrow** arrow, Target* target) {
WaitableEvent completion(true, false);
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index a180cc3..b781711 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -115,7 +115,7 @@
// Creates a TYPE_CUSTOM MessageLoop with the supplied MessagePump, which must
// be non-NULL.
explicit MessageLoop(scoped_ptr<base::MessagePump> pump);
- virtual ~MessageLoop();
+ ~MessageLoop() override;
// Returns the MessageLoop object for the current thread, or null if none.
static MessageLoop* current();
@@ -442,9 +442,9 @@
void HistogramEvent(int event);
// MessagePump::Delegate methods:
- virtual bool DoWork() override;
- virtual bool DoDelayedWork(TimeTicks* next_delayed_work_time) override;
- virtual bool DoIdleWork() override;
+ bool DoWork() override;
+ bool DoDelayedWork(TimeTicks* next_delayed_work_time) override;
+ bool DoIdleWork() override;
const Type type_;
diff --git a/base/message_loop/message_loop_proxy.h b/base/message_loop/message_loop_proxy.h
index 4ace802..88eeac4 100644
--- a/base/message_loop/message_loop_proxy.h
+++ b/base/message_loop/message_loop_proxy.h
@@ -30,7 +30,7 @@
protected:
MessageLoopProxy();
- virtual ~MessageLoopProxy();
+ ~MessageLoopProxy() override;
};
} // namespace base
diff --git a/base/message_loop/message_loop_proxy_impl.h b/base/message_loop/message_loop_proxy_impl.h
index ca9543e..0fe629f 100644
--- a/base/message_loop/message_loop_proxy_impl.h
+++ b/base/message_loop/message_loop_proxy_impl.h
@@ -25,18 +25,17 @@
scoped_refptr<IncomingTaskQueue> incoming_queue);
// MessageLoopProxy implementation
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
private:
friend class RefCountedThreadSafe<MessageLoopProxyImpl>;
- virtual ~MessageLoopProxyImpl();
+ ~MessageLoopProxyImpl() override;
// THe incoming queue receiving all posted tasks.
scoped_refptr<IncomingTaskQueue> incoming_queue_;
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc
index 1a42cc6..733f5e5 100644
--- a/base/message_loop/message_loop_unittest.cc
+++ b/base/message_loop/message_loop_unittest.cc
@@ -664,16 +664,16 @@
num_tasks_processed_(0),
num_tasks_(num_tasks) {}
- virtual ~DummyTaskObserver() {}
+ ~DummyTaskObserver() override {}
- virtual void WillProcessTask(const PendingTask& pending_task) override {
+ void WillProcessTask(const PendingTask& pending_task) override {
num_tasks_started_++;
EXPECT_TRUE(pending_task.time_posted != TimeTicks());
EXPECT_LE(num_tasks_started_, num_tasks_);
EXPECT_EQ(num_tasks_started_, num_tasks_processed_ + 1);
}
- virtual void DidProcessTask(const PendingTask& pending_task) override {
+ void DidProcessTask(const PendingTask& pending_task) override {
num_tasks_processed_++;
EXPECT_TRUE(pending_task.time_posted != TimeTicks());
EXPECT_LE(num_tasks_started_, num_tasks_);
@@ -756,10 +756,10 @@
class QuitDelegate : public MessageLoopForIO::Watcher {
public:
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {
+ void OnFileCanWriteWithoutBlocking(int fd) override {
MessageLoop::current()->QuitWhenIdle();
}
- virtual void OnFileCanReadWithoutBlocking(int fd) override {
+ void OnFileCanReadWithoutBlocking(int fd) override {
MessageLoop::current()->QuitWhenIdle();
}
};
@@ -857,7 +857,7 @@
destruction_observer_called_(destruction_observer_called),
task_destroyed_before_message_loop_(false) {
}
- virtual void WillDestroyCurrentMessageLoop() override {
+ void WillDestroyCurrentMessageLoop() override {
task_destroyed_before_message_loop_ = *task_destroyed_;
*destruction_observer_called_ = true;
}
diff --git a/base/message_loop/message_pump_default.h b/base/message_loop/message_pump_default.h
index e9f7302..d63e810 100644
--- a/base/message_loop/message_pump_default.h
+++ b/base/message_loop/message_pump_default.h
@@ -15,13 +15,13 @@
class BASE_EXPORT MessagePumpDefault : public MessagePump {
public:
MessagePumpDefault();
- virtual ~MessagePumpDefault();
+ ~MessagePumpDefault() override;
// MessagePump methods:
- virtual void Run(Delegate* delegate) override;
- virtual void Quit() override;
- virtual void ScheduleWork() override;
- virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
+ void Run(Delegate* delegate) override;
+ void Quit() override;
+ void ScheduleWork() override;
+ void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
private:
// This flag is set to false when Run should return.
diff --git a/base/message_loop/message_pump_libevent.h b/base/message_loop/message_pump_libevent.h
index 2f1812f..3f5ad51 100644
--- a/base/message_loop/message_pump_libevent.h
+++ b/base/message_loop/message_pump_libevent.h
@@ -98,7 +98,7 @@
};
MessagePumpLibevent();
- virtual ~MessagePumpLibevent();
+ ~MessagePumpLibevent() override;
// Have the current thread's message loop watch for a a situation in which
// reading/writing to the FD can be performed without blocking.
@@ -122,10 +122,10 @@
void RemoveIOObserver(IOObserver* obs);
// MessagePump methods:
- virtual void Run(Delegate* delegate) override;
- virtual void Quit() override;
- virtual void ScheduleWork() override;
- virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
+ void Run(Delegate* delegate) override;
+ void Quit() override;
+ void ScheduleWork() override;
+ void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
private:
friend class MessagePumpLibeventTest;
diff --git a/base/message_loop/message_pump_libevent_unittest.cc b/base/message_loop/message_pump_libevent_unittest.cc
index e598d76..f9b89c4 100644
--- a/base/message_loop/message_pump_libevent_unittest.cc
+++ b/base/message_loop/message_pump_libevent_unittest.cc
@@ -62,11 +62,11 @@
// nothing useful.
class StupidWatcher : public MessagePumpLibevent::Watcher {
public:
- virtual ~StupidWatcher() {}
+ ~StupidWatcher() override {}
// base:MessagePumpLibevent::Watcher interface
- virtual void OnFileCanReadWithoutBlocking(int fd) override {}
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {}
+ void OnFileCanReadWithoutBlocking(int fd) override {}
+ void OnFileCanWriteWithoutBlocking(int fd) override {}
};
#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
@@ -97,16 +97,12 @@
: controller_(controller) {
DCHECK(controller_);
}
- virtual ~BaseWatcher() {}
+ ~BaseWatcher() override {}
// base:MessagePumpLibevent::Watcher interface
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {
- NOTREACHED();
- }
+ void OnFileCanReadWithoutBlocking(int /* fd */) override { NOTREACHED(); }
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
- NOTREACHED();
- }
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override { NOTREACHED(); }
protected:
MessagePumpLibevent::FileDescriptorWatcher* controller_;
@@ -118,11 +114,9 @@
MessagePumpLibevent::FileDescriptorWatcher* controller)
: BaseWatcher(controller) {}
- virtual ~DeleteWatcher() {
- DCHECK(!controller_);
- }
+ ~DeleteWatcher() override { DCHECK(!controller_); }
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {
DCHECK(controller_);
delete controller_;
controller_ = NULL;
@@ -147,9 +141,9 @@
MessagePumpLibevent::FileDescriptorWatcher* controller)
: BaseWatcher(controller) {}
- virtual ~StopWatcher() {}
+ ~StopWatcher() override {}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {
controller_->StopWatchingFileDescriptor();
}
};
@@ -177,16 +171,16 @@
class NestedPumpWatcher : public MessagePumpLibevent::Watcher {
public:
NestedPumpWatcher() {}
- virtual ~NestedPumpWatcher() {}
+ ~NestedPumpWatcher() override {}
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {
+ void OnFileCanReadWithoutBlocking(int /* fd */) override {
RunLoop runloop;
MessageLoop::current()->PostTask(FROM_HERE, Bind(&QuitMessageLoopAndStart,
runloop.QuitClosure()));
runloop.Run();
}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
};
TEST_F(MessagePumpLibeventTest, NestedPumpWatcher) {
diff --git a/base/message_loop/message_pump_mac.h b/base/message_loop/message_pump_mac.h
index d16db8c..55ab2c6 100644
--- a/base/message_loop/message_pump_mac.h
+++ b/base/message_loop/message_pump_mac.h
@@ -82,18 +82,18 @@
friend class MessagePumpScopedAutoreleasePool;
public:
MessagePumpCFRunLoopBase();
- virtual ~MessagePumpCFRunLoopBase();
+ ~MessagePumpCFRunLoopBase() override;
// Subclasses should implement the work they need to do in MessagePump::Run
// in the DoRun method. MessagePumpCFRunLoopBase::Run calls DoRun directly.
// This arrangement is used because MessagePumpCFRunLoopBase needs to set
// up and tear down things before and after the "meat" of DoRun.
- virtual void Run(Delegate* delegate) override;
+ void Run(Delegate* delegate) override;
virtual void DoRun(Delegate* delegate) = 0;
- virtual void ScheduleWork() override;
- virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
- virtual void SetTimerSlack(TimerSlack timer_slack) override;
+ void ScheduleWork() override;
+ void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
+ void SetTimerSlack(TimerSlack timer_slack) override;
protected:
// Accessors for private data members to be used by subclasses.
@@ -220,13 +220,13 @@
class BASE_EXPORT MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
public:
MessagePumpCFRunLoop();
- virtual ~MessagePumpCFRunLoop();
+ ~MessagePumpCFRunLoop() override;
- virtual void DoRun(Delegate* delegate) override;
- virtual void Quit() override;
+ void DoRun(Delegate* delegate) override;
+ void Quit() override;
private:
- virtual void EnterExitRunLoop(CFRunLoopActivity activity) override;
+ void EnterExitRunLoop(CFRunLoopActivity activity) override;
// True if Quit is called to stop the innermost MessagePump
// (innermost_quittable_) but some other CFRunLoopRun loop (nesting_level_)
@@ -239,10 +239,10 @@
class BASE_EXPORT MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase {
public:
MessagePumpNSRunLoop();
- virtual ~MessagePumpNSRunLoop();
+ ~MessagePumpNSRunLoop() override;
- virtual void DoRun(Delegate* delegate) override;
- virtual void Quit() override;
+ void DoRun(Delegate* delegate) override;
+ void Quit() override;
private:
// A source that doesn't do anything but provide something signalable
@@ -282,10 +282,10 @@
class MessagePumpNSApplication : public MessagePumpCFRunLoopBase {
public:
MessagePumpNSApplication();
- virtual ~MessagePumpNSApplication();
+ ~MessagePumpNSApplication() override;
- virtual void DoRun(Delegate* delegate) override;
- virtual void Quit() override;
+ void DoRun(Delegate* delegate) override;
+ void Quit() override;
private:
// False after Quit is called.
@@ -303,12 +303,12 @@
class MessagePumpCrApplication : public MessagePumpNSApplication {
public:
MessagePumpCrApplication();
- virtual ~MessagePumpCrApplication();
+ ~MessagePumpCrApplication() override;
protected:
// Returns nil if NSApp is currently in the middle of calling
// -sendEvent. Requires NSApp implementing CrAppProtocol.
- virtual AutoreleasePoolType* CreateAutoreleasePool() override;
+ AutoreleasePoolType* CreateAutoreleasePool() override;
private:
DISALLOW_COPY_AND_ASSIGN(MessagePumpCrApplication);
diff --git a/base/message_loop/message_pump_perftest.cc b/base/message_loop/message_pump_perftest.cc
index 40550e1..9fca465 100644
--- a/base/message_loop/message_pump_perftest.cc
+++ b/base/message_loop/message_pump_perftest.cc
@@ -230,14 +230,13 @@
class FakeMessagePump : public MessagePump {
public:
FakeMessagePump() {}
- virtual ~FakeMessagePump() {}
+ ~FakeMessagePump() override {}
- virtual void Run(Delegate* delegate) override {}
+ void Run(Delegate* delegate) override {}
- virtual void Quit() override {}
- virtual void ScheduleWork() override {}
- virtual void ScheduleDelayedWork(
- const TimeTicks& delayed_work_time) override {}
+ void Quit() override {}
+ void ScheduleWork() override {}
+ void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override {}
};
class PostTaskTest : public testing::Test {
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc
index b474ddb..905cc22 100644
--- a/base/metrics/field_trial_unittest.cc
+++ b/base/metrics/field_trial_unittest.cc
@@ -44,12 +44,10 @@
FieldTrialList::AddObserver(this);
}
- virtual ~TestFieldTrialObserver() {
- FieldTrialList::RemoveObserver(this);
- }
+ ~TestFieldTrialObserver() override { FieldTrialList::RemoveObserver(this); }
- virtual void OnFieldTrialGroupFinalized(const std::string& trial,
- const std::string& group) override {
+ void OnFieldTrialGroupFinalized(const std::string& trial,
+ const std::string& group) override {
trial_name_ = trial;
group_name_ = group;
}
@@ -78,8 +76,8 @@
// Test registration, and also check that destructors are called for trials
// (and that Valgrind doesn't catch us leaking).
TEST_F(FieldTrialTest, Registration) {
- const char* name1 = "name 1 test";
- const char* name2 = "name 2 test";
+ const char name1[] = "name 1 test";
+ const char name2[] = "name 2 test";
EXPECT_FALSE(FieldTrialList::Find(name1));
EXPECT_FALSE(FieldTrialList::Find(name2));
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
index 47cfc79..5ed9d9e 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -359,7 +359,7 @@
// produce a false-alarm if a race occurred in the reading of the data during
// a SnapShot process, but should otherwise be false at all times (unless we
// have memory over-writes, or DRAM failures).
- virtual int FindCorruption(const HistogramSamples& samples) const override;
+ int FindCorruption(const HistogramSamples& samples) const override;
//----------------------------------------------------------------------------
// Accessors for factory construction, serialization and testing.
@@ -382,17 +382,16 @@
size_t* bucket_count);
// HistogramBase implementation:
- virtual HistogramType GetHistogramType() const override;
- virtual bool HasConstructionArguments(
- Sample expected_minimum,
- Sample expected_maximum,
- size_t expected_bucket_count) const override;
- virtual void Add(Sample value) override;
- virtual scoped_ptr<HistogramSamples> SnapshotSamples() const override;
- virtual void AddSamples(const HistogramSamples& samples) override;
- virtual bool AddSamplesFromPickle(PickleIterator* iter) override;
- virtual void WriteHTMLGraph(std::string* output) const override;
- virtual void WriteAscii(std::string* output) const override;
+ HistogramType GetHistogramType() const override;
+ bool HasConstructionArguments(Sample expected_minimum,
+ Sample expected_maximum,
+ size_t expected_bucket_count) const override;
+ void Add(Sample value) override;
+ scoped_ptr<HistogramSamples> SnapshotSamples() const override;
+ void AddSamples(const HistogramSamples& samples) override;
+ bool AddSamplesFromPickle(PickleIterator* iter) override;
+ void WriteHTMLGraph(std::string* output) const override;
+ void WriteAscii(std::string* output) const override;
protected:
// |ranges| should contain the underflow and overflow buckets. See top
@@ -402,10 +401,10 @@
Sample maximum,
const BucketRanges* ranges);
- virtual ~Histogram();
+ ~Histogram() override;
// HistogramBase implementation:
- virtual bool SerializeInfoImpl(Pickle* pickle) const override;
+ bool SerializeInfoImpl(Pickle* pickle) const override;
// Method to override to skip the display of the i'th bucket if it's empty.
virtual bool PrintEmptyBucket(size_t index) const;
@@ -458,11 +457,11 @@
std::string* output) const;
// WriteJSON calls these.
- virtual void GetParameters(DictionaryValue* params) const override;
+ void GetParameters(DictionaryValue* params) const override;
- virtual void GetCountAndBucketData(Count* count,
- int64* sum,
- ListValue* buckets) const override;
+ void GetCountAndBucketData(Count* count,
+ int64* sum,
+ ListValue* buckets) const override;
// Does not own this object. Should get from StatisticsRecorder.
const BucketRanges* bucket_ranges_;
@@ -483,7 +482,7 @@
// buckets.
class BASE_EXPORT LinearHistogram : public Histogram {
public:
- virtual ~LinearHistogram();
+ ~LinearHistogram() override;
/* minimum should start from 1. 0 is as minimum is invalid. 0 is an implicit
default underflow bucket. */
@@ -521,7 +520,7 @@
BucketRanges* ranges);
// Overridden from Histogram:
- virtual HistogramType GetHistogramType() const override;
+ HistogramType GetHistogramType() const override;
protected:
LinearHistogram(const std::string& name,
@@ -529,15 +528,15 @@
Sample maximum,
const BucketRanges* ranges);
- virtual double GetBucketSize(Count current, size_t i) const override;
+ double GetBucketSize(Count current, size_t i) const override;
// If we have a description for a bucket, then return that. Otherwise
// let parent class provide a (numeric) description.
- virtual const std::string GetAsciiBucketRange(size_t i) const override;
+ const std::string GetAsciiBucketRange(size_t i) const override;
// Skip printing of name for numeric range if we have a name (and if this is
// an empty bucket).
- virtual bool PrintEmptyBucket(size_t index) const override;
+ bool PrintEmptyBucket(size_t index) const override;
private:
friend BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo(
@@ -560,7 +559,7 @@
public:
static HistogramBase* FactoryGet(const std::string& name, int32 flags);
- virtual HistogramType GetHistogramType() const override;
+ HistogramType GetHistogramType() const override;
private:
BooleanHistogram(const std::string& name, const BucketRanges* ranges);
@@ -586,7 +585,7 @@
int32 flags);
// Overridden from Histogram:
- virtual HistogramType GetHistogramType() const override;
+ HistogramType GetHistogramType() const override;
// Helper method for transforming an array of valid enumeration values
// to the std::vector<int> expected by UMA_HISTOGRAM_CUSTOM_ENUMERATION.
@@ -601,9 +600,9 @@
const BucketRanges* ranges);
// HistogramBase implementation:
- virtual bool SerializeInfoImpl(Pickle* pickle) const override;
+ bool SerializeInfoImpl(Pickle* pickle) const override;
- virtual double GetBucketSize(Count current, size_t i) const override;
+ double GetBucketSize(Count current, size_t i) const override;
private:
friend BASE_EXPORT_PRIVATE HistogramBase* DeserializeHistogramInfo(
diff --git a/base/metrics/histogram_delta_serialization.h b/base/metrics/histogram_delta_serialization.h
index 037d0b5..a379914 100644
--- a/base/metrics/histogram_delta_serialization.h
+++ b/base/metrics/histogram_delta_serialization.h
@@ -23,7 +23,7 @@
public:
// |caller_name| is string used in histograms for counting inconsistencies.
explicit HistogramDeltaSerialization(const std::string& caller_name);
- virtual ~HistogramDeltaSerialization();
+ ~HistogramDeltaSerialization() override;
// Computes deltas in histogram bucket counts relative to the previous call to
// this method. Stores the deltas in serialized form into |serialized_deltas|.
@@ -38,13 +38,12 @@
private:
// HistogramFlattener implementation.
- virtual void RecordDelta(const HistogramBase& histogram,
- const HistogramSamples& snapshot) override;
- virtual void InconsistencyDetected(
+ void RecordDelta(const HistogramBase& histogram,
+ const HistogramSamples& snapshot) override;
+ void InconsistencyDetected(HistogramBase::Inconsistency problem) override;
+ void UniqueInconsistencyDetected(
HistogramBase::Inconsistency problem) override;
- virtual void UniqueInconsistencyDetected(
- HistogramBase::Inconsistency problem) override;
- virtual void InconsistencyDetectedInLoggedCount(int amount) override;
+ void InconsistencyDetectedInLoggedCount(int amount) override;
// Calculates deltas in histogram counters.
HistogramSnapshotManager histogram_snapshot_manager_;
diff --git a/base/metrics/histogram_samples.cc b/base/metrics/histogram_samples.cc
index 26c2aeb..f5e03b9 100644
--- a/base/metrics/histogram_samples.cc
+++ b/base/metrics/histogram_samples.cc
@@ -15,11 +15,12 @@
public:
explicit SampleCountPickleIterator(PickleIterator* iter);
- virtual bool Done() const override;
- virtual void Next() override;
- virtual void Get(HistogramBase::Sample* min,
- HistogramBase::Sample* max,
- HistogramBase::Count* count) const override;
+ bool Done() const override;
+ void Next() override;
+ void Get(HistogramBase::Sample* min,
+ HistogramBase::Sample* max,
+ HistogramBase::Count* count) const override;
+
private:
PickleIterator* const iter_;
diff --git a/base/metrics/histogram_snapshot_manager_unittest.cc b/base/metrics/histogram_snapshot_manager_unittest.cc
index 2da22be..5dd72a7 100644
--- a/base/metrics/histogram_snapshot_manager_unittest.cc
+++ b/base/metrics/histogram_snapshot_manager_unittest.cc
@@ -18,22 +18,21 @@
public:
HistogramFlattenerDeltaRecorder() {}
- virtual void RecordDelta(const HistogramBase& histogram,
- const HistogramSamples& snapshot) override {
+ void RecordDelta(const HistogramBase& histogram,
+ const HistogramSamples& snapshot) override {
recorded_delta_histogram_names_.push_back(histogram.histogram_name());
}
- virtual void InconsistencyDetected(
+ void InconsistencyDetected(HistogramBase::Inconsistency problem) override {
+ ASSERT_TRUE(false);
+ }
+
+ void UniqueInconsistencyDetected(
HistogramBase::Inconsistency problem) override {
ASSERT_TRUE(false);
}
- virtual void UniqueInconsistencyDetected(
- HistogramBase::Inconsistency problem) override {
- ASSERT_TRUE(false);
- }
-
- virtual void InconsistencyDetectedInLoggedCount(int amount) override {
+ void InconsistencyDetectedInLoggedCount(int amount) override {
ASSERT_TRUE(false);
}
diff --git a/base/metrics/sample_map.h b/base/metrics/sample_map.h
index 0972acd..7a780ea 100644
--- a/base/metrics/sample_map.h
+++ b/base/metrics/sample_map.h
@@ -20,18 +20,17 @@
class BASE_EXPORT_PRIVATE SampleMap : public HistogramSamples {
public:
SampleMap();
- virtual ~SampleMap();
+ ~SampleMap() override;
// HistogramSamples implementation:
- virtual void Accumulate(HistogramBase::Sample value,
- HistogramBase::Count count) override;
- virtual HistogramBase::Count GetCount(
- HistogramBase::Sample value) const override;
- virtual HistogramBase::Count TotalCount() const override;
- virtual scoped_ptr<SampleCountIterator> Iterator() const override;
+ void Accumulate(HistogramBase::Sample value,
+ HistogramBase::Count count) override;
+ HistogramBase::Count GetCount(HistogramBase::Sample value) const override;
+ HistogramBase::Count TotalCount() const override;
+ scoped_ptr<SampleCountIterator> Iterator() const override;
protected:
- virtual bool AddSubtractImpl(
+ bool AddSubtractImpl(
SampleCountIterator* iter,
HistogramSamples::Operator op) override; // |op| is ADD or SUBTRACT.
@@ -47,14 +46,15 @@
SampleToCountMap;
explicit SampleMapIterator(const SampleToCountMap& sample_counts);
- virtual ~SampleMapIterator();
+ ~SampleMapIterator() override;
// SampleCountIterator implementation:
- virtual bool Done() const override;
- virtual void Next() override;
- virtual void Get(HistogramBase::Sample* min,
- HistogramBase::Sample* max,
- HistogramBase::Count* count) const override;
+ bool Done() const override;
+ void Next() override;
+ void Get(HistogramBase::Sample* min,
+ HistogramBase::Sample* max,
+ HistogramBase::Count* count) const override;
+
private:
SampleToCountMap::const_iterator iter_;
const SampleToCountMap::const_iterator end_;
diff --git a/base/metrics/sample_vector.h b/base/metrics/sample_vector.h
index 8cc8ce9..55f9b96 100644
--- a/base/metrics/sample_vector.h
+++ b/base/metrics/sample_vector.h
@@ -23,21 +23,20 @@
class BASE_EXPORT_PRIVATE SampleVector : public HistogramSamples {
public:
explicit SampleVector(const BucketRanges* bucket_ranges);
- virtual ~SampleVector();
+ ~SampleVector() override;
// HistogramSamples implementation:
- virtual void Accumulate(HistogramBase::Sample value,
- HistogramBase::Count count) override;
- virtual HistogramBase::Count GetCount(
- HistogramBase::Sample value) const override;
- virtual HistogramBase::Count TotalCount() const override;
- virtual scoped_ptr<SampleCountIterator> Iterator() const override;
+ void Accumulate(HistogramBase::Sample value,
+ HistogramBase::Count count) override;
+ HistogramBase::Count GetCount(HistogramBase::Sample value) const override;
+ HistogramBase::Count TotalCount() const override;
+ scoped_ptr<SampleCountIterator> Iterator() const override;
// Get count of a specific bucket.
HistogramBase::Count GetCountAtIndex(size_t bucket_index) const;
protected:
- virtual bool AddSubtractImpl(
+ bool AddSubtractImpl(
SampleCountIterator* iter,
HistogramSamples::Operator op) override; // |op| is ADD or SUBTRACT.
@@ -58,17 +57,17 @@
public:
SampleVectorIterator(const std::vector<HistogramBase::AtomicCount>* counts,
const BucketRanges* bucket_ranges);
- virtual ~SampleVectorIterator();
+ ~SampleVectorIterator() override;
// SampleCountIterator implementation:
- virtual bool Done() const override;
- virtual void Next() override;
- virtual void Get(HistogramBase::Sample* min,
- HistogramBase::Sample* max,
- HistogramBase::Count* count) const override;
+ bool Done() const override;
+ void Next() override;
+ void Get(HistogramBase::Sample* min,
+ HistogramBase::Sample* max,
+ HistogramBase::Count* count) const override;
// SampleVector uses predefined buckets, so iterator can return bucket index.
- virtual bool GetBucketIndex(size_t* index) const override;
+ bool GetBucketIndex(size_t* index) const override;
private:
void SkipEmptyBuckets();
diff --git a/base/metrics/sparse_histogram.h b/base/metrics/sparse_histogram.h
index 321c630..8c05613 100644
--- a/base/metrics/sparse_histogram.h
+++ b/base/metrics/sparse_histogram.h
@@ -34,24 +34,23 @@
// new one.
static HistogramBase* FactoryGet(const std::string& name, int32 flags);
- virtual ~SparseHistogram();
+ ~SparseHistogram() override;
// HistogramBase implementation:
- virtual HistogramType GetHistogramType() const override;
- virtual bool HasConstructionArguments(
- Sample expected_minimum,
- Sample expected_maximum,
- size_t expected_bucket_count) const override;
- virtual void Add(Sample value) override;
- virtual void AddSamples(const HistogramSamples& samples) override;
- virtual bool AddSamplesFromPickle(PickleIterator* iter) override;
- virtual scoped_ptr<HistogramSamples> SnapshotSamples() const override;
- virtual void WriteHTMLGraph(std::string* output) const override;
- virtual void WriteAscii(std::string* output) const override;
+ HistogramType GetHistogramType() const override;
+ bool HasConstructionArguments(Sample expected_minimum,
+ Sample expected_maximum,
+ size_t expected_bucket_count) const override;
+ void Add(Sample value) override;
+ void AddSamples(const HistogramSamples& samples) override;
+ bool AddSamplesFromPickle(PickleIterator* iter) override;
+ scoped_ptr<HistogramSamples> SnapshotSamples() const override;
+ void WriteHTMLGraph(std::string* output) const override;
+ void WriteAscii(std::string* output) const override;
protected:
// HistogramBase implementation:
- virtual bool SerializeInfoImpl(Pickle* pickle) const override;
+ bool SerializeInfoImpl(Pickle* pickle) const override;
private:
// Clients should always use FactoryGet to create SparseHistogram.
@@ -61,10 +60,10 @@
PickleIterator* iter);
static HistogramBase* DeserializeInfoImpl(PickleIterator* iter);
- virtual void GetParameters(DictionaryValue* params) const override;
- virtual void GetCountAndBucketData(Count* count,
- int64* sum,
- ListValue* buckets) const override;
+ void GetParameters(DictionaryValue* params) const override;
+ void GetCountAndBucketData(Count* count,
+ int64* sum,
+ ListValue* buckets) const override;
// Helpers for emitting Ascii graphic. Each method appends data to output.
void WriteAsciiImpl(bool graph_it,
diff --git a/base/metrics/stats_counters.h b/base/metrics/stats_counters.h
index a2c7dec..0f8354f 100644
--- a/base/metrics/stats_counters.h
+++ b/base/metrics/stats_counters.h
@@ -133,7 +133,7 @@
public:
// Constructs and starts the timer.
explicit StatsCounterTimer(const std::string& name);
- virtual ~StatsCounterTimer();
+ ~StatsCounterTimer() override;
// Start the timer.
void Start();
@@ -162,9 +162,9 @@
public:
// Constructs and starts the timer.
explicit StatsRate(const std::string& name);
- virtual ~StatsRate();
+ ~StatsRate() override;
- virtual void Add(int value) override;
+ void Add(int value) override;
private:
StatsCounter counter_;
diff --git a/base/metrics/stats_table_unittest.cc b/base/metrics/stats_table_unittest.cc
index 501cbc7..45b0a43 100644
--- a/base/metrics/stats_table_unittest.cc
+++ b/base/metrics/stats_table_unittest.cc
@@ -70,7 +70,7 @@
: SimpleThread(name),
id_(id) {}
- virtual void Run() override;
+ void Run() override;
private:
int id_;
diff --git a/base/nix/xdg_util_unittest.cc b/base/nix/xdg_util_unittest.cc
index 2fc9d4c..6d10d3e 100644
--- a/base/nix/xdg_util_unittest.cc
+++ b/base/nix/xdg_util_unittest.cc
@@ -25,10 +25,10 @@
MOCK_METHOD1(UnSetVar, bool(const char*));
};
-const char* kGnome = "gnome";
-const char* kKDE4 = "kde4";
-const char* kKDE = "kde";
-const char* kXFCE = "xfce";
+const char* const kGnome = "gnome";
+const char* const kKDE4 = "kde4";
+const char* const kKDE = "kde";
+const char* const kXFCE = "xfce";
} // namespace
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index 3df8db0..11f59be 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -26,10 +26,8 @@
class Adder : public Foo {
public:
explicit Adder(int scaler) : total(0), scaler_(scaler) {}
- virtual void Observe(int x) override {
- total += x * scaler_;
- }
- virtual ~Adder() {}
+ void Observe(int x) override { total += x * scaler_; }
+ ~Adder() override {}
int total;
private:
@@ -42,10 +40,8 @@
: list_(list),
doomed_(doomed) {
}
- virtual ~Disrupter() {}
- virtual void Observe(int x) override {
- list_->RemoveObserver(doomed_);
- }
+ ~Disrupter() override {}
+ void Observe(int x) override { list_->RemoveObserver(doomed_); }
private:
ObserverList<Foo>* list_;
@@ -58,10 +54,8 @@
: list_(list),
doomed_(doomed) {
}
- virtual ~ThreadSafeDisrupter() {}
- virtual void Observe(int x) override {
- list_->RemoveObserver(doomed_);
- }
+ ~ThreadSafeDisrupter() override {}
+ void Observe(int x) override { list_->RemoveObserver(doomed_); }
private:
ObserverListThreadSafe<Foo>* list_;
@@ -109,10 +103,9 @@
weak_factory_(this) {
}
- virtual ~AddRemoveThread() {
- }
+ ~AddRemoveThread() override {}
- virtual void ThreadMain() override {
+ void ThreadMain() override {
loop_ = new MessageLoop(); // Fire up a message loop.
loop_->PostTask(
FROM_HERE,
@@ -153,7 +146,7 @@
loop_->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
}
- virtual void Observe(int x) override {
+ void Observe(int x) override {
count_observes_++;
// If we're getting called after we removed ourselves from
@@ -323,13 +316,13 @@
class FooRemover : public Foo {
public:
explicit FooRemover(ObserverListThreadSafe<Foo>* list) : list_(list) {}
- virtual ~FooRemover() {}
+ ~FooRemover() override {}
void AddFooToRemove(Foo* foo) {
foos_.push_back(foo);
}
- virtual void Observe(int x) override {
+ void Observe(int x) override {
std::vector<Foo*> tmp;
tmp.swap(foos_);
for (std::vector<Foo*>::iterator it = tmp.begin();
@@ -481,7 +474,7 @@
explicit AddInClearObserve(ObserverList<Foo>* list)
: list_(list), added_(false), adder_(1) {}
- virtual void Observe(int /* x */) override {
+ void Observe(int /* x */) override {
list_->Clear();
list_->AddObserver(&adder_);
added_ = true;
@@ -524,11 +517,9 @@
class ListDestructor : public Foo {
public:
explicit ListDestructor(ObserverList<Foo>* list) : list_(list) {}
- virtual ~ListDestructor() {}
+ ~ListDestructor() override {}
- virtual void Observe(int x) override {
- delete list_;
- }
+ void Observe(int x) override { delete list_; }
private:
ObserverList<Foo>* list_;
diff --git a/base/posix/file_descriptor_shuffle.h b/base/posix/file_descriptor_shuffle.h
index 875fdf5..78e3a7d 100644
--- a/base/posix/file_descriptor_shuffle.h
+++ b/base/posix/file_descriptor_shuffle.h
@@ -48,9 +48,9 @@
// An implementation of the InjectionDelegate interface using the file
// descriptor table of the current process as the domain.
class BASE_EXPORT FileDescriptorTableInjection : public InjectionDelegate {
- virtual bool Duplicate(int* result, int fd) override;
- virtual bool Move(int src, int dest) override;
- virtual void Close(int fd) override;
+ bool Duplicate(int* result, int fd) override;
+ bool Move(int src, int dest) override;
+ void Close(int fd) override;
};
// A single arc of the directed graph which describes an injective multimapping.
diff --git a/base/posix/file_descriptor_shuffle_unittest.cc b/base/posix/file_descriptor_shuffle_unittest.cc
index b12c909..3dfbf7e 100644
--- a/base/posix/file_descriptor_shuffle_unittest.cc
+++ b/base/posix/file_descriptor_shuffle_unittest.cc
@@ -44,20 +44,18 @@
: next_duplicate_(kDuplicateBase) {
}
- virtual bool Duplicate(int* result, int fd) override {
+ bool Duplicate(int* result, int fd) override {
*result = next_duplicate_++;
actions_.push_back(Action(Action::DUPLICATE, *result, fd));
return true;
}
- virtual bool Move(int src, int dest) override {
+ bool Move(int src, int dest) override {
actions_.push_back(Action(Action::MOVE, src, dest));
return true;
}
- virtual void Close(int fd) override {
- actions_.push_back(Action(Action::CLOSE, fd));
- }
+ void Close(int fd) override { actions_.push_back(Action(Action::CLOSE, fd)); }
const std::vector<Action>& actions() const { return actions_; }
@@ -250,15 +248,11 @@
class FailingDelegate : public InjectionDelegate {
public:
- virtual bool Duplicate(int* result, int fd) override {
- return false;
- }
+ bool Duplicate(int* result, int fd) override { return false; }
- virtual bool Move(int src, int dest) override {
- return false;
- }
+ bool Move(int src, int dest) override { return false; }
- virtual void Close(int fd) override {}
+ void Close(int fd) override {}
};
TEST(FileDescriptorShuffleTest, EmptyWithFailure) {
diff --git a/base/power_monitor/power_monitor_device_source.h b/base/power_monitor/power_monitor_device_source.h
index 3d264b4..29f17c2 100644
--- a/base/power_monitor/power_monitor_device_source.h
+++ b/base/power_monitor/power_monitor_device_source.h
@@ -37,7 +37,7 @@
class BASE_EXPORT PowerMonitorDeviceSource : public PowerMonitorSource {
public:
PowerMonitorDeviceSource();
- virtual ~PowerMonitorDeviceSource();
+ ~PowerMonitorDeviceSource() override;
#if defined(OS_MACOSX)
// Allocate system resources needed by the PowerMonitor class.
@@ -90,7 +90,7 @@
// Platform-specific method to check whether the system is currently
// running on battery power. Returns true if running on batteries,
// false otherwise.
- virtual bool IsOnBatteryPowerImpl() override;
+ bool IsOnBatteryPowerImpl() override;
// Checks the battery status and notifies observers if the battery
// status has changed.
diff --git a/base/prefs/default_pref_store.h b/base/prefs/default_pref_store.h
index 9939876..26462da 100644
--- a/base/prefs/default_pref_store.h
+++ b/base/prefs/default_pref_store.h
@@ -21,11 +21,11 @@
DefaultPrefStore();
// PrefStore implementation:
- virtual bool GetValue(const std::string& key,
- const base::Value** result) const override;
- virtual void AddObserver(PrefStore::Observer* observer) override;
- virtual void RemoveObserver(PrefStore::Observer* observer) override;
- virtual bool HasObservers() const override;
+ bool GetValue(const std::string& key,
+ const base::Value** result) const override;
+ void AddObserver(PrefStore::Observer* observer) override;
+ void RemoveObserver(PrefStore::Observer* observer) override;
+ bool HasObservers() const override;
// Sets a |value| for |key|. Should only be called if a value has not been
// set yet; otherwise call ReplaceDefaultValue().
@@ -40,7 +40,7 @@
const_iterator end() const;
private:
- virtual ~DefaultPrefStore();
+ ~DefaultPrefStore() override;
PrefValueMap prefs_;
diff --git a/base/prefs/default_pref_store_unittest.cc b/base/prefs/default_pref_store_unittest.cc
index 3f28132..9299937 100644
--- a/base/prefs/default_pref_store_unittest.cc
+++ b/base/prefs/default_pref_store_unittest.cc
@@ -13,15 +13,15 @@
class MockPrefStoreObserver : public PrefStore::Observer {
public:
explicit MockPrefStoreObserver(DefaultPrefStore* pref_store);
- virtual ~MockPrefStoreObserver();
+ ~MockPrefStoreObserver() override;
int change_count() {
return change_count_;
}
// PrefStore::Observer implementation:
- virtual void OnPrefValueChanged(const std::string& key) override;
- virtual void OnInitializationCompleted(bool succeeded) override {}
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool succeeded) override {}
private:
DefaultPrefStore* pref_store_;
diff --git a/base/prefs/json_pref_store.h b/base/prefs/json_pref_store.h
index b6d0b19..16e431b 100644
--- a/base/prefs/json_pref_store.h
+++ b/base/prefs/json_pref_store.h
@@ -66,29 +66,27 @@
scoped_ptr<PrefFilter> pref_filter);
// PrefStore overrides:
- virtual bool GetValue(const std::string& key,
- const base::Value** result) const override;
- virtual void AddObserver(PrefStore::Observer* observer) override;
- virtual void RemoveObserver(PrefStore::Observer* observer) override;
- virtual bool HasObservers() const override;
- virtual bool IsInitializationComplete() const override;
+ bool GetValue(const std::string& key,
+ const base::Value** result) const override;
+ void AddObserver(PrefStore::Observer* observer) override;
+ void RemoveObserver(PrefStore::Observer* observer) override;
+ bool HasObservers() const override;
+ bool IsInitializationComplete() const override;
// PersistentPrefStore overrides:
- virtual bool GetMutableValue(const std::string& key,
- base::Value** result) override;
- virtual void SetValue(const std::string& key, base::Value* value) override;
- virtual void SetValueSilently(const std::string& key,
- base::Value* value) override;
- virtual void RemoveValue(const std::string& key) override;
- virtual bool ReadOnly() const override;
- virtual PrefReadError GetReadError() const override;
+ bool GetMutableValue(const std::string& key, base::Value** result) override;
+ void SetValue(const std::string& key, base::Value* value) override;
+ void SetValueSilently(const std::string& key, base::Value* value) override;
+ void RemoveValue(const std::string& key) override;
+ bool ReadOnly() const override;
+ PrefReadError GetReadError() const override;
// Note this method may be asynchronous if this instance has a |pref_filter_|
// in which case it will return PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE.
// See details in pref_filter.h.
- virtual PrefReadError ReadPrefs() override;
- virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
- virtual void CommitPendingWrite() override;
- virtual void ReportValueChanged(const std::string& key) override;
+ PrefReadError ReadPrefs() override;
+ void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
+ void CommitPendingWrite() override;
+ void ReportValueChanged(const std::string& key) override;
// Just like RemoveValue(), but doesn't notify observers. Used when doing some
// cleanup that shouldn't otherwise alert observers.
@@ -100,7 +98,7 @@
const base::Closure& on_next_successful_write);
private:
- virtual ~JsonPrefStore();
+ ~JsonPrefStore() override;
// This method is called after the JSON file has been read. It then hands
// |value| (or an empty dictionary in some read error cases) to the
@@ -111,7 +109,7 @@
void OnFileRead(scoped_ptr<ReadResult> read_result);
// ImportantFileWriter::DataSerializer overrides:
- virtual bool SerializeData(std::string* output) override;
+ bool SerializeData(std::string* output) override;
// This method is called after the JSON file has been read and the result has
// potentially been intercepted and modified by |pref_filter_|.
diff --git a/base/prefs/json_pref_store_unittest.cc b/base/prefs/json_pref_store_unittest.cc
index 45bf895..dc4043e 100644
--- a/base/prefs/json_pref_store_unittest.cc
+++ b/base/prefs/json_pref_store_unittest.cc
@@ -32,14 +32,14 @@
class InterceptingPrefFilter : public PrefFilter {
public:
InterceptingPrefFilter();
- virtual ~InterceptingPrefFilter();
+ ~InterceptingPrefFilter() override;
// PrefFilter implementation:
- virtual void FilterOnLoad(
+ void FilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
scoped_ptr<base::DictionaryValue> pref_store_contents) override;
- virtual void FilterUpdate(const std::string& path) override {}
- virtual void FilterSerializeData(
+ void FilterUpdate(const std::string& path) override {}
+ void FilterSerializeData(
base::DictionaryValue* pref_store_contents) override {}
bool has_intercepted_prefs() const { return intercepted_prefs_ != NULL; }
diff --git a/base/prefs/overlay_user_pref_store.h b/base/prefs/overlay_user_pref_store.h
index 0e78230..5194a7b 100644
--- a/base/prefs/overlay_user_pref_store.h
+++ b/base/prefs/overlay_user_pref_store.h
@@ -30,37 +30,35 @@
virtual bool IsSetInOverlay(const std::string& key) const;
// Methods of PrefStore.
- virtual void AddObserver(PrefStore::Observer* observer) override;
- virtual void RemoveObserver(PrefStore::Observer* observer) override;
- virtual bool HasObservers() const override;
- virtual bool IsInitializationComplete() const override;
- virtual bool GetValue(const std::string& key,
- const base::Value** result) const override;
+ void AddObserver(PrefStore::Observer* observer) override;
+ void RemoveObserver(PrefStore::Observer* observer) override;
+ bool HasObservers() const override;
+ bool IsInitializationComplete() const override;
+ bool GetValue(const std::string& key,
+ const base::Value** result) const override;
// Methods of PersistentPrefStore.
- virtual bool GetMutableValue(const std::string& key,
- base::Value** result) override;
- virtual void SetValue(const std::string& key, base::Value* value) override;
- virtual void SetValueSilently(const std::string& key,
- base::Value* value) override;
- virtual void RemoveValue(const std::string& key) override;
- virtual bool ReadOnly() const override;
- virtual PrefReadError GetReadError() const override;
- virtual PrefReadError ReadPrefs() override;
- virtual void ReadPrefsAsync(ReadErrorDelegate* delegate) override;
- virtual void CommitPendingWrite() override;
- virtual void ReportValueChanged(const std::string& key) override;
+ bool GetMutableValue(const std::string& key, base::Value** result) override;
+ void SetValue(const std::string& key, base::Value* value) override;
+ void SetValueSilently(const std::string& key, base::Value* value) override;
+ void RemoveValue(const std::string& key) override;
+ bool ReadOnly() const override;
+ PrefReadError GetReadError() const override;
+ PrefReadError ReadPrefs() override;
+ void ReadPrefsAsync(ReadErrorDelegate* delegate) override;
+ void CommitPendingWrite() override;
+ void ReportValueChanged(const std::string& key) override;
// Methods of PrefStore::Observer.
- virtual void OnPrefValueChanged(const std::string& key) override;
- virtual void OnInitializationCompleted(bool succeeded) override;
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool succeeded) override;
void RegisterOverlayPref(const std::string& key);
void RegisterOverlayPref(const std::string& overlay_key,
const std::string& underlay_key);
protected:
- virtual ~OverlayUserPrefStore();
+ ~OverlayUserPrefStore() override;
private:
typedef std::map<std::string, std::string> NamesMap;
diff --git a/base/prefs/overlay_user_pref_store_unittest.cc b/base/prefs/overlay_user_pref_store_unittest.cc
index 18e9a5c..66a7b3b 100644
--- a/base/prefs/overlay_user_pref_store_unittest.cc
+++ b/base/prefs/overlay_user_pref_store_unittest.cc
@@ -19,12 +19,12 @@
const char kBrowserWindowPlacement[] = "browser.window_placement";
const char kShowBookmarkBar[] = "bookmark_bar.show_on_all_tabs";
-const char* overlay_key = kBrowserWindowPlacement;
-const char* regular_key = kShowBookmarkBar;
+const char* const overlay_key = kBrowserWindowPlacement;
+const char* const regular_key = kShowBookmarkBar;
// With the removal of the kWebKitGlobalXXX prefs, we'll no longer have real
// prefs using the overlay pref store, so make up keys here.
-const char* mapped_overlay_key = "test.per_tab.javascript_enabled";
-const char* mapped_underlay_key = "test.per_profile.javascript_enabled";
+const char mapped_overlay_key[] = "test.per_tab.javascript_enabled";
+const char mapped_underlay_key[] = "test.per_profile.javascript_enabled";
} // namespace
diff --git a/base/prefs/persistent_pref_store.h b/base/prefs/persistent_pref_store.h
index 093ea8d..e70e2a6 100644
--- a/base/prefs/persistent_pref_store.h
+++ b/base/prefs/persistent_pref_store.h
@@ -68,7 +68,7 @@
virtual void CommitPendingWrite() = 0;
protected:
- virtual ~PersistentPrefStore() {}
+ ~PersistentPrefStore() override {}
};
#endif // BASE_PREFS_PERSISTENT_PREF_STORE_H_
diff --git a/base/prefs/pref_change_registrar.h b/base/prefs/pref_change_registrar.h
index 693d3e7..70c22fe 100644
--- a/base/prefs/pref_change_registrar.h
+++ b/base/prefs/pref_change_registrar.h
@@ -64,8 +64,8 @@
private:
// PrefObserver:
- virtual void OnPreferenceChanged(PrefService* service,
- const std::string& pref_name) override;
+ void OnPreferenceChanged(PrefService* service,
+ const std::string& pref_name) override;
static void InvokeUnnamedCallback(const base::Closure& callback,
const std::string& pref_name);
diff --git a/base/prefs/pref_member.h b/base/prefs/pref_member.h
index fc27793..a05d60e 100644
--- a/base/prefs/pref_member.h
+++ b/base/prefs/pref_member.h
@@ -116,8 +116,8 @@
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
// PrefObserver
- virtual void OnPreferenceChanged(PrefService* service,
- const std::string& pref_name) override;
+ void OnPreferenceChanged(PrefService* service,
+ const std::string& pref_name) override;
void VerifyValuePrefName() const {
DCHECK(!pref_name_.empty());
diff --git a/base/prefs/pref_notifier_impl.h b/base/prefs/pref_notifier_impl.h
index 1aa243f..3f4c254 100644
--- a/base/prefs/pref_notifier_impl.h
+++ b/base/prefs/pref_notifier_impl.h
@@ -25,7 +25,7 @@
public:
PrefNotifierImpl();
explicit PrefNotifierImpl(PrefService* pref_service);
- virtual ~PrefNotifierImpl();
+ ~PrefNotifierImpl() override;
// If the pref at the given path changes, we call the observer's
// OnPreferenceChanged method.
@@ -41,8 +41,8 @@
protected:
// PrefNotifier overrides.
- virtual void OnPreferenceChanged(const std::string& pref_name) override;
- virtual void OnInitializationCompleted(bool succeeded) override;
+ void OnPreferenceChanged(const std::string& pref_name) override;
+ void OnInitializationCompleted(bool succeeded) override;
// A map from pref names to a list of observers. Observers get fired in the
// order they are added. These should only be accessed externally for unit
diff --git a/base/prefs/pref_registry_simple.h b/base/prefs/pref_registry_simple.h
index 50b6467..41fe590 100644
--- a/base/prefs/pref_registry_simple.h
+++ b/base/prefs/pref_registry_simple.h
@@ -36,7 +36,7 @@
int64 default_value);
private:
- virtual ~PrefRegistrySimple();
+ ~PrefRegistrySimple() override;
DISALLOW_COPY_AND_ASSIGN(PrefRegistrySimple);
};
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index bc86ac1..433f814 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -28,7 +28,7 @@
ReadErrorHandler(base::Callback<void(PersistentPrefStore::PrefReadError)> cb)
: callback_(cb) {}
- virtual void OnError(PersistentPrefStore::PrefReadError error) override {
+ void OnError(PersistentPrefStore::PrefReadError error) override {
callback_.Run(error);
}
diff --git a/base/prefs/pref_store_observer_mock.h b/base/prefs/pref_store_observer_mock.h
index de7cc9d..1b24b4e 100644
--- a/base/prefs/pref_store_observer_mock.h
+++ b/base/prefs/pref_store_observer_mock.h
@@ -16,13 +16,13 @@
class PrefStoreObserverMock : public PrefStore::Observer {
public:
PrefStoreObserverMock();
- virtual ~PrefStoreObserverMock();
+ ~PrefStoreObserverMock() override;
void VerifyAndResetChangedKey(const std::string& expected);
// PrefStore::Observer implementation
- virtual void OnPrefValueChanged(const std::string& key) override;
- virtual void OnInitializationCompleted(bool success) override;
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool success) override;
std::vector<std::string> changed_keys;
bool initialized;
diff --git a/base/prefs/pref_value_store.h b/base/prefs/pref_value_store.h
index a0409ef..db82a82 100644
--- a/base/prefs/pref_value_store.h
+++ b/base/prefs/pref_value_store.h
@@ -149,7 +149,7 @@
class PrefStoreKeeper : public PrefStore::Observer {
public:
PrefStoreKeeper();
- virtual ~PrefStoreKeeper();
+ ~PrefStoreKeeper() override;
// Takes ownership of |pref_store|.
void Initialize(PrefValueStore* store,
@@ -161,8 +161,8 @@
private:
// PrefStore::Observer implementation.
- virtual void OnPrefValueChanged(const std::string& key) override;
- virtual void OnInitializationCompleted(bool succeeded) override;
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool succeeded) override;
// PrefValueStore this keeper is part of.
PrefValueStore* pref_value_store_;
diff --git a/base/prefs/testing_pref_service.h b/base/prefs/testing_pref_service.h
index a9ab937..2f6d494 100644
--- a/base/prefs/testing_pref_service.h
+++ b/base/prefs/testing_pref_service.h
@@ -84,7 +84,7 @@
: public TestingPrefServiceBase<PrefService, PrefRegistry> {
public:
TestingPrefServiceSimple();
- virtual ~TestingPrefServiceSimple();
+ ~TestingPrefServiceSimple() override;
// This is provided as a convenience for registering preferences on
// an existing TestingPrefServiceSimple instance. On a production
diff --git a/base/prefs/testing_pref_store.h b/base/prefs/testing_pref_store.h
index aa2bd80..866b4ae 100644
--- a/base/prefs/testing_pref_store.h
+++ b/base/prefs/testing_pref_store.h
@@ -21,26 +21,24 @@
TestingPrefStore();
// Overriden from PrefStore.
- virtual bool GetValue(const std::string& key,
- const base::Value** result) const override;
- virtual void AddObserver(PrefStore::Observer* observer) override;
- virtual void RemoveObserver(PrefStore::Observer* observer) override;
- virtual bool HasObservers() const override;
- virtual bool IsInitializationComplete() const override;
+ bool GetValue(const std::string& key,
+ const base::Value** result) const override;
+ void AddObserver(PrefStore::Observer* observer) override;
+ void RemoveObserver(PrefStore::Observer* observer) override;
+ bool HasObservers() const override;
+ bool IsInitializationComplete() const override;
// PersistentPrefStore overrides:
- virtual bool GetMutableValue(const std::string& key,
- base::Value** result) override;
- virtual void ReportValueChanged(const std::string& key) override;
- virtual void SetValue(const std::string& key, base::Value* value) override;
- virtual void SetValueSilently(const std::string& key,
- base::Value* value) override;
- virtual void RemoveValue(const std::string& key) override;
- virtual bool ReadOnly() const override;
- virtual PrefReadError GetReadError() const override;
- virtual PersistentPrefStore::PrefReadError ReadPrefs() override;
- virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
- virtual void CommitPendingWrite() override;
+ bool GetMutableValue(const std::string& key, base::Value** result) override;
+ void ReportValueChanged(const std::string& key) override;
+ void SetValue(const std::string& key, base::Value* value) override;
+ void SetValueSilently(const std::string& key, base::Value* value) override;
+ void RemoveValue(const std::string& key) override;
+ bool ReadOnly() const override;
+ PrefReadError GetReadError() const override;
+ PersistentPrefStore::PrefReadError ReadPrefs() override;
+ void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
+ void CommitPendingWrite() override;
// Marks the store as having completed initialization.
void SetInitializationCompleted();
@@ -72,7 +70,7 @@
bool committed() { return committed_; }
protected:
- virtual ~TestingPrefStore();
+ ~TestingPrefStore() override;
private:
// Stores the preference values.
diff --git a/base/prefs/value_map_pref_store.h b/base/prefs/value_map_pref_store.h
index d90d0c0..8c515ed 100644
--- a/base/prefs/value_map_pref_store.h
+++ b/base/prefs/value_map_pref_store.h
@@ -21,23 +21,21 @@
ValueMapPrefStore();
// PrefStore overrides:
- virtual bool GetValue(const std::string& key,
- const base::Value** value) const override;
- virtual void AddObserver(PrefStore::Observer* observer) override;
- virtual void RemoveObserver(PrefStore::Observer* observer) override;
- virtual bool HasObservers() const override;
+ bool GetValue(const std::string& key,
+ const base::Value** value) const override;
+ void AddObserver(PrefStore::Observer* observer) override;
+ void RemoveObserver(PrefStore::Observer* observer) override;
+ bool HasObservers() const override;
// WriteablePrefStore overrides:
- virtual void SetValue(const std::string& key, base::Value* value) override;
- virtual void RemoveValue(const std::string& key) override;
- virtual bool GetMutableValue(const std::string& key,
- base::Value** value) override;
- virtual void ReportValueChanged(const std::string& key) override;
- virtual void SetValueSilently(const std::string& key,
- base::Value* value) override;
+ void SetValue(const std::string& key, base::Value* value) override;
+ void RemoveValue(const std::string& key) override;
+ bool GetMutableValue(const std::string& key, base::Value** value) override;
+ void ReportValueChanged(const std::string& key) override;
+ void SetValueSilently(const std::string& key, base::Value* value) override;
protected:
- virtual ~ValueMapPrefStore();
+ ~ValueMapPrefStore() override;
// Notify observers about the initialization completed event.
void NotifyInitializationCompleted();
diff --git a/base/prefs/writeable_pref_store.h b/base/prefs/writeable_pref_store.h
index d320dcf..5ebab64 100644
--- a/base/prefs/writeable_pref_store.h
+++ b/base/prefs/writeable_pref_store.h
@@ -43,7 +43,7 @@
virtual void SetValueSilently(const std::string& key, base::Value* value) = 0;
protected:
- virtual ~WriteablePrefStore() {}
+ ~WriteablePrefStore() override {}
private:
DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore);
diff --git a/base/process/process_iterator.h b/base/process/process_iterator.h
index 185965a..bdd07c6 100644
--- a/base/process/process_iterator.h
+++ b/base/process/process_iterator.h
@@ -163,10 +163,10 @@
public:
NamedProcessIterator(const FilePath::StringType& executable_name,
const ProcessFilter* filter);
- virtual ~NamedProcessIterator();
+ ~NamedProcessIterator() override;
protected:
- virtual bool IncludeEntry() override;
+ bool IncludeEntry() override;
private:
FilePath::StringType executable_name_;
diff --git a/base/sequenced_task_runner.h b/base/sequenced_task_runner.h
index f6ca646..71dcf05 100644
--- a/base/sequenced_task_runner.h
+++ b/base/sequenced_task_runner.h
@@ -139,7 +139,7 @@
}
protected:
- virtual ~SequencedTaskRunner() {}
+ ~SequencedTaskRunner() override {}
private:
template <class T, class R> friend class subtle::DeleteHelperInternal;
diff --git a/base/single_thread_task_runner.h b/base/single_thread_task_runner.h
index e82941a..b5311db 100644
--- a/base/single_thread_task_runner.h
+++ b/base/single_thread_task_runner.h
@@ -29,7 +29,7 @@
}
protected:
- virtual ~SingleThreadTaskRunner() {}
+ ~SingleThreadTaskRunner() override {}
};
} // namespace base
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index a3e8992..f29baac 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -461,7 +461,7 @@
}
TEST(StringUtilTest, ConvertASCII) {
- static const char* char_cases[] = {
+ static const char* const char_cases[] = {
"Google Video",
"Hello, world\n",
"0123ABCDwxyz \a\b\t\r\n!+,.~"
@@ -566,7 +566,7 @@
{99LL*1024*1024*1024, "99.0 GB"},
{105LL*1024*1024*1024, "105 GB"},
{105LL*1024*1024*1024 + 500LL*1024*1024, "105 GB"},
- {~(1LL<<63), "8192 PB"},
+ {~(1LL << 63), "8192 PB"},
{99*1024 + 103, "99.1 kB"},
{1024*1024 + 103, "1.0 MB"},
@@ -1153,7 +1153,7 @@
}
TEST(StringUtilTest, RemoveChars) {
- const char* kRemoveChars = "-/+*";
+ const char kRemoveChars[] = "-/+*";
std::string input = "A-+bc/d!*";
EXPECT_TRUE(RemoveChars(input, kRemoveChars, &input));
EXPECT_EQ("Abcd!", input);
diff --git a/base/strings/stringprintf_unittest.cc b/base/strings/stringprintf_unittest.cc
index a1bf2da..4935b55 100644
--- a/base/strings/stringprintf_unittest.cc
+++ b/base/strings/stringprintf_unittest.cc
@@ -106,7 +106,7 @@
src[i] = 'A';
src[1025] = 0;
- const char* fmt = "%sB%sB%sB%sB%sB%sB%s";
+ const char fmt[] = "%sB%sB%sB%sB%sB%sB%s";
std::string out;
SStringPrintf(&out, fmt, src, src, src, src, src, src, src);
@@ -132,14 +132,15 @@
// Test the boundary condition for the size of the string_util's
// internal buffer.
TEST(StringPrintfTest, GrowBoundary) {
- const int string_util_buf_len = 1024;
+ const int kStringUtilBufLen = 1024;
// Our buffer should be one larger than the size of StringAppendVT's stack
// buffer.
- const int buf_len = string_util_buf_len + 1;
- char src[buf_len + 1]; // Need extra one for NULL-terminator.
- for (int i = 0; i < buf_len; ++i)
+ // And need extra one for NULL-terminator.
+ const int kBufLen = kStringUtilBufLen + 1 + 1;
+ char src[kBufLen];
+ for (int i = 0; i < kBufLen - 1; ++i)
src[i] = 'a';
- src[buf_len] = 0;
+ src[kBufLen - 1] = 0;
std::string out;
SStringPrintf(&out, "%s", src);
diff --git a/base/supports_user_data_unittest.cc b/base/supports_user_data_unittest.cc
index f6afc37..faa8140 100644
--- a/base/supports_user_data_unittest.cc
+++ b/base/supports_user_data_unittest.cc
@@ -19,7 +19,7 @@
key_(key) {
}
- virtual ~UsesItself() {
+ ~UsesItself() override {
EXPECT_EQ(NULL, supports_user_data_->GetUserData(key_));
}
diff --git a/base/sync_socket.h b/base/sync_socket.h
index b8d947e..4da9d3b 100644
--- a/base/sync_socket.h
+++ b/base/sync_socket.h
@@ -106,7 +106,7 @@
public:
CancelableSyncSocket();
explicit CancelableSyncSocket(Handle handle);
- virtual ~CancelableSyncSocket() {}
+ ~CancelableSyncSocket() override {}
// Initializes a pair of cancelable sockets. See documentation for
// SyncSocket::CreatePair for more details.
@@ -136,7 +136,7 @@
// implementation of Send() will not block indefinitely as
// SyncSocket::Send will, but instead return 0, as no bytes could be sent.
// Note that the socket will not be closed in this case.
- virtual size_t Send(const void* buffer, size_t length) override;
+ size_t Send(const void* buffer, size_t length) override;
private:
#if defined(OS_WIN)
diff --git a/base/sync_socket_unittest.cc b/base/sync_socket_unittest.cc
index ddd2fcc..7c8c97c 100644
--- a/base/sync_socket_unittest.cc
+++ b/base/sync_socket_unittest.cc
@@ -20,9 +20,9 @@
thread_.Start();
}
- virtual ~HangingReceiveThread() {}
+ ~HangingReceiveThread() override {}
- virtual void Run() override {
+ void Run() override {
int data = 0;
ASSERT_EQ(socket_->Peek(), 0u);
diff --git a/base/synchronization/condition_variable_unittest.cc b/base/synchronization/condition_variable_unittest.cc
index 4232734..5d7a0ab 100644
--- a/base/synchronization/condition_variable_unittest.cc
+++ b/base/synchronization/condition_variable_unittest.cc
@@ -64,10 +64,10 @@
class WorkQueue : public PlatformThread::Delegate {
public:
explicit WorkQueue(int thread_count);
- virtual ~WorkQueue();
+ ~WorkQueue() override;
// PlatformThread::Delegate interface.
- virtual void ThreadMain() override;
+ 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 60f4250..967efb8 100644
--- a/base/synchronization/lock_unittest.cc
+++ b/base/synchronization/lock_unittest.cc
@@ -18,7 +18,7 @@
public:
explicit BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {}
- virtual void ThreadMain() override {
+ void ThreadMain() override {
for (int i = 0; i < 10; i++) {
lock_->Acquire();
acquired_++;
@@ -93,7 +93,7 @@
public:
explicit TryLockTestThread(Lock* lock) : lock_(lock), got_lock_(false) {}
- virtual void ThreadMain() override {
+ void ThreadMain() override {
got_lock_ = lock_->Try();
if (got_lock_)
lock_->Release();
@@ -162,9 +162,7 @@
}
}
- virtual void ThreadMain() override {
- DoStuff(lock_, value_);
- }
+ void ThreadMain() override { DoStuff(lock_, value_); }
private:
Lock* lock_;
diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc
index f34b2a4..696ffc7 100644
--- a/base/synchronization/waitable_event_posix.cc
+++ b/base/synchronization/waitable_event_posix.cc
@@ -91,7 +91,7 @@
cv_(&lock_) {
}
- virtual bool Fire(WaitableEvent* signaling_event) override {
+ bool Fire(WaitableEvent* signaling_event) override {
base::AutoLock locked(lock_);
if (fired_)
@@ -117,9 +117,7 @@
// 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.
// ---------------------------------------------------------------------------
- virtual bool Compare(void* tag) override {
- return this == tag;
- }
+ bool Compare(void* tag) override { return this == tag; }
// ---------------------------------------------------------------------------
// Called with lock held.
diff --git a/base/synchronization/waitable_event_unittest.cc b/base/synchronization/waitable_event_unittest.cc
index a8913fd..abba935 100644
--- a/base/synchronization/waitable_event_unittest.cc
+++ b/base/synchronization/waitable_event_unittest.cc
@@ -78,7 +78,7 @@
ev_(ev) {
}
- virtual void ThreadMain() override {
+ void ThreadMain() override {
PlatformThread::Sleep(TimeDelta::FromSecondsD(seconds_));
ev_->Signal();
}
diff --git a/base/synchronization/waitable_event_watcher.h b/base/synchronization/waitable_event_watcher.h
index 4d2f9b5..d4d8e77 100644
--- a/base/synchronization/waitable_event_watcher.h
+++ b/base/synchronization/waitable_event_watcher.h
@@ -67,7 +67,7 @@
public:
typedef Callback<void(WaitableEvent*)> EventCallback;
WaitableEventWatcher();
- virtual ~WaitableEventWatcher();
+ ~WaitableEventWatcher() override;
// When @event is signaled, the given callback is called on the thread of the
// current message loop when StartWatching is called.
@@ -96,7 +96,7 @@
win::ObjectWatcher watcher_;
#else
// Implementation of MessageLoop::DestructionObserver
- virtual void WillDestroyCurrentMessageLoop() override;
+ void WillDestroyCurrentMessageLoop() override;
MessageLoop* message_loop_;
scoped_refptr<Flag> cancel_flag_;
diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc
index e791871..6fc337c 100644
--- a/base/synchronization/waitable_event_watcher_posix.cc
+++ b/base/synchronization/waitable_event_watcher_posix.cc
@@ -65,7 +65,7 @@
callback_(callback),
flag_(flag) { }
- virtual bool Fire(WaitableEvent* event) override {
+ bool Fire(WaitableEvent* event) override {
// Post the callback if we haven't been cancelled.
if (!flag_->value()) {
message_loop_->PostTask(FROM_HERE, callback_);
@@ -81,9 +81,7 @@
}
// See StopWatching for discussion
- virtual bool Compare(void* tag) override {
- return tag == flag_.get();
- }
+ bool Compare(void* tag) override { return tag == flag_.get(); }
private:
MessageLoop *const message_loop_;
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index d3a1b2c..ef5f1fe 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -21,7 +21,7 @@
namespace {
-const char* kLinuxStandardBaseVersionKeys[] = {
+const char* const kLinuxStandardBaseVersionKeys[] = {
"CHROMEOS_RELEASE_VERSION",
"GOOGLE_RELEASE",
"DISTRIB_RELEASE",
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index bfd8224..29409ee 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -71,7 +71,7 @@
int32 os_major_version = -1;
int32 os_minor_version = -1;
int32 os_bugfix_version = -1;
- const char* kLsbRelease =
+ const char kLsbRelease[] =
"FOO=1234123.34.5\n"
"CHROMEOS_RELEASE_VERSION=1.2.3.4\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
@@ -87,7 +87,7 @@
int32 os_major_version = -1;
int32 os_minor_version = -1;
int32 os_bugfix_version = -1;
- const char* kLsbRelease =
+ const char kLsbRelease[] =
"CHROMEOS_RELEASE_VERSION=1.2.3.4\n"
"FOO=1234123.34.5\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
@@ -103,7 +103,7 @@
int32 os_major_version = -1;
int32 os_minor_version = -1;
int32 os_bugfix_version = -1;
- const char* kLsbRelease = "FOO=1234123.34.5\n";
+ const char kLsbRelease[] = "FOO=1234123.34.5\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
&os_minor_version,
@@ -114,7 +114,7 @@
}
TEST_F(SysInfoTest, GoogleChromeOSLsbReleaseTime) {
- const char* kLsbRelease = "CHROMEOS_RELEASE_VERSION=1.2.3.4";
+ const char kLsbRelease[] = "CHROMEOS_RELEASE_VERSION=1.2.3.4";
// Use a fake time that can be safely displayed as a string.
const base::Time lsb_release_time(base::Time::FromDoubleT(12345.6));
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, lsb_release_time);
@@ -127,19 +127,19 @@
base::SysInfo::SetChromeOSVersionInfoForTest("", base::Time());
EXPECT_FALSE(base::SysInfo::IsRunningOnChromeOS());
- const char* kLsbRelease1 =
+ const char kLsbRelease1[] =
"CHROMEOS_RELEASE_NAME=Non Chrome OS\n"
"CHROMEOS_RELEASE_VERSION=1.2.3.4\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease1, base::Time());
EXPECT_FALSE(base::SysInfo::IsRunningOnChromeOS());
- const char* kLsbRelease2 =
+ const char kLsbRelease2[] =
"CHROMEOS_RELEASE_NAME=Chrome OS\n"
"CHROMEOS_RELEASE_VERSION=1.2.3.4\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease2, base::Time());
EXPECT_TRUE(base::SysInfo::IsRunningOnChromeOS());
- const char* kLsbRelease3 =
+ const char kLsbRelease3[] =
"CHROMEOS_RELEASE_NAME=Chromium OS\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease3, base::Time());
EXPECT_TRUE(base::SysInfo::IsRunningOnChromeOS());
diff --git a/base/task_runner.cc b/base/task_runner.cc
index f2c64f3..262e1f8 100644
--- a/base/task_runner.cc
+++ b/base/task_runner.cc
@@ -20,8 +20,8 @@
explicit PostTaskAndReplyTaskRunner(TaskRunner* destination);
private:
- virtual bool PostTask(const tracked_objects::Location& from_here,
- const Closure& task) override;
+ bool PostTask(const tracked_objects::Location& from_here,
+ const Closure& task) override;
// Non-owning.
TaskRunner* destination_;
diff --git a/base/test/expectations/expectation_unittest.cc b/base/test/expectations/expectation_unittest.cc
index 8a7af71..c0f55a1 100644
--- a/base/test/expectations/expectation_unittest.cc
+++ b/base/test/expectations/expectation_unittest.cc
@@ -71,7 +71,7 @@
}
TEST(TestExpectationsFunctionsTest, IsValidPlatform) {
- const char* kValidPlatforms[] = {
+ const char* const kValidPlatforms[] = {
"Win",
"Win-XP",
"Win-Vista",
@@ -89,7 +89,7 @@
"Android",
};
- const char* kInvalidPlatforms[] = {
+ const char* const kInvalidPlatforms[] = {
"Solaris",
"Plan9",
};
diff --git a/base/test/expectations/parser_unittest.cc b/base/test/expectations/parser_unittest.cc
index a456458..074d634 100644
--- a/base/test/expectations/parser_unittest.cc
+++ b/base/test/expectations/parser_unittest.cc
@@ -15,16 +15,16 @@
class TestExpectationParserTest : public testing::Test,
public Parser::Delegate {
public:
- virtual void EmitExpectation(
+ void EmitExpectation(
const test_expectations::Expectation& expectation) override {
expectations_.push_back(expectation);
}
- virtual void OnSyntaxError(const std::string& message) override {
+ void OnSyntaxError(const std::string& message) override {
syntax_error_ = message;
}
- virtual void OnDataError(const std::string& error) override {
+ void OnDataError(const std::string& error) override {
data_errors_.push_back(error);
}
@@ -161,7 +161,7 @@
}
TEST_F(TestExpectationParserTest, SyntaxErrors) {
- const char* kErrors[] = {
+ const char* const kErrors[] = {
"Foo [ dfasd",
"Foo [Linux] # This is an illegal comment",
"Foo [Linux] Bar # Another illegal comment.",
@@ -184,7 +184,7 @@
}
TEST_F(TestExpectationParserTest, DataErrors) {
- const char* kOneError[] = {
+ const char* const kOneError[] = {
"http://crbug.com/1234 [MagicBrowzR] BadModifier = Timeout",
"________ [Linux] BadResult = WhatNow",
"http://wkb.ug/1234 [Debug Release Win-7] MultipleConfigs = Skip",
@@ -196,7 +196,7 @@
data_errors_.clear();
}
- const char* kTwoErrors[] = {
+ const char* const kTwoErrors[] = {
". [Mac-TurningIntoiOS] BadModifierVariant.BadResult = Foobar",
"1234 [ Debug Release OS/2 ] MultipleConfigs.BadModifier = Pass",
};
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index eab51f4..c0ae6a9 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -142,7 +142,7 @@
SignalFDWatcher() {
}
- virtual void OnFileCanReadWithoutBlocking(int fd) override {
+ void OnFileCanReadWithoutBlocking(int fd) override {
fprintf(stdout, "\nCaught signal. Killing spawned test processes...\n");
fflush(stdout);
@@ -152,9 +152,7 @@
exit(1);
}
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {
- NOTREACHED();
- }
+ void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
private:
DISALLOW_COPY_AND_ASSIGN(SignalFDWatcher);
diff --git a/base/test/launcher/unit_test_launcher.cc b/base/test/launcher/unit_test_launcher.cc
index d6aeef8..44846a1 100644
--- a/base/test/launcher/unit_test_launcher.cc
+++ b/base/test/launcher/unit_test_launcher.cc
@@ -107,7 +107,7 @@
use_job_objects_(use_job_objects) {
}
- virtual ~UnitTestLauncherDelegate() {
+ ~UnitTestLauncherDelegate() override {
DCHECK(thread_checker_.CalledOnValidThread());
}
@@ -118,16 +118,16 @@
FilePath output_file;
};
- virtual bool ShouldRunTest(const testing::TestCase* test_case,
- const testing::TestInfo* test_info) override {
+ bool ShouldRunTest(const testing::TestCase* test_case,
+ const testing::TestInfo* test_info) override {
DCHECK(thread_checker_.CalledOnValidThread());
// There is no additional logic to disable specific tests.
return true;
}
- virtual size_t RunTests(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) override {
+ size_t RunTests(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) override {
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<std::string> batch;
@@ -145,9 +145,8 @@
return test_names.size();
}
- virtual size_t RetryTests(
- TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) override {
+ size_t RetryTests(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) override {
MessageLoop::current()->PostTask(
FROM_HERE,
Bind(&UnitTestLauncherDelegate::RunSerially,
diff --git a/base/test/null_task_runner.h b/base/test/null_task_runner.h
index 9515733..2cde880 100644
--- a/base/test/null_task_runner.h
+++ b/base/test/null_task_runner.h
@@ -15,18 +15,17 @@
public:
NullTaskRunner();
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
// Always returns true to avoid triggering DCHECKs.
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool RunsTasksOnCurrentThread() const override;
protected:
- virtual ~NullTaskRunner();
+ ~NullTaskRunner() override;
DISALLOW_COPY_AND_ASSIGN(NullTaskRunner);
};
diff --git a/base/test/perf_test_suite.h b/base/test/perf_test_suite.h
index df8162b..52528f0 100644
--- a/base/test/perf_test_suite.h
+++ b/base/test/perf_test_suite.h
@@ -13,8 +13,8 @@
public:
PerfTestSuite(int argc, char** argv);
- virtual void Initialize() override;
- virtual void Shutdown() override;
+ void Initialize() override;
+ void Shutdown() override;
};
} // namespace base
diff --git a/base/test/power_monitor_test_base.h b/base/test/power_monitor_test_base.h
index 4aaafb9..4655eae 100644
--- a/base/test/power_monitor_test_base.h
+++ b/base/test/power_monitor_test_base.h
@@ -14,14 +14,14 @@
class PowerMonitorTestSource : public PowerMonitorSource {
public:
PowerMonitorTestSource();
- virtual ~PowerMonitorTestSource();
+ ~PowerMonitorTestSource() override;
void GeneratePowerStateEvent(bool on_battery_power);
void GenerateSuspendEvent();
void GenerateResumeEvent();
protected:
- virtual bool IsOnBatteryPowerImpl() override;
+ bool IsOnBatteryPowerImpl() override;
bool test_on_battery_power_;
MessageLoop message_loop_;
@@ -30,12 +30,12 @@
class PowerMonitorTestObserver : public PowerObserver {
public:
PowerMonitorTestObserver();
- virtual ~PowerMonitorTestObserver();
+ ~PowerMonitorTestObserver() override;
// PowerObserver callbacks.
- virtual void OnPowerStateChange(bool on_battery_power) override;
- virtual void OnSuspend() override;
- virtual void OnResume() override;
+ void OnPowerStateChange(bool on_battery_power) override;
+ void OnSuspend() override;
+ void OnResume() override;
// Test status counts.
bool last_power_state() { return last_power_state_; }
diff --git a/base/test/sequenced_worker_pool_owner.h b/base/test/sequenced_worker_pool_owner.h
index f6f0bb2..b52dd67 100644
--- a/base/test/sequenced_worker_pool_owner.h
+++ b/base/test/sequenced_worker_pool_owner.h
@@ -30,7 +30,7 @@
SequencedWorkerPoolOwner(size_t max_threads,
const std::string& thread_name_prefix);
- virtual ~SequencedWorkerPoolOwner();
+ ~SequencedWorkerPoolOwner() override;
// Don't change the returned pool's testing observer.
const scoped_refptr<SequencedWorkerPool>& pool();
@@ -42,9 +42,9 @@
private:
// SequencedWorkerPool::TestingObserver implementation.
- virtual void OnHasWork() override;
- virtual void WillWaitForShutdown() override;
- virtual void OnDestruct() override;
+ void OnHasWork() override;
+ void WillWaitForShutdown() override;
+ void OnDestruct() override;
MessageLoop* const constructor_message_loop_;
scoped_refptr<SequencedWorkerPool> pool_;
diff --git a/base/test/simple_test_clock.h b/base/test/simple_test_clock.h
index a49cc53..e8a79c5 100644
--- a/base/test/simple_test_clock.h
+++ b/base/test/simple_test_clock.h
@@ -19,9 +19,9 @@
public:
// Starts off with a clock set to Time().
SimpleTestClock();
- virtual ~SimpleTestClock();
+ ~SimpleTestClock() override;
- virtual Time Now() override;
+ Time Now() override;
// Advances the clock by |delta|.
void Advance(TimeDelta delta);
diff --git a/base/test/simple_test_tick_clock.h b/base/test/simple_test_tick_clock.h
index c67eb55..a637543 100644
--- a/base/test/simple_test_tick_clock.h
+++ b/base/test/simple_test_tick_clock.h
@@ -19,9 +19,9 @@
public:
// Starts off with a clock set to TimeTicks().
SimpleTestTickClock();
- virtual ~SimpleTestTickClock();
+ ~SimpleTestTickClock() override;
- virtual TimeTicks NowTicks() override;
+ TimeTicks NowTicks() override;
// Advances the clock by |delta|, which must not be negative.
void Advance(TimeDelta delta);
diff --git a/base/test/test_simple_task_runner.h b/base/test/test_simple_task_runner.h
index 56a1894..7481b6d 100644
--- a/base/test/test_simple_task_runner.h
+++ b/base/test/test_simple_task_runner.h
@@ -47,15 +47,14 @@
TestSimpleTaskRunner();
// SingleThreadTaskRunner implementation.
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool RunsTasksOnCurrentThread() const override;
const std::deque<TestPendingTask>& GetPendingTasks() const;
bool HasPendingTask() const;
@@ -72,7 +71,7 @@
void RunUntilIdle();
protected:
- virtual ~TestSimpleTaskRunner();
+ ~TestSimpleTaskRunner() override;
std::deque<TestPendingTask> pending_tasks_;
ThreadChecker thread_checker_;
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index 5604508..0edeb14 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -86,7 +86,7 @@
int int_num = 2;
double double_num = 3.5;
- const char* str = "the string";
+ const char str[] = "the string";
TraceEvent event;
event.arg_numbers["false"] = 0.0;
@@ -508,7 +508,7 @@
TEST_F(TraceEventAnalyzerTest, MergeAssociatedEventArgs) {
ManualSetUp();
- const char* arg_string = "arg_string";
+ const char arg_string[] = "arg_string";
BeginTracing();
{
TRACE_EVENT_BEGIN0("cat1", "name1");
diff --git a/base/threading/non_thread_safe_unittest.cc b/base/threading/non_thread_safe_unittest.cc
index 2bd7629..955c939 100644
--- a/base/threading/non_thread_safe_unittest.cc
+++ b/base/threading/non_thread_safe_unittest.cc
@@ -52,9 +52,7 @@
non_thread_safe_class_(non_thread_safe_class) {
}
- virtual void Run() override {
- non_thread_safe_class_->DoStuff();
- }
+ void Run() override { non_thread_safe_class_->DoStuff(); }
private:
NonThreadSafeClass* non_thread_safe_class_;
@@ -71,9 +69,7 @@
non_thread_safe_class_(non_thread_safe_class) {
}
- virtual void Run() override {
- non_thread_safe_class_.reset();
- }
+ void Run() override { non_thread_safe_class_.reset(); }
private:
scoped_ptr<NonThreadSafeClass> non_thread_safe_class_;
diff --git a/base/threading/platform_thread_unittest.cc b/base/threading/platform_thread_unittest.cc
index 6859692..21260e5 100644
--- a/base/threading/platform_thread_unittest.cc
+++ b/base/threading/platform_thread_unittest.cc
@@ -15,9 +15,7 @@
public:
TrivialThread() : did_run_(false) {}
- virtual void ThreadMain() override {
- did_run_ = true;
- }
+ void ThreadMain() override { did_run_ = true; }
bool did_run() const { return did_run_; }
@@ -57,7 +55,7 @@
public:
FunctionTestThread() : thread_id_(0) {}
- virtual void ThreadMain() override {
+ void ThreadMain() override {
thread_id_ = PlatformThread::CurrentId();
PlatformThread::YieldCurrentThread();
PlatformThread::Sleep(TimeDelta::FromMilliseconds(50));
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index b0256c3..08ef5f0 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -98,13 +98,13 @@
SequencedWorkerPool::WorkerShutdown shutdown_behavior);
// TaskRunner implementation
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
private:
- virtual ~SequencedWorkerPoolTaskRunner();
+ ~SequencedWorkerPoolTaskRunner() override;
const scoped_refptr<SequencedWorkerPool> pool_;
@@ -151,19 +151,18 @@
SequencedWorkerPool::WorkerShutdown shutdown_behavior);
// TaskRunner implementation
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
// SequencedTaskRunner implementation
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
private:
- virtual ~SequencedWorkerPoolSequencedTaskRunner();
+ ~SequencedWorkerPoolSequencedTaskRunner() override;
const scoped_refptr<SequencedWorkerPool> pool_;
@@ -235,10 +234,10 @@
Worker(const scoped_refptr<SequencedWorkerPool>& worker_pool,
int thread_number,
const std::string& thread_name_prefix);
- virtual ~Worker();
+ ~Worker() override;
// SimpleThread implementation. This actually runs the background thread.
- virtual void Run() override;
+ void Run() override;
void set_running_task_info(SequenceToken token,
WorkerShutdown shutdown_behavior) {
diff --git a/base/threading/sequenced_worker_pool.h b/base/threading/sequenced_worker_pool.h
index 4b1c749..63c6204 100644
--- a/base/threading/sequenced_worker_pool.h
+++ b/base/threading/sequenced_worker_pool.h
@@ -290,10 +290,10 @@
WorkerShutdown shutdown_behavior);
// TaskRunner implementation. Forwards to PostDelayedWorkerTask().
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
// Returns true if the current thread is processing a task with the given
// sequence_token.
@@ -336,9 +336,9 @@
bool IsShutdownInProgress();
protected:
- virtual ~SequencedWorkerPool();
+ ~SequencedWorkerPool() override;
- virtual void OnDestruct() const override;
+ void OnDestruct() const override;
private:
friend class RefCountedThreadSafe<SequencedWorkerPool>;
diff --git a/base/threading/simple_thread.h b/base/threading/simple_thread.h
index e734c29..ecd3604 100644
--- a/base/threading/simple_thread.h
+++ b/base/threading/simple_thread.h
@@ -78,7 +78,7 @@
explicit SimpleThread(const std::string& name_prefix);
SimpleThread(const std::string& name_prefix, const Options& options);
- virtual ~SimpleThread();
+ ~SimpleThread() override;
virtual void Start();
virtual void Join();
@@ -102,7 +102,7 @@
bool HasBeenJoined() { return joined_; }
// Overridden from PlatformThread::Delegate:
- virtual void ThreadMain() override;
+ void ThreadMain() override;
// Only set priorities with a careful understanding of the consequences.
// This is meant for very limited use cases.
@@ -135,8 +135,9 @@
const std::string& name_prefix,
const Options& options);
- virtual ~DelegateSimpleThread();
- virtual void Run() override;
+ ~DelegateSimpleThread() override;
+ void Run() override;
+
private:
Delegate* delegate_;
};
@@ -156,7 +157,7 @@
typedef DelegateSimpleThread::Delegate Delegate;
DelegateSimpleThreadPool(const std::string& name_prefix, int num_threads);
- virtual ~DelegateSimpleThreadPool();
+ ~DelegateSimpleThreadPool() override;
// Start up all of the underlying threads, and start processing work if we
// have any.
@@ -174,7 +175,7 @@
}
// We implement the Delegate interface, for running our internal threads.
- virtual void Run() override;
+ void Run() override;
private:
const std::string name_prefix_;
diff --git a/base/threading/simple_thread_unittest.cc b/base/threading/simple_thread_unittest.cc
index 89ddeba..7229d36 100644
--- a/base/threading/simple_thread_unittest.cc
+++ b/base/threading/simple_thread_unittest.cc
@@ -15,11 +15,9 @@
class SetIntRunner : public DelegateSimpleThread::Delegate {
public:
SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { }
- virtual ~SetIntRunner() { }
+ ~SetIntRunner() override {}
- virtual void Run() override {
- *ptr_ = val_;
- }
+ void Run() override { *ptr_ = val_; }
private:
int* ptr_;
@@ -29,9 +27,9 @@
class WaitEventRunner : public DelegateSimpleThread::Delegate {
public:
explicit WaitEventRunner(WaitableEvent* event) : event_(event) { }
- virtual ~WaitEventRunner() { }
+ ~WaitEventRunner() override {}
- virtual void Run() override {
+ void Run() override {
EXPECT_FALSE(event_->IsSignaled());
event_->Signal();
EXPECT_TRUE(event_->IsSignaled());
@@ -43,9 +41,7 @@
class SeqRunner : public DelegateSimpleThread::Delegate {
public:
explicit SeqRunner(AtomicSequenceNumber* seq) : seq_(seq) { }
- virtual void Run() override {
- seq_->GetNext();
- }
+ void Run() override { seq_->GetNext(); }
private:
AtomicSequenceNumber* seq_;
@@ -60,7 +56,7 @@
int total, WaitableEvent* event)
: seq_(seq), total_(total), event_(event) { }
- virtual void Run() override {
+ void Run() override {
if (seq_->GetNext() == total_) {
event_->Signal();
} else {
diff --git a/base/threading/thread.h b/base/threading/thread.h
index 464a965..5010f0e 100644
--- a/base/threading/thread.h
+++ b/base/threading/thread.h
@@ -72,7 +72,7 @@
// vtable, and the thread's ThreadMain calling the virtual method Run(). It
// also ensures that the CleanUp() virtual method is called on the subclass
// before it is destructed.
- virtual ~Thread();
+ ~Thread() override;
#if defined(OS_WIN)
// Causes the thread to initialize COM. This must be called before calling
@@ -201,7 +201,7 @@
#endif
// PlatformThread::Delegate methods:
- virtual void ThreadMain() override;
+ void ThreadMain() override;
#if defined(OS_WIN)
// Whether this thread needs to initialize COM, and if so, in what mode.
diff --git a/base/threading/thread_checker_unittest.cc b/base/threading/thread_checker_unittest.cc
index 1084dd9..d42cbc2 100644
--- a/base/threading/thread_checker_unittest.cc
+++ b/base/threading/thread_checker_unittest.cc
@@ -52,9 +52,7 @@
thread_checker_class_(thread_checker_class) {
}
- virtual void Run() override {
- thread_checker_class_->DoStuff();
- }
+ void Run() override { thread_checker_class_->DoStuff(); }
private:
ThreadCheckerClass* thread_checker_class_;
@@ -71,9 +69,7 @@
thread_checker_class_(thread_checker_class) {
}
- virtual void Run() override {
- thread_checker_class_.reset();
- }
+ void Run() override { thread_checker_class_.reset(); }
private:
scoped_ptr<ThreadCheckerClass> thread_checker_class_;
diff --git a/base/threading/thread_collision_warner.h b/base/threading/thread_collision_warner.h
index 0523c91..de4e9c3 100644
--- a/base/threading/thread_collision_warner.h
+++ b/base/threading/thread_collision_warner.h
@@ -138,8 +138,8 @@
};
struct BASE_EXPORT DCheckAsserter : public AsserterBase {
- virtual ~DCheckAsserter() {}
- virtual void warn() override;
+ ~DCheckAsserter() override {}
+ void warn() override;
};
class BASE_EXPORT ThreadCollisionWarner {
diff --git a/base/threading/thread_collision_warner_unittest.cc b/base/threading/thread_collision_warner_unittest.cc
index c7c7d0a..26faff4 100644
--- a/base/threading/thread_collision_warner_unittest.cc
+++ b/base/threading/thread_collision_warner_unittest.cc
@@ -41,11 +41,9 @@
AssertReporter()
: failed_(false) {}
- virtual void warn() override {
- failed_ = true;
- }
+ void warn() override { failed_ = true; }
- virtual ~AssertReporter() {}
+ ~AssertReporter() override {}
bool fail_state() const { return failed_; }
void reset() { failed_ = false; }
@@ -151,7 +149,7 @@
explicit QueueUser(NonThreadSafeQueue& queue)
: queue_(queue) {}
- virtual void Run() override {
+ void Run() override {
queue_.push(0);
queue_.pop();
}
@@ -209,7 +207,7 @@
explicit QueueUser(NonThreadSafeQueue& queue)
: queue_(queue) {}
- virtual void Run() override {
+ void Run() override {
queue_.push(0);
queue_.pop();
}
@@ -270,7 +268,7 @@
: queue_(queue),
lock_(lock) {}
- virtual void Run() override {
+ void Run() override {
{
base::AutoLock auto_lock(lock_);
queue_.push(0);
@@ -344,7 +342,7 @@
: queue_(queue),
lock_(lock) {}
- virtual void Run() override {
+ void Run() override {
{
base::AutoLock auto_lock(lock_);
queue_.push(0);
diff --git a/base/threading/thread_id_name_manager_unittest.cc b/base/threading/thread_id_name_manager_unittest.cc
index 3777301..b5953d5 100644
--- a/base/threading/thread_id_name_manager_unittest.cc
+++ b/base/threading/thread_id_name_manager_unittest.cc
@@ -13,8 +13,8 @@
namespace {
-static const char* kAThread = "a thread";
-static const char* kBThread = "b thread";
+const char kAThread[] = "a thread";
+const char kBThread[] = "b thread";
TEST_F(ThreadIdNameManagerTest, AddThreads) {
base::ThreadIdNameManager* manager = base::ThreadIdNameManager::GetInstance();
diff --git a/base/threading/thread_local_storage_unittest.cc b/base/threading/thread_local_storage_unittest.cc
index 321a058..b53f577 100644
--- a/base/threading/thread_local_storage_unittest.cc
+++ b/base/threading/thread_local_storage_unittest.cc
@@ -33,9 +33,9 @@
explicit ThreadLocalStorageRunner(int* tls_value_ptr)
: tls_value_ptr_(tls_value_ptr) {}
- virtual ~ThreadLocalStorageRunner() {}
+ ~ThreadLocalStorageRunner() override {}
- virtual void Run() override {
+ 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 9d0a7c9e..8dc7cd2 100644
--- a/base/threading/thread_local_unittest.cc
+++ b/base/threading/thread_local_unittest.cc
@@ -20,7 +20,7 @@
: tlp_(tlp),
done_(done) {
}
- virtual ~ThreadLocalTesterBase() {}
+ ~ThreadLocalTesterBase() override {}
protected:
TLPType* tlp_;
@@ -33,11 +33,11 @@
: ThreadLocalTesterBase(tlp, done),
val_(NULL) {
}
- virtual ~SetThreadLocal() {}
+ ~SetThreadLocal() override {}
void set_value(ThreadLocalTesterBase* val) { val_ = val; }
- virtual void Run() override {
+ void Run() override {
DCHECK(!done_->IsSignaled());
tlp_->Set(val_);
done_->Signal();
@@ -53,11 +53,11 @@
: ThreadLocalTesterBase(tlp, done),
ptr_(NULL) {
}
- virtual ~GetThreadLocal() {}
+ ~GetThreadLocal() override {}
void set_ptr(ThreadLocalTesterBase** ptr) { ptr_ = ptr; }
- virtual void Run() override {
+ void Run() override {
DCHECK(!done_->IsSignaled());
*ptr_ = tlp_->Get();
done_->Signal();
diff --git a/base/threading/thread_perftest.cc b/base/threading/thread_perftest.cc
index 2c9fabb..9fbc844 100644
--- a/base/threading/thread_perftest.cc
+++ b/base/threading/thread_perftest.cc
@@ -123,7 +123,7 @@
return threads_[count % threads_.size()];
}
- virtual void PingPong(int hops) override {
+ void PingPong(int hops) override {
if (!hops) {
FinishMeasurement();
return;
@@ -149,16 +149,14 @@
// Same as above, but add observers to test their perf impact.
class MessageLoopObserver : public base::MessageLoop::TaskObserver {
public:
- virtual void WillProcessTask(const base::PendingTask& pending_task) override {
- }
- virtual void DidProcessTask(const base::PendingTask& pending_task) override {
- }
+ void WillProcessTask(const base::PendingTask& pending_task) override {}
+ void DidProcessTask(const base::PendingTask& pending_task) override {}
};
MessageLoopObserver message_loop_observer;
class TaskObserverPerfTest : public TaskPerfTest {
public:
- virtual void Init() override {
+ void Init() override {
TaskPerfTest::Init();
for (size_t i = 0; i < threads_.size(); i++) {
threads_[i]->message_loop()->AddTaskObserver(&message_loop_observer);
diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc
index 2bac84a..f3fb334 100644
--- a/base/threading/thread_unittest.cc
+++ b/base/threading/thread_unittest.cc
@@ -31,11 +31,9 @@
ANNOTATE_BENIGN_RACE(
this, "Benign test-only data race on vptr - http://crbug.com/98219");
}
- virtual ~SleepInsideInitThread() {
- Stop();
- }
+ ~SleepInsideInitThread() override { Stop(); }
- virtual void Init() override {
+ void Init() override {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(500));
init_called_ = true;
}
@@ -70,17 +68,11 @@
event_list_(event_list) {
}
- virtual ~CaptureToEventList() {
- Stop();
- }
+ ~CaptureToEventList() override { Stop(); }
- virtual void Init() override {
- event_list_->push_back(THREAD_EVENT_INIT);
- }
+ void Init() override { event_list_->push_back(THREAD_EVENT_INIT); }
- virtual void CleanUp() override {
- event_list_->push_back(THREAD_EVENT_CLEANUP);
- }
+ void CleanUp() override { event_list_->push_back(THREAD_EVENT_CLEANUP); }
private:
EventList* event_list_;
@@ -97,7 +89,7 @@
}
// DestructionObserver implementation:
- virtual void WillDestroyCurrentMessageLoop() override {
+ void WillDestroyCurrentMessageLoop() override {
event_list_->push_back(THREAD_EVENT_MESSAGE_LOOP_DESTROYED);
event_list_ = NULL;
}
diff --git a/base/threading/watchdog.cc b/base/threading/watchdog.cc
index 82c1875..769119e 100644
--- a/base/threading/watchdog.cc
+++ b/base/threading/watchdog.cc
@@ -153,7 +153,7 @@
watchdog_->state_ = DISARMED; // Only alarm at most once.
TimeTicks last_alarm_time = TimeTicks::Now();
{
- AutoUnlock lock(watchdog_->lock_);
+ AutoUnlock unlock(watchdog_->lock_);
watchdog_->Alarm(); // Set a break point here to debug on alarms.
}
TimeDelta last_alarm_delay = TimeTicks::Now() - last_alarm_time;
diff --git a/base/threading/watchdog.h b/base/threading/watchdog.h
index fe43e48..ea3be36 100644
--- a/base/threading/watchdog.h
+++ b/base/threading/watchdog.h
@@ -65,7 +65,8 @@
public:
explicit ThreadDelegate(Watchdog* watchdog) : watchdog_(watchdog) {
}
- virtual void ThreadMain() override;
+ void ThreadMain() override;
+
private:
void SetThreadName() const;
diff --git a/base/threading/watchdog_unittest.cc b/base/threading/watchdog_unittest.cc
index 2dbfdbd..b8cc7b7 100644
--- a/base/threading/watchdog_unittest.cc
+++ b/base/threading/watchdog_unittest.cc
@@ -26,9 +26,9 @@
alarm_counter_(0) {
}
- virtual ~WatchdogCounter() {}
+ ~WatchdogCounter() override {}
- virtual void Alarm() override {
+ void Alarm() override {
alarm_counter_++;
Watchdog::Alarm();
}
diff --git a/base/threading/worker_pool.cc b/base/threading/worker_pool.cc
index 5b57cab..bc016ce 100644
--- a/base/threading/worker_pool.cc
+++ b/base/threading/worker_pool.cc
@@ -23,8 +23,8 @@
}
private:
- virtual bool PostTask(const tracked_objects::Location& from_here,
- const Closure& task) override {
+ bool PostTask(const tracked_objects::Location& from_here,
+ const Closure& task) override {
return WorkerPool::PostTask(from_here, task, task_is_slow_);
}
@@ -41,13 +41,13 @@
explicit WorkerPoolTaskRunner(bool tasks_are_slow);
// TaskRunner implementation
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
- TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
private:
- virtual ~WorkerPoolTaskRunner();
+ ~WorkerPoolTaskRunner() override;
// Helper function for posting a delayed task. Asserts that the delay is
// zero because non-zero delays are not supported.
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc
index fbf4635..f54b7ec 100644
--- a/base/threading/worker_pool_posix.cc
+++ b/base/threading/worker_pool_posix.cc
@@ -71,7 +71,7 @@
: name_prefix_(name_prefix),
pool_(pool) {}
- virtual void ThreadMain() override;
+ void ThreadMain() override;
private:
const std::string name_prefix_;
diff --git a/base/time/default_clock.h b/base/time/default_clock.h
index 98bca1a..3d2e947 100644
--- a/base/time/default_clock.h
+++ b/base/time/default_clock.h
@@ -14,10 +14,10 @@
// DefaultClock is a Clock implementation that uses Time::Now().
class BASE_EXPORT DefaultClock : public Clock {
public:
- virtual ~DefaultClock();
+ ~DefaultClock() override;
// Simply returns Time::Now().
- virtual Time Now() override;
+ Time Now() override;
};
} // namespace base
diff --git a/base/time/default_tick_clock.h b/base/time/default_tick_clock.h
index b3d5a31..a6d6b15 100644
--- a/base/time/default_tick_clock.h
+++ b/base/time/default_tick_clock.h
@@ -14,10 +14,10 @@
// DefaultClock is a Clock implementation that uses TimeTicks::Now().
class BASE_EXPORT DefaultTickClock : public TickClock {
public:
- virtual ~DefaultTickClock();
+ ~DefaultTickClock() override;
// Simply returns TimeTicks::Now().
- virtual TimeTicks NowTicks() override;
+ TimeTicks NowTicks() override;
};
} // namespace base
diff --git a/base/timer/hi_res_timer_manager.h b/base/timer/hi_res_timer_manager.h
index bfe1f4d..ed0e1e0 100644
--- a/base/timer/hi_res_timer_manager.h
+++ b/base/timer/hi_res_timer_manager.h
@@ -16,10 +16,10 @@
class BASE_EXPORT HighResolutionTimerManager : public base::PowerObserver {
public:
HighResolutionTimerManager();
- virtual ~HighResolutionTimerManager();
+ ~HighResolutionTimerManager() override;
// base::PowerObserver method.
- virtual void OnPowerStateChange(bool on_battery_power) override;
+ void OnPowerStateChange(bool on_battery_power) override;
// Returns true if the hi resolution clock could be used right now.
bool hi_res_clock_available() const { return hi_res_clock_available_; }
diff --git a/base/timer/mock_timer.h b/base/timer/mock_timer.h
index c4aa92e..b07c9c0 100644
--- a/base/timer/mock_timer.h
+++ b/base/timer/mock_timer.h
@@ -16,16 +16,16 @@
TimeDelta delay,
const base::Closure& user_task,
bool is_repeating);
- virtual ~MockTimer();
+ ~MockTimer() override;
// base::Timer implementation.
- virtual bool IsRunning() const override;
- virtual base::TimeDelta GetCurrentDelay() const override;
- virtual void Start(const tracked_objects::Location& posted_from,
- base::TimeDelta delay,
- const base::Closure& user_task) override;
- virtual void Stop() override;
- virtual void Reset() override;
+ bool IsRunning() const override;
+ base::TimeDelta GetCurrentDelay() const override;
+ void Start(const tracked_objects::Location& posted_from,
+ base::TimeDelta delay,
+ const base::Closure& user_task) override;
+ void Stop() override;
+ void Reset() override;
// Testing methods.
void Fire();
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index d61d1c2..2ddaf89 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -238,8 +238,8 @@
class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate {
public:
explicit TOOLS_SANITY_TEST_CONCURRENT_THREAD(bool *value) : value_(value) {}
- virtual ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() {}
- virtual void ThreadMain() override {
+ ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() override {}
+ void ThreadMain() override {
*value_ = true;
// Sleep for a few milliseconds so the two threads are more likely to live
@@ -254,8 +254,8 @@
class ReleaseStoreThread : public PlatformThread::Delegate {
public:
explicit ReleaseStoreThread(base::subtle::Atomic32 *value) : value_(value) {}
- virtual ~ReleaseStoreThread() {}
- virtual void ThreadMain() override {
+ ~ReleaseStoreThread() override {}
+ void ThreadMain() override {
base::subtle::Release_Store(value_, kMagicValue);
// Sleep for a few milliseconds so the two threads are more likely to live
@@ -270,8 +270,8 @@
class AcquireLoadThread : public PlatformThread::Delegate {
public:
explicit AcquireLoadThread(base::subtle::Atomic32 *value) : value_(value) {}
- virtual ~AcquireLoadThread() {}
- virtual void ThreadMain() override {
+ ~AcquireLoadThread() override {}
+ 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/values.h b/base/values.h
index 68dd9c8..04b2d26 100644
--- a/base/values.h
+++ b/base/values.h
@@ -121,16 +121,16 @@
explicit FundamentalValue(bool in_value);
explicit FundamentalValue(int in_value);
explicit FundamentalValue(double in_value);
- virtual ~FundamentalValue();
+ ~FundamentalValue() override;
// Overridden from Value:
- virtual bool GetAsBoolean(bool* out_value) const override;
- virtual bool GetAsInteger(int* out_value) const override;
+ bool GetAsBoolean(bool* out_value) const override;
+ bool GetAsInteger(int* out_value) const override;
// Values of both type TYPE_INTEGER and TYPE_DOUBLE can be obtained as
// doubles.
- virtual bool GetAsDouble(double* out_value) const override;
- virtual FundamentalValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsDouble(double* out_value) const override;
+ FundamentalValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
union {
@@ -148,18 +148,18 @@
// Initializes a StringValue with a string16.
explicit StringValue(const string16& in_value);
- virtual ~StringValue();
+ ~StringValue() override;
// Returns |value_| as a pointer or reference.
std::string* GetString();
const std::string& GetString() const;
// Overridden from Value:
- virtual bool GetAsString(std::string* out_value) const override;
- virtual bool GetAsString(string16* out_value) const override;
- virtual bool GetAsString(const StringValue** out_value) const override;
- virtual StringValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsString(std::string* out_value) const override;
+ bool GetAsString(string16* out_value) const override;
+ bool GetAsString(const StringValue** out_value) const override;
+ StringValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
std::string value_;
@@ -174,7 +174,7 @@
// |buffer|.
BinaryValue(scoped_ptr<char[]> buffer, size_t size);
- virtual ~BinaryValue();
+ ~BinaryValue() override;
// For situations where you want to keep ownership of your buffer, this
// factory method creates a new BinaryValue by copying the contents of the
@@ -188,8 +188,8 @@
const char* GetBuffer() const { return buffer_.get(); }
// Overridden from Value:
- virtual BinaryValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ BinaryValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
scoped_ptr<char[]> buffer_;
@@ -204,12 +204,11 @@
class BASE_EXPORT DictionaryValue : public Value {
public:
DictionaryValue();
- virtual ~DictionaryValue();
+ ~DictionaryValue() override;
// Overridden from Value:
- virtual bool GetAsDictionary(DictionaryValue** out_value) override;
- virtual bool GetAsDictionary(
- const DictionaryValue** out_value) const override;
+ bool GetAsDictionary(DictionaryValue** out_value) override;
+ bool GetAsDictionary(const DictionaryValue** out_value) const override;
// Returns true if the current dictionary has a value for the given key.
bool HasKey(const std::string& key) const;
@@ -362,8 +361,8 @@
};
// Overridden from Value:
- virtual DictionaryValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ DictionaryValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
ValueMap dictionary_;
@@ -378,7 +377,7 @@
typedef ValueVector::const_iterator const_iterator;
ListValue();
- virtual ~ListValue();
+ ~ListValue() override;
// Clears the contents of this ListValue
void Clear();
@@ -476,10 +475,10 @@
const_iterator end() const { return list_.end(); }
// Overridden from Value:
- virtual bool GetAsList(ListValue** out_value) override;
- virtual bool GetAsList(const ListValue** out_value) const override;
- virtual ListValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsList(ListValue** out_value) override;
+ bool GetAsList(const ListValue** out_value) const override;
+ ListValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
ValueVector list_;
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index c8a6cbf..cbb07f3 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -177,9 +177,7 @@
*deletion_flag_ = false;
}
- virtual ~DeletionTestValue() {
- *deletion_flag_ = true;
- }
+ ~DeletionTestValue() override { *deletion_flag_ = true; }
private:
bool* deletion_flag_;
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 69e14e4..a53f30a 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -5,6 +5,7 @@
#include "base/win/win_util.h"
#include <aclapi.h>
+#include <cfgmgr32.h>
#include <lm.h>
#include <powrprof.h>
#include <shellapi.h>
@@ -14,6 +15,7 @@
#include <propkey.h>
#include <propvarutil.h>
#include <sddl.h>
+#include <setupapi.h>
#include <signal.h>
#include <stdlib.h>
@@ -53,6 +55,63 @@
L"Software\\Classes\\CLSID\\{054AAE20-4BEA-4347-8A35-64A533254A9D}"
L"\\LocalServer32";
+// Returns true if a physical keyboard is detected on Windows 8 and up.
+// Uses the Setup APIs to enumerate the attached keyboards and returns true
+// if the keyboard count is more than 1. While this will work in most cases
+// it won't work if there are devices which expose keyboard interfaces which
+// are attached to the machine.
+bool IsKeyboardPresentOnSlate() {
+ // This function is only supported for Windows 8 and up.
+ DCHECK(base::win::GetVersion() >= base::win::VERSION_WIN8);
+
+ // This function should be only invoked for machines with touch screens.
+ if ((GetSystemMetrics(SM_DIGITIZER) & NID_INTEGRATED_TOUCH)
+ != NID_INTEGRATED_TOUCH) {
+ return true;
+ }
+
+ const GUID KEYBOARD_CLASS_GUID =
+ { 0x4D36E96B, 0xE325, 0x11CE,
+ { 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18 } };
+
+ // Query for all the keyboard devices.
+ HDEVINFO device_info =
+ SetupDiGetClassDevs(&KEYBOARD_CLASS_GUID, NULL, NULL, DIGCF_PRESENT);
+ if (device_info == INVALID_HANDLE_VALUE)
+ return false;
+
+ // Enumerate all keyboards and look for ACPI\PNP and HID\VID devices. If
+ // the count is more than 1 we assume that a keyboard is present. This is
+ // under the assumption that there will always be one keyboard device.
+ int keyboard_count = 0;
+ for (DWORD i = 0;; ++i) {
+ SP_DEVINFO_DATA device_info_data = { 0 };
+ device_info_data.cbSize = sizeof(device_info_data);
+ if (!SetupDiEnumDeviceInfo(device_info, i, &device_info_data))
+ break;
+ // Get the device ID.
+ wchar_t device_id[MAX_DEVICE_ID_LEN];
+ CONFIGRET status = CM_Get_Device_ID(device_info_data.DevInst,
+ device_id,
+ MAX_DEVICE_ID_LEN,
+ 0);
+ if (status == CR_SUCCESS) {
+ // To reduce the scope of the hack we only look for PNP and HID
+ // keyboards.
+ if (StartsWith(L"ACPI\\PNP", device_id, false) ||
+ StartsWith(L"HID\\VID", device_id, false)) {
+ keyboard_count++;
+ }
+ }
+ }
+ // On a Windows machine, the API's always report 1 keyboard at least
+ // regardless of whether the machine has a keyboard attached or not.
+ // The heuristic we are using is to check the count and return true
+ // if the API's report more than one keyboard. Please note that this
+ // will break for non keyboard devices which expose a keyboard PDO.
+ return keyboard_count > 1;
+}
+
} // namespace
namespace base {
@@ -252,6 +311,9 @@
if (base::win::GetVersion() < base::win::VERSION_WIN8)
return false;
+ if (IsKeyboardPresentOnSlate())
+ return false;
+
static base::LazyInstance<string16>::Leaky osk_path =
LAZY_INSTANCE_INITIALIZER;
diff --git a/build/android/AndroidManifest.xml b/build/android/AndroidManifest.xml
index 5dacfa9..25e1db0 100644
--- a/build/android/AndroidManifest.xml
+++ b/build/android/AndroidManifest.xml
@@ -15,6 +15,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dummy.package">
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="20" />
+ <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
</manifest>
diff --git a/build/android/gyp/jinja_template.py b/build/android/gyp/jinja_template.py
new file mode 100755
index 0000000..8e579aa
--- /dev/null
+++ b/build/android/gyp/jinja_template.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 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.
+
+"""Renders one or more template files using the Jinja template engine."""
+
+import optparse
+import os
+import sys
+
+from util import build_utils
+
+# Import jinja2 from third_party/jinja2
+sys.path.append(os.path.join(os.path.dirname(__file__), '../../../third_party'))
+import jinja2 # pylint: disable=F0401
+
+
+def ProcessFile(input_filename, output_filename, variables):
+ with open(input_filename, 'r') as input_file:
+ input_ = input_file.read()
+ env = jinja2.Environment(undefined=jinja2.StrictUndefined)
+ template = env.from_string(input_)
+ template.filename = os.path.abspath(input_filename)
+ output = template.render(variables)
+ with open(output_filename, 'w') as output_file:
+ output_file.write(output)
+
+
+def ProcessFiles(input_filenames, inputs_base_dir, outputs_zip, variables):
+ with build_utils.TempDir() as temp_dir:
+ for input_filename in input_filenames:
+ relpath = os.path.relpath(os.path.abspath(input_filename),
+ os.path.abspath(inputs_base_dir))
+ if relpath.startswith(os.pardir):
+ raise Exception('input file %s is not contained in inputs base dir %s'
+ % input_filename, inputs_base_dir)
+
+ output_filename = os.path.join(temp_dir, relpath)
+ parent_dir = os.path.dirname(output_filename)
+ build_utils.MakeDirectory(parent_dir)
+ ProcessFile(input_filename, output_filename, variables)
+
+ build_utils.ZipDir(outputs_zip, temp_dir)
+
+
+def main():
+ parser = optparse.OptionParser()
+ build_utils.AddDepfileOption(parser)
+ parser.add_option('--inputs', help='The template files to process.')
+ parser.add_option('--output', help='The output file to generate. Valid '
+ 'only if there is a single input.')
+ parser.add_option('--outputs-zip', help='A zip file containing the processed '
+ 'templates. Required if there are multiple inputs.')
+ parser.add_option('--inputs-base-dir', help='A common ancestor directory of '
+ 'the inputs. Each output\'s path in the output zip will '
+ 'match the relative path from INPUTS_BASE_DIR to the '
+ 'input. Required if --output-zip is given.')
+ parser.add_option('--variables', help='Variables to be made available in the '
+ 'template processing environment, as a GYP list (e.g. '
+ '--variables "channel=beta mstone=39")', default='')
+ options, args = parser.parse_args()
+
+ build_utils.CheckOptions(options, parser, required=['inputs'])
+ inputs = build_utils.ParseGypList(options.inputs)
+
+ if (options.output is None) == (options.outputs_zip is None):
+ parser.error('Exactly one of --output and --output-zip must be given')
+ if options.output and len(inputs) != 1:
+ parser.error('--output cannot be used with multiple inputs')
+ if options.outputs_zip and not options.inputs_base_dir:
+ parser.error('--inputs-base-dir must be given when --output-zip is used')
+ if args:
+ parser.error('No positional arguments should be given.')
+
+ variables = {}
+ for v in build_utils.ParseGypList(options.variables):
+ if '=' not in v:
+ parser.error('--variables argument must contain "=": ' + v)
+ name, _, value = v.partition('=')
+ variables[name] = value
+
+ if options.output:
+ ProcessFile(inputs[0], options.output, variables)
+ else:
+ ProcessFiles(inputs, options.inputs_base_dir, options.outputs_zip,
+ variables)
+
+ if options.depfile:
+ deps = inputs + build_utils.GetPythonDependencies()
+ build_utils.WriteDepfile(options.depfile, deps)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build/android/jinja_template.gypi b/build/android/jinja_template.gypi
new file mode 100644
index 0000000..25430ca
--- /dev/null
+++ b/build/android/jinja_template.gypi
@@ -0,0 +1,83 @@
+# Copyright 2014 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.
+
+# This file is meant to be included into a target to process one or more
+# Jinja templates.
+#
+# To process a single template file, create a gyp target with the following
+# form:
+# {
+# 'target_name': 'chrome_shell_manifest',
+# 'type': 'none',
+# 'variables': {
+# 'jinja_inputs': ['android/shell/java/AndroidManifest.xml'],
+# 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
+# 'jinja_variables': ['app_name=ChromeShell'],
+# },
+# 'includes': [ '../build/android/jinja_template.gypi' ],
+# },
+#
+# To process multiple template files and package the results into a zip file,
+# create a gyp target with the following form:
+# {
+# 'target_name': 'chrome_template_resources',
+# 'type': 'none',
+# 'variables': {
+# 'jinja_inputs_base_dir': 'android/shell/java/res_template',
+# 'jinja_inputs': [
+# '<(jinja_inputs_base_dir)/xml/searchable.xml',
+# '<(jinja_inputs_base_dir)/xml/syncadapter.xml',
+# ],
+# 'jinja_outputs_zip': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
+# 'jinja_variables': ['app_name=ChromeShell'],
+# },
+# 'includes': [ '../build/android/jinja_template.gypi' ],
+# },
+#
+
+{
+ 'actions': [
+ {
+ 'action_name': '<(_target_name)_jinja_template',
+ 'message': 'processing jinja template',
+ 'variables': {
+ 'jinja_output%': '',
+ 'jinja_outputs_zip%': '',
+ 'jinja_inputs_base_dir%': '',
+ 'jinja_variables%': [],
+ 'jinja_args': [],
+ },
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/jinja_template.py',
+ '<@(jinja_inputs)',
+ ],
+ 'conditions': [
+ ['jinja_output != ""', {
+ 'outputs': [ '<(jinja_output)' ],
+ 'variables': {
+ 'jinja_args': ['--output', '<(jinja_output)'],
+ },
+ }],
+ ['jinja_outputs_zip != ""', {
+ 'outputs': [ '<(jinja_outputs_zip)' ],
+ 'variables': {
+ 'jinja_args': ['--outputs-zip', '<(jinja_outputs_zip)'],
+ },
+ }],
+ ['jinja_inputs_base_dir != ""', {
+ 'variables': {
+ 'jinja_args': ['--inputs-base-dir', '<(jinja_inputs_base_dir)'],
+ },
+ }],
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/jinja_template.py',
+ '--inputs', '<(jinja_inputs)',
+ '--variables', '<(jinja_variables)',
+ '<@(jinja_args)',
+ ],
+ },
+ ],
+}
diff --git a/build/android/pylib/device/decorators.py b/build/android/pylib/device/decorators.py
index 9362f95..074a0fc 100644
--- a/build/android/pylib/device/decorators.py
+++ b/build/android/pylib/device/decorators.py
@@ -9,6 +9,7 @@
import functools
import os
import sys
+import threading
from pylib import constants
from pylib.device import device_errors
@@ -48,7 +49,11 @@
def impl():
return f(*args, **kwargs)
try:
- return timeout_retry.Run(impl, timeout, retries)
+ if isinstance(threading.current_thread(),
+ timeout_retry.TimeoutRetryThread):
+ return impl()
+ else:
+ return timeout_retry.Run(impl, timeout, retries)
except old_errors.WaitForResponseTimedOutError as e:
raise device_errors.CommandTimeoutError(str(e)), None, (
sys.exc_info()[2])
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 61a8539..c3af91f 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -121,6 +121,7 @@
'--config-variable', 'component', 'static_library',
'--config-variable', 'fastbuild', '0',
'--config-variable', 'icu_use_data_file_flag', '1',
+ '--config-variable', 'libpeer_target_type', 'static_library',
'--config-variable', 'lsan', '0',
# TODO(maruel): This may not be always true.
'--config-variable', 'target_arch', 'arm',
diff --git a/build/android/pylib/instrumentation/test_jar.py b/build/android/pylib/instrumentation/test_jar.py
index 964dca7..c81258f 100644
--- a/build/android/pylib/instrumentation/test_jar.py
+++ b/build/android/pylib/instrumentation/test_jar.py
@@ -268,13 +268,14 @@
'%s has no annotations. Assuming "%s".', test,
self._DEFAULT_ANNOTATION)
available_tests.append(test)
- if exclude_annotation_list:
- excluded_tests = self.GetAnnotatedTests(exclude_annotation_list)
- available_tests = list(set(available_tests) - set(excluded_tests))
else:
available_tests = [m for m in self.GetTestMethods()
if not self.IsHostDrivenTest(m)]
+ if exclude_annotation_list:
+ excluded_tests = self.GetAnnotatedTests(exclude_annotation_list)
+ available_tests = list(set(available_tests) - set(excluded_tests))
+
tests = []
if test_filter:
# |available_tests| are in adb instrument format: package.path.class#test.
diff --git a/build/android/pylib/utils/timeout_retry.py b/build/android/pylib/utils/timeout_retry.py
index bc7e891..bae8b16 100644
--- a/build/android/pylib/utils/timeout_retry.py
+++ b/build/android/pylib/utils/timeout_retry.py
@@ -11,6 +11,10 @@
from pylib.utils import watchdog_timer
+class TimeoutRetryThread(reraiser_thread.ReraiserThread):
+ pass
+
+
def Run(func, timeout, retries, args=None, kwargs=None):
"""Runs the passed function in a separate thread with timeouts and retries.
@@ -40,7 +44,7 @@
try:
name = 'TimeoutThread-for-%s' % threading.current_thread().name
thread_group = reraiser_thread.ReraiserThreadGroup(
- [reraiser_thread.ReraiserThread(RunOnTimeoutThread, name=name)])
+ [TimeoutRetryThread(RunOnTimeoutThread, name=name)])
thread_group.StartAll()
thread_group.JoinAll(watchdog_timer.WatchdogTimer(timeout))
return ret[0]
diff --git a/build/common.gypi b/build/common.gypi
index e9b1476..0ad62ee 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -147,6 +147,10 @@
'target_subarch%': '',
+ # The channel to build on Android: stable, beta, dev, canary, or
+ # default. "default" should be used on non-official builds.
+ 'android_channel%': 'default',
+
# This is set when building the Android WebView inside the Android
# build system, using the 'android' gyp backend. The WebView code is
# still built when this is unset, but builds using the normal chromium
@@ -285,6 +289,7 @@
'use_openssl_certs%': '<(use_openssl_certs)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
+ 'android_channel%': '<(android_channel)',
'android_webview_build%': '<(android_webview_build)',
'android_webview_telemetry_build%': '<(android_webview_telemetry_build)',
'use_goma%': '<(use_goma)',
@@ -1155,6 +1160,7 @@
'wix_path%': '<(wix_path)',
'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
'use_system_libjpeg%': '<(use_system_libjpeg)',
+ 'android_channel%': '<(android_channel)',
'android_webview_build%': '<(android_webview_build)',
'android_webview_telemetry_build%': '<(android_webview_telemetry_build)',
'icu_use_data_file_flag%': '<(icu_use_data_file_flag)',
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index af493bd..ac6fe5a 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -343,6 +343,112 @@
}
}
+# Declare a target for processing a Jinja template.
+#
+# Variables
+# input: The template file to be processed.
+# output: Where to save the result.
+# variables: (Optional) A list of variables to make available to the template
+# processing environment, e.g. ["name=foo", "color=red"].
+#
+# Example
+# jinja_template("chrome_shell_manifest") {
+# input = "shell/java/AndroidManifest.xml"
+# output = "$target_gen_dir/AndroidManifest.xml"
+# }
+template("jinja_template") {
+ if (defined(invoker.testonly)) { testonly = invoker.testonly }
+
+ assert(defined(invoker.input))
+ assert(defined(invoker.output))
+
+ action(target_name) {
+ sources = [invoker.input]
+ script = "//build/android/gyp/jinja_template.py"
+ depfile = "$target_gen_dir/$target_name.d"
+
+ outputs = [
+ depfile,
+ invoker.output,
+ ]
+
+ args = [
+ "--inputs", rebase_path(invoker.input, root_build_dir),
+ "--output", rebase_path(invoker.output, root_build_dir),
+ "--depfile", rebase_path(depfile, root_build_dir),
+ ]
+ if (defined(invoker.variables)) {
+ variables = invoker.variables
+ args += ["--variables=${variables}" ]
+ }
+ }
+}
+
+# Declare a target for processing Android resources as Jinja templates.
+#
+# This takes an Android resource directory where each resource is a Jinja
+# template, processes each template, then packages the results in a zip file
+# which can be consumed by an android resources, library, or apk target.
+#
+# If this target is included in the deps of an android resources/library/apk,
+# the resources will be included with that target.
+#
+# Variables
+# resources: The list of resources files to process.
+# res_dir: The resource directory containing the resources.
+# variables: (Optional) A list of variables to make available to the template
+# processing environment, e.g. ["name=foo", "color=red"].
+#
+# Example
+# jinja_template_resources("chrome_shell_template_resources") {
+# res_dir = "shell/res_template"
+# resources = ["shell/res_template/xml/syncable.xml"]
+# variables = ["color=red"]
+# }
+template("jinja_template_resources") {
+ if (defined(invoker.testonly)) { testonly = invoker.testonly }
+
+ assert(defined(invoker.resources))
+ assert(defined(invoker.res_dir))
+
+ _base_path = "$target_gen_dir/$target_name"
+ _resources_zip = _base_path + ".resources.zip"
+ _build_config = _base_path + ".build_config"
+
+ write_build_config("${target_name}__build_config") {
+ type = "android_resources"
+ }
+
+ action("${target_name}__template") {
+ sources = invoker.resources
+ script = "//build/android/gyp/jinja_template.py"
+ depfile = "$target_gen_dir/$target_name.d"
+
+ outputs = [
+ depfile,
+ _resources_zip,
+ ]
+
+ rebased_resources = rebase_path(invoker.resources, root_build_dir)
+ args = [
+ "--inputs=${rebased_resources}",
+ "--inputs-base-dir", rebase_path(invoker.res_dir, root_build_dir),
+ "--outputs-zip", rebase_path(_resources_zip, root_build_dir),
+ "--depfile", rebase_path(depfile, root_build_dir),
+ ]
+ if (defined(invoker.variables)) {
+ variables = invoker.variables
+ args += ["--variables=${variables}" ]
+ }
+ }
+
+ group(target_name) {
+ deps = [
+ ":${target_name}__build_config",
+ ":${target_name}__template",
+ ]
+ }
+}
# Declare an Android resources target
#
@@ -688,6 +794,7 @@
group(target_name) {
deps = [
+ ":${target_name}__build_config",
":${target_name}__dex",
]
}
diff --git a/cc/animation/animation_curve.h b/cc/animation/animation_curve.h
index 7f38af9..57c42c7 100644
--- a/cc/animation/animation_curve.h
+++ b/cc/animation/animation_curve.h
@@ -45,27 +45,27 @@
class CC_EXPORT ColorAnimationCurve : public AnimationCurve {
public:
- virtual ~ColorAnimationCurve() {}
+ ~ColorAnimationCurve() override {}
virtual SkColor GetValue(double t) const = 0;
// Partial Animation implementation.
- virtual CurveType Type() const override;
+ CurveType Type() const override;
};
class CC_EXPORT FloatAnimationCurve : public AnimationCurve {
public:
- virtual ~FloatAnimationCurve() {}
+ ~FloatAnimationCurve() override {}
virtual float GetValue(double t) const = 0;
// Partial Animation implementation.
- virtual CurveType Type() const override;
+ CurveType Type() const override;
};
class CC_EXPORT TransformAnimationCurve : public AnimationCurve {
public:
- virtual ~TransformAnimationCurve() {}
+ ~TransformAnimationCurve() override {}
virtual gfx::Transform GetValue(double t) const = 0;
@@ -90,18 +90,18 @@
float* max_scale) const = 0;
// Partial Animation implementation.
- virtual CurveType Type() const override;
+ CurveType Type() const override;
};
class CC_EXPORT FilterAnimationCurve : public AnimationCurve {
public:
- virtual ~FilterAnimationCurve() {}
+ ~FilterAnimationCurve() override {}
virtual FilterOperations GetValue(double t) const = 0;
virtual bool HasFilterThatMovesPixels() const = 0;
// Partial Animation implementation.
- virtual CurveType Type() const override;
+ CurveType Type() const override;
};
} // namespace cc
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h
index 5d25b89..a6e6740 100644
--- a/cc/animation/keyframed_animation_curve.h
+++ b/cc/animation/keyframed_animation_curve.h
@@ -37,7 +37,7 @@
double time,
SkColor value,
scoped_ptr<TimingFunction> timing_function);
- virtual ~ColorKeyframe();
+ ~ColorKeyframe() override;
SkColor Value() const;
@@ -57,7 +57,7 @@
double time,
float value,
scoped_ptr<TimingFunction> timing_function);
- virtual ~FloatKeyframe();
+ ~FloatKeyframe() override;
float Value() const;
@@ -77,7 +77,7 @@
double time,
const TransformOperations& value,
scoped_ptr<TimingFunction> timing_function);
- virtual ~TransformKeyframe();
+ ~TransformKeyframe() override;
const TransformOperations& Value() const;
@@ -98,7 +98,7 @@
double time,
const FilterOperations& value,
scoped_ptr<TimingFunction> timing_function);
- virtual ~FilterKeyframe();
+ ~FilterKeyframe() override;
const FilterOperations& Value() const;
@@ -118,7 +118,7 @@
// It is required that the keyframes be sorted by time.
static scoped_ptr<KeyframedColorAnimationCurve> Create();
- virtual ~KeyframedColorAnimationCurve();
+ ~KeyframedColorAnimationCurve() override;
void AddKeyframe(scoped_ptr<ColorKeyframe> keyframe);
void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
@@ -126,11 +126,11 @@
}
// AnimationCurve implementation
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
// BackgrounColorAnimationCurve implementation
- virtual SkColor GetValue(double t) const override;
+ SkColor GetValue(double t) const override;
private:
KeyframedColorAnimationCurve();
@@ -148,7 +148,7 @@
// It is required that the keyframes be sorted by time.
static scoped_ptr<KeyframedFloatAnimationCurve> Create();
- virtual ~KeyframedFloatAnimationCurve();
+ ~KeyframedFloatAnimationCurve() override;
void AddKeyframe(scoped_ptr<FloatKeyframe> keyframe);
void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
@@ -156,11 +156,11 @@
}
// AnimationCurve implementation
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
// FloatAnimationCurve implementation
- virtual float GetValue(double t) const override;
+ float GetValue(double t) const override;
private:
KeyframedFloatAnimationCurve();
@@ -179,7 +179,7 @@
// It is required that the keyframes be sorted by time.
static scoped_ptr<KeyframedTransformAnimationCurve> Create();
- virtual ~KeyframedTransformAnimationCurve();
+ ~KeyframedTransformAnimationCurve() override;
void AddKeyframe(scoped_ptr<TransformKeyframe> keyframe);
void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
@@ -187,17 +187,17 @@
}
// AnimationCurve implementation
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
// TransformAnimationCurve implementation
- virtual gfx::Transform GetValue(double t) const override;
- virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const override;
- virtual bool AffectsScale() const override;
- virtual bool IsTranslation() const override;
- virtual bool MaximumTargetScale(bool forward_direction,
- float* max_scale) const override;
+ gfx::Transform GetValue(double t) const override;
+ bool AnimatedBoundsForBox(const gfx::BoxF& box,
+ gfx::BoxF* bounds) const override;
+ bool AffectsScale() const override;
+ bool IsTranslation() const override;
+ bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
private:
KeyframedTransformAnimationCurve();
@@ -216,7 +216,7 @@
// It is required that the keyframes be sorted by time.
static scoped_ptr<KeyframedFilterAnimationCurve> Create();
- virtual ~KeyframedFilterAnimationCurve();
+ ~KeyframedFilterAnimationCurve() override;
void AddKeyframe(scoped_ptr<FilterKeyframe> keyframe);
void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
@@ -224,12 +224,12 @@
}
// AnimationCurve implementation
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
// FilterAnimationCurve implementation
- virtual FilterOperations GetValue(double t) const override;
- virtual bool HasFilterThatMovesPixels() const override;
+ FilterOperations GetValue(double t) const override;
+ bool HasFilterThatMovesPixels() const override;
private:
KeyframedFilterAnimationCurve();
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index a5a2965..96c406c 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -859,16 +859,15 @@
: started_(false),
finished_(false) {}
- virtual void NotifyAnimationStarted(TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
started_ = true;
}
- virtual void NotifyAnimationFinished(
- TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
finished_ = true;
}
diff --git a/cc/animation/scroll_offset_animation_curve.h b/cc/animation/scroll_offset_animation_curve.h
index 197a431..0c8692a 100644
--- a/cc/animation/scroll_offset_animation_curve.h
+++ b/cc/animation/scroll_offset_animation_curve.h
@@ -21,7 +21,7 @@
const gfx::ScrollOffset& target_value,
scoped_ptr<TimingFunction> timing_function);
- virtual ~ScrollOffsetAnimationCurve();
+ ~ScrollOffsetAnimationCurve() override;
void SetInitialValue(const gfx::ScrollOffset& initial_value);
gfx::ScrollOffset GetValue(double t) const;
@@ -29,9 +29,9 @@
void UpdateTarget(double t, const gfx::ScrollOffset& new_target);
// AnimationCurve implementation
- virtual double Duration() const override;
- virtual CurveType Type() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ CurveType Type() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
private:
ScrollOffsetAnimationCurve(const gfx::ScrollOffset& target_value,
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.h b/cc/animation/scrollbar_animation_controller_linear_fade.h
index 86524f2..73d6031 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.h
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.h
@@ -22,9 +22,9 @@
base::TimeDelta resize_delay_before_starting,
base::TimeDelta duration);
- virtual ~ScrollbarAnimationControllerLinearFade();
+ ~ScrollbarAnimationControllerLinearFade() override;
- virtual void DidScrollUpdate(bool on_resize) override;
+ void DidScrollUpdate(bool on_resize) override;
protected:
ScrollbarAnimationControllerLinearFade(
@@ -34,7 +34,7 @@
base::TimeDelta resize_delay_before_starting,
base::TimeDelta duration);
- virtual void RunAnimationFrame(float progress) override;
+ void RunAnimationFrame(float progress) override;
private:
float OpacityAtTime(base::TimeTicks now) const;
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
index 4ffb0b2..3f01c54 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
+++ b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc
@@ -22,14 +22,12 @@
ScrollbarAnimationControllerLinearFadeTest()
: host_impl_(&proxy_, &shared_bitmap_manager_), needs_frame_count_(0) {}
- virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
- base::TimeDelta delay) override {
+ void PostDelayedScrollbarFade(const base::Closure& start_fade,
+ base::TimeDelta delay) override {
start_fade_ = start_fade;
delay_ = delay;
}
- virtual void SetNeedsScrollbarAnimationFrame() override {
- needs_frame_count_++;
- }
+ void SetNeedsScrollbarAnimationFrame() override { needs_frame_count_++; }
protected:
virtual void SetUp() {
@@ -83,7 +81,7 @@
class VerticalScrollbarAnimationControllerLinearFadeTest
: public ScrollbarAnimationControllerLinearFadeTest {
protected:
- virtual ScrollbarOrientation orientation() const override { return VERTICAL; }
+ ScrollbarOrientation orientation() const override { return VERTICAL; }
};
TEST_F(ScrollbarAnimationControllerLinearFadeTest, DelayAnimationOnResize) {
diff --git a/cc/animation/scrollbar_animation_controller_thinning.h b/cc/animation/scrollbar_animation_controller_thinning.h
index 6e9f21a..2cf30f5 100644
--- a/cc/animation/scrollbar_animation_controller_thinning.h
+++ b/cc/animation/scrollbar_animation_controller_thinning.h
@@ -24,7 +24,7 @@
base::TimeDelta resize_delay_before_starting,
base::TimeDelta duration);
- virtual ~ScrollbarAnimationControllerThinning();
+ ~ScrollbarAnimationControllerThinning() override;
void set_mouse_move_distance_for_test(float distance) {
mouse_move_distance_to_trigger_animation_ = distance;
@@ -32,9 +32,9 @@
bool mouse_is_over_scrollbar() const { return mouse_is_over_scrollbar_; }
bool mouse_is_near_scrollbar() const { return mouse_is_near_scrollbar_; }
- virtual void DidScrollUpdate(bool on_resize) override;
- virtual void DidMouseMoveOffScrollbar() override;
- virtual void DidMouseMoveNear(float distance) override;
+ void DidScrollUpdate(bool on_resize) override;
+ void DidMouseMoveOffScrollbar() override;
+ void DidMouseMoveNear(float distance) override;
protected:
ScrollbarAnimationControllerThinning(
@@ -44,7 +44,7 @@
base::TimeDelta resize_delay_before_starting,
base::TimeDelta duration);
- virtual void RunAnimationFrame(float progress) override;
+ void RunAnimationFrame(float progress) override;
private:
// Describes whether the current animation should INCREASE (darken / thicken)
diff --git a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
index 7836dd7..d46431b 100644
--- a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
+++ b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
@@ -22,11 +22,11 @@
ScrollbarAnimationControllerThinningTest()
: host_impl_(&proxy_, &shared_bitmap_manager_) {}
- virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
- base::TimeDelta delay) override {
+ void PostDelayedScrollbarFade(const base::Closure& start_fade,
+ base::TimeDelta delay) override {
start_fade_ = start_fade;
}
- virtual void SetNeedsScrollbarAnimationFrame() override {}
+ void SetNeedsScrollbarAnimationFrame() override {}
protected:
virtual void SetUp() {
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index 9974865..69d1cc9 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -32,13 +32,13 @@
public:
static scoped_ptr<CubicBezierTimingFunction> Create(double x1, double y1,
double x2, double y2);
- virtual ~CubicBezierTimingFunction();
+ ~CubicBezierTimingFunction() override;
// TimingFunction implementation.
- virtual float GetValue(double time) const override;
- virtual float Velocity(double time) const override;
- virtual void Range(float* min, float* max) const override;
- virtual scoped_ptr<TimingFunction> Clone() const override;
+ float GetValue(double time) const override;
+ float Velocity(double time) const override;
+ void Range(float* min, float* max) const override;
+ scoped_ptr<TimingFunction> Clone() const override;
protected:
CubicBezierTimingFunction(double x1, double y1, double x2, double y2);
diff --git a/cc/base/delayed_unique_notifier_unittest.cc b/cc/base/delayed_unique_notifier_unittest.cc
index 090da33..41cde83 100644
--- a/cc/base/delayed_unique_notifier_unittest.cc
+++ b/cc/base/delayed_unique_notifier_unittest.cc
@@ -20,10 +20,10 @@
const base::Closure& closure,
const base::TimeDelta& delay)
: DelayedUniqueNotifier(task_runner, closure, delay) {}
- virtual ~TestNotifier() {}
+ ~TestNotifier() override {}
// Overridden from DelayedUniqueNotifier:
- virtual base::TimeTicks Now() const override { return now_; }
+ base::TimeTicks Now() const override { return now_; }
void SetNow(base::TimeTicks now) { now_ = now; }
diff --git a/cc/base/latency_info_swap_promise.h b/cc/base/latency_info_swap_promise.h
index b912f24..a7941f1 100644
--- a/cc/base/latency_info_swap_promise.h
+++ b/cc/base/latency_info_swap_promise.h
@@ -14,12 +14,12 @@
class CC_EXPORT LatencyInfoSwapPromise : public SwapPromise {
public:
explicit LatencyInfoSwapPromise(const ui::LatencyInfo& latency_info);
- virtual ~LatencyInfoSwapPromise();
+ ~LatencyInfoSwapPromise() override;
- virtual void DidSwap(CompositorFrameMetadata* metadata) override;
- virtual void DidNotSwap(DidNotSwapReason reason) override;
+ void DidSwap(CompositorFrameMetadata* metadata) override;
+ void DidNotSwap(DidNotSwapReason reason) override;
- virtual int64 TraceId() const override;
+ int64 TraceId() const override;
private:
ui::LatencyInfo latency_;
diff --git a/cc/base/latency_info_swap_promise_monitor.h b/cc/base/latency_info_swap_promise_monitor.h
index cf1dc1d..d9e71fb 100644
--- a/cc/base/latency_info_swap_promise_monitor.h
+++ b/cc/base/latency_info_swap_promise_monitor.h
@@ -22,11 +22,11 @@
LatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency,
LayerTreeHost* layer_tree_host,
LayerTreeHostImpl* layer_tree_host_impl);
- virtual ~LatencyInfoSwapPromiseMonitor();
+ ~LatencyInfoSwapPromiseMonitor() override;
- virtual void OnSetNeedsCommitOnMain() override;
- virtual void OnSetNeedsRedrawOnImpl() override;
- virtual void OnForwardScrollUpdateToMainThreadOnImpl() override;
+ void OnSetNeedsCommitOnMain() override;
+ void OnSetNeedsRedrawOnImpl() override;
+ void OnForwardScrollUpdateToMainThreadOnImpl() override;
private:
ui::LatencyInfo* latency_;
diff --git a/cc/blink/scrollbar_impl.h b/cc/blink/scrollbar_impl.h
index 5f0572c..fa5f042 100644
--- a/cc/blink/scrollbar_impl.h
+++ b/cc/blink/scrollbar_impl.h
@@ -22,20 +22,20 @@
ScrollbarImpl(scoped_ptr<blink::WebScrollbar> scrollbar,
blink::WebScrollbarThemePainter painter,
scoped_ptr<blink::WebScrollbarThemeGeometry> geometry);
- virtual ~ScrollbarImpl();
+ ~ScrollbarImpl() override;
// cc::Scrollbar implementation.
- virtual cc::ScrollbarOrientation Orientation() const override;
- virtual bool IsLeftSideVerticalScrollbar() const override;
- virtual bool HasThumb() const override;
- virtual bool IsOverlay() const override;
- virtual gfx::Point Location() const override;
- virtual int ThumbThickness() const override;
- virtual int ThumbLength() const override;
- virtual gfx::Rect TrackRect() const override;
- virtual void PaintPart(SkCanvas* canvas,
- cc::ScrollbarPart part,
- const gfx::Rect& content_rect) override;
+ cc::ScrollbarOrientation Orientation() const override;
+ bool IsLeftSideVerticalScrollbar() const override;
+ bool HasThumb() const override;
+ bool IsOverlay() const override;
+ gfx::Point Location() const override;
+ int ThumbThickness() const override;
+ int ThumbLength() const override;
+ gfx::Rect TrackRect() const override;
+ void PaintPart(SkCanvas* canvas,
+ cc::ScrollbarPart part,
+ const gfx::Rect& content_rect) override;
private:
scoped_ptr<blink::WebScrollbar> scrollbar_;
diff --git a/cc/blink/web_content_layer_impl.h b/cc/blink/web_content_layer_impl.h
index 9dab02d..b9bb871 100644
--- a/cc/blink/web_content_layer_impl.h
+++ b/cc/blink/web_content_layer_impl.h
@@ -36,12 +36,12 @@
virtual ~WebContentLayerImpl();
// ContentLayerClient implementation.
- virtual void PaintContents(SkCanvas* canvas,
- const gfx::Rect& clip,
- ContentLayerClient::GraphicsContextStatus
- graphics_context_status) override;
- virtual void DidChangeLayerCanUseLCDText() override;
- virtual bool FillsBoundsCompletely() const override;
+ void PaintContents(SkCanvas* canvas,
+ const gfx::Rect& clip,
+ ContentLayerClient::GraphicsContextStatus
+ graphics_context_status) override;
+ void DidChangeLayerCanUseLCDText() override;
+ bool FillsBoundsCompletely() const override;
scoped_ptr<WebLayerImpl> layer_;
blink::WebContentLayerClient* client_;
diff --git a/cc/blink/web_external_texture_layer_impl.h b/cc/blink/web_external_texture_layer_impl.h
index a657e62..853b1a0 100644
--- a/cc/blink/web_external_texture_layer_impl.h
+++ b/cc/blink/web_external_texture_layer_impl.h
@@ -45,7 +45,7 @@
virtual void setRateLimitContext(bool rate_limit);
// TextureLayerClient implementation.
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
cc::TextureMailbox* mailbox,
scoped_ptr<cc::SingleReleaseCallback>* release_callback,
bool use_shared_memory) override;
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index b4b9f29..f73ae10 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -435,7 +435,7 @@
// This object takes ownership of the debug_info object.
explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info)
: debug_info_(debug_info) {}
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
DCHECK(thread_checker_.CalledOnValidThread());
blink::WebString web_string;
debug_info_->appendAsTraceFormat(&web_string);
@@ -443,7 +443,7 @@
}
private:
- virtual ~TracedDebugInfo() {}
+ ~TracedDebugInfo() override {}
scoped_ptr<blink::WebGraphicsLayerDebugInfo> debug_info_;
base::ThreadChecker thread_checker_;
};
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h
index cc94344..bced598 100644
--- a/cc/blink/web_layer_impl.h
+++ b/cc/blink/web_layer_impl.h
@@ -132,8 +132,7 @@
virtual void setWebLayerClient(blink::WebLayerClient* client);
// LayerClient implementation.
- virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo()
- override;
+ scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() override;
virtual void setScrollParent(blink::WebLayer* parent);
virtual void setClipParent(blink::WebLayer* parent);
diff --git a/cc/blink/web_to_cc_animation_delegate_adapter.h b/cc/blink/web_to_cc_animation_delegate_adapter.h
index b52a758..4d52cb4 100644
--- a/cc/blink/web_to_cc_animation_delegate_adapter.h
+++ b/cc/blink/web_to_cc_animation_delegate_adapter.h
@@ -21,14 +21,12 @@
blink::WebCompositorAnimationDelegate* delegate);
private:
- virtual void NotifyAnimationStarted(
- base::TimeTicks monotonic_time,
- cc::Animation::TargetProperty target_property,
- int group) override;
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- cc::Animation::TargetProperty target_property,
- int group) override;
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property,
+ int group) override;
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property,
+ int group) override;
blink::WebCompositorAnimationDelegate* delegate_;
diff --git a/cc/debug/invalidation_benchmark.h b/cc/debug/invalidation_benchmark.h
index a727104..f17fdbd 100644
--- a/cc/debug/invalidation_benchmark.h
+++ b/cc/debug/invalidation_benchmark.h
@@ -21,12 +21,12 @@
public:
explicit InvalidationBenchmark(scoped_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback);
- virtual ~InvalidationBenchmark();
+ ~InvalidationBenchmark() override;
// Implements MicroBenchmark interface.
- virtual void DidUpdateLayers(LayerTreeHost* host) override;
- virtual void RunOnLayer(PictureLayer* layer) override;
- virtual bool ProcessMessage(scoped_ptr<base::Value> value) override;
+ void DidUpdateLayers(LayerTreeHost* host) override;
+ void RunOnLayer(PictureLayer* layer) override;
+ bool ProcessMessage(scoped_ptr<base::Value> value) override;
private:
enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM };
diff --git a/cc/debug/picture_record_benchmark.h b/cc/debug/picture_record_benchmark.h
index 472f660..d6330fe 100644
--- a/cc/debug/picture_record_benchmark.h
+++ b/cc/debug/picture_record_benchmark.h
@@ -20,11 +20,11 @@
public:
explicit PictureRecordBenchmark(scoped_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback);
- virtual ~PictureRecordBenchmark();
+ ~PictureRecordBenchmark() override;
// Implements MicroBenchmark interface.
- virtual void DidUpdateLayers(LayerTreeHost* host) override;
- virtual void RunOnLayer(PictureLayer* layer) override;
+ void DidUpdateLayers(LayerTreeHost* host) override;
+ void RunOnLayer(PictureLayer* layer) override;
private:
void Run(Layer* layer);
diff --git a/cc/debug/rasterize_and_record_benchmark.h b/cc/debug/rasterize_and_record_benchmark.h
index 921a7e9..68d5d05 100644
--- a/cc/debug/rasterize_and_record_benchmark.h
+++ b/cc/debug/rasterize_and_record_benchmark.h
@@ -27,13 +27,13 @@
explicit RasterizeAndRecordBenchmark(
scoped_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback);
- virtual ~RasterizeAndRecordBenchmark();
+ ~RasterizeAndRecordBenchmark() override;
// Implements MicroBenchmark interface.
- virtual void DidUpdateLayers(LayerTreeHost* host) override;
- virtual void RunOnLayer(PictureLayer* layer) override;
+ void DidUpdateLayers(LayerTreeHost* host) override;
+ void RunOnLayer(PictureLayer* layer) override;
- virtual scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
+ scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
scoped_refptr<base::MessageLoopProxy> origin_loop) override;
private:
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index 91c92b9..77bc259 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -37,7 +37,7 @@
best_time_(base::TimeDelta::Max()) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
// Parameters for LapTimer.
const int kTimeLimitMillis = 1;
const int kWarmupRuns = 0;
@@ -76,7 +76,7 @@
base::TimeDelta GetBestTime() const { return best_time_; }
private:
- virtual ~BenchmarkRasterTask() {}
+ ~BenchmarkRasterTask() override {}
PicturePileImpl* picture_pile_;
gfx::Rect content_rect_;
@@ -94,50 +94,46 @@
const Region invalidation)
: base_client_(base_client), invalidation_(invalidation) {}
- virtual scoped_refptr<Tile> CreateTile(
- PictureLayerTiling* tiling,
- const gfx::Rect& content_rect) override {
+ scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling,
+ const gfx::Rect& content_rect) override {
return base_client_->CreateTile(tiling, content_rect);
}
- virtual PicturePileImpl* GetPile() override {
- return base_client_->GetPile();
- }
+ PicturePileImpl* GetPile() override { return base_client_->GetPile(); }
- virtual gfx::Size CalculateTileSize(
- const gfx::Size& content_bounds) const override {
+ gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override {
return base_client_->CalculateTileSize(content_bounds);
}
// This is the only function that returns something different from the base
// client.
- virtual const Region* GetInvalidation() override { return &invalidation_; }
+ const Region* GetInvalidation() override { return &invalidation_; }
- virtual const PictureLayerTiling* GetTwinTiling(
+ const PictureLayerTiling* GetTwinTiling(
const PictureLayerTiling* tiling) const override {
return base_client_->GetTwinTiling(tiling);
}
- virtual PictureLayerTiling* GetRecycledTwinTiling(
+ PictureLayerTiling* GetRecycledTwinTiling(
const PictureLayerTiling* tiling) override {
return base_client_->GetRecycledTwinTiling(tiling);
}
- virtual size_t GetMaxTilesForInterestArea() const override {
+ size_t GetMaxTilesForInterestArea() const override {
return base_client_->GetMaxTilesForInterestArea();
}
- virtual float GetSkewportTargetTimeInSeconds() const override {
+ float GetSkewportTargetTimeInSeconds() const override {
return base_client_->GetSkewportTargetTimeInSeconds();
}
- virtual int GetSkewportExtrapolationLimitInContentPixels() const override {
+ int GetSkewportExtrapolationLimitInContentPixels() const override {
return base_client_->GetSkewportExtrapolationLimitInContentPixels();
}
- virtual WhichTree GetTree() const override { return base_client_->GetTree(); }
+ WhichTree GetTree() const override { return base_client_->GetTree(); }
- virtual bool RequiresHighResToDraw() const override {
+ bool RequiresHighResToDraw() const override {
return base_client_->RequiresHighResToDraw();
}
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.h b/cc/debug/rasterize_and_record_benchmark_impl.h
index 4508d5e..c0f26fd 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.h
+++ b/cc/debug/rasterize_and_record_benchmark_impl.h
@@ -24,11 +24,11 @@
scoped_refptr<base::MessageLoopProxy> origin_loop,
base::Value* value,
const MicroBenchmarkImpl::DoneCallback& callback);
- virtual ~RasterizeAndRecordBenchmarkImpl();
+ ~RasterizeAndRecordBenchmarkImpl() override;
// Implements MicroBenchmark interface.
- virtual void DidCompleteCommit(LayerTreeHostImpl* host) override;
- virtual void RunOnLayer(PictureLayerImpl* layer) override;
+ void DidCompleteCommit(LayerTreeHostImpl* host) override;
+ void RunOnLayer(PictureLayerImpl* layer) override;
private:
void Run(LayerImpl* layer);
diff --git a/cc/debug/traced_picture.h b/cc/debug/traced_picture.h
index 1d31694..b5f5e3a 100644
--- a/cc/debug/traced_picture.h
+++ b/cc/debug/traced_picture.h
@@ -23,10 +23,10 @@
static scoped_refptr<base::debug::ConvertableToTraceFormat>
AsTraceablePictureAlias(const Picture* original);
- virtual void AppendAsTraceFormat(std::string* out) const override;
+ void AppendAsTraceFormat(std::string* out) const override;
private:
- virtual ~TracedPicture();
+ ~TracedPicture() override;
void AppendPicture(std::string* out) const;
void AppendPictureAlias(std::string* out) const;
diff --git a/cc/debug/unittest_only_benchmark.h b/cc/debug/unittest_only_benchmark.h
index 277d85f..7fa2b4d 100644
--- a/cc/debug/unittest_only_benchmark.h
+++ b/cc/debug/unittest_only_benchmark.h
@@ -14,13 +14,13 @@
public:
UnittestOnlyBenchmark(scoped_ptr<base::Value> value,
const DoneCallback& callback);
- virtual ~UnittestOnlyBenchmark();
+ ~UnittestOnlyBenchmark() override;
- virtual void DidUpdateLayers(LayerTreeHost* host) override;
- virtual bool ProcessMessage(scoped_ptr<base::Value> value) override;
+ void DidUpdateLayers(LayerTreeHost* host) override;
+ bool ProcessMessage(scoped_ptr<base::Value> value) override;
protected:
- virtual scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
+ scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
scoped_refptr<base::MessageLoopProxy> origin_loop) override;
private:
diff --git a/cc/debug/unittest_only_benchmark_impl.h b/cc/debug/unittest_only_benchmark_impl.h
index 48953de..f9b256d 100644
--- a/cc/debug/unittest_only_benchmark_impl.h
+++ b/cc/debug/unittest_only_benchmark_impl.h
@@ -21,9 +21,9 @@
UnittestOnlyBenchmarkImpl(scoped_refptr<base::MessageLoopProxy> origin_loop,
base::Value* settings,
const DoneCallback& callback);
- virtual ~UnittestOnlyBenchmarkImpl();
+ ~UnittestOnlyBenchmarkImpl() override;
- virtual void DidCompleteCommit(LayerTreeHostImpl* host) override;
+ void DidCompleteCommit(LayerTreeHostImpl* host) override;
};
} // namespace cc
diff --git a/cc/input/top_controls_manager_unittest.cc b/cc/input/top_controls_manager_unittest.cc
index 177904c..9bde132 100644
--- a/cc/input/top_controls_manager_unittest.cc
+++ b/cc/input/top_controls_manager_unittest.cc
@@ -35,24 +35,20 @@
root_scroll_layer_ = LayerImpl::Create(active_tree_.get(), 1);
}
- virtual ~MockTopControlsManagerClient() {}
+ ~MockTopControlsManagerClient() override {}
- virtual void DidChangeTopControlsPosition() override {
+ void DidChangeTopControlsPosition() override {
redraw_needed_ = true;
update_draw_properties_needed_ = true;
}
- virtual bool HaveRootScrollLayer() const override {
- return true;
- }
+ bool HaveRootScrollLayer() const override { return true; }
- virtual void SetControlsTopOffset(float offset) override {
+ void SetControlsTopOffset(float offset) override {
top_controls_top_offset_ = offset;
}
- virtual float ControlsTopOffset() const override {
- return top_controls_top_offset_;
- }
+ float ControlsTopOffset() const override { return top_controls_top_offset_; }
LayerImpl* rootScrollLayer() {
return root_scroll_layer_.get();
diff --git a/cc/layers/content_layer.h b/cc/layers/content_layer.h
index 4b8c346..fe0bd37 100644
--- a/cc/layers/content_layer.h
+++ b/cc/layers/content_layer.h
@@ -21,7 +21,7 @@
public:
static scoped_ptr<ContentLayerPainter> Create(ContentLayerClient* client);
- virtual void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override;
+ void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override;
private:
explicit ContentLayerPainter(ContentLayerClient* client);
@@ -38,33 +38,32 @@
void ClearClient();
- virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
- virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
- override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual bool NeedMoreUpdates() override;
+ void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
+ void SetTexturePriorities(const PriorityCalculator& priority_calc) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ bool NeedMoreUpdates() override;
- virtual void SetContentsOpaque(bool contents_opaque) override;
+ void SetContentsOpaque(bool contents_opaque) override;
- virtual bool SupportsLCDText() const override;
+ bool SupportsLCDText() const override;
- virtual skia::RefPtr<SkPicture> GetPicture() const override;
+ skia::RefPtr<SkPicture> GetPicture() const override;
- virtual void OnOutputSurfaceCreated() override;
+ void OnOutputSurfaceCreated() override;
protected:
explicit ContentLayer(ContentLayerClient* client);
- virtual ~ContentLayer();
+ ~ContentLayer() override;
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
// TiledLayer implementation.
- virtual LayerUpdater* Updater() const override;
+ LayerUpdater* Updater() const override;
private:
// TiledLayer implementation.
- virtual void CreateUpdaterIfNeeded() override;
+ void CreateUpdaterIfNeeded() override;
void UpdateCanUseLCDText();
diff --git a/cc/layers/contents_scaling_layer.h b/cc/layers/contents_scaling_layer.h
index 3b1f828..15faa00 100644
--- a/cc/layers/contents_scaling_layer.h
+++ b/cc/layers/contents_scaling_layer.h
@@ -14,17 +14,17 @@
// The content bounds are determined by bounds and scale of the contents.
class CC_EXPORT ContentsScalingLayer : public Layer {
public:
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* content_bounds) override;
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
protected:
ContentsScalingLayer();
- virtual ~ContentsScalingLayer();
+ ~ContentsScalingLayer() override;
gfx::Size ComputeContentBoundsForScale(float scale_x, float scale_y) const;
diff --git a/cc/layers/contents_scaling_layer_unittest.cc b/cc/layers/contents_scaling_layer_unittest.cc
index 9865079..38385a0 100644
--- a/cc/layers/contents_scaling_layer_unittest.cc
+++ b/cc/layers/contents_scaling_layer_unittest.cc
@@ -18,7 +18,7 @@
MockContentsScalingLayer()
: ContentsScalingLayer() {}
- virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override {
+ void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override {
last_needs_display_rect_ = dirty_rect;
ContentsScalingLayer::SetNeedsDisplayRect(dirty_rect);
}
@@ -28,7 +28,7 @@
}
private:
- virtual ~MockContentsScalingLayer() {}
+ ~MockContentsScalingLayer() override {}
gfx::Rect last_needs_display_rect_;
};
diff --git a/cc/layers/delegated_frame_provider_unittest.cc b/cc/layers/delegated_frame_provider_unittest.cc
index 76af9a1..5ba92bf 100644
--- a/cc/layers/delegated_frame_provider_unittest.cc
+++ b/cc/layers/delegated_frame_provider_unittest.cc
@@ -69,7 +69,7 @@
virtual void TearDown() override { resource_collection_->SetClient(nullptr); }
- virtual void UnusedResourcesAreAvailable() override {
+ void UnusedResourcesAreAvailable() override {
resources_available_ = true;
resource_collection_->TakeUnusedResourcesForChildCompositor(&resources_);
}
diff --git a/cc/layers/delegated_frame_resource_collection_unittest.cc b/cc/layers/delegated_frame_resource_collection_unittest.cc
index 8ec7169..3e95823 100644
--- a/cc/layers/delegated_frame_resource_collection_unittest.cc
+++ b/cc/layers/delegated_frame_resource_collection_unittest.cc
@@ -46,7 +46,7 @@
return resources;
}
- virtual void UnusedResourcesAreAvailable() override {
+ void UnusedResourcesAreAvailable() override {
resources_available_ = true;
resource_collection_->TakeUnusedResourcesForChildCompositor(
&returned_resources_);
diff --git a/cc/layers/delegated_renderer_layer.h b/cc/layers/delegated_renderer_layer.h
index 8f31b17..39d2696 100644
--- a/cc/layers/delegated_renderer_layer.h
+++ b/cc/layers/delegated_renderer_layer.h
@@ -21,22 +21,21 @@
static scoped_refptr<DelegatedRendererLayer> Create(
const scoped_refptr<DelegatedFrameProvider>& frame_provider);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void SetLayerTreeHost(LayerTreeHost* host) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void PushPropertiesTo(LayerImpl* impl) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void SetLayerTreeHost(LayerTreeHost* host) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void PushPropertiesTo(LayerImpl* impl) override;
// Called by the DelegatedFrameProvider when a new frame is available to be
// picked up.
void ProviderHasNewFrame();
- virtual bool HasDelegatedContent() const override;
+ bool HasDelegatedContent() const override;
protected:
DelegatedRendererLayer(
const scoped_refptr<DelegatedFrameProvider>& frame_provider);
- virtual ~DelegatedRendererLayer();
+ ~DelegatedRendererLayer() override;
private:
scoped_refptr<DelegatedFrameProvider> frame_provider_;
diff --git a/cc/layers/delegated_renderer_layer_impl.h b/cc/layers/delegated_renderer_layer_impl.h
index 53f2f8a..1f84ffb 100644
--- a/cc/layers/delegated_renderer_layer_impl.h
+++ b/cc/layers/delegated_renderer_layer_impl.h
@@ -21,23 +21,22 @@
LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new DelegatedRendererLayerImpl(tree_impl, id));
}
- virtual ~DelegatedRendererLayerImpl();
+ ~DelegatedRendererLayerImpl() override;
// LayerImpl overrides.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual bool HasDelegatedContent() const override;
- virtual bool HasContributingDelegatedRenderPasses() const override;
- virtual RenderPassId FirstContributingRenderPassId() const override;
- virtual RenderPassId NextContributingRenderPassId(
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ bool HasDelegatedContent() const override;
+ bool HasContributingDelegatedRenderPasses() const override;
+ RenderPassId FirstContributingRenderPassId() const override;
+ RenderPassId NextContributingRenderPassId(
RenderPassId previous) const override;
- virtual void ReleaseResources() override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void ReleaseResources() override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
void AppendContributingRenderPasses(RenderPassSink* render_pass_sink);
@@ -85,7 +84,7 @@
const gfx::Size& frame_size) const;
// LayerImpl overrides.
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
bool have_render_passes_to_push_;
float inverse_device_scale_factor_;
diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h
index 22dcec8..7ca0992 100644
--- a/cc/layers/heads_up_display_layer.h
+++ b/cc/layers/heads_up_display_layer.h
@@ -20,16 +20,14 @@
void PrepareForCalculateDrawProperties(
const gfx::Size& device_viewport, float device_scale_factor);
-
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
protected:
HeadsUpDisplayLayer();
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
private:
- virtual ~HeadsUpDisplayLayer();
+ ~HeadsUpDisplayLayer() override;
DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayer);
};
diff --git a/cc/layers/heads_up_display_layer_impl.h b/cc/layers/heads_up_display_layer_impl.h
index 388dfcd..c826092 100644
--- a/cc/layers/heads_up_display_layer_impl.h
+++ b/cc/layers/heads_up_display_layer_impl.h
@@ -32,20 +32,19 @@
int id) {
return make_scoped_ptr(new HeadsUpDisplayLayerImpl(tree_impl, id));
}
- virtual ~HeadsUpDisplayLayerImpl();
+ ~HeadsUpDisplayLayerImpl() override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
void UpdateHudTexture(DrawMode draw_mode,
ResourceProvider* resource_provider);
- virtual void ReleaseResources() override;
+ void ReleaseResources() override;
bool IsAnimatingHUDContents() const { return fade_step_ > 0; }
@@ -70,9 +69,9 @@
HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl, int id);
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
void UpdateHudContents();
void DrawHudContents(SkCanvas* canvas);
diff --git a/cc/layers/heads_up_display_unittest.cc b/cc/layers/heads_up_display_unittest.cc
index 37d40a8..312e482 100644
--- a/cc/layers/heads_up_display_unittest.cc
+++ b/cc/layers/heads_up_display_unittest.cc
@@ -12,7 +12,7 @@
class HeadsUpDisplayTest : public LayerTreeTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// Enable the HUD without requiring text.
settings->initial_debug_state.show_property_changed_rects = true;
}
@@ -23,11 +23,11 @@
static scoped_refptr<DrawsContentLayer> Create() {
return make_scoped_refptr(new DrawsContentLayer());
}
- virtual bool DrawsContent() const override { return true; }
+ bool DrawsContent() const override { return true; }
private:
DrawsContentLayer() : Layer() {}
- virtual ~DrawsContentLayer() {}
+ ~DrawsContentLayer() override {}
};
class HudWithRootLayerChange : public HeadsUpDisplayTest {
@@ -37,14 +37,14 @@
root_layer2_(DrawsContentLayer::Create()),
num_commits_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
root_layer1_->SetBounds(gfx::Size(30, 30));
root_layer2_->SetBounds(gfx::Size(30, 30));
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
++num_commits_;
ASSERT_TRUE(layer_tree_host()->hud_layer());
@@ -86,7 +86,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<DrawsContentLayer> root_layer1_;
diff --git a/cc/layers/image_layer.h b/cc/layers/image_layer.h
index 53d1f69..ed2a2a3 100644
--- a/cc/layers/image_layer.h
+++ b/cc/layers/image_layer.h
@@ -19,28 +19,27 @@
static scoped_refptr<ImageLayer> Create();
// Layer implementation.
- virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
- override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* content_bounds) override;
- virtual void OnOutputSurfaceCreated() override;
+ void SetTexturePriorities(const PriorityCalculator& priority_calc) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override;
+ void OnOutputSurfaceCreated() override;
void SetBitmap(const SkBitmap& image);
protected:
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
private:
ImageLayer();
- virtual ~ImageLayer();
+ ~ImageLayer() override;
// TiledLayer Implementation.
- virtual LayerUpdater* Updater() const override;
- virtual void CreateUpdaterIfNeeded() override;
+ LayerUpdater* Updater() const override;
+ void CreateUpdaterIfNeeded() override;
float ImageContentsScaleX() const;
float ImageContentsScaleY() const;
diff --git a/cc/layers/io_surface_layer.h b/cc/layers/io_surface_layer.h
index 681f1a1..90bcf3e 100644
--- a/cc/layers/io_surface_layer.h
+++ b/cc/layers/io_surface_layer.h
@@ -16,18 +16,17 @@
void SetIOSurfaceProperties(uint32_t io_surface_id, const gfx::Size& size);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
protected:
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
IOSurfaceLayer();
private:
- virtual ~IOSurfaceLayer();
+ ~IOSurfaceLayer() override;
uint32_t io_surface_id_;
gfx::Size io_surface_size_;
diff --git a/cc/layers/io_surface_layer_impl.h b/cc/layers/io_surface_layer_impl.h
index d6b6625..17b7093 100644
--- a/cc/layers/io_surface_layer_impl.h
+++ b/cc/layers/io_surface_layer_impl.h
@@ -19,28 +19,27 @@
int id) {
return make_scoped_ptr(new IOSurfaceLayerImpl(tree_impl, id));
}
- virtual ~IOSurfaceLayerImpl();
+ ~IOSurfaceLayerImpl() override;
void SetIOSurfaceProperties(unsigned io_surface_id, const gfx::Size& size);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer_tree_impl) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer_tree_impl) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void ReleaseResources() override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void ReleaseResources() override;
private:
IOSurfaceLayerImpl(LayerTreeImpl* tree_impl, int id);
void DestroyResource();
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
unsigned io_surface_id_;
gfx::Size io_surface_size_;
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 5af7195..c6279af 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -465,7 +465,7 @@
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
- virtual ~Layer();
+ ~Layer() override;
Layer();
@@ -552,16 +552,15 @@
void RemoveChildOrDependent(Layer* child);
// LayerAnimationValueProvider implementation.
- virtual gfx::ScrollOffset ScrollOffsetForAnimation() const override;
+ gfx::ScrollOffset ScrollOffsetForAnimation() const override;
// LayerAnimationValueObserver implementation.
- virtual void OnFilterAnimated(const FilterOperations& filters) override;
- virtual void OnOpacityAnimated(float opacity) override;
- virtual void OnTransformAnimated(const gfx::Transform& transform) override;
- virtual void OnScrollOffsetAnimated(
- const gfx::ScrollOffset& scroll_offset) override;
- virtual void OnAnimationWaitingForDeletion() override;
- virtual bool IsActive() const override;
+ void OnFilterAnimated(const FilterOperations& filters) override;
+ void OnOpacityAnimated(float opacity) override;
+ void OnTransformAnimated(const gfx::Transform& transform) override;
+ void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
+ void OnAnimationWaitingForDeletion() override;
+ bool IsActive() const override;
// If this layer has a scroll parent, it removes |this| from its list of
// scroll children.
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 210b392..bcac36c 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -94,30 +94,28 @@
return make_scoped_ptr(new LayerImpl(tree_impl, id));
}
- virtual ~LayerImpl();
+ ~LayerImpl() override;
int id() const { return layer_id_; }
// LayerAnimationValueProvider implementation.
- virtual gfx::ScrollOffset ScrollOffsetForAnimation() const override;
+ gfx::ScrollOffset ScrollOffsetForAnimation() const override;
// LayerAnimationValueObserver implementation.
- virtual void OnFilterAnimated(const FilterOperations& filters) override;
- virtual void OnOpacityAnimated(float opacity) override;
- virtual void OnTransformAnimated(const gfx::Transform& transform) override;
- virtual void OnScrollOffsetAnimated(
- const gfx::ScrollOffset& scroll_offset) override;
- virtual void OnAnimationWaitingForDeletion() override;
- virtual bool IsActive() const override;
+ void OnFilterAnimated(const FilterOperations& filters) override;
+ void OnOpacityAnimated(float opacity) override;
+ void OnTransformAnimated(const gfx::Transform& transform) override;
+ void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
+ void OnAnimationWaitingForDeletion() override;
+ bool IsActive() const override;
// AnimationDelegate implementation.
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override{};
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override;
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override{};
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override;
// Tree structure.
LayerImpl* parent() { return parent_; }
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index 3f5ff5e..8d120be 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -497,12 +497,11 @@
class ScrollDelegateIgnore : public LayerImpl::ScrollOffsetDelegate {
public:
- virtual void SetTotalScrollOffset(
- const gfx::ScrollOffset& new_value) override {}
- virtual gfx::ScrollOffset GetTotalScrollOffset() override {
+ void SetTotalScrollOffset(const gfx::ScrollOffset& new_value) override {}
+ gfx::ScrollOffset GetTotalScrollOffset() override {
return gfx::ScrollOffset(fixed_offset_);
}
- virtual bool IsExternalFlingActive() const override { return false; }
+ bool IsExternalFlingActive() const override { return false; }
void set_fixed_offset(const gfx::Vector2dF& fixed_offset) {
fixed_offset_ = fixed_offset;
@@ -547,14 +546,11 @@
class ScrollDelegateAccept : public LayerImpl::ScrollOffsetDelegate {
public:
- virtual void SetTotalScrollOffset(
- const gfx::ScrollOffset& new_value) override {
+ void SetTotalScrollOffset(const gfx::ScrollOffset& new_value) override {
current_offset_ = new_value;
}
- virtual gfx::ScrollOffset GetTotalScrollOffset() override {
- return current_offset_;
- }
- virtual bool IsExternalFlingActive() const override { return false; }
+ gfx::ScrollOffset GetTotalScrollOffset() override { return current_offset_; }
+ bool IsExternalFlingActive() const override { return false; }
private:
gfx::ScrollOffset current_offset_;
diff --git a/cc/layers/layer_iterator_unittest.cc b/cc/layers/layer_iterator_unittest.cc
index 3aa98d2..cdc1473 100644
--- a/cc/layers/layer_iterator_unittest.cc
+++ b/cc/layers/layer_iterator_unittest.cc
@@ -31,7 +31,7 @@
int count_representing_contributing_surface_;
int count_representing_itself_;
- virtual bool DrawsContent() const override { return draws_content_; }
+ bool DrawsContent() const override { return draws_content_; }
void set_draws_content(bool draws_content) { draws_content_ = draws_content; }
private:
@@ -39,7 +39,7 @@
SetBounds(gfx::Size(100, 100));
SetPosition(gfx::Point());
}
- virtual ~TestLayer() {}
+ ~TestLayer() override {}
bool draws_content_;
};
diff --git a/cc/layers/layer_perftest.cc b/cc/layers/layer_perftest.cc
index c9b8a40..fcd0844 100644
--- a/cc/layers/layer_perftest.cc
+++ b/cc/layers/layer_perftest.cc
@@ -23,8 +23,7 @@
class MockLayerPainter : public LayerPainter {
public:
- virtual void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {
- }
+ void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {}
};
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index bd832be..ecdd916 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -52,8 +52,7 @@
class MockLayerPainter : public LayerPainter {
public:
- virtual void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {
- }
+ void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {}
};
class LayerTest : public testing::Test {
@@ -1211,12 +1210,12 @@
return make_scoped_refptr(new DrawsContentChangeLayer());
}
- virtual void SetLayerTreeHost(LayerTreeHost* host) override {
+ void SetLayerTreeHost(LayerTreeHost* host) override {
Layer::SetLayerTreeHost(host);
SetFakeDrawsContent(!fake_draws_content_);
}
- virtual bool HasDrawableContent() const override {
+ bool HasDrawableContent() const override {
return fake_draws_content_ && Layer::HasDrawableContent();
}
@@ -1227,7 +1226,7 @@
private:
DrawsContentChangeLayer() : Layer(), fake_draws_content_(false) {}
- virtual ~DrawsContentChangeLayer() override {}
+ ~DrawsContentChangeLayer() override {}
bool fake_draws_content_;
};
diff --git a/cc/layers/nine_patch_layer.h b/cc/layers/nine_patch_layer.h
index c1891bc..f5aa712 100644
--- a/cc/layers/nine_patch_layer.h
+++ b/cc/layers/nine_patch_layer.h
@@ -21,7 +21,7 @@
public:
static scoped_refptr<NinePatchLayer> Create();
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
// |border| is the space around the center rectangular region in layer space
// (known as aperture in image space). |border.x()| and |border.y()| are the
@@ -41,9 +41,8 @@
private:
NinePatchLayer();
- virtual ~NinePatchLayer();
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ ~NinePatchLayer() override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
gfx::Rect border_;
bool fill_center_;
diff --git a/cc/layers/nine_patch_layer_impl.h b/cc/layers/nine_patch_layer_impl.h
index 0674ecb..9af6f32 100644
--- a/cc/layers/nine_patch_layer_impl.h
+++ b/cc/layers/nine_patch_layer_impl.h
@@ -27,7 +27,7 @@
int id) {
return make_scoped_ptr(new NinePatchLayerImpl(tree_impl, id));
}
- virtual ~NinePatchLayerImpl();
+ ~NinePatchLayerImpl() override;
// The bitmap stretches out the bounds of the layer. The following picture
// illustrates the parameters associated with the dimensions.
@@ -57,21 +57,20 @@
const gfx::Rect& border,
bool fill_center);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
- virtual base::DictionaryValue* LayerTreeAsJson() const override;
+ base::DictionaryValue* LayerTreeAsJson() const override;
protected:
NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id);
private:
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
void CheckGeometryLimitations();
diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h
index 8a621e3..950c165 100644
--- a/cc/layers/painted_scrollbar_layer.h
+++ b/cc/layers/painted_scrollbar_layer.h
@@ -19,37 +19,36 @@
class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
public ContentsScalingLayer {
public:
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
static scoped_refptr<PaintedScrollbarLayer> Create(
scoped_ptr<Scrollbar> scrollbar,
int scroll_layer_id);
- virtual bool OpacityCanAnimateOnImplThread() const override;
- virtual ScrollbarLayerInterface* ToScrollbarLayer() override;
+ bool OpacityCanAnimateOnImplThread() const override;
+ ScrollbarLayerInterface* ToScrollbarLayer() override;
// ScrollbarLayerInterface
- virtual int ScrollLayerId() const override;
- virtual void SetScrollLayer(int layer_id) override;
- virtual void SetClipLayer(int layer_id) override;
+ int ScrollLayerId() const override;
+ void SetScrollLayer(int layer_id) override;
+ void SetClipLayer(int layer_id) override;
- virtual ScrollbarOrientation orientation() const override;
+ ScrollbarOrientation orientation() const override;
// Layer interface
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void SetLayerTreeHost(LayerTreeHost* host) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void PushScrollClipPropertiesTo(LayerImpl* layer) override;
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* content_bounds) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void SetLayerTreeHost(LayerTreeHost* host) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void PushScrollClipPropertiesTo(LayerImpl* layer) override;
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override;
protected:
PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar, int scroll_layer_id);
- virtual ~PaintedScrollbarLayer();
+ ~PaintedScrollbarLayer() override;
// For unit tests
UIResourceId track_resource_id() {
diff --git a/cc/layers/painted_scrollbar_layer_impl.h b/cc/layers/painted_scrollbar_layer_impl.h
index 1c67e73..d54de6b 100644
--- a/cc/layers/painted_scrollbar_layer_impl.h
+++ b/cc/layers/painted_scrollbar_layer_impl.h
@@ -21,18 +21,17 @@
LayerTreeImpl* tree_impl,
int id,
ScrollbarOrientation orientation);
- virtual ~PaintedScrollbarLayerImpl();
+ ~PaintedScrollbarLayerImpl() override;
// LayerImpl implementation.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
void SetThumbThickness(int thumb_thickness);
void SetThumbLength(int thumb_length);
@@ -52,14 +51,14 @@
ScrollbarOrientation orientation);
// ScrollbarLayerImplBase implementation.
- virtual int ThumbThickness() const override;
- virtual int ThumbLength() const override;
- virtual float TrackLength() const override;
- virtual int TrackStart() const override;
- virtual bool IsThumbResizable() const override;
+ int ThumbThickness() const override;
+ int ThumbLength() const override;
+ float TrackLength() const override;
+ int TrackStart() const override;
+ bool IsThumbResizable() const override;
private:
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
UIResourceId track_ui_resource_id_;
UIResourceId thumb_ui_resource_id_;
diff --git a/cc/layers/picture_image_layer.h b/cc/layers/picture_image_layer.h
index 6f73b42..3467804 100644
--- a/cc/layers/picture_image_layer.h
+++ b/cc/layers/picture_image_layer.h
@@ -20,23 +20,22 @@
void SetBitmap(const SkBitmap& image);
// Layer implementation.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(
- LayerTreeImpl* tree_impl) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
// ContentLayerClient implementation.
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override;
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override;
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override;
protected:
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
private:
PictureImageLayer();
- virtual ~PictureImageLayer();
+ ~PictureImageLayer() override;
SkBitmap bitmap_;
diff --git a/cc/layers/picture_image_layer_impl.h b/cc/layers/picture_image_layer_impl.h
index db36a13..7a363a1 100644
--- a/cc/layers/picture_image_layer_impl.h
+++ b/cc/layers/picture_image_layer_impl.h
@@ -15,22 +15,20 @@
int id) {
return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id));
}
- virtual ~PictureImageLayerImpl();
+ ~PictureImageLayerImpl() override;
// LayerImpl overrides.
- virtual const char* LayerTypeAsString() const override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(
- LayerTreeImpl* tree_impl) override;
+ const char* LayerTypeAsString() const override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
protected:
PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id);
- virtual bool ShouldAdjustRasterScale() const override;
- virtual void RecalculateRasterScales() override;
- virtual void GetDebugBorderProperties(
- SkColor* color, float* width) const override;
+ bool ShouldAdjustRasterScale() const override;
+ void RecalculateRasterScales() override;
+ void GetDebugBorderProperties(SkColor* color, float* width) const override;
- virtual void UpdateIdealScales() override;
+ void UpdateIdealScales() override;
private:
DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl);
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index aee140f..1bb7d54 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -60,7 +60,7 @@
Layer::SetLayerTreeHost(host);
if (host) {
pile_->SetMinContentsScale(host->settings().minimum_contents_scale);
- pile_->SetTileGridSize(host->settings().default_tile_size);
+ pile_->SetTileGridSize(host->settings().default_tile_grid_size);
pile_->set_slow_down_raster_scale_factor(
host->debug_state().slow_down_raster_scale_factor);
pile_->set_show_debug_picture_borders(
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index 2108fbe..0ba26e6 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -24,19 +24,18 @@
void ClearClient();
// Layer interface.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(
- LayerTreeImpl* tree_impl) override;
- virtual void SetLayerTreeHost(LayerTreeHost* host) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void SetNeedsDisplayRect(const gfx::Rect& layer_rect) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void SetIsMask(bool is_mask) override;
- virtual bool SupportsLCDText() const override;
- virtual skia::RefPtr<SkPicture> GetPicture() const override;
- virtual bool IsSuitableForGpuRasterization() const override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void SetLayerTreeHost(LayerTreeHost* host) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void SetNeedsDisplayRect(const gfx::Rect& layer_rect) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void SetIsMask(bool is_mask) override;
+ bool SupportsLCDText() const override;
+ skia::RefPtr<SkPicture> GetPicture() const override;
+ bool IsSuitableForGpuRasterization() const override;
- virtual void RunMicroBenchmark(MicroBenchmark* benchmark) override;
+ void RunMicroBenchmark(MicroBenchmark* benchmark) override;
ContentLayerClient* client() { return client_; }
@@ -44,9 +43,9 @@
protected:
explicit PictureLayer(ContentLayerClient* client);
- virtual ~PictureLayer();
+ ~PictureLayer() override;
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
void UpdateCanUseLCDText();
private:
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index fd8a507..c0344e2 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -498,10 +498,12 @@
(layer_tree_impl()->CurrentBeginFrameArgs().frame_time -
base::TimeTicks()).InSecondsF();
+ gfx::Rect viewport_rect_in_layer_space =
+ GetViewportForTilePriorityInContentSpace();
bool tiling_needs_update = false;
for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
- if (tilings_->tiling_at(i)->NeedsUpdateForFrameAtTime(
- current_frame_time_in_seconds)) {
+ if (tilings_->tiling_at(i)->NeedsUpdateForFrameAtTimeAndViewport(
+ current_frame_time_in_seconds, viewport_rect_in_layer_space)) {
tiling_needs_update = true;
break;
}
@@ -509,8 +511,6 @@
if (!tiling_needs_update)
return;
- gfx::Rect viewport_rect_in_layer_space =
- GetViewportForTilePriorityInContentSpace();
WhichTree tree =
layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
bool can_require_tiles_for_activation =
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 967b930..1ac106a 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -99,52 +99,49 @@
static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new PictureLayerImpl(tree_impl, id));
}
- virtual ~PictureLayerImpl();
+ ~PictureLayerImpl() override;
// LayerImpl overrides.
- virtual const char* LayerTypeAsString() const override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
- virtual void UpdateTiles(const Occlusion& occlusion_in_content_space,
- bool resourceless_software_draw) override;
- virtual void NotifyTileStateChanged(const Tile* tile) override;
- virtual void DidBecomeActive() override;
- virtual void DidBeginTracing() override;
- virtual void ReleaseResources() override;
- virtual skia::RefPtr<SkPicture> GetPicture() override;
+ const char* LayerTypeAsString() const override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
+ void UpdateTiles(const Occlusion& occlusion_in_content_space,
+ bool resourceless_software_draw) override;
+ void NotifyTileStateChanged(const Tile* tile) override;
+ void DidBecomeActive() override;
+ void DidBeginTracing() override;
+ void ReleaseResources() override;
+ skia::RefPtr<SkPicture> GetPicture() override;
// PictureLayerTilingClient overrides.
- virtual scoped_refptr<Tile> CreateTile(
- PictureLayerTiling* tiling,
- const gfx::Rect& content_rect) override;
- virtual PicturePileImpl* GetPile() override;
- virtual gfx::Size CalculateTileSize(
- const gfx::Size& content_bounds) const override;
- virtual const Region* GetInvalidation() override;
- virtual const PictureLayerTiling* GetTwinTiling(
+ scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling,
+ const gfx::Rect& content_rect) override;
+ PicturePileImpl* GetPile() override;
+ gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override;
+ const Region* GetInvalidation() override;
+ const PictureLayerTiling* GetTwinTiling(
const PictureLayerTiling* tiling) const override;
- virtual PictureLayerTiling* GetRecycledTwinTiling(
+ PictureLayerTiling* GetRecycledTwinTiling(
const PictureLayerTiling* tiling) override;
- virtual size_t GetMaxTilesForInterestArea() const override;
- virtual float GetSkewportTargetTimeInSeconds() const override;
- virtual int GetSkewportExtrapolationLimitInContentPixels() const override;
- virtual WhichTree GetTree() const override;
- virtual bool RequiresHighResToDraw() const override;
+ size_t GetMaxTilesForInterestArea() const override;
+ float GetSkewportTargetTimeInSeconds() const override;
+ int GetSkewportExtrapolationLimitInContentPixels() const override;
+ WhichTree GetTree() const override;
+ bool RequiresHighResToDraw() const override;
// PushPropertiesTo active tree => pending tree.
void SyncTiling(const PictureLayerTiling* tiling);
// Mask-related functions.
- virtual void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
- gfx::Size* resource_size) const override;
+ void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
+ gfx::Size* resource_size) const override;
- virtual size_t GPUMemoryUsageInBytes() const override;
+ size_t GPUMemoryUsageInBytes() const override;
- virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override;
+ void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override;
// Functions used by tile manager.
PictureLayerImpl* GetTwinLayer() { return twin_layer_; }
@@ -185,11 +182,9 @@
bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
- virtual void GetDebugBorderProperties(
- SkColor* color, float* width) const override;
- virtual void GetAllTilesForTracing(
- std::set<const Tile*>* tiles) const override;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void GetDebugBorderProperties(SkColor* color, float* width) const override;
+ void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
virtual void UpdateIdealScales();
float MaximumTilingContentsScale() const;
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 9b767ce..73906af 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -38,7 +38,7 @@
public:
explicit MockCanvas(int w, int h) : SkCanvas(w, h) {}
- virtual void drawRect(const SkRect& rect, const SkPaint& paint) override {
+ void drawRect(const SkRect& rect, const SkPaint& paint) override {
// Capture calls before SkCanvas quickReject() kicks in.
rects_.push_back(rect);
}
@@ -2322,7 +2322,7 @@
class DeferredInitPictureLayerImplTest : public PictureLayerImplTest {
public:
- virtual void InitializeRenderer() override {
+ void InitializeRenderer() override {
bool delegated_rendering = false;
host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL(
scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
@@ -3643,7 +3643,7 @@
public:
PictureLayerImplTestWithDelegatingRenderer() : PictureLayerImplTest() {}
- virtual void InitializeRenderer() override {
+ void InitializeRenderer() override {
host_impl_.InitializeRenderer(FakeOutputSurface::CreateDelegating3d());
}
};
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index 545b332..78182d9 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -20,14 +20,12 @@
class MockContentLayerClient : public ContentLayerClient {
public:
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {}
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override {
- return false;
- };
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override { return false; };
};
TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
@@ -84,5 +82,23 @@
EXPECT_FALSE(layer->IsSuitableForGpuRasterization());
}
+TEST(PictureLayerTest, UseTileGridSize) {
+ LayerTreeSettings settings;
+ settings.default_tile_grid_size = gfx::Size(123, 123);
+
+ MockContentLayerClient client;
+ scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
+ FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host =
+ FakeLayerTreeHost::Create(&host_client, settings);
+ host->SetRootLayer(layer);
+
+ // Tile-grid is set according to its setting.
+ SkTileGridFactory::TileGridInfo info =
+ layer->GetPicturePileForTesting()->GetTileGridInfoForTesting();
+ EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width());
+ EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height());
+}
+
} // namespace
} // namespace cc
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc
index b57152a..68398fe 100644
--- a/cc/layers/render_surface_unittest.cc
+++ b/cc/layers/render_surface_unittest.cc
@@ -135,7 +135,7 @@
class TestRenderPassSink : public RenderPassSink {
public:
- virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override {
+ void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override {
render_passes_.push_back(render_pass.Pass());
}
diff --git a/cc/layers/scrollbar_layer_impl_base.h b/cc/layers/scrollbar_layer_impl_base.h
index 85dc643..4a96b49 100644
--- a/cc/layers/scrollbar_layer_impl_base.h
+++ b/cc/layers/scrollbar_layer_impl_base.h
@@ -46,8 +46,8 @@
bool CanScrollOrientation() const;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual ScrollbarLayerImplBase* ToScrollbarLayer() override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ ScrollbarLayerImplBase* ToScrollbarLayer() override;
void PushScrollClipPropertiesTo(LayerImpl* layer);
bool SetVisibleToTotalLengthRatio(float ratio);
@@ -66,7 +66,7 @@
ScrollbarOrientation orientation,
bool is_left_side_vertical_scrollbar,
bool is_overlay);
- virtual ~ScrollbarLayerImplBase();
+ ~ScrollbarLayerImplBase() override;
gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const;
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index fdffcfa..25fa708 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -568,7 +568,7 @@
void SetScrollbarBounds(const gfx::Size& bounds) { bounds_ = bounds; }
- virtual void BeginTest() override {
+ void BeginTest() override {
scroll_layer_ = Layer::Create();
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
@@ -583,7 +583,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
const int kMaxTextureSize =
layer_tree_host()->GetRendererCapabilities().max_texture_size;
@@ -598,7 +598,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<PaintedScrollbarLayer> scrollbar_layer_;
@@ -635,7 +635,7 @@
InitializeSingleThreaded(client, base::MessageLoopProxy::current());
}
- virtual UIResourceId CreateUIResource(UIResourceClient* content) override {
+ UIResourceId CreateUIResource(UIResourceClient* content) override {
total_ui_resource_created_++;
UIResourceId nid = next_id_++;
ui_resource_bitmap_map_.insert(
@@ -644,7 +644,7 @@
}
// Deletes a UI resource. May safely be called more than once.
- virtual void DeleteUIResource(UIResourceId id) override {
+ void DeleteUIResource(UIResourceId id) override {
UIResourceBitmapMap::iterator iter = ui_resource_bitmap_map_.find(id);
if (iter != ui_resource_bitmap_map_.end()) {
ui_resource_bitmap_map_.erase(iter);
diff --git a/cc/layers/solid_color_layer.h b/cc/layers/solid_color_layer.h
index 987c005..8dc9860 100644
--- a/cc/layers/solid_color_layer.h
+++ b/cc/layers/solid_color_layer.h
@@ -17,16 +17,15 @@
public:
static scoped_refptr<SolidColorLayer> Create();
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
- virtual void SetBackgroundColor(SkColor color) override;
+ void SetBackgroundColor(SkColor color) override;
protected:
SolidColorLayer();
private:
- virtual ~SolidColorLayer();
+ ~SolidColorLayer() override;
DISALLOW_COPY_AND_ASSIGN(SolidColorLayer);
};
diff --git a/cc/layers/solid_color_layer_impl.h b/cc/layers/solid_color_layer_impl.h
index 0116479..34a3819 100644
--- a/cc/layers/solid_color_layer_impl.h
+++ b/cc/layers/solid_color_layer_impl.h
@@ -25,20 +25,19 @@
SkColor color,
AppendQuadsData* append_quads_data);
- virtual ~SolidColorLayerImpl();
+ ~SolidColorLayerImpl() override;
// LayerImpl overrides.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
protected:
SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id);
private:
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
DISALLOW_COPY_AND_ASSIGN(SolidColorLayerImpl);
};
diff --git a/cc/layers/solid_color_scrollbar_layer.h b/cc/layers/solid_color_scrollbar_layer.h
index 0e48173..fc6306e 100644
--- a/cc/layers/solid_color_scrollbar_layer.h
+++ b/cc/layers/solid_color_scrollbar_layer.h
@@ -14,8 +14,7 @@
class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
public Layer {
public:
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
static scoped_refptr<SolidColorScrollbarLayer> Create(
ScrollbarOrientation orientation,
@@ -25,20 +24,20 @@
int scroll_layer_id);
// Layer overrides.
- virtual bool OpacityCanAnimateOnImplThread() const override;
- virtual ScrollbarLayerInterface* ToScrollbarLayer() override;
+ bool OpacityCanAnimateOnImplThread() const override;
+ ScrollbarLayerInterface* ToScrollbarLayer() override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void PushScrollClipPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void PushScrollClipPropertiesTo(LayerImpl* layer) override;
- virtual void SetNeedsDisplayRect(const gfx::Rect& rect) override;
+ void SetNeedsDisplayRect(const gfx::Rect& rect) override;
// ScrollbarLayerInterface
- virtual int ScrollLayerId() const override;
- virtual void SetScrollLayer(int layer_id) override;
- virtual void SetClipLayer(int layer_id) override;
+ int ScrollLayerId() const override;
+ void SetScrollLayer(int layer_id) override;
+ void SetClipLayer(int layer_id) override;
- virtual ScrollbarOrientation orientation() const override;
+ ScrollbarOrientation orientation() const override;
protected:
SolidColorScrollbarLayer(ScrollbarOrientation orientation,
@@ -46,7 +45,7 @@
int track_start,
bool is_left_side_vertical_scrollbar,
int scroll_layer_id);
- virtual ~SolidColorScrollbarLayer();
+ ~SolidColorScrollbarLayer() override;
private:
int scroll_layer_id_;
diff --git a/cc/layers/solid_color_scrollbar_layer_impl.h b/cc/layers/solid_color_scrollbar_layer_impl.h
index 32695d0..1abf552 100644
--- a/cc/layers/solid_color_scrollbar_layer_impl.h
+++ b/cc/layers/solid_color_scrollbar_layer_impl.h
@@ -20,16 +20,15 @@
int track_start,
bool is_left_side_vertical_scrollbar,
bool is_overlay);
- virtual ~SolidColorScrollbarLayerImpl();
+ ~SolidColorScrollbarLayerImpl() override;
// LayerImpl overrides.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
protected:
SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl,
@@ -41,11 +40,11 @@
bool is_overlay);
// ScrollbarLayerImplBase implementation.
- virtual int ThumbThickness() const override;
- virtual int ThumbLength() const override;
- virtual float TrackLength() const override;
- virtual int TrackStart() const override;
- virtual bool IsThumbResizable() const override;
+ int ThumbThickness() const override;
+ int ThumbLength() const override;
+ float TrackLength() const override;
+ int TrackStart() const override;
+ bool IsThumbResizable() const override;
private:
int thumb_thickness_;
diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
index eace365..0b886eb 100644
--- a/cc/layers/surface_layer.h
+++ b/cc/layers/surface_layer.h
@@ -20,16 +20,15 @@
void SetSurfaceId(SurfaceId surface_id);
// Layer overrides.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
protected:
SurfaceLayer();
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
private:
- virtual ~SurfaceLayer();
+ ~SurfaceLayer() override;
SurfaceId surface_id_;
diff --git a/cc/layers/surface_layer_impl.h b/cc/layers/surface_layer_impl.h
index 5353a21..9ef3c6d 100644
--- a/cc/layers/surface_layer_impl.h
+++ b/cc/layers/surface_layer_impl.h
@@ -17,26 +17,24 @@
static scoped_ptr<SurfaceLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new SurfaceLayerImpl(tree_impl, id));
}
- virtual ~SurfaceLayerImpl();
+ ~SurfaceLayerImpl() override;
void SetSurfaceId(SurfaceId surface_id);
// LayerImpl overrides.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
protected:
SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id);
private:
- virtual void GetDebugBorderProperties(SkColor* color,
- float* width) const override;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
- virtual const char* LayerTypeAsString() const override;
+ void GetDebugBorderProperties(SkColor* color, float* width) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
+ const char* LayerTypeAsString() const override;
SurfaceId surface_id_;
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index 61791ac..fa52a8c 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -94,8 +94,7 @@
// Resets the texture.
void ClearTexture();
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
// Sets whether this texture should be Y-flipped at draw time. Defaults to
// true.
@@ -134,18 +133,18 @@
// TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204
void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox);
- virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
+ void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
- virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
+ void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
protected:
explicit TextureLayer(TextureLayerClient* client);
- virtual ~TextureLayer();
- virtual bool HasDrawableContent() const override;
+ ~TextureLayer() override;
+ bool HasDrawableContent() const override;
private:
void SetTextureMailboxInternal(
diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h
index bbf0817..6d38ae1 100644
--- a/cc/layers/texture_layer_impl.h
+++ b/cc/layers/texture_layer_impl.h
@@ -20,19 +20,19 @@
static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new TextureLayerImpl(tree_impl, id));
}
- virtual ~TextureLayerImpl();
+ ~TextureLayerImpl() override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* layer_tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(
+ LayerTreeImpl* layer_tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
- virtual void ReleaseResources() override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
+ void ReleaseResources() override;
// These setter methods don't cause any implicit damage, so the texture client
// must explicitly invalidate if they intend to cause a visible change in the
@@ -56,7 +56,7 @@
private:
TextureLayerImpl(LayerTreeImpl* tree_impl, int id);
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
void FreeTextureMailbox();
ResourceProvider::ResourceId external_texture_resource_;
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 99c1e9e..d355b62 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -65,7 +65,7 @@
public:
FakeTextureLayerClient() : mailbox_changed_(true) {}
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
TextureMailbox* mailbox,
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) override {
@@ -293,7 +293,7 @@
using TextureLayer::TextureMailboxHolder::Create;
protected:
- virtual ~TestMailboxHolder() {}
+ ~TestMailboxHolder() override {}
};
class TextureLayerWithMailboxTest : public TextureLayerTest {
@@ -726,7 +726,7 @@
callback.Pass());
}
- virtual void BeginTest() override {
+ void BeginTest() override {
EXPECT_EQ(true, main_thread_.CalledOnValidThread());
gfx::Size bounds(100, 100);
@@ -750,7 +750,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
++commit_count_;
switch (commit_count_) {
case 1:
@@ -820,7 +820,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
base::ThreadChecker main_thread_;
@@ -849,7 +849,7 @@
callback.Pass());
}
- virtual void BeginTest() override {
+ void BeginTest() override {
gfx::Size bounds(100, 100);
root_ = Layer::Create();
root_->SetBounds(bounds);
@@ -866,11 +866,11 @@
PostSetNeedsCommitToMainThread();
}
- virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
++activate_count_;
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The first mailbox has been activated. Set a new mailbox, and
@@ -889,7 +889,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
switch (host_impl->active_tree()->source_frame_number()) {
case 0: {
// The activate for the 1st mailbox should have happened before now.
@@ -913,8 +913,7 @@
}
}
-
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int activate_count_;
scoped_refptr<Layer> root_;
@@ -1129,7 +1128,7 @@
public TextureLayerClient {
public:
// TextureLayerClient implementation.
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
TextureMailbox* texture_mailbox,
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) override {
@@ -1153,7 +1152,7 @@
EndTest();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
@@ -1167,11 +1166,9 @@
LayerTreeTest::SetupTree();
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
EXPECT_FALSE(proxy()->MainFrameWillHappenForTesting());
@@ -1187,8 +1184,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ASSERT_TRUE(result);
DelegatedFrameData* delegated_frame_data =
output_surface()->last_sent_frame().delegated_frame_data.get();
@@ -1205,7 +1201,7 @@
host_impl->ReclaimResources(&ack);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<TextureLayer> texture_layer_;
@@ -1229,7 +1225,7 @@
}
// TextureLayerClient implementation.
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
TextureMailbox* mailbox,
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) override {
@@ -1251,7 +1247,7 @@
++mailbox_returned_;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
@@ -1276,11 +1272,9 @@
LayerTreeTest::SetupTree();
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
++commit_count_;
switch (commit_count_) {
case 1:
@@ -1324,8 +1318,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ASSERT_TRUE(result);
DelegatedFrameData* delegated_frame_data =
output_surface()->last_sent_frame().delegated_frame_data.get();
@@ -1342,7 +1335,7 @@
host_impl->ReclaimResources(&ack);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<SolidColorLayer> solid_layer_;
@@ -1366,7 +1359,7 @@
public TextureLayerClient {
public:
// TextureLayerClient implementation.
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
TextureMailbox* mailbox,
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) override {
@@ -1381,7 +1374,7 @@
mailbox_released_ = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeTest::SetupTree();
scoped_refptr<TextureLayer> texture_layer =
@@ -1392,18 +1385,14 @@
layer_tree_host()->root_layer()->AddChild(texture_layer);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
mailbox_released_ = false;
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
- EndTest();
- }
+ void DidCommitAndDrawFrame() override { EndTest(); }
- virtual void AfterTest() override {
- EXPECT_TRUE(mailbox_released_);
- }
+ void AfterTest() override { EXPECT_TRUE(mailbox_released_); }
private:
bool mailbox_released_;
@@ -1412,7 +1401,7 @@
class TextureLayerReleaseResourcesAfterCommit
: public TextureLayerReleaseResourcesBase {
public:
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
LayerTreeImpl* tree = nullptr;
if (host_impl->settings().impl_side_painting)
tree = host_impl->pending_tree();
@@ -1427,7 +1416,7 @@
class TextureLayerReleaseResourcesAfterActivate
: public TextureLayerReleaseResourcesBase {
public:
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
host_impl->active_tree()->root_layer()->children()[0]->ReleaseResources();
}
};
@@ -1454,7 +1443,7 @@
callback.Pass());
}
- virtual void SetupTree() override {
+ void SetupTree() override {
gfx::Size bounds(100, 100);
root_ = Layer::Create();
root_->SetBounds(bounds);
@@ -1468,7 +1457,7 @@
layer_tree_host()->SetViewportSize(bounds);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
EXPECT_EQ(true, main_thread_.CalledOnValidThread());
callback_count_ = 0;
@@ -1480,7 +1469,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// Delete the TextureLayer on the main thread while the mailbox is in
@@ -1491,9 +1480,7 @@
}
}
- virtual void AfterTest() override {
- EXPECT_EQ(1, callback_count_);
- }
+ void AfterTest() override { EXPECT_EQ(1, callback_count_); }
private:
base::ThreadChecker main_thread_;
@@ -1525,7 +1512,7 @@
callback.Pass());
}
- virtual void SetupTree() override {
+ void SetupTree() override {
gfx::Size bounds(100, 100);
root_ = Layer::Create();
root_->SetBounds(bounds);
@@ -1539,7 +1526,7 @@
layer_tree_host()->SetViewportSize(bounds);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
EXPECT_EQ(true, main_thread_.CalledOnValidThread());
callback_count_ = 0;
@@ -1551,7 +1538,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// Remove the TextureLayer on the main thread while the mailbox is in
@@ -1565,9 +1552,7 @@
}
}
- virtual void AfterTest() override {
- EXPECT_EQ(1, callback_count_);
- }
+ void AfterTest() override { EXPECT_EQ(1, callback_count_); }
private:
base::ThreadChecker main_thread_;
diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h
index 8a765d0..d48ebe4 100644
--- a/cc/layers/tiled_layer.h
+++ b/cc/layers/tiled_layer.h
@@ -25,21 +25,20 @@
};
// Layer implementation.
- virtual void SetIsMask(bool is_mask) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual void ReduceMemoryUsage() override;
- virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
- virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
- virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
- override;
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
- virtual void OnOutputSurfaceCreated() override;
+ void SetIsMask(bool is_mask) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ void ReduceMemoryUsage() override;
+ void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
+ void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
+ void SetTexturePriorities(const PriorityCalculator& priority_calc) override;
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
+ void OnOutputSurfaceCreated() override;
protected:
TiledLayer();
- virtual ~TiledLayer();
+ ~TiledLayer() override;
void UpdateTileSizeAndTilingOption();
void UpdateBounds();
@@ -67,7 +66,7 @@
bool SkipsDraw() const { return skips_draw_; }
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
// Virtual for testing
virtual PrioritizedResourceManager* ResourceManager();
@@ -75,8 +74,7 @@
const PrioritizedResource* ResourceAtForTesting(int i, int j) const;
private:
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
void CreateTilerIfNeeded();
void set_tiling_option(TilingOption tiling_option) {
diff --git a/cc/layers/tiled_layer_impl.h b/cc/layers/tiled_layer_impl.h
index fb6502c..e3ace34 100644
--- a/cc/layers/tiled_layer_impl.h
+++ b/cc/layers/tiled_layer_impl.h
@@ -20,20 +20,19 @@
static scoped_ptr<TiledLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new TiledLayerImpl(tree_impl, id));
}
- virtual ~TiledLayerImpl();
+ ~TiledLayerImpl() override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
- virtual void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
- gfx::Size* resource_size) const override;
+ void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
+ gfx::Size* resource_size) const override;
void set_skips_draw(bool skips_draw) { skips_draw_ = skips_draw; }
void SetTilingData(const LayerTilingData& tiler);
@@ -43,12 +42,12 @@
bool contents_swizzled);
void PushInvalidTile(int i, int j);
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
- virtual void ReleaseResources() override;
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override;
+ void ReleaseResources() override;
const LayerTilingData* TilingForTesting() const { return tiler_.get(); }
- virtual size_t GPUMemoryUsageInBytes() const override;
+ size_t GPUMemoryUsageInBytes() const override;
protected:
TiledLayerImpl(LayerTreeImpl* tree_impl, int id);
@@ -56,12 +55,11 @@
bool HasTileAt(int i, int j) const;
bool HasResourceIdForTileAt(int i, int j) const;
- virtual void GetDebugBorderProperties(SkColor* color, float* width) const
- override;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void GetDebugBorderProperties(SkColor* color, float* width) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
private:
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
DrawableTile* TileAt(int i, int j) const;
DrawableTile* CreateTile(int i, int j);
diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc
index 80f42ed..925cdc8 100644
--- a/cc/layers/tiled_layer_unittest.cc
+++ b/cc/layers/tiled_layer_unittest.cc
@@ -57,7 +57,7 @@
client, manager, settings, impl_task_runner));
}
- virtual ~SynchronousOutputSurfaceLayerTreeHost() {}
+ ~SynchronousOutputSurfaceLayerTreeHost() override {}
bool EnsureOutputSurfaceCreated() {
base::MessageLoop::current()->PostDelayedTask(
@@ -68,8 +68,7 @@
return output_surface_created_;
}
- virtual void OnCreateAndInitializeOutputSurfaceAttempted(
- bool success) override {
+ void OnCreateAndInitializeOutputSurfaceAttempted(bool success) override {
LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(success);
output_surface_created_ = success;
run_loop_.Quit();
@@ -1649,7 +1648,7 @@
return make_scoped_ptr(new TrackingLayerPainter());
}
- virtual void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {
+ void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override {
painted_rect_ = content_rect;
}
@@ -1675,10 +1674,8 @@
}
private:
- virtual LayerUpdater* Updater() const override {
- return layer_updater_.get();
- }
- virtual ~UpdateTrackingTiledLayer() {}
+ LayerUpdater* Updater() const override { return layer_updater_.get(); }
+ ~UpdateTrackingTiledLayer() override {}
TrackingLayerPainter* tracking_layer_painter_;
scoped_refptr<BitmapContentLayerUpdater> layer_updater_;
diff --git a/cc/layers/ui_resource_layer.cc b/cc/layers/ui_resource_layer.cc
index 4293b09..944cf7d 100644
--- a/cc/layers/ui_resource_layer.cc
+++ b/cc/layers/ui_resource_layer.cc
@@ -23,7 +23,7 @@
const SkBitmap& skbitmap) {
return make_scoped_ptr(new ScopedUIResourceHolder(host, skbitmap));
}
- virtual UIResourceId id() override { return resource_->id(); }
+ UIResourceId id() override { return resource_->id(); }
private:
ScopedUIResourceHolder(LayerTreeHost* host, const SkBitmap& skbitmap) {
@@ -39,7 +39,7 @@
return make_scoped_ptr(new SharedUIResourceHolder(id));
}
- virtual UIResourceId id() override { return id_; }
+ UIResourceId id() override { return id_; }
private:
explicit SharedUIResourceHolder(UIResourceId id) : id_(id) {}
diff --git a/cc/layers/ui_resource_layer.h b/cc/layers/ui_resource_layer.h
index f79389b..e22318c 100644
--- a/cc/layers/ui_resource_layer.h
+++ b/cc/layers/ui_resource_layer.h
@@ -20,9 +20,9 @@
public:
static scoped_refptr<UIResourceLayer> Create();
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual void SetLayerTreeHost(LayerTreeHost* host) override;
+ void SetLayerTreeHost(LayerTreeHost* host) override;
void SetBitmap(const SkBitmap& skbitmap);
@@ -47,9 +47,9 @@
protected:
UIResourceLayer();
- virtual ~UIResourceLayer();
+ ~UIResourceLayer() override;
- virtual bool HasDrawableContent() const override;
+ bool HasDrawableContent() const override;
scoped_ptr<UIResourceHolder> ui_resource_holder_;
SkBitmap bitmap_;
@@ -59,8 +59,7 @@
float vertex_opacity_[4];
private:
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
void RecreateUIResourceHolder();
diff --git a/cc/layers/ui_resource_layer_impl.h b/cc/layers/ui_resource_layer_impl.h
index a0cb6ec..515a0f1 100644
--- a/cc/layers/ui_resource_layer_impl.h
+++ b/cc/layers/ui_resource_layer_impl.h
@@ -26,7 +26,7 @@
int id) {
return make_scoped_ptr(new UIResourceLayerImpl(tree_impl, id));
}
- virtual ~UIResourceLayerImpl();
+ ~UIResourceLayerImpl() override;
void SetUIResourceId(UIResourceId uid);
@@ -39,17 +39,16 @@
// opacity value.
void SetVertexOpacity(const float vertex_opacity[4]);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
- virtual base::DictionaryValue* LayerTreeAsJson() const override;
+ base::DictionaryValue* LayerTreeAsJson() const override;
protected:
UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id);
@@ -64,7 +63,7 @@
float vertex_opacity_[4];
private:
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl);
};
diff --git a/cc/layers/video_frame_provider_client_impl.h b/cc/layers/video_frame_provider_client_impl.h
index c2d6599..b6eb86f 100644
--- a/cc/layers/video_frame_provider_client_impl.h
+++ b/cc/layers/video_frame_provider_client_impl.h
@@ -39,14 +39,14 @@
// VideoFrameProvider::Client implementation. These methods are all callable
// on any thread.
- virtual void StopUsingProvider() override;
- virtual void DidReceiveFrame() override;
- virtual void DidUpdateMatrix(const float* matrix) override;
+ void StopUsingProvider() override;
+ void DidReceiveFrame() override;
+ void DidUpdateMatrix(const float* matrix) override;
private:
explicit VideoFrameProviderClientImpl(VideoFrameProvider* provider);
friend class base::RefCounted<VideoFrameProviderClientImpl>;
- virtual ~VideoFrameProviderClientImpl();
+ ~VideoFrameProviderClientImpl() override;
VideoLayerImpl* active_video_layer_;
diff --git a/cc/layers/video_layer.h b/cc/layers/video_layer.h
index c7ca647..bbcff36 100644
--- a/cc/layers/video_layer.h
+++ b/cc/layers/video_layer.h
@@ -23,15 +23,14 @@
static scoped_refptr<VideoLayer> Create(VideoFrameProvider* provider,
media::VideoRotation video_rotation);
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
private:
VideoLayer(VideoFrameProvider* provider, media::VideoRotation video_rotation);
- virtual ~VideoLayer();
+ ~VideoLayer() override;
// This pointer is only for passing to VideoLayerImpl's constructor. It should
// never be dereferenced by this class.
diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h
index 232a1c7..1843ec7 100644
--- a/cc/layers/video_layer_impl.h
+++ b/cc/layers/video_layer_impl.h
@@ -27,20 +27,19 @@
int id,
VideoFrameProvider* provider,
media::VideoRotation video_rotation);
- virtual ~VideoLayerImpl();
+ ~VideoLayerImpl() override;
// LayerImpl implementation.
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
- virtual bool WillDraw(DrawMode draw_mode,
- ResourceProvider* resource_provider) override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
- virtual void DidDraw(ResourceProvider* resource_provider) override;
- virtual void DidBecomeActive() override;
- virtual void ReleaseResources() override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
+ bool WillDraw(DrawMode draw_mode,
+ ResourceProvider* resource_provider) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
+ void DidDraw(ResourceProvider* resource_provider) override;
+ void DidBecomeActive() override;
+ void ReleaseResources() override;
void SetNeedsRedraw();
@@ -54,7 +53,7 @@
int id,
media::VideoRotation video_rotation);
- virtual const char* LayerTypeAsString() const override;
+ const char* LayerTypeAsString() const override;
scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_;
diff --git a/cc/output/bsp_walk_action.h b/cc/output/bsp_walk_action.h
index 342e635..ac8fa41 100644
--- a/cc/output/bsp_walk_action.h
+++ b/cc/output/bsp_walk_action.h
@@ -23,7 +23,7 @@
class CC_EXPORT BspWalkActionToVector : public BspWalkAction {
public:
explicit BspWalkActionToVector(std::vector<DrawPolygon*>* in_list);
- virtual void operator()(DrawPolygon* item) override;
+ void operator()(DrawPolygon* item) override;
private:
std::vector<DrawPolygon*>* list_;
diff --git a/cc/output/delegating_renderer.h b/cc/output/delegating_renderer.h
index 1acebc5..89b47ad 100644
--- a/cc/output/delegating_renderer.h
+++ b/cc/output/delegating_renderer.h
@@ -22,20 +22,20 @@
const LayerTreeSettings* settings,
OutputSurface* output_surface,
ResourceProvider* resource_provider);
- virtual ~DelegatingRenderer();
+ ~DelegatingRenderer() override;
- virtual const RendererCapabilitiesImpl& Capabilities() const override;
+ const RendererCapabilitiesImpl& Capabilities() const override;
- virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
- float device_scale_factor,
- const gfx::Rect& device_viewport_rect,
- const gfx::Rect& device_clip_rect,
- bool disable_picture_quad_image_filtering) override;
+ void DrawFrame(RenderPassList* render_passes_in_draw_order,
+ float device_scale_factor,
+ const gfx::Rect& device_viewport_rect,
+ const gfx::Rect& device_clip_rect,
+ bool disable_picture_quad_image_filtering) override;
- virtual void Finish() override {}
+ void Finish() override {}
- virtual void SwapBuffers(const CompositorFrameMetadata& metadata) override;
- virtual void ReceiveSwapBuffersAck(const CompositorFrameAck&) override;
+ void SwapBuffers(const CompositorFrameMetadata& metadata) override;
+ void ReceiveSwapBuffersAck(const CompositorFrameAck&) override;
private:
DelegatingRenderer(RendererClient* client,
@@ -43,7 +43,7 @@
OutputSurface* output_surface,
ResourceProvider* resource_provider);
- virtual void DidChangeVisibility() override;
+ void DidChangeVisibility() override;
OutputSurface* output_surface_;
ResourceProvider* resource_provider_;
diff --git a/cc/output/delegating_renderer_unittest.cc b/cc/output/delegating_renderer_unittest.cc
index 4c9deb2..fffa0ac 100644
--- a/cc/output/delegating_renderer_unittest.cc
+++ b/cc/output/delegating_renderer_unittest.cc
@@ -17,8 +17,7 @@
DelegatingRendererTest() : LayerTreeTest(), output_surface_(NULL) {}
virtual ~DelegatingRendererTest() {}
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback)
- override {
+ scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override {
scoped_ptr<FakeOutputSurface> output_surface =
FakeOutputSurface::CreateDelegating3d();
output_surface_ = output_surface.get();
@@ -32,17 +31,16 @@
class DelegatingRendererTestDraw : public DelegatingRendererTest {
public:
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f);
PostSetNeedsCommitToMainThread();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
EXPECT_EQ(0u, output_surface_->num_sent_frames());
const CompositorFrame& last_frame = output_surface_->last_sent_frame();
@@ -53,12 +51,11 @@
return DRAW_SUCCESS;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_EQ(0u, output_surface_->num_sent_frames());
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
EXPECT_TRUE(result);
EXPECT_EQ(1u, output_surface_->num_sent_frames());
@@ -83,15 +80,13 @@
class DelegatingRendererTestResources : public DelegatingRendererTest {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void AfterTest() override {}
+ void AfterTest() override {}
- virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
frame->render_passes.clear();
frame->render_passes_by_id.clear();
@@ -111,12 +106,11 @@
return draw_result;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_EQ(0u, output_surface_->num_sent_frames());
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
EXPECT_TRUE(result);
EXPECT_EQ(1u, output_surface_->num_sent_frames());
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h
index d4c4ba6..4966e63 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -23,16 +23,16 @@
// delegate rendering to another compositor.
class CC_EXPORT DirectRenderer : public Renderer {
public:
- virtual ~DirectRenderer();
+ ~DirectRenderer() override;
- virtual void DecideRenderPassAllocationsForFrame(
+ void DecideRenderPassAllocationsForFrame(
const RenderPassList& render_passes_in_draw_order) override;
- virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const override;
- virtual void DrawFrame(RenderPassList* render_passes_in_draw_order,
- float device_scale_factor,
- const gfx::Rect& device_viewport_rect,
- const gfx::Rect& device_clip_rect,
- bool disable_picture_quad_image_filtering) override;
+ bool HasAllocatedResourcesForTesting(RenderPassId id) const override;
+ void DrawFrame(RenderPassList* render_passes_in_draw_order,
+ float device_scale_factor,
+ const gfx::Rect& device_viewport_rect,
+ const gfx::Rect& device_clip_rect,
+ bool disable_picture_quad_image_filtering) override;
struct CC_EXPORT DrawingFrame {
DrawingFrame();
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index dbe2f06..6b15faf 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -55,8 +55,8 @@
: gl_(gl), has_passed_(true) {}
// Overridden from ResourceProvider::Fence:
- virtual void Set() override { has_passed_ = false; }
- virtual bool HasPassed() override {
+ void Set() override { has_passed_ = false; }
+ bool HasPassed() override {
if (!has_passed_) {
has_passed_ = true;
Synchronize();
@@ -65,7 +65,7 @@
}
private:
- virtual ~FallbackFence() {}
+ ~FallbackFence() override {}
void Synchronize() {
TRACE_EVENT0("cc", "FallbackFence::Synchronize");
@@ -250,16 +250,14 @@
: query_(query) {}
// Overridden from ResourceProvider::Fence:
- virtual void Set() override {
+ void Set() override {
DCHECK(query_);
query_->Set();
}
- virtual bool HasPassed() override {
- return !query_ || !query_->IsPending();
- }
+ bool HasPassed() override { return !query_ || !query_->IsPending(); }
private:
- virtual ~Fence() {}
+ ~Fence() override {}
base::WeakPtr<SyncQuery> query_;
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index 8e53d70..a379dc0 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -55,15 +55,15 @@
TextureMailboxDeleter* texture_mailbox_deleter,
int highp_threshold_min);
- virtual ~GLRenderer();
+ ~GLRenderer() override;
- virtual const RendererCapabilitiesImpl& Capabilities() const override;
+ const RendererCapabilitiesImpl& Capabilities() const override;
// Waits for rendering to finish.
- virtual void Finish() override;
+ void Finish() override;
- virtual void DoNoOp() override;
- virtual void SwapBuffers(const CompositorFrameMetadata& metadata) override;
+ void DoNoOp() override;
+ void SwapBuffers(const CompositorFrameMetadata& metadata) override;
virtual bool IsContextLost();
@@ -80,7 +80,7 @@
TextureMailboxDeleter* texture_mailbox_deleter,
int highp_threshold_min);
- virtual void DidChangeVisibility() override;
+ void DidChangeVisibility() override;
bool IsBackbufferDiscarded() const { return is_backbuffer_discarded_; }
@@ -101,26 +101,26 @@
void SetBlendEnabled(bool enabled);
bool blend_enabled() const { return blend_shadow_; }
- virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
- virtual bool BindFramebufferToTexture(DrawingFrame* frame,
- const ScopedResource* resource,
- const gfx::Rect& target_rect) override;
- virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) override;
- virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
- virtual void DiscardPixels(bool has_external_stencil_test,
- bool draw_rect_covers_full_surface) override;
- virtual void ClearFramebuffer(DrawingFrame* frame,
- bool has_external_stencil_test) override;
- virtual void DoDrawQuad(DrawingFrame* frame, const class DrawQuad*) override;
- virtual void BeginDrawingFrame(DrawingFrame* frame) override;
- virtual void FinishDrawingFrame(DrawingFrame* frame) override;
- virtual bool FlippedFramebuffer() const override;
- virtual void EnsureScissorTestEnabled() override;
- virtual void EnsureScissorTestDisabled() override;
- virtual void CopyCurrentRenderPassToBitmap(
+ void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
+ bool BindFramebufferToTexture(DrawingFrame* frame,
+ const ScopedResource* resource,
+ const gfx::Rect& target_rect) override;
+ void SetDrawViewport(const gfx::Rect& window_space_viewport) override;
+ void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
+ void DiscardPixels(bool has_external_stencil_test,
+ bool draw_rect_covers_full_surface) override;
+ void ClearFramebuffer(DrawingFrame* frame,
+ bool has_external_stencil_test) override;
+ void DoDrawQuad(DrawingFrame* frame, const class DrawQuad*) override;
+ void BeginDrawingFrame(DrawingFrame* frame) override;
+ void FinishDrawingFrame(DrawingFrame* frame) override;
+ bool FlippedFramebuffer() const override;
+ void EnsureScissorTestEnabled() override;
+ void EnsureScissorTestDisabled() override;
+ void CopyCurrentRenderPassToBitmap(
DrawingFrame* frame,
scoped_ptr<CopyOutputRequest> request) override;
- virtual void FinishDrawingQuadList() override;
+ void FinishDrawingQuadList() override;
// Check if quad needs antialiasing and if so, inflate the quad and
// fill edge array for fragment shader. local_quad is set to
@@ -223,8 +223,8 @@
void RestoreGLState();
void RestoreFramebuffer(DrawingFrame* frame);
- virtual void DiscardBackbuffer() override;
- virtual void EnsureBackbuffer() override;
+ void DiscardBackbuffer() override;
+ void EnsureBackbuffer() override;
void EnforceMemoryPolicy();
void ScheduleOverlays(DrawingFrame* frame);
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index d6f7522..42e4b5e 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -362,38 +362,34 @@
public:
ForbidSynchronousCallContext() {}
- virtual void getAttachedShaders(GLuint program,
- GLsizei max_count,
- GLsizei* count,
- GLuint* shaders) override {
+ void getAttachedShaders(GLuint program,
+ GLsizei max_count,
+ GLsizei* count,
+ GLuint* shaders) override {
ADD_FAILURE();
}
- virtual GLint getAttribLocation(GLuint program, const GLchar* name) override {
+ GLint getAttribLocation(GLuint program, const GLchar* name) override {
ADD_FAILURE();
return 0;
}
- virtual void getBooleanv(GLenum pname, GLboolean* value) override {
+ void getBooleanv(GLenum pname, GLboolean* value) override { ADD_FAILURE(); }
+ void getBufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* value) override {
ADD_FAILURE();
}
- virtual void getBufferParameteriv(GLenum target,
- GLenum pname,
- GLint* value) override {
- ADD_FAILURE();
- }
- virtual GLenum getError() override {
+ GLenum getError() override {
ADD_FAILURE();
return GL_NO_ERROR;
}
- virtual void getFloatv(GLenum pname, GLfloat* value) override {
+ void getFloatv(GLenum pname, GLfloat* value) override { ADD_FAILURE(); }
+ void getFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* value) override {
ADD_FAILURE();
}
- virtual void getFramebufferAttachmentParameteriv(GLenum target,
- GLenum attachment,
- GLenum pname,
- GLint* value) override {
- ADD_FAILURE();
- }
- virtual void getIntegerv(GLenum pname, GLint* value) override {
+ void getIntegerv(GLenum pname, GLint* value) override {
if (pname == GL_MAX_TEXTURE_SIZE) {
// MAX_TEXTURE_SIZE is cached client side, so it's OK to query.
*value = 1024;
@@ -404,9 +400,7 @@
// We allow querying the shader compilation and program link status in debug
// mode, but not release.
- virtual void getProgramiv(GLuint program,
- GLenum pname,
- GLint* value) override {
+ void getProgramiv(GLuint program, GLenum pname, GLint* value) override {
#ifndef NDEBUG
*value = 1;
#else
@@ -414,7 +408,7 @@
#endif
}
- virtual void getShaderiv(GLuint shader, GLenum pname, GLint* value) override {
+ void getShaderiv(GLuint shader, GLenum pname, GLint* value) override {
#ifndef NDEBUG
*value = 1;
#else
@@ -422,55 +416,41 @@
#endif
}
- virtual void getRenderbufferParameteriv(GLenum target,
- GLenum pname,
- GLint* value) override {
+ void getRenderbufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* value) override {
ADD_FAILURE();
}
- virtual void getShaderPrecisionFormat(GLenum shadertype,
- GLenum precisiontype,
- GLint* range,
- GLint* precision) override {
+ void getShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override {
ADD_FAILURE();
}
- virtual void getTexParameterfv(GLenum target,
- GLenum pname,
- GLfloat* value) override {
+ void getTexParameterfv(GLenum target, GLenum pname, GLfloat* value) override {
ADD_FAILURE();
}
- virtual void getTexParameteriv(GLenum target,
- GLenum pname,
- GLint* value) override {
+ void getTexParameteriv(GLenum target, GLenum pname, GLint* value) override {
ADD_FAILURE();
}
- virtual void getUniformfv(GLuint program,
- GLint location,
- GLfloat* value) override {
+ void getUniformfv(GLuint program, GLint location, GLfloat* value) override {
ADD_FAILURE();
}
- virtual void getUniformiv(GLuint program,
- GLint location,
- GLint* value) override {
+ void getUniformiv(GLuint program, GLint location, GLint* value) override {
ADD_FAILURE();
}
- virtual GLint getUniformLocation(GLuint program,
- const GLchar* name) override {
+ GLint getUniformLocation(GLuint program, const GLchar* name) override {
ADD_FAILURE();
return 0;
}
- virtual void getVertexAttribfv(GLuint index,
- GLenum pname,
- GLfloat* value) override {
+ void getVertexAttribfv(GLuint index, GLenum pname, GLfloat* value) override {
ADD_FAILURE();
}
- virtual void getVertexAttribiv(GLuint index,
- GLenum pname,
- GLint* value) override {
+ void getVertexAttribiv(GLuint index, GLenum pname, GLint* value) override {
ADD_FAILURE();
}
- virtual GLsizeiptr getVertexAttribOffset(GLuint index,
- GLenum pname) override {
+ GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname) override {
ADD_FAILURE();
return 0;
}
@@ -505,14 +485,12 @@
public:
LoseContextOnFirstGetContext() {}
- virtual void getProgramiv(GLuint program,
- GLenum pname,
- GLint* value) override {
+ void getProgramiv(GLuint program, GLenum pname, GLint* value) override {
context_lost_ = true;
*value = 0;
}
- virtual void getShaderiv(GLuint shader, GLenum pname, GLint* value) override {
+ void getShaderiv(GLuint shader, GLenum pname, GLint* value) override {
context_lost_ = true;
*value = 0;
}
@@ -707,17 +685,15 @@
: last_call_was_set_visibility_(false) {}
// TestWebGraphicsContext3D methods.
- virtual void flush() override { last_call_was_set_visibility_ = false; }
- virtual void deleteTexture(GLuint) override {
+ void flush() override { last_call_was_set_visibility_ = false; }
+ void deleteTexture(GLuint) override { last_call_was_set_visibility_ = false; }
+ void deleteFramebuffer(GLuint) override {
last_call_was_set_visibility_ = false;
}
- virtual void deleteFramebuffer(GLuint) override {
+ void deleteQueryEXT(GLuint) override {
last_call_was_set_visibility_ = false;
}
- virtual void deleteQueryEXT(GLuint) override {
- last_call_was_set_visibility_ = false;
- }
- virtual void deleteRenderbuffer(GLuint) override {
+ void deleteRenderbuffer(GLuint) override {
last_call_was_set_visibility_ = false;
}
@@ -989,14 +965,14 @@
public:
ScissorTestOnClearCheckingContext() : scissor_enabled_(false) {}
- virtual void clear(GLbitfield) override { EXPECT_FALSE(scissor_enabled_); }
+ void clear(GLbitfield) override { EXPECT_FALSE(scissor_enabled_); }
- virtual void enable(GLenum cap) override {
+ void enable(GLenum cap) override {
if (cap == GL_SCISSOR_TEST)
scissor_enabled_ = true;
}
- virtual void disable(GLenum cap) override {
+ void disable(GLenum cap) override {
if (cap == GL_SCISSOR_TEST)
scissor_enabled_ = false;
}
@@ -1078,9 +1054,9 @@
set_have_discard_framebuffer(true);
}
- virtual void discardFramebufferEXT(GLenum target,
- GLsizei numAttachments,
- const GLenum* attachments) override {
+ void discardFramebufferEXT(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) override {
++discarded_;
}
@@ -1099,7 +1075,7 @@
false) {
surface_size_ = gfx::Size(500, 500);
}
- virtual void Reshape(const gfx::Size& size, float scale_factor) override {}
+ void Reshape(const gfx::Size& size, float scale_factor) override {}
void set_fixed_size(const gfx::Size& size) { surface_size_ = size; }
};
@@ -1264,13 +1240,12 @@
public:
FlippedScissorAndViewportContext()
: did_call_viewport_(false), did_call_scissor_(false) {}
- virtual ~FlippedScissorAndViewportContext() {
+ ~FlippedScissorAndViewportContext() override {
EXPECT_TRUE(did_call_viewport_);
EXPECT_TRUE(did_call_scissor_);
}
- virtual void viewport(GLint x, GLint y, GLsizei width, GLsizei height)
- override {
+ void viewport(GLint x, GLint y, GLsizei width, GLsizei height) override {
EXPECT_EQ(10, x);
EXPECT_EQ(390, y);
EXPECT_EQ(100, width);
@@ -1278,8 +1253,7 @@
did_call_viewport_ = true;
}
- virtual void scissor(GLint x, GLint y, GLsizei width, GLsizei height)
- override {
+ void scissor(GLint x, GLint y, GLsizei width, GLsizei height) override {
EXPECT_EQ(30, x);
EXPECT_EQ(450, y);
EXPECT_EQ(20, width);
diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc
index b70e344..b1f4149 100644
--- a/cc/output/output_surface_unittest.cc
+++ b/cc/output/output_surface_unittest.cc
@@ -32,7 +32,7 @@
scoped_ptr<SoftwareOutputDevice> software_device)
: OutputSurface(context_provider, software_device.Pass()) {}
- virtual void SwapBuffers(CompositorFrame* frame) override {
+ void SwapBuffers(CompositorFrame* frame) override {
client_->DidSwapBuffers();
client_->DidSwapBuffersComplete();
}
@@ -63,11 +63,11 @@
class TestSoftwareOutputDevice : public SoftwareOutputDevice {
public:
TestSoftwareOutputDevice();
- virtual ~TestSoftwareOutputDevice();
+ ~TestSoftwareOutputDevice() override;
// Overriden from cc:SoftwareOutputDevice
- virtual void DiscardBackbuffer() override;
- virtual void EnsureBackbuffer() override;
+ void DiscardBackbuffer() override;
+ void EnsureBackbuffer() override;
int discard_backbuffer_count() { return discard_backbuffer_count_; }
int ensure_backbuffer_count() { return ensure_backbuffer_count_; }
diff --git a/cc/output/overlay_strategy_single_on_top.h b/cc/output/overlay_strategy_single_on_top.h
index 1bf6bd8..e5518cc 100644
--- a/cc/output/overlay_strategy_single_on_top.h
+++ b/cc/output/overlay_strategy_single_on_top.h
@@ -19,8 +19,8 @@
public:
OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker,
ResourceProvider* resource_provider);
- virtual bool Attempt(RenderPassList* render_passes_in_draw_order,
- OverlayCandidateList* candidate_list) override;
+ bool Attempt(RenderPassList* render_passes_in_draw_order,
+ OverlayCandidateList* candidate_list) override;
private:
OverlayCandidateValidator* capability_checker_;
diff --git a/cc/output/overlay_unittest.cc b/cc/output/overlay_unittest.cc
index 245caec..92b19c7 100644
--- a/cc/output/overlay_unittest.cc
+++ b/cc/output/overlay_unittest.cc
@@ -40,7 +40,7 @@
class SingleOverlayValidator : public OverlayCandidateValidator {
public:
- virtual void CheckOverlaySupport(OverlayCandidateList* surfaces) override;
+ void CheckOverlaySupport(OverlayCandidateList* surfaces) override;
};
void SingleOverlayValidator::CheckOverlaySupport(
@@ -62,7 +62,7 @@
SingleOverlayProcessor(OutputSurface* surface,
ResourceProvider* resource_provider);
// Virtual to allow testing different strategies.
- virtual void Initialize() override;
+ void Initialize() override;
};
SingleOverlayProcessor::SingleOverlayProcessor(
@@ -103,7 +103,7 @@
: OutputSurface(context_provider) {}
// OutputSurface implementation
- virtual void SwapBuffers(CompositorFrame* frame) override;
+ void SwapBuffers(CompositorFrame* frame) override;
void InitWithSingleOverlayValidator() {
overlay_candidate_validator_.reset(new SingleOverlayValidator);
@@ -568,7 +568,7 @@
class FakeRendererClient : public RendererClient {
public:
// RendererClient methods.
- virtual void SetFullRootLayerDamage() override {}
+ void SetFullRootLayerDamage() override {}
};
class MockOverlayScheduler {
diff --git a/cc/output/renderer_unittest.cc b/cc/output/renderer_unittest.cc
index 8f0a0ef..229558d 100644
--- a/cc/output/renderer_unittest.cc
+++ b/cc/output/renderer_unittest.cc
@@ -19,10 +19,10 @@
public:
explicit TestOutputSurface(
const scoped_refptr<ContextProvider>& context_provider);
- virtual ~TestOutputSurface() override;
+ ~TestOutputSurface() override;
// OutputSurface implementation
- virtual void SwapBuffers(CompositorFrame* frame) override;
+ void SwapBuffers(CompositorFrame* frame) override;
};
TestOutputSurface::TestOutputSurface(
diff --git a/cc/output/software_renderer.h b/cc/output/software_renderer.h
index deac838..d8b5a9d 100644
--- a/cc/output/software_renderer.h
+++ b/cc/output/software_renderer.h
@@ -33,34 +33,32 @@
OutputSurface* output_surface,
ResourceProvider* resource_provider);
- virtual ~SoftwareRenderer();
- virtual const RendererCapabilitiesImpl& Capabilities() const override;
- virtual void Finish() override;
- virtual void SwapBuffers(const CompositorFrameMetadata& metadata) override;
- virtual void ReceiveSwapBuffersAck(
- const CompositorFrameAck& ack) override;
- virtual void DiscardBackbuffer() override;
- virtual void EnsureBackbuffer() override;
+ ~SoftwareRenderer() override;
+ const RendererCapabilitiesImpl& Capabilities() const override;
+ void Finish() override;
+ void SwapBuffers(const CompositorFrameMetadata& metadata) override;
+ void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) override;
+ void DiscardBackbuffer() override;
+ void EnsureBackbuffer() override;
protected:
- virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
- virtual bool BindFramebufferToTexture(
- DrawingFrame* frame,
- const ScopedResource* texture,
- const gfx::Rect& target_rect) override;
- virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) override;
- virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
- virtual void DiscardPixels(bool has_external_stencil_test,
- bool draw_rect_covers_full_surface) override;
- virtual void ClearFramebuffer(DrawingFrame* frame,
- bool has_external_stencil_test) override;
- virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) override;
- virtual void BeginDrawingFrame(DrawingFrame* frame) override;
- virtual void FinishDrawingFrame(DrawingFrame* frame) override;
- virtual bool FlippedFramebuffer() const override;
- virtual void EnsureScissorTestEnabled() override;
- virtual void EnsureScissorTestDisabled() override;
- virtual void CopyCurrentRenderPassToBitmap(
+ void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
+ bool BindFramebufferToTexture(DrawingFrame* frame,
+ const ScopedResource* texture,
+ const gfx::Rect& target_rect) override;
+ void SetDrawViewport(const gfx::Rect& window_space_viewport) override;
+ void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
+ void DiscardPixels(bool has_external_stencil_test,
+ bool draw_rect_covers_full_surface) override;
+ void ClearFramebuffer(DrawingFrame* frame,
+ bool has_external_stencil_test) override;
+ void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) override;
+ void BeginDrawingFrame(DrawingFrame* frame) override;
+ void FinishDrawingFrame(DrawingFrame* frame) override;
+ bool FlippedFramebuffer() const override;
+ void EnsureScissorTestEnabled() override;
+ void EnsureScissorTestDisabled() override;
+ void CopyCurrentRenderPassToBitmap(
DrawingFrame* frame,
scoped_ptr<CopyOutputRequest> request) override;
@@ -69,7 +67,7 @@
OutputSurface* output_surface,
ResourceProvider* resource_provider);
- virtual void DidChangeVisibility() override;
+ void DidChangeVisibility() override;
private:
void ClearCanvas(SkColor color);
diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc
index 2896be1..1e373b2 100644
--- a/cc/output/software_renderer_unittest.cc
+++ b/cc/output/software_renderer_unittest.cc
@@ -55,7 +55,7 @@
SoftwareRenderer* renderer() const { return renderer_.get(); }
// RendererClient implementation.
- virtual void SetFullRootLayerDamage() override {}
+ void SetFullRootLayerDamage() override {}
scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list,
float device_scale_factor,
diff --git a/cc/quads/checkerboard_draw_quad.h b/cc/quads/checkerboard_draw_quad.h
index 71253e3..64c583f 100644
--- a/cc/quads/checkerboard_draw_quad.h
+++ b/cc/quads/checkerboard_draw_quad.h
@@ -30,13 +30,12 @@
SkColor color;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const CheckerboardDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/content_draw_quad_base.h b/cc/quads/content_draw_quad_base.h
index d6b1995..6917e6b 100644
--- a/cc/quads/content_draw_quad_base.h
+++ b/cc/quads/content_draw_quad_base.h
@@ -41,8 +41,8 @@
protected:
ContentDrawQuadBase();
- virtual ~ContentDrawQuadBase();
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ ~ContentDrawQuadBase() override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/debug_border_draw_quad.h b/cc/quads/debug_border_draw_quad.h
index e2b6f70..a511ce1 100644
--- a/cc/quads/debug_border_draw_quad.h
+++ b/cc/quads/debug_border_draw_quad.h
@@ -33,13 +33,12 @@
SkColor color;
int width;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const DebugBorderDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/io_surface_draw_quad.h b/cc/quads/io_surface_draw_quad.h
index 3829156..9c8b50b 100644
--- a/cc/quads/io_surface_draw_quad.h
+++ b/cc/quads/io_surface_draw_quad.h
@@ -43,13 +43,12 @@
unsigned io_surface_resource_id;
Orientation orientation;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const IOSurfaceDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/list_container_unittest.cc b/cc/quads/list_container_unittest.cc
index 8b68852..31a479b 100644
--- a/cc/quads/list_container_unittest.cc
+++ b/cc/quads/list_container_unittest.cc
@@ -29,13 +29,12 @@
class SimpleDrawQuad : public DrawQuad {
public:
- virtual ~SimpleDrawQuad() {}
- virtual void IterateResources(
- const ResourceIteratorCallback& callback) override {}
+ ~SimpleDrawQuad() override {}
+ void IterateResources(const ResourceIteratorCallback& callback) override {}
void set_value(int val) { value = val; }
int get_value() { return value; }
- virtual void ExtendValue(base::debug::TracedValue* value) const override {}
+ void ExtendValue(base::debug::TracedValue* value) const override {}
private:
int value;
diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h
index 5d75e05..d2a7271 100644
--- a/cc/quads/picture_draw_quad.h
+++ b/cc/quads/picture_draw_quad.h
@@ -20,7 +20,7 @@
class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase {
public:
PictureDrawQuad();
- virtual ~PictureDrawQuad();
+ ~PictureDrawQuad() override;
void SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
@@ -50,13 +50,12 @@
scoped_refptr<PicturePileImpl> picture_pile;
ResourceFormat texture_format;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const PictureDrawQuad* MaterialCast(const DrawQuad* quad);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/render_pass_draw_quad.h b/cc/quads/render_pass_draw_quad.h
index 25417f6..95ca2f2 100644
--- a/cc/quads/render_pass_draw_quad.h
+++ b/cc/quads/render_pass_draw_quad.h
@@ -18,7 +18,7 @@
class CC_EXPORT RenderPassDrawQuad : public DrawQuad {
public:
RenderPassDrawQuad();
- virtual ~RenderPassDrawQuad();
+ ~RenderPassDrawQuad() override;
void SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
@@ -65,13 +65,12 @@
// Helper function to generate the normalized uv rect.
gfx::RectF MaskUVRect() const;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const RenderPassDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/solid_color_draw_quad.h b/cc/quads/solid_color_draw_quad.h
index 256cc52..f70e5e3 100644
--- a/cc/quads/solid_color_draw_quad.h
+++ b/cc/quads/solid_color_draw_quad.h
@@ -33,13 +33,12 @@
SkColor color;
bool force_anti_aliasing_off;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const SolidColorDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/stream_video_draw_quad.h b/cc/quads/stream_video_draw_quad.h
index f4cb0f5..cdba60c 100644
--- a/cc/quads/stream_video_draw_quad.h
+++ b/cc/quads/stream_video_draw_quad.h
@@ -34,13 +34,12 @@
unsigned resource_id;
gfx::Transform matrix;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const StreamVideoDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/surface_draw_quad.h b/cc/quads/surface_draw_quad.h
index 2fa35f1..bdf7838 100644
--- a/cc/quads/surface_draw_quad.h
+++ b/cc/quads/surface_draw_quad.h
@@ -30,13 +30,12 @@
SurfaceId surface_id;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const SurfaceDrawQuad* MaterialCast(const DrawQuad* quad);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/texture_draw_quad.h b/cc/quads/texture_draw_quad.h
index 3a3bb54..3e0632c 100644
--- a/cc/quads/texture_draw_quad.h
+++ b/cc/quads/texture_draw_quad.h
@@ -49,13 +49,12 @@
float vertex_opacity[4];
bool flipped;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const TextureDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/tile_draw_quad.h b/cc/quads/tile_draw_quad.h
index e8941d5..d776057 100644
--- a/cc/quads/tile_draw_quad.h
+++ b/cc/quads/tile_draw_quad.h
@@ -12,7 +12,7 @@
class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase {
public:
TileDrawQuad();
- virtual ~TileDrawQuad();
+ ~TileDrawQuad() override;
void SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
@@ -35,13 +35,12 @@
unsigned resource_id;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const TileDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index 1460458..edda34a 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -20,7 +20,7 @@
COLOR_SPACE_LAST = REC_601_JPEG
};
- virtual ~YUVVideoDrawQuad();
+ ~YUVVideoDrawQuad() override;
YUVVideoDrawQuad();
@@ -54,13 +54,12 @@
unsigned a_plane_resource_id;
ColorSpace color_space;
- virtual void IterateResources(const ResourceIteratorCallback& callback)
- override;
+ void IterateResources(const ResourceIteratorCallback& callback) override;
static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*);
private:
- virtual void ExtendValue(base::debug::TracedValue* value) const override;
+ void ExtendValue(base::debug::TracedValue* value) const override;
};
} // namespace cc
diff --git a/cc/resources/bitmap_content_layer_updater.h b/cc/resources/bitmap_content_layer_updater.h
index 0010c41..5ddc35f 100644
--- a/cc/resources/bitmap_content_layer_updater.h
+++ b/cc/resources/bitmap_content_layer_updater.h
@@ -27,12 +27,12 @@
public:
Resource(BitmapContentLayerUpdater* updater,
scoped_ptr<PrioritizedResource> resource);
- virtual ~Resource();
+ ~Resource() override;
- virtual void Update(ResourceUpdateQueue* queue,
- const gfx::Rect& source_rect,
- const gfx::Vector2d& dest_offset,
- bool partial_update) override;
+ void Update(ResourceUpdateQueue* queue,
+ const gfx::Rect& source_rect,
+ const gfx::Vector2d& dest_offset,
+ bool partial_update) override;
private:
BitmapContentLayerUpdater* updater_;
@@ -45,27 +45,27 @@
RenderingStatsInstrumentation* stats_instrumenation,
int layer_id);
- virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
+ scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) override;
- virtual void PrepareToUpdate(const gfx::Size& content_size,
- const gfx::Rect& paint_rect,
- const gfx::Size& tile_size,
- float contents_width_scale,
- float contents_height_scale) override;
+ void PrepareToUpdate(const gfx::Size& content_size,
+ const gfx::Rect& paint_rect,
+ const gfx::Size& tile_size,
+ float contents_width_scale,
+ float contents_height_scale) override;
void UpdateTexture(ResourceUpdateQueue* queue,
PrioritizedResource* resource,
const gfx::Rect& source_rect,
const gfx::Vector2d& dest_offset,
bool partial_update);
- virtual void SetOpaque(bool opaque) override;
- virtual void ReduceMemoryUsage() override;
+ void SetOpaque(bool opaque) override;
+ void ReduceMemoryUsage() override;
protected:
BitmapContentLayerUpdater(
scoped_ptr<LayerPainter> painter,
RenderingStatsInstrumentation* stats_instrumenation,
int layer_id);
- virtual ~BitmapContentLayerUpdater();
+ ~BitmapContentLayerUpdater() override;
SkBitmap bitmap_backing_;
skia::RefPtr<SkCanvas> canvas_;
diff --git a/cc/resources/bitmap_raster_worker_pool.cc b/cc/resources/bitmap_raster_worker_pool.cc
index e86129f..fd16ca3 100644
--- a/cc/resources/bitmap_raster_worker_pool.cc
+++ b/cc/resources/bitmap_raster_worker_pool.cc
@@ -24,10 +24,10 @@
: lock_(resource_provider, resource->id()) {}
// Overridden from RasterBuffer:
- virtual void Playback(const PicturePileImpl* picture_pile,
- const gfx::Rect& rect,
- float scale,
- RenderingStatsInstrumentation* stats) override {
+ void Playback(const PicturePileImpl* picture_pile,
+ const gfx::Rect& rect,
+ float scale,
+ RenderingStatsInstrumentation* stats) override {
picture_pile->RasterToBitmap(lock_.sk_canvas(), rect, scale, stats);
}
diff --git a/cc/resources/bitmap_raster_worker_pool.h b/cc/resources/bitmap_raster_worker_pool.h
index 876bf36..624318b 100644
--- a/cc/resources/bitmap_raster_worker_pool.h
+++ b/cc/resources/bitmap_raster_worker_pool.h
@@ -23,7 +23,7 @@
public Rasterizer,
public RasterizerTaskClient {
public:
- virtual ~BitmapRasterWorkerPool();
+ ~BitmapRasterWorkerPool() override;
static scoped_ptr<RasterWorkerPool> Create(
base::SequencedTaskRunner* task_runner,
@@ -31,18 +31,18 @@
ResourceProvider* resource_provider);
// Overridden from RasterWorkerPool:
- virtual Rasterizer* AsRasterizer() override;
+ Rasterizer* AsRasterizer() override;
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override;
- virtual void Shutdown() override;
- virtual void ScheduleTasks(RasterTaskQueue* queue) override;
- virtual void CheckForCompletedTasks() override;
+ void SetClient(RasterizerClient* client) override;
+ void Shutdown() override;
+ void ScheduleTasks(RasterTaskQueue* queue) override;
+ void CheckForCompletedTasks() override;
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override;
- virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
protected:
BitmapRasterWorkerPool(base::SequencedTaskRunner* task_runner,
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.h b/cc/resources/bitmap_skpicture_content_layer_updater.h
index 030db6e..ba22b2e 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.h
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.h
@@ -20,10 +20,10 @@
Resource(BitmapSkPictureContentLayerUpdater* updater,
scoped_ptr<PrioritizedResource> texture);
- virtual void Update(ResourceUpdateQueue* queue,
- const gfx::Rect& source_rect,
- const gfx::Vector2d& dest_offset,
- bool partial_update) override;
+ void Update(ResourceUpdateQueue* queue,
+ const gfx::Rect& source_rect,
+ const gfx::Vector2d& dest_offset,
+ bool partial_update) override;
private:
SkBitmap bitmap_;
@@ -37,7 +37,7 @@
RenderingStatsInstrumentation* stats_instrumentation,
int layer_id);
- virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
+ scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* manager) override;
void PaintContentsRect(SkCanvas* canvas,
const gfx::Rect& source_rect);
@@ -47,7 +47,7 @@
scoped_ptr<LayerPainter> painter,
RenderingStatsInstrumentation* stats_instrumentation,
int layer_id);
- virtual ~BitmapSkPictureContentLayerUpdater();
+ ~BitmapSkPictureContentLayerUpdater() override;
DISALLOW_COPY_AND_ASSIGN(BitmapSkPictureContentLayerUpdater);
};
diff --git a/cc/resources/content_layer_updater.h b/cc/resources/content_layer_updater.h
index 33d3ee5..e0c54e5 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -22,15 +22,15 @@
class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
public:
void set_rendering_stats_instrumentation(RenderingStatsInstrumentation* rsi);
- virtual void SetOpaque(bool opaque) override;
- virtual void SetFillsBoundsCompletely(bool fills_bounds) override;
- virtual void SetBackgroundColor(SkColor background_color) override;
+ void SetOpaque(bool opaque) override;
+ void SetFillsBoundsCompletely(bool fills_bounds) override;
+ void SetBackgroundColor(SkColor background_color) override;
protected:
ContentLayerUpdater(scoped_ptr<LayerPainter> painter,
RenderingStatsInstrumentation* stats_instrumentation,
int layer_id);
- virtual ~ContentLayerUpdater();
+ ~ContentLayerUpdater() override;
// Paints the contents. |content_size| size of the underlying layer in
// layer's content space. |paint_rect| bounds to paint in content space of the
diff --git a/cc/resources/gpu_raster_worker_pool.cc b/cc/resources/gpu_raster_worker_pool.cc
index 2d1e888..a0bc86f 100644
--- a/cc/resources/gpu_raster_worker_pool.cc
+++ b/cc/resources/gpu_raster_worker_pool.cc
@@ -32,10 +32,10 @@
multi_picture_draw_(multi_picture_draw) {}
// Overridden from RasterBuffer:
- virtual void Playback(const PicturePileImpl* picture_pile,
- const gfx::Rect& rect,
- float scale,
- RenderingStatsInstrumentation* stats) override {
+ void Playback(const PicturePileImpl* picture_pile,
+ const gfx::Rect& rect,
+ float scale,
+ RenderingStatsInstrumentation* stats) override {
if (!lock_.sk_surface())
return;
diff --git a/cc/resources/gpu_raster_worker_pool.h b/cc/resources/gpu_raster_worker_pool.h
index 48c17b1..a4e4197 100644
--- a/cc/resources/gpu_raster_worker_pool.h
+++ b/cc/resources/gpu_raster_worker_pool.h
@@ -18,7 +18,7 @@
public Rasterizer,
public RasterizerTaskClient {
public:
- virtual ~GpuRasterWorkerPool();
+ ~GpuRasterWorkerPool() override;
static scoped_ptr<RasterWorkerPool> Create(
base::SequencedTaskRunner* task_runner,
@@ -26,18 +26,18 @@
ResourceProvider* resource_provider);
// Overridden from RasterWorkerPool:
- virtual Rasterizer* AsRasterizer() override;
+ Rasterizer* AsRasterizer() override;
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override;
- virtual void Shutdown() override;
- virtual void ScheduleTasks(RasterTaskQueue* queue) override;
- virtual void CheckForCompletedTasks() override;
+ void SetClient(RasterizerClient* client) override;
+ void Shutdown() override;
+ void ScheduleTasks(RasterTaskQueue* queue) override;
+ void CheckForCompletedTasks() override;
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override;
- virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
private:
GpuRasterWorkerPool(base::SequencedTaskRunner* task_runner,
diff --git a/cc/resources/image_layer_updater.h b/cc/resources/image_layer_updater.h
index 55fdfe5..81225ba 100644
--- a/cc/resources/image_layer_updater.h
+++ b/cc/resources/image_layer_updater.h
@@ -19,12 +19,12 @@
public:
Resource(ImageLayerUpdater* updater,
scoped_ptr<PrioritizedResource> texture);
- virtual ~Resource();
+ ~Resource() override;
- virtual void Update(ResourceUpdateQueue* queue,
- const gfx::Rect& source_rect,
- const gfx::Vector2d& dest_offset,
- bool partial_update) override;
+ void Update(ResourceUpdateQueue* queue,
+ const gfx::Rect& source_rect,
+ const gfx::Vector2d& dest_offset,
+ bool partial_update) override;
private:
ImageLayerUpdater* updater_;
@@ -34,7 +34,7 @@
static scoped_refptr<ImageLayerUpdater> Create();
- virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
+ scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager*) override;
void UpdateTexture(ResourceUpdateQueue* queue,
@@ -48,7 +48,7 @@
private:
ImageLayerUpdater() {}
- virtual ~ImageLayerUpdater() {}
+ ~ImageLayerUpdater() override {}
SkBitmap bitmap_;
diff --git a/cc/resources/one_copy_raster_worker_pool.cc b/cc/resources/one_copy_raster_worker_pool.cc
index a297451..66b6ea0 100644
--- a/cc/resources/one_copy_raster_worker_pool.cc
+++ b/cc/resources/one_copy_raster_worker_pool.cc
@@ -32,7 +32,7 @@
resource_provider_,
raster_resource_->id())) {}
- virtual ~RasterBufferImpl() {
+ ~RasterBufferImpl() override {
// First unlock raster resource.
lock_.reset();
@@ -45,10 +45,10 @@
}
// Overridden from RasterBuffer:
- virtual void Playback(const PicturePileImpl* picture_pile,
- const gfx::Rect& rect,
- float scale,
- RenderingStatsInstrumentation* stats) override {
+ void Playback(const PicturePileImpl* picture_pile,
+ const gfx::Rect& rect,
+ float scale,
+ RenderingStatsInstrumentation* stats) override {
gfx::GpuMemoryBuffer* gpu_memory_buffer = lock_->gpu_memory_buffer();
if (!gpu_memory_buffer)
return;
diff --git a/cc/resources/one_copy_raster_worker_pool.h b/cc/resources/one_copy_raster_worker_pool.h
index c240999..c84b559 100644
--- a/cc/resources/one_copy_raster_worker_pool.h
+++ b/cc/resources/one_copy_raster_worker_pool.h
@@ -27,7 +27,7 @@
public Rasterizer,
public RasterizerTaskClient {
public:
- virtual ~OneCopyRasterWorkerPool();
+ ~OneCopyRasterWorkerPool() override;
static scoped_ptr<RasterWorkerPool> Create(
base::SequencedTaskRunner* task_runner,
@@ -37,18 +37,18 @@
ResourcePool* resource_pool);
// Overridden from RasterWorkerPool:
- virtual Rasterizer* AsRasterizer() override;
+ Rasterizer* AsRasterizer() override;
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override;
- virtual void Shutdown() override;
- virtual void ScheduleTasks(RasterTaskQueue* queue) override;
- virtual void CheckForCompletedTasks() override;
+ void SetClient(RasterizerClient* client) override;
+ void Shutdown() override;
+ void ScheduleTasks(RasterTaskQueue* queue) override;
+ void CheckForCompletedTasks() override;
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override;
- virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
protected:
OneCopyRasterWorkerPool(base::SequencedTaskRunner* task_runner,
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index f47c700..38e2dc4 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -539,7 +539,8 @@
float ideal_contents_scale,
double current_frame_time_in_seconds,
const Occlusion& occlusion_in_layer_space) {
- if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) {
+ if (!NeedsUpdateForFrameAtTimeAndViewport(current_frame_time_in_seconds,
+ viewport_in_layer_space)) {
// This should never be zero for the purposes of has_ever_been_updated().
DCHECK_NE(current_frame_time_in_seconds, 0.0);
return;
@@ -550,6 +551,7 @@
if (tiling_size().IsEmpty()) {
last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds;
+ last_viewport_in_layer_space_ = viewport_in_layer_space;
last_visible_rect_in_content_space_ = visible_rect_in_content_space;
return;
}
@@ -587,6 +589,7 @@
SetLiveTilesRect(eventually_rect);
last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds;
+ last_viewport_in_layer_space_ = viewport_in_layer_space;
last_visible_rect_in_content_space_ = visible_rect_in_content_space;
eviction_tiles_cache_valid_ = false;
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index a12b1d2..5da4c8d 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -262,8 +262,11 @@
double current_frame_time_in_seconds,
const Occlusion& occlusion_in_layer_space);
- bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) {
- return frame_time_in_seconds != last_impl_frame_time_in_seconds_;
+ bool NeedsUpdateForFrameAtTimeAndViewport(
+ double frame_time_in_seconds,
+ const gfx::Rect& viewport_in_layer_space) {
+ return frame_time_in_seconds != last_impl_frame_time_in_seconds_ ||
+ viewport_in_layer_space != last_viewport_in_layer_space_;
}
void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
@@ -340,6 +343,7 @@
// State saved for computing velocities based upon finite differences.
double last_impl_frame_time_in_seconds_;
+ gfx::Rect last_viewport_in_layer_space_;
gfx::Rect last_visible_rect_in_content_space_;
float content_to_screen_scale_;
diff --git a/cc/resources/picture_pile.h b/cc/resources/picture_pile.h
index 5395843..d68387f 100644
--- a/cc/resources/picture_pile.h
+++ b/cc/resources/picture_pile.h
@@ -54,7 +54,7 @@
void SetPixelRecordDistanceForTesting(int d) { pixel_record_distance_ = d; }
protected:
- virtual ~PicturePile();
+ ~PicturePile() override;
private:
friend class PicturePileImpl;
diff --git a/cc/resources/picture_pile_base.h b/cc/resources/picture_pile_base.h
index 1067c3e..991a29c 100644
--- a/cc/resources/picture_pile_base.h
+++ b/cc/resources/picture_pile_base.h
@@ -65,6 +65,10 @@
void AsValueInto(base::debug::TracedValue* array) const;
+ SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const {
+ return tile_grid_info_;
+ }
+
protected:
class CC_EXPORT PictureInfo {
public:
diff --git a/cc/resources/picture_pile_impl.h b/cc/resources/picture_pile_impl.h
index 75ee536..a9bef0c 100644
--- a/cc/resources/picture_pile_impl.h
+++ b/cc/resources/picture_pile_impl.h
@@ -106,7 +106,7 @@
PicturePileImpl();
explicit PicturePileImpl(const PicturePileBase* other);
- virtual ~PicturePileImpl();
+ ~PicturePileImpl() override;
private:
typedef std::map<const Picture*, Region> PictureRegionMap;
diff --git a/cc/resources/picture_pile_unittest.cc b/cc/resources/picture_pile_unittest.cc
index 338d5a6..881055f 100644
--- a/cc/resources/picture_pile_unittest.cc
+++ b/cc/resources/picture_pile_unittest.cc
@@ -33,7 +33,7 @@
typedef PicturePile::PictureMap PictureMap;
protected:
- virtual ~TestPicturePile() {}
+ ~TestPicturePile() override {}
};
class PicturePileTestBase {
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
index 36bbe0d..9ad641a 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.cc
+++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
@@ -30,15 +30,15 @@
memory_ = resource_provider_->MapPixelBuffer(resource_->id(), &stride_);
}
- virtual ~RasterBufferImpl() {
+ ~RasterBufferImpl() override {
resource_provider_->ReleasePixelBuffer(resource_->id());
}
// Overridden from RasterBuffer:
- virtual void Playback(const PicturePileImpl* picture_pile,
- const gfx::Rect& rect,
- float scale,
- RenderingStatsInstrumentation* stats) override {
+ void Playback(const PicturePileImpl* picture_pile,
+ const gfx::Rect& rect,
+ float scale,
+ RenderingStatsInstrumentation* stats) override {
if (!memory_)
return;
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.h b/cc/resources/pixel_buffer_raster_worker_pool.h
index 78933aa..7fb45ec 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.h
+++ b/cc/resources/pixel_buffer_raster_worker_pool.h
@@ -29,7 +29,7 @@
public Rasterizer,
public RasterizerTaskClient {
public:
- virtual ~PixelBufferRasterWorkerPool();
+ ~PixelBufferRasterWorkerPool() override;
static scoped_ptr<RasterWorkerPool> Create(
base::SequencedTaskRunner* task_runner,
@@ -39,18 +39,18 @@
size_t max_transfer_buffer_usage_bytes);
// Overridden from RasterWorkerPool:
- virtual Rasterizer* AsRasterizer() override;
+ Rasterizer* AsRasterizer() override;
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override;
- virtual void Shutdown() override;
- virtual void ScheduleTasks(RasterTaskQueue* queue) override;
- virtual void CheckForCompletedTasks() override;
+ void SetClient(RasterizerClient* client) override;
+ void Shutdown() override;
+ void ScheduleTasks(RasterTaskQueue* queue) override;
+ void CheckForCompletedTasks() override;
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override;
- virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
private:
struct RasterTaskState {
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index 9b4abe1..a52e019 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -36,13 +36,11 @@
}
}
- virtual ~RasterTaskGraphRunner() { NOTREACHED(); }
+ ~RasterTaskGraphRunner() override { NOTREACHED(); }
private:
// Overridden from base::DelegateSimpleThread::Delegate:
- virtual void Run() override {
- TaskGraphRunner::Run();
- }
+ void Run() override { TaskGraphRunner::Run(); }
ScopedPtrDeque<base::DelegateSimpleThread> workers_;
};
@@ -63,18 +61,18 @@
on_raster_finished_callback_(on_raster_finished_callback) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
TRACE_EVENT0("cc", "RasterFinishedTaskImpl::RunOnWorkerThread");
RasterFinished();
}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void RunReplyOnOriginThread() override {}
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
+ void RunReplyOnOriginThread() override {}
protected:
- virtual ~RasterFinishedTaskImpl() {}
+ ~RasterFinishedTaskImpl() override {}
void RasterFinished() {
task_runner_->PostTask(FROM_HERE, on_raster_finished_callback_);
diff --git a/cc/resources/raster_worker_pool_perftest.cc b/cc/resources/raster_worker_pool_perftest.cc
index c4e43ac..4264373 100644
--- a/cc/resources/raster_worker_pool_perftest.cc
+++ b/cc/resources/raster_worker_pool_perftest.cc
@@ -33,31 +33,31 @@
class PerfGLES2Interface : public gpu::gles2::GLES2InterfaceStub {
// Overridden from gpu::gles2::GLES2Interface:
- virtual GLuint CreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat) override {
+ GLuint CreateImageCHROMIUM(ClientBuffer buffer,
+ GLsizei width,
+ GLsizei height,
+ GLenum internalformat) override {
return 1u;
}
- virtual void GenBuffers(GLsizei n, GLuint* buffers) override {
+ void GenBuffers(GLsizei n, GLuint* buffers) override {
for (GLsizei i = 0; i < n; ++i)
buffers[i] = 1u;
}
- virtual void GenTextures(GLsizei n, GLuint* textures) override {
+ void GenTextures(GLsizei n, GLuint* textures) override {
for (GLsizei i = 0; i < n; ++i)
textures[i] = 1u;
}
- virtual void GetIntegerv(GLenum pname, GLint* params) override {
+ void GetIntegerv(GLenum pname, GLint* params) override {
if (pname == GL_MAX_TEXTURE_SIZE)
*params = INT_MAX;
}
- virtual void GenQueriesEXT(GLsizei n, GLuint* queries) override {
+ void GenQueriesEXT(GLsizei n, GLuint* queries) override {
for (GLsizei i = 0; i < n; ++i)
queries[i] = 1u;
}
- virtual void GetQueryObjectuivEXT(GLuint query,
- GLenum pname,
- GLuint* params) override {
+ void GetQueryObjectuivEXT(GLuint query,
+ GLenum pname,
+ GLuint* params) override {
if (pname == GL_QUERY_RESULT_AVAILABLE_EXT)
*params = 1;
}
@@ -67,28 +67,28 @@
public:
PerfContextProvider() : context_gl_(new PerfGLES2Interface) {}
- virtual bool BindToCurrentThread() override { return true; }
- virtual Capabilities ContextCapabilities() override {
+ bool BindToCurrentThread() override { return true; }
+ Capabilities ContextCapabilities() override {
Capabilities capabilities;
capabilities.gpu.image = true;
capabilities.gpu.sync_query = true;
return capabilities;
}
- virtual gpu::gles2::GLES2Interface* ContextGL() override {
- return context_gl_.get();
+ gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); }
+ gpu::ContextSupport* ContextSupport() override { return &support_; }
+ class GrContext* GrContext() override {
+ return NULL;
}
- virtual gpu::ContextSupport* ContextSupport() override { return &support_; }
- virtual class GrContext* GrContext() override { return NULL; }
- virtual bool IsContextLost() override { return false; }
- virtual void VerifyContexts() override {}
- virtual void DeleteCachedResources() override {}
- virtual bool DestroyedOnMainThread() override { return false; }
- virtual void SetLostContextCallback(const LostContextCallback& cb) override {}
- virtual void SetMemoryPolicyChangedCallback(
+ bool IsContextLost() override { return false; }
+ void VerifyContexts() override {}
+ void DeleteCachedResources() override {}
+ bool DestroyedOnMainThread() override { return false; }
+ void SetLostContextCallback(const LostContextCallback& cb) override {}
+ void SetMemoryPolicyChangedCallback(
const MemoryPolicyChangedCallback& cb) override {}
private:
- virtual ~PerfContextProvider() {}
+ ~PerfContextProvider() override {}
scoped_ptr<PerfGLES2Interface> context_gl_;
TestContextSupport support_;
@@ -111,12 +111,12 @@
PerfImageDecodeTaskImpl() {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {}
+ void RunOnWorkerThread() override {}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void RunReplyOnOriginThread() override { Reset(); }
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
+ void RunReplyOnOriginThread() override { Reset(); }
void Reset() {
did_run_ = false;
@@ -124,7 +124,7 @@
}
protected:
- virtual ~PerfImageDecodeTaskImpl() {}
+ ~PerfImageDecodeTaskImpl() override {}
private:
DISALLOW_COPY_AND_ASSIGN(PerfImageDecodeTaskImpl);
@@ -137,16 +137,16 @@
: RasterTask(resource.get(), dependencies), resource_(resource.Pass()) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {}
+ void RunOnWorkerThread() override {}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
raster_buffer_ = client->AcquireBufferForRaster(resource());
}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {
client->ReleaseBufferForRaster(raster_buffer_.Pass());
}
- virtual void RunReplyOnOriginThread() override { Reset(); }
+ void RunReplyOnOriginThread() override { Reset(); }
void Reset() {
did_run_ = false;
@@ -154,7 +154,7 @@
}
protected:
- virtual ~PerfRasterTaskImpl() {}
+ ~PerfRasterTaskImpl() override {}
private:
scoped_ptr<ScopedResource> resource_;
@@ -282,10 +282,10 @@
}
// Overriden from RasterizerClient:
- virtual void DidFinishRunningTasks(TaskSet task_set) override {
+ void DidFinishRunningTasks(TaskSet task_set) override {
raster_worker_pool_->AsRasterizer()->CheckForCompletedTasks();
}
- virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const override {
+ TaskSetCollection TasksThatShouldBeForcedToComplete() const override {
return TaskSetCollection();
}
diff --git a/cc/resources/raster_worker_pool_unittest.cc b/cc/resources/raster_worker_pool_unittest.cc
index 7e3d1f9..2227128 100644
--- a/cc/resources/raster_worker_pool_unittest.cc
+++ b/cc/resources/raster_worker_pool_unittest.cc
@@ -58,24 +58,24 @@
gfx::Size(1, 1))) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
raster_buffer_->Playback(
picture_pile_.get(), gfx::Rect(0, 0, 1, 1), 1.0, NULL);
}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
raster_buffer_ = client->AcquireBufferForRaster(resource());
}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {
client->ReleaseBufferForRaster(raster_buffer_.Pass());
}
- virtual void RunReplyOnOriginThread() override {
+ void RunReplyOnOriginThread() override {
reply_.Run(PicturePileImpl::Analysis(), !HasFinishedRunning());
}
protected:
- virtual ~TestRasterTaskImpl() {}
+ ~TestRasterTaskImpl() override {}
private:
const Reply reply_;
@@ -94,16 +94,16 @@
: TestRasterTaskImpl(resource, reply, dependencies), lock_(lock) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
base::AutoLock lock(*lock_);
TestRasterTaskImpl::RunOnWorkerThread();
}
// Overridden from RasterizerTask:
- virtual void RunReplyOnOriginThread() override {}
+ void RunReplyOnOriginThread() override {}
protected:
- virtual ~BlockingTestRasterTaskImpl() {}
+ ~BlockingTestRasterTaskImpl() override {}
private:
base::Lock* lock_;
@@ -185,13 +185,13 @@
}
// Overriden from RasterWorkerPoolClient:
- virtual void DidFinishRunningTasks(TaskSet task_set) override {
+ void DidFinishRunningTasks(TaskSet task_set) override {
if (task_set == ALL) {
raster_worker_pool_->AsRasterizer()->CheckForCompletedTasks();
base::MessageLoop::current()->Quit();
}
}
- virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const override {
+ TaskSetCollection TasksThatShouldBeForcedToComplete() const override {
return TaskSetCollection();
}
diff --git a/cc/resources/rasterizer.h b/cc/resources/rasterizer.h
index 8013593..526058c 100644
--- a/cc/resources/rasterizer.h
+++ b/cc/resources/rasterizer.h
@@ -50,7 +50,7 @@
protected:
RasterizerTask();
- virtual ~RasterizerTask();
+ ~RasterizerTask() override;
bool did_schedule_;
bool did_complete_;
@@ -61,11 +61,11 @@
typedef std::vector<scoped_refptr<ImageDecodeTask>> Vector;
// Overridden from RasterizerTask:
- virtual ImageDecodeTask* AsImageDecodeTask() override;
+ ImageDecodeTask* AsImageDecodeTask() override;
protected:
ImageDecodeTask();
- virtual ~ImageDecodeTask();
+ ~ImageDecodeTask() override;
};
class CC_EXPORT RasterTask : public RasterizerTask {
@@ -73,14 +73,14 @@
typedef std::vector<scoped_refptr<RasterTask>> Vector;
// Overridden from RasterizerTask:
- virtual RasterTask* AsRasterTask() override;
+ RasterTask* AsRasterTask() override;
const Resource* resource() const { return resource_; }
const ImageDecodeTask::Vector& dependencies() const { return dependencies_; }
protected:
RasterTask(const Resource* resource, ImageDecodeTask::Vector* dependencies);
- virtual ~RasterTask();
+ ~RasterTask() override;
private:
const Resource* resource_;
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 578c2e9..1697ac2 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -156,13 +156,13 @@
TextureIdAllocator(GLES2Interface* gl,
size_t texture_id_allocation_chunk_size)
: IdAllocator(gl, texture_id_allocation_chunk_size) {}
- virtual ~TextureIdAllocator() {
+ ~TextureIdAllocator() override {
gl_->DeleteTextures(id_allocation_chunk_size_ - next_id_index_,
ids_.get() + next_id_index_);
}
// Overridden from IdAllocator:
- virtual GLuint NextId() override {
+ GLuint NextId() override {
if (next_id_index_ == id_allocation_chunk_size_) {
gl_->GenTextures(id_allocation_chunk_size_, ids_.get());
next_id_index_ = 0;
@@ -179,13 +179,13 @@
public:
BufferIdAllocator(GLES2Interface* gl, size_t buffer_id_allocation_chunk_size)
: IdAllocator(gl, buffer_id_allocation_chunk_size) {}
- virtual ~BufferIdAllocator() {
+ ~BufferIdAllocator() override {
gl_->DeleteBuffers(id_allocation_chunk_size_ - next_id_index_,
ids_.get() + next_id_index_);
}
// Overridden from IdAllocator:
- virtual GLuint NextId() override {
+ GLuint NextId() override {
if (next_id_index_ == id_allocation_chunk_size_) {
gl_->GenBuffers(id_allocation_chunk_size_, ids_.get());
next_id_index_ = 0;
@@ -206,8 +206,8 @@
: gl_(gl), query_id_(query_id) {}
// Overridden from ResourceProvider::Fence:
- virtual void Set() override {}
- virtual bool HasPassed() override {
+ void Set() override {}
+ bool HasPassed() override {
unsigned available = 1;
gl_->GetQueryObjectuivEXT(
query_id_, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
@@ -215,7 +215,7 @@
}
private:
- virtual ~QueryFence() {}
+ ~QueryFence() override {}
gpu::gles2::GLES2Interface* gl_;
unsigned query_id_;
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index dc8e7b6..1e70132 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -238,7 +238,7 @@
ResourceProvider::ResourceId resource_id,
GLenum unit,
GLenum filter);
- virtual ~ScopedSamplerGL();
+ ~ScopedSamplerGL() override;
GLenum target() const { return target_; }
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index 3daef66..3aea34f 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -170,7 +170,7 @@
return make_scoped_ptr(new ResourceProviderContext(shared_data));
}
- virtual GLuint insertSyncPoint() override {
+ GLuint insertSyncPoint() override {
uint32 sync_point = shared_data_->InsertSyncPoint();
// Commit the produceTextureCHROMIUM calls at this point, so that
// they're associated with the sync point.
@@ -185,17 +185,17 @@
return sync_point;
}
- virtual void waitSyncPoint(GLuint sync_point) override {
+ void waitSyncPoint(GLuint sync_point) override {
last_waited_sync_point_ = std::max(sync_point, last_waited_sync_point_);
}
unsigned last_waited_sync_point() const { return last_waited_sync_point_; }
- virtual void texStorage2DEXT(GLenum target,
- GLint levels,
- GLuint internalformat,
- GLint width,
- GLint height) override {
+ void texStorage2DEXT(GLenum target,
+ GLint levels,
+ GLuint internalformat,
+ GLint width,
+ GLint height) override {
CheckTextureIsBound(target);
ASSERT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
ASSERT_EQ(1, levels);
@@ -212,15 +212,15 @@
AllocateTexture(gfx::Size(width, height), format);
}
- virtual void texImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override {
+ void texImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override {
CheckTextureIsBound(target);
ASSERT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
ASSERT_FALSE(level);
@@ -232,15 +232,15 @@
SetPixels(0, 0, width, height, pixels);
}
- virtual void texSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override {
+ void texSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override {
CheckTextureIsBound(target);
ASSERT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
ASSERT_FALSE(level);
@@ -253,12 +253,11 @@
SetPixels(xoffset, yoffset, width, height, pixels);
}
- virtual void genMailboxCHROMIUM(GLbyte* mailbox) override {
+ void genMailboxCHROMIUM(GLbyte* mailbox) override {
return shared_data_->GenMailbox(mailbox);
}
- virtual void produceTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override {
+ void produceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override {
CheckTextureIsBound(target);
// Delay moving the texture into the mailbox until the next
@@ -271,8 +270,7 @@
pending_produce_textures_.push_back(pending.Pass());
}
- virtual void consumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override {
+ void consumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override {
CheckTextureIsBound(target);
base::AutoLock lock_for_texture_access(namespace_->lock);
scoped_refptr<TestTexture> texture =
@@ -3604,11 +3602,11 @@
class TextureIdAllocationTrackingContext : public TestWebGraphicsContext3D {
public:
- virtual GLuint NextTextureId() override {
+ GLuint NextTextureId() override {
base::AutoLock lock(namespace_->lock);
return namespace_->next_texture_id++;
}
- virtual void RetireTextureId(GLuint) override {}
+ void RetireTextureId(GLuint) override {}
GLuint PeekTextureId() {
base::AutoLock lock(namespace_->lock);
return namespace_->next_texture_id;
diff --git a/cc/resources/resource_update_controller_unittest.cc b/cc/resources/resource_update_controller_unittest.cc
index 361050d..49f7b47 100644
--- a/cc/resources/resource_update_controller_unittest.cc
+++ b/cc/resources/resource_update_controller_unittest.cc
@@ -32,20 +32,19 @@
explicit WebGraphicsContext3DForUploadTest(ResourceUpdateControllerTest* test)
: test_(test) {}
- virtual void flush() override;
- virtual void shallowFlushCHROMIUM() override;
- virtual void texSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
+ void flush() override;
+ void shallowFlushCHROMIUM() override;
+ void texSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
- virtual void getQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* value)
- override;
+ void getQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* value) override;
private:
ResourceUpdateControllerTest* test_;
@@ -329,7 +328,7 @@
void Reset() { ready_to_finalize_called_ = false; }
bool ReadyToFinalizeCalled() const { return ready_to_finalize_called_; }
- virtual void ReadyToFinalizeTextureUpdates() override {
+ void ReadyToFinalizeTextureUpdates() override {
ready_to_finalize_called_ = true;
}
@@ -353,7 +352,7 @@
void SetUpdateTextureTime(base::TimeDelta time) {
update_textures_time_ = time;
}
- virtual base::TimeTicks UpdateMoreTexturesCompletionTime() override {
+ base::TimeTicks UpdateMoreTexturesCompletionTime() override {
size_t total_updates =
resource_provider_->NumBlockingUploads() + update_more_textures_size_;
return now_ + total_updates * update_textures_time_;
@@ -361,7 +360,7 @@
void SetUpdateMoreTexturesSize(size_t size) {
update_more_textures_size_ = size;
}
- virtual size_t UpdateMoreTexturesSize() const override {
+ size_t UpdateMoreTexturesSize() const override {
return update_more_textures_size_;
}
diff --git a/cc/resources/scoped_ui_resource.h b/cc/resources/scoped_ui_resource.h
index 9d4b937..f7def7f 100644
--- a/cc/resources/scoped_ui_resource.h
+++ b/cc/resources/scoped_ui_resource.h
@@ -25,11 +25,10 @@
public:
static scoped_ptr<ScopedUIResource> Create(LayerTreeHost* host,
const UIResourceBitmap& bitmap);
- virtual ~ScopedUIResource();
+ ~ScopedUIResource() override;
// UIResourceClient implementation.
- virtual UIResourceBitmap GetBitmap(UIResourceId uid,
- bool resource_lost) override;
+ UIResourceBitmap GetBitmap(UIResourceId uid, bool resource_lost) override;
UIResourceId id() { return id_; }
protected:
diff --git a/cc/resources/skpicture_content_layer_updater.h b/cc/resources/skpicture_content_layer_updater.h
index 55edade..ec49aae 100644
--- a/cc/resources/skpicture_content_layer_updater.h
+++ b/cc/resources/skpicture_content_layer_updater.h
@@ -23,13 +23,13 @@
scoped_ptr<LayerPainter> painter,
RenderingStatsInstrumentation* stats_instrumentation,
int layer_id);
- virtual ~SkPictureContentLayerUpdater();
+ ~SkPictureContentLayerUpdater() override;
- virtual void PrepareToUpdate(const gfx::Size& content_size,
- const gfx::Rect& paint_rect,
- const gfx::Size& tile_size,
- float contents_width_scale,
- float contents_height_scale) override;
+ void PrepareToUpdate(const gfx::Size& content_size,
+ const gfx::Rect& paint_rect,
+ const gfx::Size& tile_size,
+ float contents_width_scale,
+ float contents_height_scale) override;
void DrawPicture(SkCanvas* canvas);
private:
diff --git a/cc/resources/task_graph_runner_perftest.cc b/cc/resources/task_graph_runner_perftest.cc
index 2ce6dc8..7809e58 100644
--- a/cc/resources/task_graph_runner_perftest.cc
+++ b/cc/resources/task_graph_runner_perftest.cc
@@ -27,12 +27,12 @@
PerfTaskImpl() {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {}
+ void RunOnWorkerThread() override {}
void Reset() { did_run_ = false; }
private:
- virtual ~PerfTaskImpl() {}
+ ~PerfTaskImpl() override {}
DISALLOW_COPY_AND_ASSIGN(PerfTaskImpl);
};
diff --git a/cc/resources/task_graph_runner_unittest.cc b/cc/resources/task_graph_runner_unittest.cc
index 6e5a785..ad23b66 100644
--- a/cc/resources/task_graph_runner_unittest.cc
+++ b/cc/resources/task_graph_runner_unittest.cc
@@ -118,7 +118,7 @@
: test_(test), namespace_index_(namespace_index), id_(id) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
test_->RunTaskOnWorkerThread(namespace_index_, id_);
}
@@ -127,7 +127,7 @@
}
protected:
- virtual ~FakeTaskImpl() {}
+ ~FakeTaskImpl() override {}
private:
TaskGraphRunnerTestBase* test_;
@@ -145,10 +145,10 @@
: FakeTaskImpl(test, namespace_index, id) {}
// Overridden from FakeTaskImpl:
- virtual void CompleteOnOriginThread() override {}
+ void CompleteOnOriginThread() override {}
private:
- virtual ~FakeDependentTaskImpl() {}
+ ~FakeDependentTaskImpl() override {}
DISALLOW_COPY_AND_ASSIGN(FakeDependentTaskImpl);
};
@@ -189,7 +189,7 @@
private:
// Overridden from base::DelegateSimpleThread::Delegate:
- virtual void Run() override { task_graph_runner_->Run(); }
+ void Run() override { task_graph_runner_->Run(); }
ScopedPtrDeque<base::DelegateSimpleThread> workers_;
};
@@ -299,7 +299,7 @@
private:
// Overridden from base::DelegateSimpleThread::Delegate:
- virtual void Run() override { task_graph_runner_->Run(); }
+ void Run() override { task_graph_runner_->Run(); }
scoped_ptr<base::DelegateSimpleThread> worker_;
};
diff --git a/cc/resources/texture_uploader_unittest.cc b/cc/resources/texture_uploader_unittest.cc
index 335908d..7249172 100644
--- a/cc/resources/texture_uploader_unittest.cc
+++ b/cc/resources/texture_uploader_unittest.cc
@@ -19,7 +19,7 @@
public:
TextureUploadTestContext() : result_available_(0), unpack_alignment_(4) {}
- virtual void PixelStorei(GLenum pname, GLint param) override {
+ void PixelStorei(GLenum pname, GLint param) override {
switch (pname) {
case GL_UNPACK_ALIGNMENT:
// Param should be a power of two <= 8.
@@ -41,9 +41,7 @@
}
}
- virtual void GetQueryObjectuivEXT(GLuint,
- GLenum type,
- GLuint* value) override {
+ void GetQueryObjectuivEXT(GLuint, GLenum type, GLuint* value) override {
switch (type) {
case GL_QUERY_RESULT_AVAILABLE_EXT:
*value = result_available_;
@@ -54,15 +52,15 @@
}
}
- virtual void TexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override {
+ void TexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override {
EXPECT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
EXPECT_EQ(0, level);
EXPECT_LE(0, width);
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 7fa2e3e..cb9d766 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -57,7 +57,7 @@
reply_(reply) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
TRACE_EVENT0("cc", "RasterizerTaskImpl::RunOnWorkerThread");
DCHECK(picture_pile_.get());
@@ -73,20 +73,20 @@
}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {
DCHECK(!raster_buffer_);
raster_buffer_ = client->AcquireBufferForRaster(resource());
}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {
client->ReleaseBufferForRaster(raster_buffer_.Pass());
}
- virtual void RunReplyOnOriginThread() override {
+ void RunReplyOnOriginThread() override {
DCHECK(!raster_buffer_);
reply_.Run(analysis_, !HasFinishedRunning());
}
protected:
- virtual ~RasterTaskImpl() { DCHECK(!raster_buffer_); }
+ ~RasterTaskImpl() override { DCHECK(!raster_buffer_); }
private:
void Analyze(const PicturePileImpl* picture_pile) {
@@ -166,7 +166,7 @@
reply_(reply) {}
// Overridden from Task:
- virtual void RunOnWorkerThread() override {
+ void RunOnWorkerThread() override {
TRACE_EVENT0("cc", "ImageDecodeTaskImpl::RunOnWorkerThread");
devtools_instrumentation::ScopedImageDecodeTask image_decode_task(
@@ -177,14 +177,12 @@
}
// Overridden from RasterizerTask:
- virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
- virtual void RunReplyOnOriginThread() override {
- reply_.Run(!HasFinishedRunning());
- }
+ void ScheduleOnOriginThread(RasterizerTaskClient* client) override {}
+ void CompleteOnOriginThread(RasterizerTaskClient* client) override {}
+ void RunReplyOnOriginThread() override { reply_.Run(!HasFinishedRunning()); }
protected:
- virtual ~ImageDecodeTaskImpl() {}
+ ~ImageDecodeTaskImpl() override {}
private:
skia::RefPtr<SkPixelRef> pixel_ref_;
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 03fb6e1..2abf177 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -99,7 +99,7 @@
ResourcePool* resource_pool,
Rasterizer* rasterizer,
RenderingStatsInstrumentation* rendering_stats_instrumentation);
- virtual ~TileManager();
+ ~TileManager() override;
void ManageTiles(const GlobalStateThatImpactsTilePriority& state);
@@ -170,11 +170,11 @@
// Overriden from RefCountedManager<Tile>:
friend class Tile;
- virtual void Release(Tile* tile) override;
+ void Release(Tile* tile) override;
// Overriden from RasterizerClient:
- virtual void DidFinishRunningTasks(TaskSet task_set) override;
- virtual TaskSetCollection TasksThatShouldBeForcedToComplete() const override;
+ void DidFinishRunningTasks(TaskSet task_set) override;
+ TaskSetCollection TasksThatShouldBeForcedToComplete() const override;
typedef std::vector<Tile*> TileVector;
typedef std::set<Tile*> TileSet;
diff --git a/cc/resources/tile_manager_perftest.cc b/cc/resources/tile_manager_perftest.cc
index 9766df6..ba130bf 100644
--- a/cc/resources/tile_manager_perftest.cc
+++ b/cc/resources/tile_manager_perftest.cc
@@ -37,9 +37,9 @@
class FakeRasterizerImpl : public Rasterizer, public RasterizerTaskClient {
public:
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override {}
- virtual void Shutdown() override {}
- virtual void ScheduleTasks(RasterTaskQueue* queue) override {
+ void SetClient(RasterizerClient* client) override {}
+ void Shutdown() override {}
+ void ScheduleTasks(RasterTaskQueue* queue) override {
for (RasterTaskQueue::Item::Vector::const_iterator it =
queue->items.begin();
it != queue->items.end();
@@ -53,7 +53,7 @@
completed_tasks_.push_back(task);
}
}
- virtual void CheckForCompletedTasks() override {
+ void CheckForCompletedTasks() override {
for (RasterTask::Vector::iterator it = completed_tasks_.begin();
it != completed_tasks_.end();
++it) {
@@ -69,12 +69,11 @@
}
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override {
return nullptr;
}
- virtual void ReleaseBufferForRaster(
- scoped_ptr<RasterBuffer> buffer) override {}
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {}
private:
RasterTask::Vector completed_tasks_;
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index f62b6e6..4d0e125 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -26,11 +26,11 @@
class SyncPointClientImpl : public media::VideoFrame::SyncPointClient {
public:
explicit SyncPointClientImpl(gpu::gles2::GLES2Interface* gl) : gl_(gl) {}
- virtual ~SyncPointClientImpl() {}
- virtual uint32 InsertSyncPoint() override {
+ ~SyncPointClientImpl() override {}
+ uint32 InsertSyncPoint() override {
return GLC(gl_, gl_->InsertSyncPointCHROMIUM());
}
- virtual void WaitSyncPoint(uint32 sync_point) override {
+ void WaitSyncPoint(uint32 sync_point) override {
GLC(gl_, gl_->WaitSyncPointCHROMIUM(sync_point));
}
diff --git a/cc/resources/zero_copy_raster_worker_pool.cc b/cc/resources/zero_copy_raster_worker_pool.cc
index c9533f8..10464cd 100644
--- a/cc/resources/zero_copy_raster_worker_pool.cc
+++ b/cc/resources/zero_copy_raster_worker_pool.cc
@@ -24,10 +24,10 @@
: lock_(resource_provider, resource->id()), resource_(resource) {}
// Overridden from RasterBuffer:
- virtual void Playback(const PicturePileImpl* picture_pile,
- const gfx::Rect& rect,
- float scale,
- RenderingStatsInstrumentation* stats) override {
+ void Playback(const PicturePileImpl* picture_pile,
+ const gfx::Rect& rect,
+ float scale,
+ RenderingStatsInstrumentation* stats) override {
gfx::GpuMemoryBuffer* gpu_memory_buffer = lock_.gpu_memory_buffer();
if (!gpu_memory_buffer)
return;
diff --git a/cc/resources/zero_copy_raster_worker_pool.h b/cc/resources/zero_copy_raster_worker_pool.h
index b94713d..d1f583e 100644
--- a/cc/resources/zero_copy_raster_worker_pool.h
+++ b/cc/resources/zero_copy_raster_worker_pool.h
@@ -23,7 +23,7 @@
public Rasterizer,
public RasterizerTaskClient {
public:
- virtual ~ZeroCopyRasterWorkerPool();
+ ~ZeroCopyRasterWorkerPool() override;
static scoped_ptr<RasterWorkerPool> Create(
base::SequencedTaskRunner* task_runner,
@@ -31,18 +31,18 @@
ResourceProvider* resource_provider);
// Overridden from RasterWorkerPool:
- virtual Rasterizer* AsRasterizer() override;
+ Rasterizer* AsRasterizer() override;
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override;
- virtual void Shutdown() override;
- virtual void ScheduleTasks(RasterTaskQueue* queue) override;
- virtual void CheckForCompletedTasks() override;
+ void SetClient(RasterizerClient* client) override;
+ void Shutdown() override;
+ void ScheduleTasks(RasterTaskQueue* queue) override;
+ void CheckForCompletedTasks() override;
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override;
- virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
protected:
ZeroCopyRasterWorkerPool(base::SequencedTaskRunner* task_runner,
diff --git a/cc/scheduler/begin_frame_source.h b/cc/scheduler/begin_frame_source.h
index 3b8a576..3d849a4 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -71,11 +71,11 @@
// Traces |args| and DCHECK |args| satisfies pre-conditions then calls
// OnBeginFrameMixInDelegate and updates the last_begin_frame_args_ value on
// true.
- virtual void OnBeginFrame(const BeginFrameArgs& args) override;
- virtual const BeginFrameArgs LastUsedBeginFrameArgs() const override;
+ void OnBeginFrame(const BeginFrameArgs& args) override;
+ const BeginFrameArgs LastUsedBeginFrameArgs() const override;
// Outputs last_begin_frame_args_
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
protected:
// Subclasses should override this method!
@@ -131,18 +131,18 @@
// in their own AsValueInto implementation.
class CC_EXPORT BeginFrameSourceMixIn : public BeginFrameSource {
public:
- virtual ~BeginFrameSourceMixIn() {}
+ ~BeginFrameSourceMixIn() override {}
// BeginFrameSource
- virtual bool NeedsBeginFrames() const override;
- virtual void SetNeedsBeginFrames(bool needs_begin_frames) override;
- virtual void DidFinishFrame(size_t remaining_frames) override {}
- virtual void AddObserver(BeginFrameObserver* obs) override;
- virtual void RemoveObserver(BeginFrameObserver* obs) override;
+ bool NeedsBeginFrames() const override;
+ void SetNeedsBeginFrames(bool needs_begin_frames) override;
+ void DidFinishFrame(size_t remaining_frames) override {}
+ void AddObserver(BeginFrameObserver* obs) override;
+ void RemoveObserver(BeginFrameObserver* obs) override;
// Tracing support - Recommend (but not required) to call this implementation
// in any override.
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
protected:
BeginFrameSourceMixIn();
@@ -168,13 +168,13 @@
public:
static scoped_ptr<BackToBackBeginFrameSource> Create(
base::SingleThreadTaskRunner* task_runner);
- virtual ~BackToBackBeginFrameSource();
+ ~BackToBackBeginFrameSource() override;
// BeginFrameSource
- virtual void DidFinishFrame(size_t remaining_frames) override;
+ void DidFinishFrame(size_t remaining_frames) override;
// Tracing
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
protected:
explicit BackToBackBeginFrameSource(
@@ -187,7 +187,7 @@
bool send_begin_frame_posted_;
// BeginFrameSourceMixIn
- virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
+ void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
void BeginFrame();
};
@@ -202,21 +202,20 @@
base::SingleThreadTaskRunner* task_runner,
base::TimeTicks initial_vsync_timebase,
base::TimeDelta initial_vsync_interval);
- virtual ~SyntheticBeginFrameSource();
+ ~SyntheticBeginFrameSource() override;
// BeginFrameSource
- virtual bool NeedsBeginFrames() const override;
+ bool NeedsBeginFrames() const override;
// Tracing
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
// VSyncParameterObserver
- virtual void OnUpdateVSyncParameters(
- base::TimeTicks new_vsync_timebase,
- base::TimeDelta new_vsync_interval) override;
+ void OnUpdateVSyncParameters(base::TimeTicks new_vsync_timebase,
+ base::TimeDelta new_vsync_interval) override;
// TimeSourceClient
- virtual void OnTimerTick() override;
+ void OnTimerTick() override;
protected:
explicit SyntheticBeginFrameSource(
@@ -226,7 +225,7 @@
BeginFrameArgs::BeginFrameArgsType type);
// BeginFrameSourceMixIn
- virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
+ void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
scoped_refptr<DelayBasedTimeSource> time_source_;
};
@@ -238,7 +237,7 @@
public BeginFrameObserver {
public:
static scoped_ptr<BeginFrameSourceMultiplexer> Create();
- virtual ~BeginFrameSourceMultiplexer();
+ ~BeginFrameSourceMultiplexer() override;
void SetMinimumInterval(base::TimeDelta new_minimum_interval);
@@ -251,16 +250,16 @@
// The mux is an BeginFrameObserver as it needs to proxy the OnBeginFrame
// calls to preserve the monotonicity of the BeginFrameArgs when switching
// sources.
- virtual void OnBeginFrame(const BeginFrameArgs& args) override;
- virtual const BeginFrameArgs LastUsedBeginFrameArgs() const override;
+ void OnBeginFrame(const BeginFrameArgs& args) override;
+ const BeginFrameArgs LastUsedBeginFrameArgs() const override;
// BeginFrameSource
- virtual bool NeedsBeginFrames() const override;
- virtual void SetNeedsBeginFrames(bool needs_begin_frames) override;
- virtual void DidFinishFrame(size_t remaining_frames) override;
+ bool NeedsBeginFrames() const override;
+ void SetNeedsBeginFrames(bool needs_begin_frames) override;
+ void DidFinishFrame(size_t remaining_frames) override;
// Tracing
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
protected:
BeginFrameSourceMultiplexer();
diff --git a/cc/scheduler/begin_frame_source_unittest.cc b/cc/scheduler/begin_frame_source_unittest.cc
index 8abf1a9..b741e35 100644
--- a/cc/scheduler/begin_frame_source_unittest.cc
+++ b/cc/scheduler/begin_frame_source_unittest.cc
@@ -256,7 +256,7 @@
public:
BeginFrameSource* source_;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override {
+ void AsValueInto(base::debug::TracedValue* dict) const override {
dict->SetString("type", "LoopingBeginFrameObserver");
dict->BeginDictionary("source");
source_->AsValueInto(dict);
@@ -265,7 +265,7 @@
protected:
// BeginFrameObserverMixIn
- virtual bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override {
+ bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override {
return true;
}
};
@@ -297,7 +297,7 @@
base::SingleThreadTaskRunner* task_runner)
: BackToBackBeginFrameSource(task_runner), now_src_(now_src) {}
- virtual base::TimeTicks Now() override { return now_src_->Now(); }
+ base::TimeTicks Now() override { return now_src_->Now(); }
scoped_refptr<TestNowSource> now_src_;
};
diff --git a/cc/scheduler/delay_based_time_source.h b/cc/scheduler/delay_based_time_source.h
index 270102b..9f670d1 100644
--- a/cc/scheduler/delay_based_time_source.h
+++ b/cc/scheduler/delay_based_time_source.h
@@ -101,14 +101,14 @@
static scoped_refptr<DelayBasedTimeSourceHighRes> Create(
base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner);
- virtual base::TimeTicks Now() const override;
+ base::TimeTicks Now() const override;
protected:
DelayBasedTimeSourceHighRes(base::TimeDelta interval,
base::SingleThreadTaskRunner* task_runner);
- virtual ~DelayBasedTimeSourceHighRes();
+ ~DelayBasedTimeSourceHighRes() override;
- virtual std::string TypeString() const override;
+ std::string TypeString() const override;
private:
DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes);
diff --git a/cc/scheduler/scheduler.h b/cc/scheduler/scheduler.h
index 6da951c..f470d17 100644
--- a/cc/scheduler/scheduler.h
+++ b/cc/scheduler/scheduler.h
@@ -91,10 +91,10 @@
&frame_sources_constructor));
}
- virtual ~Scheduler();
+ ~Scheduler() override;
// base::PowerObserver method.
- virtual void OnPowerStateChange(bool on_battery_power) override;
+ void OnPowerStateChange(bool on_battery_power) override;
const SchedulerSettings& settings() const { return settings_; }
@@ -158,14 +158,14 @@
base::TimeTicks LastBeginImplFrameTime();
scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
- virtual void AsValueInto(base::debug::TracedValue* value) const override;
+ void AsValueInto(base::debug::TracedValue* value) const override;
void SetContinuousPainting(bool continuous_painting) {
state_machine_.SetContinuousPainting(continuous_painting);
}
// BeginFrameObserverMixin
- virtual bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override;
+ bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override;
protected:
Scheduler(SchedulerClient* client,
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 84d9fa3..7da6267 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -55,7 +55,7 @@
FakeSchedulerClient* client)
: client_(client) {}
- virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override {
+ void OnNeedsBeginFramesChange(bool needs_begin_frames) override {
if (needs_begin_frames) {
client_->actions_.push_back("SetNeedsBeginFrames(true)");
} else {
@@ -68,15 +68,13 @@
class FakePowerMonitorSource : public base::PowerMonitorSource {
public:
FakePowerMonitorSource() {}
- virtual ~FakePowerMonitorSource() {}
+ ~FakePowerMonitorSource() override {}
void GeneratePowerStateEvent(bool on_battery_power) {
on_battery_power_impl_ = on_battery_power;
ProcessPowerEvent(POWER_STATE_EVENT);
base::MessageLoop::current()->RunUntilIdle();
}
- virtual bool IsOnBatteryPowerImpl() override {
- return on_battery_power_impl_;
- }
+ bool IsOnBatteryPowerImpl() override { return on_battery_power_impl_; }
private:
bool on_battery_power_impl_;
@@ -134,7 +132,7 @@
return scheduler_->settings().begin_frame_scheduling_enabled &&
scheduler_->settings().throttle_frame_production;
}
- virtual FakeBeginFrameSource* ExternalBeginFrameSource() override {
+ FakeBeginFrameSource* ExternalBeginFrameSource() override {
return &fake_frame_source_;
}
@@ -192,19 +190,19 @@
redraw_will_happen_if_update_visible_tiles_happens_ = redraw;
}
// SchedulerClient implementation.
- virtual void WillBeginImplFrame(const BeginFrameArgs& args) override {
+ void WillBeginImplFrame(const BeginFrameArgs& args) override {
actions_.push_back("WillBeginImplFrame");
states_.push_back(scheduler_->AsValue());
}
- virtual void ScheduledActionSendBeginMainFrame() override {
+ void ScheduledActionSendBeginMainFrame() override {
actions_.push_back("ScheduledActionSendBeginMainFrame");
states_.push_back(scheduler_->AsValue());
}
- virtual void ScheduledActionAnimate() override {
+ void ScheduledActionAnimate() override {
actions_.push_back("ScheduledActionAnimate");
states_.push_back(scheduler_->AsValue());
}
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override {
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override {
actions_.push_back("ScheduledActionDrawAndSwapIfPossible");
states_.push_back(scheduler_->AsValue());
num_draws_++;
@@ -226,48 +224,46 @@
}
return result;
}
- virtual DrawResult ScheduledActionDrawAndSwapForced() override {
+ DrawResult ScheduledActionDrawAndSwapForced() override {
actions_.push_back("ScheduledActionDrawAndSwapForced");
states_.push_back(scheduler_->AsValue());
return DRAW_SUCCESS;
}
- virtual void ScheduledActionCommit() override {
+ void ScheduledActionCommit() override {
actions_.push_back("ScheduledActionCommit");
states_.push_back(scheduler_->AsValue());
}
- virtual void ScheduledActionUpdateVisibleTiles() override {
+ void ScheduledActionUpdateVisibleTiles() override {
actions_.push_back("ScheduledActionUpdateVisibleTiles");
states_.push_back(scheduler_->AsValue());
if (redraw_will_happen_if_update_visible_tiles_happens_)
scheduler_->SetNeedsRedraw();
}
- virtual void ScheduledActionActivateSyncTree() override {
+ void ScheduledActionActivateSyncTree() override {
actions_.push_back("ScheduledActionActivateSyncTree");
states_.push_back(scheduler_->AsValue());
}
- virtual void ScheduledActionBeginOutputSurfaceCreation() override {
+ void ScheduledActionBeginOutputSurfaceCreation() override {
actions_.push_back("ScheduledActionBeginOutputSurfaceCreation");
states_.push_back(scheduler_->AsValue());
}
- virtual void ScheduledActionManageTiles() override {
+ void ScheduledActionManageTiles() override {
actions_.push_back("ScheduledActionManageTiles");
states_.push_back(scheduler_->AsValue());
}
- virtual void DidAnticipatedDrawTimeChange(base::TimeTicks) override {
+ void DidAnticipatedDrawTimeChange(base::TimeTicks) override {
if (log_anticipated_draw_time_change_)
actions_.push_back("DidAnticipatedDrawTimeChange");
}
- virtual base::TimeDelta DrawDurationEstimate() override {
+ base::TimeDelta DrawDurationEstimate() override { return base::TimeDelta(); }
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
return base::TimeDelta();
}
- virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
- return base::TimeDelta();
- }
- virtual base::TimeDelta CommitToActivateDurationEstimate() override {
+ base::TimeDelta CommitToActivateDurationEstimate() override {
return base::TimeDelta();
}
- virtual void DidBeginImplFrameDeadline() override {}
+ void DidBeginImplFrameDeadline() override {}
base::Callback<bool(void)> ImplFrameDeadlinePending(bool state) {
return base::Bind(&FakeSchedulerClient::ImplFrameDeadlinePendingCallback,
@@ -491,23 +487,22 @@
class SchedulerClientThatsetNeedsDrawInsideDraw : public FakeSchedulerClient {
public:
- virtual void ScheduledActionSendBeginMainFrame() override {}
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible()
- override {
+ void ScheduledActionSendBeginMainFrame() override {}
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override {
// Only SetNeedsRedraw the first time this is called
if (!num_draws_)
scheduler_->SetNeedsRedraw();
return FakeSchedulerClient::ScheduledActionDrawAndSwapIfPossible();
}
- virtual DrawResult ScheduledActionDrawAndSwapForced() override {
+ DrawResult ScheduledActionDrawAndSwapForced() override {
NOTREACHED();
return DRAW_SUCCESS;
}
- virtual void ScheduledActionCommit() override {}
- virtual void ScheduledActionBeginOutputSurfaceCreation() override {}
- virtual void DidAnticipatedDrawTimeChange(base::TimeTicks) override {}
+ void ScheduledActionCommit() override {}
+ void ScheduledActionBeginOutputSurfaceCreation() override {}
+ void DidAnticipatedDrawTimeChange(base::TimeTicks) override {}
};
// Tests for two different situations:
@@ -602,9 +597,8 @@
SchedulerClientThatSetNeedsCommitInsideDraw()
: set_needs_commit_on_next_draw_(false) {}
- virtual void ScheduledActionSendBeginMainFrame() override {}
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible()
- override {
+ void ScheduledActionSendBeginMainFrame() override {}
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override {
// Only SetNeedsCommit the first time this is called
if (set_needs_commit_on_next_draw_) {
scheduler_->SetNeedsCommit();
@@ -613,14 +607,14 @@
return FakeSchedulerClient::ScheduledActionDrawAndSwapIfPossible();
}
- virtual DrawResult ScheduledActionDrawAndSwapForced() override {
+ DrawResult ScheduledActionDrawAndSwapForced() override {
NOTREACHED();
return DRAW_SUCCESS;
}
- virtual void ScheduledActionCommit() override {}
- virtual void ScheduledActionBeginOutputSurfaceCreation() override {}
- virtual void DidAnticipatedDrawTimeChange(base::TimeTicks) override {}
+ void ScheduledActionCommit() override {}
+ void ScheduledActionBeginOutputSurfaceCreation() override {}
+ void DidAnticipatedDrawTimeChange(base::TimeTicks) override {}
void SetNeedsCommitOnNextDraw() { set_needs_commit_on_next_draw_ = true; }
@@ -757,8 +751,7 @@
class SchedulerClientNeedsManageTilesInDraw : public FakeSchedulerClient {
public:
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible()
- override {
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override {
scheduler_->SetNeedsManageTiles();
return FakeSchedulerClient::ScheduledActionDrawAndSwapIfPossible();
}
@@ -1079,13 +1072,11 @@
begin_main_frame_to_commit_duration),
commit_to_activate_duration_(commit_to_activate_duration) {}
- virtual base::TimeDelta DrawDurationEstimate() override {
- return draw_duration_;
- }
- virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
+ base::TimeDelta DrawDurationEstimate() override { return draw_duration_; }
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
return begin_main_frame_to_commit_duration_;
}
- virtual base::TimeDelta CommitToActivateDurationEstimate() override {
+ base::TimeDelta CommitToActivateDurationEstimate() override {
return commit_to_activate_duration_;
}
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index 451a119..94202c5 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -43,7 +43,7 @@
SurfaceManager* manager,
SharedBitmapManager* bitmap_manager,
GpuMemoryBufferManager* gpu_memory_buffer_manager);
- virtual ~Display();
+ ~Display() override;
bool Initialize(scoped_ptr<OutputSurface> output_surface);
void Resize(SurfaceId id, const gfx::Size& new_size);
@@ -53,32 +53,31 @@
int GetMaxFramesPending();
// OutputSurfaceClient implementation.
- virtual void DeferredInitialize() override {}
- virtual void ReleaseGL() override {}
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override;
- virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
- virtual void BeginFrame(const BeginFrameArgs& args) override {}
- virtual void DidSwapBuffers() override;
- virtual void DidSwapBuffersComplete() override;
- virtual void ReclaimResources(const CompositorFrameAck* ack) override {}
- virtual void DidLoseOutputSurface() override;
- virtual void SetExternalDrawConstraints(
+ void DeferredInitialize() override {}
+ void ReleaseGL() override {}
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override;
+ void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
+ void BeginFrame(const BeginFrameArgs& args) override {}
+ void DidSwapBuffers() override;
+ void DidSwapBuffersComplete() override;
+ void ReclaimResources(const CompositorFrameAck* ack) override {}
+ void DidLoseOutputSurface() override;
+ void SetExternalDrawConstraints(
const gfx::Transform& transform,
const gfx::Rect& viewport,
const gfx::Rect& clip,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority,
bool resourceless_software_draw) override {}
- virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
- virtual void SetTreeActivationCallback(
- const base::Closure& callback) override {}
+ void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
+ void SetTreeActivationCallback(const base::Closure& callback) override {}
// RendererClient implementation.
- virtual void SetFullRootLayerDamage() override {}
+ void SetFullRootLayerDamage() override {}
// SurfaceDamageObserver implementation.
- virtual void OnSurfaceDamaged(SurfaceId surface) override;
+ void OnSurfaceDamaged(SurfaceId surface) override;
private:
void InitializeRenderer();
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index 243a9a4..ef369f4 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -42,8 +42,7 @@
class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
public:
- virtual void ReturnResources(
- const ReturnedResourceArray& resources) override {}
+ void ReturnResources(const ReturnedResourceArray& resources) override {}
};
class SurfaceAggregatorTest : public testing::Test {
@@ -1147,10 +1146,9 @@
class ResourceTrackingSurfaceFactoryClient : public SurfaceFactoryClient {
public:
ResourceTrackingSurfaceFactoryClient() {}
- virtual ~ResourceTrackingSurfaceFactoryClient() {}
+ ~ResourceTrackingSurfaceFactoryClient() override {}
- virtual void ReturnResources(
- const ReturnedResourceArray& resources) override {
+ void ReturnResources(const ReturnedResourceArray& resources) override {
returned_resources_ = resources;
}
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index ba2a888..636a5ff 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -17,10 +17,9 @@
class TestSurfaceFactoryClient : public SurfaceFactoryClient {
public:
TestSurfaceFactoryClient() {}
- virtual ~TestSurfaceFactoryClient() {}
+ ~TestSurfaceFactoryClient() override {}
- virtual void ReturnResources(
- const ReturnedResourceArray& resources) override {
+ void ReturnResources(const ReturnedResourceArray& resources) override {
returned_resources_.insert(
returned_resources_.end(), resources.begin(), resources.end());
}
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc
index 171d74e..c70028b 100644
--- a/cc/surfaces/surfaces_pixeltest.cc
+++ b/cc/surfaces/surfaces_pixeltest.cc
@@ -23,8 +23,7 @@
class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
public:
- virtual void ReturnResources(
- const ReturnedResourceArray& resources) override {}
+ void ReturnResources(const ReturnedResourceArray& resources) override {}
};
class SurfacesPixelTest : public RendererPixelTest<GLRenderer> {
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index 7b53c48..328ae84 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -24,11 +24,11 @@
public:
FakeFloatAnimationCurve();
explicit FakeFloatAnimationCurve(double duration);
- virtual ~FakeFloatAnimationCurve();
+ ~FakeFloatAnimationCurve() override;
- virtual double Duration() const override;
- virtual float GetValue(double now) const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ double Duration() const override;
+ float GetValue(double now) const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
private:
double duration_;
@@ -37,18 +37,18 @@
class FakeTransformTransition : public TransformAnimationCurve {
public:
explicit FakeTransformTransition(double duration);
- virtual ~FakeTransformTransition();
+ ~FakeTransformTransition() override;
- virtual double Duration() const override;
- virtual gfx::Transform GetValue(double time) const override;
- virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const override;
- virtual bool AffectsScale() const override;
- virtual bool IsTranslation() const override;
- virtual bool MaximumTargetScale(bool forward_direction,
- float* max_scale) const override;
+ double Duration() const override;
+ gfx::Transform GetValue(double time) const override;
+ bool AnimatedBoundsForBox(const gfx::BoxF& box,
+ gfx::BoxF* bounds) const override;
+ bool AffectsScale() const override;
+ bool IsTranslation() const override;
+ bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
private:
double duration_;
@@ -57,12 +57,12 @@
class FakeFloatTransition : public FloatAnimationCurve {
public:
FakeFloatTransition(double duration, float from, float to);
- virtual ~FakeFloatTransition();
+ ~FakeFloatTransition() override;
- virtual double Duration() const override;
- virtual float GetValue(double time) const override;
+ double Duration() const override;
+ float GetValue(double time) const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
private:
double duration_;
@@ -73,16 +73,15 @@
class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver {
public:
FakeLayerAnimationValueObserver();
- virtual ~FakeLayerAnimationValueObserver();
+ ~FakeLayerAnimationValueObserver() override;
// LayerAnimationValueObserver implementation
- virtual void OnFilterAnimated(const FilterOperations& filters) override;
- virtual void OnOpacityAnimated(float opacity) override;
- virtual void OnTransformAnimated(const gfx::Transform& transform) override;
- virtual void OnScrollOffsetAnimated(
- const gfx::ScrollOffset& scroll_offset) override;
- virtual void OnAnimationWaitingForDeletion() override;
- virtual bool IsActive() const override;
+ void OnFilterAnimated(const FilterOperations& filters) override;
+ void OnOpacityAnimated(float opacity) override;
+ void OnTransformAnimated(const gfx::Transform& transform) override;
+ void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
+ void OnAnimationWaitingForDeletion() override;
+ bool IsActive() const override;
const FilterOperations& filters() const { return filters_; }
float opacity() const { return opacity_; }
@@ -104,12 +103,12 @@
class FakeInactiveLayerAnimationValueObserver
: public FakeLayerAnimationValueObserver {
public:
- virtual bool IsActive() const override;
+ bool IsActive() const override;
};
class FakeLayerAnimationValueProvider : public LayerAnimationValueProvider {
public:
- virtual gfx::ScrollOffset ScrollOffsetForAnimation() const override;
+ gfx::ScrollOffset ScrollOffsetForAnimation() const override;
void set_scroll_offset(const gfx::ScrollOffset& scroll_offset) {
scroll_offset_ = scroll_offset;
diff --git a/cc/test/cc_test_suite.h b/cc/test/cc_test_suite.h
index 6edcd6a..d2ad2b8 100644
--- a/cc/test/cc_test_suite.h
+++ b/cc/test/cc_test_suite.h
@@ -18,12 +18,12 @@
class CCTestSuite : public base::TestSuite {
public:
CCTestSuite(int argc, char** argv);
- virtual ~CCTestSuite();
+ ~CCTestSuite() override;
protected:
// Overridden from base::TestSuite:
- virtual void Initialize() override;
- virtual void Shutdown() override;
+ void Initialize() override;
+ void Shutdown() override;
private:
scoped_ptr<base::MessageLoop> message_loop_;
diff --git a/cc/test/fake_content_layer.cc b/cc/test/fake_content_layer.cc
index 4025afd..a0a01ee 100644
--- a/cc/test/fake_content_layer.cc
+++ b/cc/test/fake_content_layer.cc
@@ -15,7 +15,7 @@
using ContentLayerUpdater::paint_rect;
private:
- virtual ~FakeContentLayerUpdater() {}
+ ~FakeContentLayerUpdater() override {}
};
FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
diff --git a/cc/test/fake_content_layer.h b/cc/test/fake_content_layer.h
index 1debe85..fd09683 100644
--- a/cc/test/fake_content_layer.h
+++ b/cc/test/fake_content_layer.h
@@ -16,8 +16,7 @@
return make_scoped_refptr(new FakeContentLayer(client));
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
size_t update_count() const { return update_count_; }
void reset_update_count() { update_count_ = 0; }
@@ -25,8 +24,8 @@
size_t push_properties_count() const { return push_properties_count_; }
void reset_push_properties_count() { push_properties_count_ = 0; }
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
gfx::Rect LastPaintRect() const;
@@ -34,9 +33,9 @@
always_update_resources_ = always_update_resources;
}
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual void OnOutputSurfaceCreated() override;
+ void OnOutputSurfaceCreated() override;
size_t output_surface_created_count() const {
return output_surface_created_count_;
}
@@ -45,7 +44,7 @@
private:
explicit FakeContentLayer(ContentLayerClient* client);
- virtual ~FakeContentLayer();
+ ~FakeContentLayer() override;
size_t update_count_;
size_t push_properties_count_;
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index b74860d..8f13284 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -25,14 +25,14 @@
};
FakeContentLayerClient();
- virtual ~FakeContentLayerClient();
+ ~FakeContentLayerClient() override;
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& rect,
ContentLayerClient::GraphicsContextStatus gc_status) override;
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override;
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override;
void set_fill_with_nonsolid_color(bool nonsolid) {
fill_with_nonsolid_color_ = nonsolid;
diff --git a/cc/test/fake_content_layer_impl.h b/cc/test/fake_content_layer_impl.h
index f4c8f54..8a6c90b 100644
--- a/cc/test/fake_content_layer_impl.h
+++ b/cc/test/fake_content_layer_impl.h
@@ -16,10 +16,9 @@
LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new FakeContentLayerImpl(tree_impl, id));
}
- virtual ~FakeContentLayerImpl();
+ ~FakeContentLayerImpl() override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
bool HaveResourceForTileAt(int i, int j);
@@ -28,7 +27,7 @@
}
void reset_lost_output_surface_count() { lost_output_surface_count_ = 0; }
- virtual void ReleaseResources() override;
+ void ReleaseResources() override;
private:
explicit FakeContentLayerImpl(LayerTreeImpl* tree_impl, int id);
diff --git a/cc/test/fake_delegated_renderer_layer.h b/cc/test/fake_delegated_renderer_layer.h
index a5fca87..a8a89a2 100644
--- a/cc/test/fake_delegated_renderer_layer.h
+++ b/cc/test/fake_delegated_renderer_layer.h
@@ -17,12 +17,11 @@
new FakeDelegatedRendererLayer(frame_provider));
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
protected:
explicit FakeDelegatedRendererLayer(DelegatedFrameProvider* frame_provider);
- virtual ~FakeDelegatedRendererLayer();
+ ~FakeDelegatedRendererLayer() override;
};
} // namespace cc
diff --git a/cc/test/fake_delegated_renderer_layer_impl.h b/cc/test/fake_delegated_renderer_layer_impl.h
index dc3fee7..f22370c 100644
--- a/cc/test/fake_delegated_renderer_layer_impl.h
+++ b/cc/test/fake_delegated_renderer_layer_impl.h
@@ -15,10 +15,9 @@
LayerTreeImpl* tree_impl, int id) {
return make_scoped_ptr(new FakeDelegatedRendererLayerImpl(tree_impl, id));
}
- virtual ~FakeDelegatedRendererLayerImpl();
+ ~FakeDelegatedRendererLayerImpl() override;
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
int ChildId() const { return ChildIdForTesting(); }
const RenderPassList& RenderPassesInDrawOrder() const {
diff --git a/cc/test/fake_layer_tree_host.h b/cc/test/fake_layer_tree_host.h
index c288046..3daf471 100644
--- a/cc/test/fake_layer_tree_host.h
+++ b/cc/test/fake_layer_tree_host.h
@@ -23,10 +23,10 @@
FakeLayerTreeHostClient* client,
const LayerTreeSettings& settings);
- virtual ~FakeLayerTreeHost();
+ ~FakeLayerTreeHost() override;
- virtual void SetNeedsCommit() override;
- virtual void SetNeedsFullTreeSync() override {}
+ void SetNeedsCommit() override;
+ void SetNeedsFullTreeSync() override {}
using LayerTreeHost::SetRootLayer;
using LayerTreeHost::root_layer;
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index 9371e32..d64a5b2 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -24,34 +24,34 @@
DELEGATED_SOFTWARE
};
explicit FakeLayerTreeHostClient(RendererOptions options);
- virtual ~FakeLayerTreeHostClient();
+ ~FakeLayerTreeHostClient() override;
// Caller responsible for unsetting this and maintaining the host's lifetime.
void SetLayerTreeHost(LayerTreeHost* host) { host_ = host; }
// LayerTreeHostClient implementation.
- virtual void WillBeginMainFrame(int frame_id) override {}
- virtual void DidBeginMainFrame() override {}
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {}
- virtual void Layout() override {}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
- const gfx::Vector2d& outer_delta,
- float page_scale,
- float top_controls_delta) override {}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float page_scale,
- float top_controls_delta) override {}
+ void WillBeginMainFrame(int frame_id) override {}
+ void DidBeginMainFrame() override {}
+ void BeginMainFrame(const BeginFrameArgs& args) override {}
+ void Layout() override {}
+ void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
+ const gfx::Vector2d& outer_delta,
+ float page_scale,
+ float top_controls_delta) override {}
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float page_scale,
+ float top_controls_delta) override {}
- virtual void RequestNewOutputSurface(bool fallback) override;
- virtual void DidInitializeOutputSurface() override {}
- virtual void WillCommit() override {}
- virtual void DidCommit() override {}
- virtual void DidCommitAndDrawFrame() override {}
- virtual void DidCompleteSwapBuffers() override {}
+ void RequestNewOutputSurface(bool fallback) override;
+ void DidInitializeOutputSurface() override {}
+ void WillCommit() override {}
+ void DidCommit() override {}
+ void DidCommitAndDrawFrame() override {}
+ void DidCompleteSwapBuffers() override {}
// LayerTreeHostSingleThreadClient implementation.
- virtual void DidPostSwapBuffers() override {}
- virtual void DidAbortSwapBuffers() override {}
+ void DidPostSwapBuffers() override {}
+ void DidAbortSwapBuffers() override {}
private:
bool use_software_rendering_;
diff --git a/cc/test/fake_layer_tree_host_impl.h b/cc/test/fake_layer_tree_host_impl.h
index 558007e..7403c07 100644
--- a/cc/test/fake_layer_tree_host_impl.h
+++ b/cc/test/fake_layer_tree_host_impl.h
@@ -18,7 +18,7 @@
FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
Proxy* proxy,
SharedBitmapManager* manager);
- virtual ~FakeLayerTreeHostImpl();
+ ~FakeLayerTreeHostImpl() override;
void ForcePrepareToDraw() {
LayerTreeHostImpl::FrameData frame_data;
@@ -26,9 +26,9 @@
DidDrawAllLayers(frame_data);
}
- virtual void CreatePendingTree() override;
+ void CreatePendingTree() override;
- virtual BeginFrameArgs CurrentBeginFrameArgs() const override;
+ BeginFrameArgs CurrentBeginFrameArgs() const override;
void SetCurrentBeginFrameArgs(const BeginFrameArgs& args);
void UpdateNumChildrenAndDrawPropertiesForActiveTree();
static void UpdateNumChildrenAndDrawProperties(LayerTreeImpl* layerTree);
diff --git a/cc/test/fake_layer_tree_host_impl_client.h b/cc/test/fake_layer_tree_host_impl_client.h
index c73e023..d7b4704 100644
--- a/cc/test/fake_layer_tree_host_impl_client.h
+++ b/cc/test/fake_layer_tree_host_impl_client.h
@@ -13,35 +13,32 @@
class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
public:
// LayerTreeHostImplClient implementation.
- virtual void UpdateRendererCapabilitiesOnImplThread() override {}
- virtual void DidLoseOutputSurfaceOnImplThread() override {}
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override {}
- virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
- virtual void SetMaxSwapsPendingOnImplThread(int max) override {}
- virtual void DidSwapBuffersOnImplThread() override {}
- virtual void DidSwapBuffersCompleteOnImplThread() override {}
- virtual void OnCanDrawStateChanged(bool can_draw) override {}
- virtual void NotifyReadyToActivate() override {}
- virtual void SetNeedsRedrawOnImplThread() override {}
- virtual void SetNeedsRedrawRectOnImplThread(
- const gfx::Rect& damage_rect) override {}
- virtual void SetNeedsAnimateOnImplThread() override {}
- virtual void DidInitializeVisibleTileOnImplThread() override {}
- virtual void SetNeedsCommitOnImplThread() override {}
- virtual void SetNeedsManageTilesOnImplThread() override {}
- virtual void PostAnimationEventsToMainThreadOnImplThread(
+ void UpdateRendererCapabilitiesOnImplThread() override {}
+ void DidLoseOutputSurfaceOnImplThread() override {}
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override {}
+ void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
+ void SetMaxSwapsPendingOnImplThread(int max) override {}
+ void DidSwapBuffersOnImplThread() override {}
+ void DidSwapBuffersCompleteOnImplThread() override {}
+ void OnCanDrawStateChanged(bool can_draw) override {}
+ void NotifyReadyToActivate() override {}
+ void SetNeedsRedrawOnImplThread() override {}
+ void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override {}
+ void SetNeedsAnimateOnImplThread() override {}
+ void DidInitializeVisibleTileOnImplThread() override {}
+ void SetNeedsCommitOnImplThread() override {}
+ void SetNeedsManageTilesOnImplThread() override {}
+ void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events) override {}
- virtual bool ReduceContentsTextureMemoryOnImplThread(
- size_t limit_bytes,
- int priority_cutoff) override;
- virtual bool IsInsideDraw() override;
- virtual void RenewTreePriority() override {}
- virtual void PostDelayedScrollbarFadeOnImplThread(
- const base::Closure& start_fade,
- base::TimeDelta delay) override {}
- virtual void DidActivateSyncTree() override {}
- virtual void DidManageTiles() override {}
+ bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
+ int priority_cutoff) override;
+ bool IsInsideDraw() override;
+ void RenewTreePriority() override {}
+ void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade,
+ base::TimeDelta delay) override {}
+ void DidActivateSyncTree() override {}
+ void DidManageTiles() override {}
};
} // namespace cc
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 37c0c54..59c9a8c 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -20,7 +20,7 @@
class FakeOutputSurface : public OutputSurface {
public:
- virtual ~FakeOutputSurface();
+ ~FakeOutputSurface() override;
static scoped_ptr<FakeOutputSurface> Create3d() {
return make_scoped_ptr(new FakeOutputSurface(
@@ -92,12 +92,12 @@
CompositorFrame& last_sent_frame() { return last_sent_frame_; }
size_t num_sent_frames() { return num_sent_frames_; }
- virtual void SwapBuffers(CompositorFrame* frame) override;
+ void SwapBuffers(CompositorFrame* frame) override;
- virtual void SetNeedsBeginFrame(bool enable) override;
+ void SetNeedsBeginFrame(bool enable) override;
bool needs_begin_frame() const { return needs_begin_frame_; }
- virtual bool BindToClient(OutputSurfaceClient* client) override;
+ bool BindToClient(OutputSurfaceClient* client) override;
using OutputSurface::ReleaseGL;
using OutputSurface::InitializeAndSetContext3d;
@@ -110,7 +110,7 @@
void ReturnResource(unsigned id, CompositorFrameAck* ack);
- virtual bool HasExternalStencilTest() const override;
+ bool HasExternalStencilTest() const override;
void set_has_external_stencil_test(bool has_test) {
has_external_stencil_test_ = has_test;
diff --git a/cc/test/fake_output_surface_client.h b/cc/test/fake_output_surface_client.h
index 16453da..a7620b6 100644
--- a/cc/test/fake_output_surface_client.h
+++ b/cc/test/fake_output_surface_client.h
@@ -30,25 +30,25 @@
did_lose_output_surface_called_(false),
memory_policy_(0) {}
- virtual void DeferredInitialize() override;
- virtual void ReleaseGL() override;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override {}
- virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
- virtual void BeginFrame(const BeginFrameArgs& args) override;
- virtual void DidSwapBuffers() override;
- virtual void DidSwapBuffersComplete() override {}
- virtual void ReclaimResources(const CompositorFrameAck* ack) override {}
- virtual void DidLoseOutputSurface() override;
- virtual void SetExternalDrawConstraints(
+ void DeferredInitialize() override;
+ void ReleaseGL() override;
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override {}
+ void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
+ void BeginFrame(const BeginFrameArgs& args) override;
+ void DidSwapBuffers() override;
+ void DidSwapBuffersComplete() override {}
+ void ReclaimResources(const CompositorFrameAck* ack) override {}
+ void DidLoseOutputSurface() override;
+ void SetExternalDrawConstraints(
const gfx::Transform& transform,
const gfx::Rect& viewport,
const gfx::Rect& clip,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority,
bool resourceless_software_draw) override {}
- virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
- virtual void SetTreeActivationCallback(const base::Closure&) override {}
+ void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
+ void SetTreeActivationCallback(const base::Closure&) override {}
int begin_frame_count() { return begin_frame_count_; }
int swap_count() { return swap_count_; }
diff --git a/cc/test/fake_painted_scrollbar_layer.h b/cc/test/fake_painted_scrollbar_layer.h
index 0fb3437..e86a2e9 100644
--- a/cc/test/fake_painted_scrollbar_layer.h
+++ b/cc/test/fake_painted_scrollbar_layer.h
@@ -20,10 +20,10 @@
int update_count() const { return update_count_; }
void reset_update_count() { update_count_ = 0; }
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
scoped_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit();
@@ -45,7 +45,7 @@
private:
FakePaintedScrollbarLayer(FakeScrollbar* fake_scrollbar,
int scrolling_layer_id);
- virtual ~FakePaintedScrollbarLayer();
+ ~FakePaintedScrollbarLayer() override;
int update_count_;
size_t push_properties_count_;
diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h
index 332e63f..7aa155e 100644
--- a/cc/test/fake_picture_layer.h
+++ b/cc/test/fake_picture_layer.h
@@ -17,8 +17,7 @@
return make_scoped_refptr(new FakePictureLayer(client));
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
size_t update_count() const { return update_count_; }
void reset_update_count() { update_count_ = 0; }
@@ -30,19 +29,19 @@
always_update_resources_ = always_update_resources;
}
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override;
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override;
- virtual void PushPropertiesTo(LayerImpl* layer) override;
+ void PushPropertiesTo(LayerImpl* layer) override;
- virtual void OnOutputSurfaceCreated() override;
+ void OnOutputSurfaceCreated() override;
size_t output_surface_created_count() const {
return output_surface_created_count_;
}
private:
explicit FakePictureLayer(ContentLayerClient* client);
- virtual ~FakePictureLayer();
+ ~FakePictureLayer() override;
size_t update_count_;
size_t push_properties_count_;
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index 10bd290..ef554b3 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -33,20 +33,18 @@
new FakePictureLayerImpl(tree_impl, id, pile, layer_bounds));
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override;
- virtual gfx::Size CalculateTileSize(
- const gfx::Size& content_bounds) const override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override;
+ gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override;
- virtual void DidBecomeActive() override;
+ void DidBecomeActive() override;
size_t did_become_active_call_count() {
return did_become_active_call_count_;
}
- virtual bool HasValidTilePriorities() const override;
+ bool HasValidTilePriorities() const override;
void set_has_valid_tile_priorities(bool has_valid_priorities) {
has_valid_tile_priorities_ = has_valid_priorities;
use_set_valid_tile_priorities_flag_ = true;
@@ -108,7 +106,7 @@
size_t release_resources_count() const { return release_resources_count_; }
void reset_release_resources_count() { release_resources_count_ = 0; }
- virtual void ReleaseResources() override;
+ void ReleaseResources() override;
bool only_used_low_res_last_append_quads() const {
return only_used_low_res_last_append_quads_;
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h
index 0fcab36..dece2fc 100644
--- a/cc/test/fake_picture_layer_tiling_client.h
+++ b/cc/test/fake_picture_layer_tiling_client.h
@@ -18,28 +18,27 @@
public:
FakePictureLayerTilingClient();
explicit FakePictureLayerTilingClient(ResourceProvider* resource_provider);
- virtual ~FakePictureLayerTilingClient();
+ ~FakePictureLayerTilingClient() override;
// PictureLayerTilingClient implementation.
- virtual scoped_refptr<Tile> CreateTile(
- PictureLayerTiling* tiling, const gfx::Rect& rect) override;
- virtual PicturePileImpl* GetPile() override;
- virtual gfx::Size CalculateTileSize(
- const gfx::Size& content_bounds) const override;
- virtual size_t GetMaxTilesForInterestArea() const override;
- virtual float GetSkewportTargetTimeInSeconds() const override;
- virtual int GetSkewportExtrapolationLimitInContentPixels() const override;
- virtual bool RequiresHighResToDraw() const override;
+ scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling,
+ const gfx::Rect& rect) override;
+ PicturePileImpl* GetPile() override;
+ gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override;
+ size_t GetMaxTilesForInterestArea() const override;
+ float GetSkewportTargetTimeInSeconds() const override;
+ int GetSkewportExtrapolationLimitInContentPixels() const override;
+ bool RequiresHighResToDraw() const override;
void SetTileSize(const gfx::Size& tile_size);
gfx::Size TileSize() const { return tile_size_; }
- virtual const Region* GetInvalidation() override;
- virtual const PictureLayerTiling* GetTwinTiling(
+ const Region* GetInvalidation() override;
+ const PictureLayerTiling* GetTwinTiling(
const PictureLayerTiling* tiling) const override;
- virtual PictureLayerTiling* GetRecycledTwinTiling(
+ PictureLayerTiling* GetRecycledTwinTiling(
const PictureLayerTiling* tiling) override;
- virtual WhichTree GetTree() const override;
+ WhichTree GetTree() const override;
void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; }
void set_recycled_twin_tiling(PictureLayerTiling* tiling) {
diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc
index 3598ca7..32a6589 100644
--- a/cc/test/fake_picture_pile_impl.cc
+++ b/cc/test/fake_picture_pile_impl.cc
@@ -22,7 +22,7 @@
scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
pile->tiling().SetTilingSize(layer_bounds);
pile->tiling().SetMaxTextureSize(tile_size);
- pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_size);
+ pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_grid_size);
pile->recorded_viewport_ = gfx::Rect(layer_bounds);
pile->has_any_recordings_ = true;
for (int x = 0; x < pile->tiling().num_tiles_x(); ++x) {
@@ -38,7 +38,7 @@
scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
pile->tiling().SetTilingSize(layer_bounds);
pile->tiling().SetMaxTextureSize(tile_size);
- pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_size);
+ pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_grid_size);
pile->recorded_viewport_ = gfx::Rect();
pile->has_any_recordings_ = false;
return pile;
@@ -51,7 +51,7 @@
scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
pile->tiling().SetTilingSize(layer_bounds);
pile->tiling().SetMaxTextureSize(tile_size);
- pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_size);
+ pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_grid_size);
// This simulates a false positive for this flag.
pile->recorded_viewport_ = gfx::Rect();
pile->has_any_recordings_ = true;
diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h
index 6877ac7..7c7e66f 100644
--- a/cc/test/fake_picture_pile_impl.h
+++ b/cc/test/fake_picture_pile_impl.h
@@ -72,7 +72,7 @@
protected:
FakePicturePileImpl();
- virtual ~FakePicturePileImpl();
+ ~FakePicturePileImpl() override;
FakeContentLayerClient client_;
SkPaint default_paint_;
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index 21324c1..2bcacd8 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -21,30 +21,30 @@
void SetLayerTreeHost(LayerTreeHost* host);
- virtual void FinishAllRendering() override {}
- virtual bool IsStarted() const override;
- virtual void SetOutputSurface(scoped_ptr<OutputSurface>) override {}
- virtual void SetLayerTreeHostClientReady() override {}
- virtual void SetVisible(bool visible) override {}
- virtual const RendererCapabilities& GetRendererCapabilities() const override;
- virtual void SetNeedsAnimate() override {}
- virtual void SetNeedsUpdateLayers() override {}
- virtual void SetNeedsCommit() override {}
- virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) override {}
- virtual void SetNextCommitWaitsForActivation() override {}
- virtual void NotifyInputThrottledUntilCommit() override {}
- virtual void SetDeferCommits(bool defer_commits) override {}
- virtual void MainThreadHasStoppedFlinging() override {}
- virtual bool BeginMainFrameRequested() const override;
- virtual bool CommitRequested() const override;
- virtual void Start() override {}
- virtual void Stop() override {}
- virtual void ForceSerializeOnSwapBuffers() override {}
- virtual size_t MaxPartialTextureUpdates() const override;
- virtual bool SupportsImplScrolling() const override;
- virtual void SetDebugState(const LayerTreeDebugState& debug_state) override {}
- virtual bool MainFrameWillHappenForTesting() override;
- virtual void AsValueInto(base::debug::TracedValue* state) const override;
+ void FinishAllRendering() override {}
+ bool IsStarted() const override;
+ void SetOutputSurface(scoped_ptr<OutputSurface>) override {}
+ void SetLayerTreeHostClientReady() override {}
+ void SetVisible(bool visible) override {}
+ const RendererCapabilities& GetRendererCapabilities() const override;
+ void SetNeedsAnimate() override {}
+ void SetNeedsUpdateLayers() override {}
+ void SetNeedsCommit() override {}
+ void SetNeedsRedraw(const gfx::Rect& damage_rect) override {}
+ void SetNextCommitWaitsForActivation() override {}
+ void NotifyInputThrottledUntilCommit() override {}
+ void SetDeferCommits(bool defer_commits) override {}
+ void MainThreadHasStoppedFlinging() override {}
+ bool BeginMainFrameRequested() const override;
+ bool CommitRequested() const override;
+ void Start() override {}
+ void Stop() override {}
+ void ForceSerializeOnSwapBuffers() override {}
+ size_t MaxPartialTextureUpdates() const override;
+ bool SupportsImplScrolling() const override;
+ void SetDebugState(const LayerTreeDebugState& debug_state) override {}
+ bool MainFrameWillHappenForTesting() override;
+ void AsValueInto(base::debug::TracedValue* state) const override;
virtual RendererCapabilities& GetRendererCapabilities();
void SetMaxPartialTextureUpdates(size_t max);
diff --git a/cc/test/fake_renderer_client.h b/cc/test/fake_renderer_client.h
index 0248249..772b44a 100644
--- a/cc/test/fake_renderer_client.h
+++ b/cc/test/fake_renderer_client.h
@@ -14,7 +14,7 @@
FakeRendererClient();
// RendererClient methods.
- virtual void SetFullRootLayerDamage() override;
+ void SetFullRootLayerDamage() override;
// Methods added for test.
int set_full_root_layer_damage_count() const {
diff --git a/cc/test/fake_rendering_stats_instrumentation.h b/cc/test/fake_rendering_stats_instrumentation.h
index d32e4a0..ebe129b 100644
--- a/cc/test/fake_rendering_stats_instrumentation.h
+++ b/cc/test/fake_rendering_stats_instrumentation.h
@@ -12,7 +12,7 @@
class FakeRenderingStatsInstrumentation : public RenderingStatsInstrumentation {
public:
FakeRenderingStatsInstrumentation() {}
- virtual ~FakeRenderingStatsInstrumentation() {}
+ ~FakeRenderingStatsInstrumentation() override {}
};
} // namespace cc
diff --git a/cc/test/fake_scoped_ui_resource.h b/cc/test/fake_scoped_ui_resource.h
index 3de9af2..6590cbc 100644
--- a/cc/test/fake_scoped_ui_resource.h
+++ b/cc/test/fake_scoped_ui_resource.h
@@ -16,8 +16,7 @@
public:
static scoped_ptr<FakeScopedUIResource> Create(LayerTreeHost* host);
- virtual UIResourceBitmap GetBitmap(UIResourceId uid,
- bool resource_lost) override;
+ UIResourceBitmap GetBitmap(UIResourceId uid, bool resource_lost) override;
void ResetCounters();
int resource_create_count;
diff --git a/cc/test/fake_scrollbar.h b/cc/test/fake_scrollbar.h
index 638735d..2d14660 100644
--- a/cc/test/fake_scrollbar.h
+++ b/cc/test/fake_scrollbar.h
@@ -15,20 +15,20 @@
public:
FakeScrollbar();
FakeScrollbar(bool paint, bool has_thumb, bool is_overlay);
- virtual ~FakeScrollbar();
+ ~FakeScrollbar() override;
// Scrollbar implementation.
- virtual ScrollbarOrientation Orientation() const override;
- virtual bool IsLeftSideVerticalScrollbar() const override;
- virtual gfx::Point Location() const override;
- virtual bool IsOverlay() const override;
- virtual bool HasThumb() const override;
- virtual int ThumbThickness() const override;
- virtual int ThumbLength() const override;
- virtual gfx::Rect TrackRect() const override;
- virtual void PaintPart(SkCanvas* canvas,
- ScrollbarPart part,
- const gfx::Rect& content_rect) override;
+ ScrollbarOrientation Orientation() const override;
+ bool IsLeftSideVerticalScrollbar() const override;
+ gfx::Point Location() const override;
+ bool IsOverlay() const override;
+ bool HasThumb() const override;
+ int ThumbThickness() const override;
+ int ThumbLength() const override;
+ gfx::Rect TrackRect() const override;
+ void PaintPart(SkCanvas* canvas,
+ ScrollbarPart part,
+ const gfx::Rect& content_rect) override;
void set_location(const gfx::Point& location) { location_ = location; }
void set_track_rect(const gfx::Rect& track_rect) { track_rect_ = track_rect; }
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index d6f704f..bebd797 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -17,9 +17,9 @@
class FakeRasterizerImpl : public Rasterizer, public RasterizerTaskClient {
public:
// Overridden from Rasterizer:
- virtual void SetClient(RasterizerClient* client) override {}
- virtual void Shutdown() override {}
- virtual void ScheduleTasks(RasterTaskQueue* queue) override {
+ void SetClient(RasterizerClient* client) override {}
+ void Shutdown() override {}
+ void ScheduleTasks(RasterTaskQueue* queue) override {
for (RasterTaskQueue::Item::Vector::const_iterator it =
queue->items.begin();
it != queue->items.end();
@@ -33,7 +33,7 @@
completed_tasks_.push_back(task);
}
}
- virtual void CheckForCompletedTasks() override {
+ void CheckForCompletedTasks() override {
for (RasterTask::Vector::iterator it = completed_tasks_.begin();
it != completed_tasks_.end();
++it) {
@@ -49,12 +49,11 @@
}
// Overridden from RasterizerTaskClient:
- virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster(
const Resource* resource) override {
return nullptr;
}
- virtual void ReleaseBufferForRaster(
- scoped_ptr<RasterBuffer> buffer) override {}
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {}
private:
RasterTask::Vector completed_tasks_;
diff --git a/cc/test/fake_tile_manager.h b/cc/test/fake_tile_manager.h
index ee6ccf3..84f794e 100644
--- a/cc/test/fake_tile_manager.h
+++ b/cc/test/fake_tile_manager.h
@@ -16,13 +16,13 @@
public:
explicit FakeTileManager(TileManagerClient* client);
FakeTileManager(TileManagerClient* client, ResourcePool* resource_pool);
- virtual ~FakeTileManager();
+ ~FakeTileManager() override;
bool HasBeenAssignedMemory(Tile* tile);
void AssignMemoryToTiles(
const GlobalStateThatImpactsTilePriority& state);
- virtual void Release(Tile* tile) override;
+ void Release(Tile* tile) override;
std::vector<Tile*> tiles_for_raster;
};
diff --git a/cc/test/fake_tile_manager_client.h b/cc/test/fake_tile_manager_client.h
index fde6c52..4b42468 100644
--- a/cc/test/fake_tile_manager_client.h
+++ b/cc/test/fake_tile_manager_client.h
@@ -14,17 +14,16 @@
class FakeTileManagerClient : public TileManagerClient {
public:
FakeTileManagerClient();
- virtual ~FakeTileManagerClient();
+ ~FakeTileManagerClient() override;
// TileManagerClient implementation.
- virtual const std::vector<PictureLayerImpl*>& GetPictureLayers()
- const override;
- virtual void NotifyReadyToActivate() override {}
- virtual void NotifyTileStateChanged(const Tile* tile) override {}
- virtual void BuildRasterQueue(RasterTilePriorityQueue* queue,
- TreePriority tree_priority) override {}
- virtual void BuildEvictionQueue(EvictionTilePriorityQueue* queue,
- TreePriority tree_priority) override {}
+ const std::vector<PictureLayerImpl*>& GetPictureLayers() const override;
+ void NotifyReadyToActivate() override {}
+ void NotifyTileStateChanged(const Tile* tile) override {}
+ void BuildRasterQueue(RasterTilePriorityQueue* queue,
+ TreePriority tree_priority) override {}
+ void BuildEvictionQueue(EvictionTilePriorityQueue* queue,
+ TreePriority tree_priority) override {}
private:
std::vector<PictureLayerImpl*> picture_layers_;
diff --git a/cc/test/fake_ui_resource_layer_tree_host_impl.h b/cc/test/fake_ui_resource_layer_tree_host_impl.h
index 9d6eac4..08a50dd 100644
--- a/cc/test/fake_ui_resource_layer_tree_host_impl.h
+++ b/cc/test/fake_ui_resource_layer_tree_host_impl.h
@@ -14,17 +14,17 @@
public:
explicit FakeUIResourceLayerTreeHostImpl(Proxy* proxy,
SharedBitmapManager* manager);
- virtual ~FakeUIResourceLayerTreeHostImpl();
+ ~FakeUIResourceLayerTreeHostImpl() override;
- virtual void CreateUIResource(UIResourceId uid,
- const UIResourceBitmap& bitmap) override;
+ void CreateUIResource(UIResourceId uid,
+ const UIResourceBitmap& bitmap) override;
- virtual void DeleteUIResource(UIResourceId uid) override;
+ void DeleteUIResource(UIResourceId uid) override;
- virtual ResourceProvider::ResourceId ResourceIdForUIResource(
+ ResourceProvider::ResourceId ResourceIdForUIResource(
UIResourceId uid) const override;
- virtual bool IsUIResourceOpaque(UIResourceId uid) const override;
+ bool IsUIResourceOpaque(UIResourceId uid) const override;
private:
ResourceProvider::ResourceId fake_next_resource_id_;
diff --git a/cc/test/fake_video_frame_provider.h b/cc/test/fake_video_frame_provider.h
index f586adb..50b6b27 100644
--- a/cc/test/fake_video_frame_provider.h
+++ b/cc/test/fake_video_frame_provider.h
@@ -14,12 +14,11 @@
class FakeVideoFrameProvider : public VideoFrameProvider {
public:
FakeVideoFrameProvider();
- virtual ~FakeVideoFrameProvider();
+ ~FakeVideoFrameProvider() override;
- virtual void SetVideoFrameProviderClient(Client* client) override;
- virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() override;
- virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&)
- override {}
+ void SetVideoFrameProviderClient(Client* client) override;
+ scoped_refptr<media::VideoFrame> GetCurrentFrame() override;
+ void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&) override {}
Client* client() { return client_; }
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h
index eae283b..5c220d5 100644
--- a/cc/test/layer_tree_pixel_test.h
+++ b/cc/test/layer_tree_pixel_test.h
@@ -34,17 +34,17 @@
LayerTreePixelTest();
virtual ~LayerTreePixelTest();
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override;
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override;
+ scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override;
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override;
virtual scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest();
void ReadbackResult(scoped_ptr<CopyOutputResult> result);
- virtual void BeginTest() override;
- virtual void SetupTree() override;
- virtual void AfterTest() override;
- virtual void EndTest() override;
+ void BeginTest() override;
+ void SetupTree() override;
+ void AfterTest() override;
+ void EndTest() override;
void TryEndTest();
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 15a1a44..c19c63f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -60,7 +60,7 @@
test_hooks, host, main_task_runner, impl_task_runner));
}
- virtual ~ThreadProxyForTest() {}
+ ~ThreadProxyForTest() override {}
void test() {
test_hooks_->Layout();
@@ -69,29 +69,29 @@
private:
TestHooks* test_hooks_;
- virtual void ScheduledActionSendBeginMainFrame() override {
+ void ScheduledActionSendBeginMainFrame() override {
test_hooks_->ScheduledActionWillSendBeginMainFrame();
ThreadProxy::ScheduledActionSendBeginMainFrame();
test_hooks_->ScheduledActionSendBeginMainFrame();
}
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override {
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override {
DrawResult result = ThreadProxy::ScheduledActionDrawAndSwapIfPossible();
test_hooks_->ScheduledActionDrawAndSwapIfPossible();
return result;
}
- virtual void ScheduledActionAnimate() override {
+ void ScheduledActionAnimate() override {
ThreadProxy::ScheduledActionAnimate();
test_hooks_->ScheduledActionAnimate();
}
- virtual void ScheduledActionCommit() override {
+ void ScheduledActionCommit() override {
ThreadProxy::ScheduledActionCommit();
test_hooks_->ScheduledActionCommit();
}
- virtual void ScheduledActionBeginOutputSurfaceCreation() override {
+ void ScheduledActionBeginOutputSurfaceCreation() override {
ThreadProxy::ScheduledActionBeginOutputSurfaceCreation();
test_hooks_->ScheduledActionBeginOutputSurfaceCreation();
}
@@ -146,65 +146,64 @@
block_notify_ready_to_activate_for_testing_(false),
notify_ready_to_activate_was_blocked_(false) {}
- virtual void WillBeginImplFrame(const BeginFrameArgs& args) override {
+ void WillBeginImplFrame(const BeginFrameArgs& args) override {
LayerTreeHostImpl::WillBeginImplFrame(args);
test_hooks_->WillBeginImplFrameOnThread(this, args);
}
- virtual void BeginMainFrameAborted(bool did_handle) override {
+ void BeginMainFrameAborted(bool did_handle) override {
LayerTreeHostImpl::BeginMainFrameAborted(did_handle);
test_hooks_->BeginMainFrameAbortedOnThread(this, did_handle);
}
- virtual void BeginCommit() override {
+ void BeginCommit() override {
LayerTreeHostImpl::BeginCommit();
test_hooks_->BeginCommitOnThread(this);
}
- virtual void CommitComplete() override {
+ void CommitComplete() override {
LayerTreeHostImpl::CommitComplete();
test_hooks_->CommitCompleteOnThread(this);
}
- virtual DrawResult PrepareToDraw(FrameData* frame) override {
+ DrawResult PrepareToDraw(FrameData* frame) override {
DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame);
return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result);
}
- virtual void DrawLayers(FrameData* frame,
- base::TimeTicks frame_begin_time) override {
+ void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time) override {
LayerTreeHostImpl::DrawLayers(frame, frame_begin_time);
test_hooks_->DrawLayersOnThread(this);
}
- virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override {
+ bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override {
bool result = LayerTreeHostImpl::SwapBuffers(frame);
test_hooks_->SwapBuffersOnThread(this, result);
return result;
}
- virtual void DidSwapBuffersComplete() override {
+ void DidSwapBuffersComplete() override {
LayerTreeHostImpl::DidSwapBuffersComplete();
test_hooks_->SwapBuffersCompleteOnThread(this);
}
- virtual void ReclaimResources(const CompositorFrameAck* ack) override {
+ void ReclaimResources(const CompositorFrameAck* ack) override {
LayerTreeHostImpl::ReclaimResources(ack);
}
- virtual void UpdateVisibleTiles() override {
+ void UpdateVisibleTiles() override {
LayerTreeHostImpl::UpdateVisibleTiles();
test_hooks_->UpdateVisibleTilesOnThread(this);
}
- virtual void NotifyReadyToActivate() override {
+ void NotifyReadyToActivate() override {
if (block_notify_ready_to_activate_for_testing_)
notify_ready_to_activate_was_blocked_ = true;
else
client_->NotifyReadyToActivate();
}
- virtual void BlockNotifyReadyToActivateForTesting(bool block) override {
+ void BlockNotifyReadyToActivateForTesting(bool block) override {
CHECK(settings().impl_side_painting);
CHECK(proxy()->ImplThreadTaskRunner())
<< "Not supported for single-threaded mode.";
@@ -215,32 +214,31 @@
}
}
- virtual void ActivateSyncTree() override {
+ void ActivateSyncTree() override {
test_hooks_->WillActivateTreeOnThread(this);
LayerTreeHostImpl::ActivateSyncTree();
DCHECK(!pending_tree());
test_hooks_->DidActivateTreeOnThread(this);
}
- virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface)
- override {
+ bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface) override {
bool success = LayerTreeHostImpl::InitializeRenderer(output_surface.Pass());
test_hooks_->InitializedRendererOnThread(this, success);
return success;
}
- virtual void SetVisible(bool visible) override {
+ void SetVisible(bool visible) override {
LayerTreeHostImpl::SetVisible(visible);
test_hooks_->DidSetVisibleOnImplTree(this, visible);
}
- virtual void AnimateLayers(base::TimeTicks monotonic_time) override {
+ void AnimateLayers(base::TimeTicks monotonic_time) override {
test_hooks_->WillAnimateLayers(this, monotonic_time);
LayerTreeHostImpl::AnimateLayers(monotonic_time);
test_hooks_->AnimateLayers(this, monotonic_time);
}
- virtual void UpdateAnimationState(bool start_ready_animations) override {
+ void UpdateAnimationState(bool start_ready_animations) override {
LayerTreeHostImpl::UpdateAnimationState(start_ready_animations);
bool has_unfinished_animation = false;
AnimationRegistrar::AnimationControllerMap::const_iterator iter =
@@ -254,7 +252,7 @@
test_hooks_->UpdateAnimationState(this, has_unfinished_animation);
}
- virtual base::TimeDelta LowFrequencyAnimationInterval() const override {
+ base::TimeDelta LowFrequencyAnimationInterval() const override {
return test_hooks_->LowFrequencyAnimationInterval();
}
@@ -272,65 +270,63 @@
TestHooks* test_hooks) {
return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks));
}
- virtual ~LayerTreeHostClientForTesting() {}
+ ~LayerTreeHostClientForTesting() override {}
- virtual void WillBeginMainFrame(int frame_id) override {
+ void WillBeginMainFrame(int frame_id) override {
test_hooks_->WillBeginMainFrame();
}
- virtual void DidBeginMainFrame() override {
- test_hooks_->DidBeginMainFrame();
- }
+ void DidBeginMainFrame() override { test_hooks_->DidBeginMainFrame(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
test_hooks_->BeginMainFrame(args);
}
- virtual void Layout() override { test_hooks_->Layout(); }
+ void Layout() override { test_hooks_->Layout(); }
- virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
- const gfx::Vector2d& outer_delta,
- float page_scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
+ const gfx::Vector2d& outer_delta,
+ float page_scale,
+ float top_controls_delta) override {
test_hooks_->ApplyViewportDeltas(inner_delta,
outer_delta,
page_scale,
top_controls_delta);
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
test_hooks_->ApplyViewportDeltas(scroll_delta,
scale,
top_controls_delta);
}
- virtual void RequestNewOutputSurface(bool fallback) override {
+ void RequestNewOutputSurface(bool fallback) override {
test_hooks_->RequestNewOutputSurface(fallback);
}
- virtual void DidInitializeOutputSurface() override {
+ void DidInitializeOutputSurface() override {
test_hooks_->DidInitializeOutputSurface();
}
- virtual void DidFailToInitializeOutputSurface() override {
+ void DidFailToInitializeOutputSurface() override {
test_hooks_->DidFailToInitializeOutputSurface();
}
- virtual void WillCommit() override { test_hooks_->WillCommit(); }
+ void WillCommit() override { test_hooks_->WillCommit(); }
- virtual void DidCommit() override { test_hooks_->DidCommit(); }
+ void DidCommit() override { test_hooks_->DidCommit(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
test_hooks_->DidCommitAndDrawFrame();
}
- virtual void DidCompleteSwapBuffers() override {
+ void DidCompleteSwapBuffers() override {
test_hooks_->DidCompleteSwapBuffers();
}
- virtual void DidPostSwapBuffers() override {}
- virtual void DidAbortSwapBuffers() override {}
+ void DidPostSwapBuffers() override {}
+ void DidAbortSwapBuffers() override {}
private:
explicit LayerTreeHostClientForTesting(TestHooks* test_hooks)
@@ -363,7 +359,7 @@
return layer_tree_host.Pass();
}
- virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
+ scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
LayerTreeHostImplClient* host_impl_client) override {
return LayerTreeHostImplForTesting::Create(
test_hooks_,
@@ -375,7 +371,7 @@
rendering_stats_instrumentation());
}
- virtual void SetNeedsCommit() override {
+ void SetNeedsCommit() override {
if (!test_started_)
return;
LayerTreeHost::SetNeedsCommit();
@@ -383,7 +379,7 @@
void set_test_started(bool started) { test_started_ = started; }
- virtual void DidDeferCommit() override { test_hooks_->DidDeferCommit(); }
+ void DidDeferCommit() override { test_hooks_->DidDeferCommit(); }
private:
LayerTreeHostForTesting(TestHooks* test_hooks,
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index a36fee4..6474d6b 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -30,7 +30,7 @@
class TestHooks : public AnimationDelegate {
public:
TestHooks();
- virtual ~TestHooks();
+ ~TestHooks() override;
void ReadSettings(const LayerTreeSettings& settings);
@@ -90,13 +90,12 @@
virtual void ScheduledActionBeginOutputSurfaceCreation() {}
// Implementation of AnimationDelegate:
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {}
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {}
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {}
virtual void RequestNewOutputSurface(bool fallback) = 0;
};
@@ -188,7 +187,7 @@
void DestroyLayerTreeHost();
// By default, output surface recreation is synchronous.
- virtual void RequestNewOutputSurface(bool fallback) override;
+ void RequestNewOutputSurface(bool fallback) override;
// Override this for pixel tests, where you need a real output surface.
virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback);
// Override this for unit tests, which should not produce pixel output.
diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h
index ee80efe..7f63113 100644
--- a/cc/test/ordered_simple_task_runner.h
+++ b/cc/test/ordered_simple_task_runner.h
@@ -53,15 +53,14 @@
bool advance_now);
// base::TestSimpleTaskRunner implementation:
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool RunsTasksOnCurrentThread() const override;
// Set a maximum number of tasks to run at once. Useful as a timeout to
// prevent infinite task loops.
@@ -133,7 +132,7 @@
bool NowBeforeCallback(base::TimeTicks stop_at);
bool AdvanceNowCallback();
- virtual ~OrderedSimpleTaskRunner();
+ ~OrderedSimpleTaskRunner() override;
base::ThreadChecker thread_checker_;
diff --git a/cc/test/pixel_comparator.h b/cc/test/pixel_comparator.h
index 0d418e8..7228858 100644
--- a/cc/test/pixel_comparator.h
+++ b/cc/test/pixel_comparator.h
@@ -23,13 +23,13 @@
class ExactPixelComparator : public PixelComparator {
public:
explicit ExactPixelComparator(const bool discard_alpha);
- virtual ~ExactPixelComparator() {}
+ ~ExactPixelComparator() override {}
// Returns true if the two bitmaps are identical. Otherwise, returns false
// and report the number of pixels with an error on LOG(ERROR). Differences
// in the alpha channel are ignored.
- virtual bool Compare(const SkBitmap& actual_bmp,
- const SkBitmap& expected_bmp) const override;
+ bool Compare(const SkBitmap& actual_bmp,
+ const SkBitmap& expected_bmp) const override;
private:
// Exclude alpha channel from comparison?
@@ -46,13 +46,13 @@
const float avg_abs_error_limit,
const int max_abs_error_limit,
const int small_error_threshold);
- virtual ~FuzzyPixelComparator() {}
+ ~FuzzyPixelComparator() override {}
// Computes error metrics and returns true if the errors don't exceed the
// specified limits. Otherwise, returns false and reports the error metrics on
// LOG(ERROR). Differences in the alpha channel are ignored.
- virtual bool Compare(const SkBitmap& actual_bmp,
- const SkBitmap& expected_bmp) const override;
+ bool Compare(const SkBitmap& actual_bmp,
+ const SkBitmap& expected_bmp) const override;
private:
// Exclude alpha channel from comparison?
diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h
index 3396099..838acaf 100644
--- a/cc/test/pixel_test.h
+++ b/cc/test/pixel_test.h
@@ -64,7 +64,7 @@
void EnableExternalStencilTest();
// RendererClient implementation.
- virtual void SetFullRootLayerDamage() override {}
+ void SetFullRootLayerDamage() override {}
private:
void ReadbackResult(base::Closure quit_run_loop,
diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h
index eaa2675..7c725f0 100644
--- a/cc/test/pixel_test_output_surface.h
+++ b/cc/test/pixel_test_output_surface.h
@@ -16,9 +16,9 @@
explicit PixelTestOutputSurface(
scoped_ptr<SoftwareOutputDevice> software_device);
- virtual void Reshape(const gfx::Size& size, float scale_factor) override;
- virtual bool HasExternalStencilTest() const override;
- virtual void SwapBuffers(CompositorFrame* frame) override;
+ void Reshape(const gfx::Size& size, float scale_factor) override;
+ bool HasExternalStencilTest() const override;
+ void SwapBuffers(CompositorFrame* frame) override;
void set_surface_expansion_size(const gfx::Size& surface_expansion_size) {
surface_expansion_size_ = surface_expansion_size;
diff --git a/cc/test/pixel_test_software_output_device.h b/cc/test/pixel_test_software_output_device.h
index 1315b4a..d339538 100644
--- a/cc/test/pixel_test_software_output_device.h
+++ b/cc/test/pixel_test_software_output_device.h
@@ -11,7 +11,7 @@
class PixelTestSoftwareOutputDevice : public SoftwareOutputDevice {
public:
- virtual void Resize(const gfx::Size& pixel_size, float scale_factor) override;
+ void Resize(const gfx::Size& pixel_size, float scale_factor) override;
void set_surface_expansion_size(const gfx::Size& surface_expansion_size) {
surface_expansion_size_ = surface_expansion_size;
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index a91fd01..d9cb3cf 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -24,7 +24,7 @@
bool TickCalled() const { return tick_called_; }
// TimeSourceClient implementation.
- virtual void OnTimerTick() override;
+ void OnTimerTick() override;
protected:
bool tick_called_;
@@ -39,13 +39,13 @@
}
void SetNow(base::TimeTicks time) { now_ = time; }
- virtual base::TimeTicks Now() const override;
+ base::TimeTicks Now() const override;
protected:
FakeDelayBasedTimeSource(base::TimeDelta interval,
base::SingleThreadTaskRunner* task_runner)
: DelayBasedTimeSource(interval, task_runner) {}
- virtual ~FakeDelayBasedTimeSource() {}
+ ~FakeDelayBasedTimeSource() override {}
base::TimeTicks now_;
};
@@ -66,9 +66,9 @@
OrderedSimpleTaskRunner* task_runner);
// Overridden from DelayBasedTimeSource
- virtual ~TestDelayBasedTimeSource();
- virtual base::TimeTicks Now() const override;
- virtual std::string TypeString() const override;
+ ~TestDelayBasedTimeSource() override;
+ base::TimeTicks Now() const override;
+ std::string TypeString() const override;
scoped_refptr<TestNowSource> now_src_;
};
@@ -89,15 +89,15 @@
}
// BeginFrameSource
- virtual void DidFinishFrame(size_t remaining_frames) override;
- virtual void AsValueInto(base::debug::TracedValue* dict) const override;
+ void DidFinishFrame(size_t remaining_frames) override;
+ void AsValueInto(base::debug::TracedValue* dict) const override;
- virtual ~FakeBeginFrameSource() {}
+ ~FakeBeginFrameSource() override {}
};
class TestBackToBackBeginFrameSource : public BackToBackBeginFrameSource {
public:
- virtual ~TestBackToBackBeginFrameSource();
+ ~TestBackToBackBeginFrameSource() override;
static scoped_ptr<TestBackToBackBeginFrameSource> Create(
scoped_refptr<TestNowSource> now_src,
@@ -110,14 +110,14 @@
TestBackToBackBeginFrameSource(scoped_refptr<TestNowSource> now_src,
base::SingleThreadTaskRunner* task_runner);
- virtual base::TimeTicks Now() override;
+ base::TimeTicks Now() override;
scoped_refptr<TestNowSource> now_src_;
};
class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource {
public:
- virtual ~TestSyntheticBeginFrameSource();
+ ~TestSyntheticBeginFrameSource() override;
static scoped_ptr<TestSyntheticBeginFrameSource> Create(
scoped_refptr<TestNowSource> now_src,
@@ -137,12 +137,11 @@
class TestSchedulerFrameSourcesConstructor
: public SchedulerFrameSourcesConstructor {
public:
- virtual ~TestSchedulerFrameSourcesConstructor();
+ ~TestSchedulerFrameSourcesConstructor() override;
protected:
- virtual BeginFrameSource* ConstructPrimaryFrameSource(
- Scheduler* scheduler) override;
- virtual BeginFrameSource* ConstructBackgroundFrameSource(
+ BeginFrameSource* ConstructPrimaryFrameSource(Scheduler* scheduler) override;
+ BeginFrameSource* ConstructBackgroundFrameSource(
Scheduler* scheduler) override;
OrderedSimpleTaskRunner* test_task_runner_;
@@ -182,11 +181,11 @@
BeginFrameSource& frame_source() { return *frame_source_; }
- virtual ~TestScheduler();
+ ~TestScheduler() override;
protected:
// Overridden from Scheduler.
- virtual base::TimeTicks Now() const override;
+ base::TimeTicks Now() const override;
private:
TestScheduler(
diff --git a/cc/test/solid_color_content_layer_client.h b/cc/test/solid_color_content_layer_client.h
index 7e6ceb6..a851b72 100644
--- a/cc/test/solid_color_content_layer_client.h
+++ b/cc/test/solid_color_content_layer_client.h
@@ -16,12 +16,12 @@
explicit SolidColorContentLayerClient(SkColor color) : color_(color) {}
// ContentLayerClient implementation.
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual void PaintContents(
+ void DidChangeLayerCanUseLCDText() override {}
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& rect,
ContentLayerClient::GraphicsContextStatus gc_status) override;
- virtual bool FillsBoundsCompletely() const override;
+ bool FillsBoundsCompletely() const override;
private:
SkColor color_;
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h
index cf0292d..66ae998 100644
--- a/cc/test/test_context_provider.h
+++ b/cc/test/test_context_provider.h
@@ -27,17 +27,17 @@
static scoped_refptr<TestContextProvider> Create(
scoped_ptr<TestWebGraphicsContext3D> context);
- virtual bool BindToCurrentThread() override;
- virtual Capabilities ContextCapabilities() override;
- virtual gpu::gles2::GLES2Interface* ContextGL() override;
- virtual gpu::ContextSupport* ContextSupport() override;
- virtual class GrContext* GrContext() override;
- virtual bool IsContextLost() override;
- virtual void VerifyContexts() override;
- virtual void DeleteCachedResources() override;
- virtual bool DestroyedOnMainThread() override;
- virtual void SetLostContextCallback(const LostContextCallback& cb) override;
- virtual void SetMemoryPolicyChangedCallback(
+ bool BindToCurrentThread() override;
+ Capabilities ContextCapabilities() override;
+ gpu::gles2::GLES2Interface* ContextGL() override;
+ gpu::ContextSupport* ContextSupport() override;
+ class GrContext* GrContext() override;
+ bool IsContextLost() override;
+ void VerifyContexts() override;
+ void DeleteCachedResources() override;
+ bool DestroyedOnMainThread() override;
+ void SetLostContextCallback(const LostContextCallback& cb) override;
+ void SetMemoryPolicyChangedCallback(
const MemoryPolicyChangedCallback& cb) override;
TestWebGraphicsContext3D* TestContext3d();
@@ -56,7 +56,7 @@
protected:
explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
- virtual ~TestContextProvider();
+ ~TestContextProvider() override;
private:
void OnLostContext();
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
index ceadd93..307b881 100644
--- a/cc/test/test_context_support.h
+++ b/cc/test/test_context_support.h
@@ -15,23 +15,22 @@
class TestContextSupport : public gpu::ContextSupport {
public:
TestContextSupport();
- virtual ~TestContextSupport();
+ ~TestContextSupport() override;
// gpu::ContextSupport implementation.
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
- virtual void Swap() override;
- virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
- virtual uint32 InsertFutureSyncPointCHROMIUM() override;
- virtual void RetireSyncPointCHROMIUM(uint32 sync_point) override;
- virtual void ScheduleOverlayPlane(int plane_z_order,
- gfx::OverlayTransform plane_transform,
- unsigned overlay_texture_id,
- const gfx::Rect& display_bounds,
- const gfx::RectF& uv_rect) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
+ void Swap() override;
+ void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
+ uint32 InsertFutureSyncPointCHROMIUM() override;
+ void RetireSyncPointCHROMIUM(uint32 sync_point) override;
+ void ScheduleOverlayPlane(int plane_z_order,
+ gfx::OverlayTransform plane_transform,
+ unsigned overlay_texture_id,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& uv_rect) override;
void CallAllSyncPointCallbacks();
diff --git a/cc/test/test_gles2_interface.h b/cc/test/test_gles2_interface.h
index 70d8288..a12147a 100644
--- a/cc/test/test_gles2_interface.h
+++ b/cc/test/test_gles2_interface.h
@@ -13,180 +13,167 @@
class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub {
public:
explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context);
- virtual ~TestGLES2Interface();
+ ~TestGLES2Interface() override;
- virtual void GenTextures(GLsizei n, GLuint* textures) override;
- virtual void GenBuffers(GLsizei n, GLuint* buffers) override;
- virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
- virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
- virtual void GenQueriesEXT(GLsizei n, GLuint* queries) override;
+ void GenTextures(GLsizei n, GLuint* textures) override;
+ void GenBuffers(GLsizei n, GLuint* buffers) override;
+ void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
+ void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
+ void GenQueriesEXT(GLsizei n, GLuint* queries) override;
- virtual void DeleteTextures(GLsizei n, const GLuint* textures) override;
- virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
- virtual void DeleteFramebuffers(GLsizei n,
- const GLuint* framebuffers) override;
- virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
+ void DeleteTextures(GLsizei n, const GLuint* textures) override;
+ void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
+ void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
+ void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
- virtual GLuint CreateShader(GLenum type) override;
- virtual GLuint CreateProgram() override;
+ GLuint CreateShader(GLenum type) override;
+ GLuint CreateProgram() override;
- virtual void BindTexture(GLenum target, GLuint texture) override;
+ void BindTexture(GLenum target, GLuint texture) override;
- virtual void GetIntegerv(GLenum pname, GLint* params) override;
- virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
- virtual void GetProgramiv(GLuint program,
- GLenum pname,
- GLint* params) override;
- virtual void GetShaderPrecisionFormat(GLenum shadertype,
- GLenum precisiontype,
- GLint* range,
- GLint* precision) override;
- virtual GLenum CheckFramebufferStatus(GLenum target) override;
+ void GetIntegerv(GLenum pname, GLint* params) override;
+ void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
+ void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
+ void GetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override;
+ GLenum CheckFramebufferStatus(GLenum target) override;
- virtual void ActiveTexture(GLenum target) override;
- virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
- override;
- virtual void UseProgram(GLuint program) override;
- virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
- override;
- virtual void DrawElements(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices) override;
- virtual void ClearColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
- virtual void ClearStencil(GLint s) override;
- virtual void Clear(GLbitfield mask) override;
- virtual void Flush() override;
- virtual void Finish() override;
- virtual void ShallowFlushCHROMIUM() override;
- virtual void Enable(GLenum cap) override;
- virtual void Disable(GLenum cap) override;
+ void ActiveTexture(GLenum target) override;
+ void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
+ void UseProgram(GLuint program) override;
+ void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
+ void DrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+ void ClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+ void ClearStencil(GLint s) override;
+ void Clear(GLbitfield mask) override;
+ void Flush() override;
+ void Finish() override;
+ void ShallowFlushCHROMIUM() override;
+ void Enable(GLenum cap) override;
+ void Disable(GLenum cap) override;
- virtual void BindBuffer(GLenum target, GLuint buffer) override;
- virtual void BindRenderbuffer(GLenum target, GLuint buffer) override;
- virtual void BindFramebuffer(GLenum target, GLuint buffer) override;
+ void BindBuffer(GLenum target, GLuint buffer) override;
+ void BindRenderbuffer(GLenum target, GLuint buffer) override;
+ void BindFramebuffer(GLenum target, GLuint buffer) override;
- virtual void TexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
- virtual void TexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
- virtual void TexStorage2DEXT(GLenum target,
- GLsizei levels,
+ void TexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+ void TexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+ void TexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+ void TexImageIOSurface2DCHROMIUM(GLenum target,
+ GLsizei width,
+ GLsizei height,
+ GLuint io_surface_id,
+ GLuint plane) override;
+ void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+
+ void AsyncTexImage2DCHROMIUM(GLenum target,
+ GLint level,
GLenum internalformat,
GLsizei width,
- GLsizei height) override;
- virtual void TexImageIOSurface2DCHROMIUM(GLenum target,
- GLsizei width,
- GLsizei height,
- GLuint io_surface_id,
- GLuint plane) override;
- virtual void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+ void AsyncTexSubImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+ void CompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei image_size,
+ const void* data) override;
+ void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
+ GLuint CreateImageCHROMIUM(ClientBuffer buffer,
+ GLsizei width,
+ GLsizei height,
+ GLenum internalformat) override;
+ void DestroyImageCHROMIUM(GLuint image_id) override;
+ GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
+ GLsizei height,
+ GLenum internalformat,
+ GLenum usage) override;
+ void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
+ void ReleaseTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
+ void FramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) override;
+ void FramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) override;
+ void RenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
- virtual void AsyncTexImage2DCHROMIUM(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
- virtual void AsyncTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
- virtual void CompressedTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLsizei image_size,
- const void* data) override;
- virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
- virtual GLuint CreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat) override;
- virtual void DestroyImageCHROMIUM(GLuint image_id) override;
- virtual GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage) override;
- virtual void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
- virtual void ReleaseTexImage2DCHROMIUM(GLenum target,
- GLint image_id) override;
- virtual void FramebufferRenderbuffer(GLenum target,
- GLenum attachment,
- GLenum renderbuffertarget,
- GLuint renderbuffer) override;
- virtual void FramebufferTexture2D(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level) override;
- virtual void RenderbufferStorage(GLenum target,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
+ void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
+ GLboolean UnmapBufferCHROMIUM(GLuint target) override;
+ void BufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) override;
- virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
- virtual GLboolean UnmapBufferCHROMIUM(GLuint target) override;
- virtual void BufferData(GLenum target,
- GLsizeiptr size,
- const void* data,
- GLenum usage) override;
+ void WaitSyncPointCHROMIUM(GLuint sync_point) override;
+ GLuint InsertSyncPointCHROMIUM() override;
- virtual void WaitSyncPointCHROMIUM(GLuint sync_point) override;
- virtual GLuint InsertSyncPointCHROMIUM() override;
+ void BeginQueryEXT(GLenum target, GLuint id) override;
+ void EndQueryEXT(GLenum target) override;
+ void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
- virtual void BeginQueryEXT(GLenum target, GLuint id) override;
- virtual void EndQueryEXT(GLenum target) override;
- virtual void GetQueryObjectuivEXT(GLuint id,
- GLenum pname,
- GLuint* params) override;
+ void DiscardFramebufferEXT(GLenum target,
+ GLsizei count,
+ const GLenum* attachments) override;
+ void GenMailboxCHROMIUM(GLbyte* mailbox) override;
+ void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+ void ProduceTextureDirectCHROMIUM(GLuint texture,
+ GLenum target,
+ const GLbyte* mailbox) override;
+ void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+ GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
+ const GLbyte* mailbox) override;
- virtual void DiscardFramebufferEXT(GLenum target,
- GLsizei count,
- const GLenum* attachments) override;
- virtual void GenMailboxCHROMIUM(GLbyte* mailbox) override;
- virtual void ProduceTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
- virtual void ProduceTextureDirectCHROMIUM(GLuint texture,
- GLenum target,
- const GLbyte* mailbox) override;
- virtual void ConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
- virtual GLuint CreateAndConsumeTextureCHROMIUM(
- GLenum target,
- const GLbyte* mailbox) override;
-
- virtual void ResizeCHROMIUM(GLuint width,
- GLuint height,
- float device_scale) override;
- virtual void LoseContextCHROMIUM(GLenum current, GLenum other) override;
+ void ResizeCHROMIUM(GLuint width, GLuint height, float device_scale) override;
+ void LoseContextCHROMIUM(GLenum current, GLenum other) override;
private:
TestWebGraphicsContext3D* test_context_;
diff --git a/cc/test/test_gpu_memory_buffer_manager.cc b/cc/test/test_gpu_memory_buffer_manager.cc
index 855959e..1f34988 100644
--- a/cc/test/test_gpu_memory_buffer_manager.cc
+++ b/cc/test/test_gpu_memory_buffer_manager.cc
@@ -19,25 +19,25 @@
mapped_(false) {}
// Overridden from gfx::GpuMemoryBuffer:
- virtual void* Map() override {
+ void* Map() override {
DCHECK(!mapped_);
mapped_ = true;
return pixels_.get();
}
- virtual void Unmap() override {
+ void Unmap() override {
DCHECK(mapped_);
mapped_ = false;
}
- virtual bool IsMapped() const override { return mapped_; }
- virtual Format GetFormat() const override { return format_; }
- virtual uint32 GetStride() const override {
+ bool IsMapped() const override { return mapped_; }
+ Format GetFormat() const override { return format_; }
+ uint32 GetStride() const override {
return size_.width() * BytesPerPixel(format_);
}
- virtual gfx::GpuMemoryBufferHandle GetHandle() const override {
+ gfx::GpuMemoryBufferHandle GetHandle() const override {
NOTREACHED();
return gfx::GpuMemoryBufferHandle();
}
- virtual ClientBuffer AsClientBuffer() override {
+ ClientBuffer AsClientBuffer() override {
return reinterpret_cast<ClientBuffer>(this);
}
diff --git a/cc/test/test_gpu_memory_buffer_manager.h b/cc/test/test_gpu_memory_buffer_manager.h
index 61aaaaa..267e6fe 100644
--- a/cc/test/test_gpu_memory_buffer_manager.h
+++ b/cc/test/test_gpu_memory_buffer_manager.h
@@ -12,14 +12,14 @@
class TestGpuMemoryBufferManager : public GpuMemoryBufferManager {
public:
TestGpuMemoryBufferManager();
- virtual ~TestGpuMemoryBufferManager();
+ ~TestGpuMemoryBufferManager() override;
// Overridden from GpuMemoryBufferManager:
- virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+ scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
const gfx::Size& size,
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage) override;
- virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
+ gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
ClientBuffer buffer) override;
};
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h
index 5e6a978..6725ec0 100644
--- a/cc/test/test_in_process_context_provider.h
+++ b/cc/test/test_in_process_context_provider.h
@@ -22,24 +22,24 @@
public:
TestInProcessContextProvider();
- virtual bool BindToCurrentThread() override;
- virtual gpu::gles2::GLES2Interface* ContextGL() override;
- virtual gpu::ContextSupport* ContextSupport() override;
- virtual class GrContext* GrContext() override;
- virtual Capabilities ContextCapabilities() override;
- virtual bool IsContextLost() override;
- virtual void VerifyContexts() override;
- virtual void DeleteCachedResources() override;
- virtual bool DestroyedOnMainThread() override;
- virtual void SetLostContextCallback(
+ bool BindToCurrentThread() override;
+ gpu::gles2::GLES2Interface* ContextGL() override;
+ gpu::ContextSupport* ContextSupport() override;
+ class GrContext* GrContext() override;
+ Capabilities ContextCapabilities() override;
+ bool IsContextLost() override;
+ void VerifyContexts() override;
+ void DeleteCachedResources() override;
+ bool DestroyedOnMainThread() override;
+ void SetLostContextCallback(
const LostContextCallback& lost_context_callback) override;
- virtual void SetMemoryPolicyChangedCallback(
+ void SetMemoryPolicyChangedCallback(
const MemoryPolicyChangedCallback& memory_policy_changed_callback)
override;
protected:
friend class base::RefCountedThreadSafe<TestInProcessContextProvider>;
- virtual ~TestInProcessContextProvider();
+ ~TestInProcessContextProvider() override;
private:
scoped_ptr<gpu::GLInProcessContext> context_;
diff --git a/cc/test/test_shared_bitmap_manager.h b/cc/test/test_shared_bitmap_manager.h
index ccda52c..9163c79 100644
--- a/cc/test/test_shared_bitmap_manager.h
+++ b/cc/test/test_shared_bitmap_manager.h
@@ -15,16 +15,15 @@
class TestSharedBitmapManager : public SharedBitmapManager {
public:
TestSharedBitmapManager();
- virtual ~TestSharedBitmapManager();
+ ~TestSharedBitmapManager() override;
- virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size)
- override;
+ scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size) override;
- virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
+ scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
const gfx::Size&,
const SharedBitmapId& id) override;
- virtual scoped_ptr<SharedBitmap> GetBitmapForSharedMemory(
+ scoped_ptr<SharedBitmap> GetBitmapForSharedMemory(
base::SharedMemory* memory) override;
private:
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h
index a54cb37..18b9817 100644
--- a/cc/test/tiled_layer_test_common.h
+++ b/cc/test/tiled_layer_test_common.h
@@ -25,12 +25,12 @@
public:
Resource(FakeLayerUpdater* updater,
scoped_ptr<PrioritizedResource> resource);
- virtual ~Resource();
+ ~Resource() override;
- virtual void Update(ResourceUpdateQueue* queue,
- const gfx::Rect& source_rect,
- const gfx::Vector2d& dest_offset,
- bool partial_update) override;
+ void Update(ResourceUpdateQueue* queue,
+ const gfx::Rect& source_rect,
+ const gfx::Vector2d& dest_offset,
+ bool partial_update) override;
private:
FakeLayerUpdater* layer_;
@@ -41,14 +41,14 @@
FakeLayerUpdater();
- virtual scoped_ptr<LayerUpdater::Resource> CreateResource(
+ scoped_ptr<LayerUpdater::Resource> CreateResource(
PrioritizedResourceManager* resource) override;
- virtual void PrepareToUpdate(const gfx::Size& content_size,
- const gfx::Rect& paint_rect,
- const gfx::Size& tile_size,
- float contents_width_scale,
- float contents_height_scale) override;
+ void PrepareToUpdate(const gfx::Size& content_size,
+ const gfx::Rect& paint_rect,
+ const gfx::Size& tile_size,
+ float contents_width_scale,
+ float contents_height_scale) override;
// Sets the rect to invalidate during the next call to PrepareToUpdate().
// After the next call to PrepareToUpdate() the rect is reset.
void SetRectToInvalidate(const gfx::Rect& rect, FakeTiledLayer* layer);
@@ -68,7 +68,7 @@
void Update() { update_count_++; }
protected:
- virtual ~FakeLayerUpdater();
+ ~FakeLayerUpdater() override;
private:
int prepare_count_;
@@ -84,7 +84,7 @@
class FakeTiledLayerImpl : public TiledLayerImpl {
public:
FakeTiledLayerImpl(LayerTreeImpl* tree_impl, int id);
- virtual ~FakeTiledLayerImpl();
+ ~FakeTiledLayerImpl() override;
using TiledLayerImpl::HasTileAt;
using TiledLayerImpl::HasResourceIdForTileAt;
@@ -102,15 +102,15 @@
using TiledLayer::NumPaintedTiles;
using TiledLayer::IdlePaintRect;
- virtual void SetNeedsDisplayRect(const gfx::Rect& rect) override;
+ void SetNeedsDisplayRect(const gfx::Rect& rect) override;
const gfx::Rect& last_needs_display_rect() const {
return last_needs_display_rect_;
}
- virtual void SetTexturePriorities(
+ void SetTexturePriorities(
const PriorityCalculator& priority_calculator) override;
- virtual PrioritizedResourceManager* ResourceManager() override;
+ PrioritizedResourceManager* ResourceManager() override;
FakeLayerUpdater* fake_layer_updater() { return fake_updater_.get(); }
gfx::RectF update_rect() { return update_rect_; }
@@ -120,9 +120,9 @@
void ResetNumDependentsNeedPushProperties();
protected:
- virtual LayerUpdater* Updater() const override;
- virtual void CreateUpdaterIfNeeded() override {}
- virtual ~FakeTiledLayer();
+ LayerUpdater* Updater() const override;
+ void CreateUpdaterIfNeeded() override {}
+ ~FakeTiledLayer() override;
private:
scoped_refptr<FakeLayerUpdater> fake_updater_;
@@ -138,13 +138,13 @@
PrioritizedResourceManager* resource_manager);
void SetContentBounds(const gfx::Size& content_bounds);
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* content_bounds) override;
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override;
protected:
- virtual ~FakeTiledLayerWithScaledBounds();
+ ~FakeTiledLayerWithScaledBounds() override;
gfx::Size forced_content_bounds_;
private:
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc
index e378561..12e7a5e 100644
--- a/cc/trees/layer_tree_host_common_perftest.cc
+++ b/cc/trees/layer_tree_host_common_perftest.cc
@@ -50,7 +50,7 @@
ASSERT_TRUE(base::ReadFileToString(json_file, &json_));
}
- virtual void SetupTree() override {
+ void SetupTree() override {
gfx::Size viewport = gfx::Size(720, 1038);
layer_tree_host()->SetViewportSize(viewport);
scoped_refptr<Layer> root =
@@ -61,7 +61,7 @@
void SetTestName(const std::string& name) { test_name_ = name; }
- virtual void AfterTest() override {
+ void AfterTest() override {
CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown().";
perf_test::PrintResult("calc_draw_props_time",
"",
@@ -84,7 +84,7 @@
RunTest(false, false, false);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
timer_.Reset();
do {
@@ -121,11 +121,9 @@
RunTestWithImplSidePainting();
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
timer_.Reset();
LayerTreeImpl* active_tree = host_impl->active_tree();
@@ -169,9 +167,9 @@
public:
void RunSortLayers() { RunTest(false, false, false); }
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
LayerTreeImpl* active_tree = host_impl->active_tree();
// First build the tree and then we'll start running tests on layersorter
// itself
@@ -221,9 +219,9 @@
num_duplicates_ = num_duplicates;
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
LayerTreeImpl* active_tree = host_impl->active_tree();
// First build the tree and then we'll start running tests on layersorter
// itself
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 83e6800..99e479a 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -43,10 +43,10 @@
public:
LayerWithForcedDrawsContent() {}
- virtual bool DrawsContent() const override;
+ bool DrawsContent() const override;
private:
- virtual ~LayerWithForcedDrawsContent() {}
+ ~LayerWithForcedDrawsContent() override {}
};
bool LayerWithForcedDrawsContent::DrawsContent() const { return true; }
@@ -54,13 +54,13 @@
class MockContentLayerClient : public ContentLayerClient {
public:
MockContentLayerClient() {}
- virtual ~MockContentLayerClient() {}
- virtual void PaintContents(
+ ~MockContentLayerClient() override {}
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {}
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override { return false; }
};
scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer(
@@ -4031,10 +4031,10 @@
return make_scoped_refptr(new NoScaleContentLayer(client));
}
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* content_bounds) override {
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override {
// Skip over the ContentLayer to the base Layer class.
Layer::CalculateContentsScale(ideal_contents_scale,
contents_scale_x,
@@ -4045,7 +4045,7 @@
protected:
explicit NoScaleContentLayer(ContentLayerClient* client)
: ContentLayer(client) {}
- virtual ~NoScaleContentLayer() {}
+ ~NoScaleContentLayer() override {}
};
scoped_refptr<NoScaleContentLayer> CreateNoScaleDrawableContentLayer(
@@ -7771,7 +7771,7 @@
new AnimationScaleFactorTrackingLayerImpl(tree_impl, id));
}
- virtual ~AnimationScaleFactorTrackingLayerImpl() {}
+ ~AnimationScaleFactorTrackingLayerImpl() override {}
private:
explicit AnimationScaleFactorTrackingLayerImpl(LayerTreeImpl* tree_impl,
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 6380647..ddb315f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -176,12 +176,12 @@
new LayerTreeHostImplTimeSourceAdapter(layer_tree_host_impl,
time_source));
}
- virtual ~LayerTreeHostImplTimeSourceAdapter() {
+ ~LayerTreeHostImplTimeSourceAdapter() override {
time_source_->SetClient(NULL);
time_source_->SetActive(false);
}
- virtual void OnTimerTick() override {
+ void OnTimerTick() override {
// In single threaded mode we attempt to simulate changing the current
// thread by maintaining a fake thread id. When we switch from one
// thread to another, we construct DebugScopedSetXXXThread objects that
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 51ef8b0..a6448c1 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -123,51 +123,49 @@
SharedBitmapManager* shared_bitmap_manager,
GpuMemoryBufferManager* gpu_memory_buffer_manager,
int id);
- virtual ~LayerTreeHostImpl();
+ ~LayerTreeHostImpl() override;
// BeginFrameSourceMixIn implementation
- virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
+ void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
// InputHandler implementation
- virtual void BindToClient(InputHandlerClient* client) override;
- virtual InputHandler::ScrollStatus ScrollBegin(
+ void BindToClient(InputHandlerClient* client) override;
+ InputHandler::ScrollStatus ScrollBegin(
const gfx::Point& viewport_point,
InputHandler::ScrollInputType type) override;
- virtual InputHandler::ScrollStatus ScrollAnimated(
+ InputHandler::ScrollStatus ScrollAnimated(
const gfx::Point& viewport_point,
const gfx::Vector2dF& scroll_delta) override;
- virtual bool ScrollBy(const gfx::Point& viewport_point,
- const gfx::Vector2dF& scroll_delta) override;
- virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
- ScrollDirection direction) override;
- virtual void SetRootLayerScrollOffsetDelegate(
+ bool ScrollBy(const gfx::Point& viewport_point,
+ const gfx::Vector2dF& scroll_delta) override;
+ bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
+ ScrollDirection direction) override;
+ void SetRootLayerScrollOffsetDelegate(
LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) override;
- virtual void OnRootLayerDelegatedScrollOffsetChanged() override;
- virtual void ScrollEnd() override;
- virtual InputHandler::ScrollStatus FlingScrollBegin() override;
- virtual void MouseMoveAt(const gfx::Point& viewport_point) override;
- virtual void PinchGestureBegin() override;
- virtual void PinchGestureUpdate(float magnify_delta,
- const gfx::Point& anchor) override;
- virtual void PinchGestureEnd() override;
- virtual void SetNeedsAnimate() override;
- virtual bool IsCurrentlyScrollingLayerAt(
- const gfx::Point& viewport_point,
- InputHandler::ScrollInputType type) override;
- virtual bool HaveTouchEventHandlersAt(
- const gfx::Point& viewport_port) override;
- virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
+ void OnRootLayerDelegatedScrollOffsetChanged() override;
+ void ScrollEnd() override;
+ InputHandler::ScrollStatus FlingScrollBegin() override;
+ void MouseMoveAt(const gfx::Point& viewport_point) override;
+ void PinchGestureBegin() override;
+ void PinchGestureUpdate(float magnify_delta,
+ const gfx::Point& anchor) override;
+ void PinchGestureEnd() override;
+ void SetNeedsAnimate() override;
+ bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
+ InputHandler::ScrollInputType type) override;
+ bool HaveTouchEventHandlersAt(const gfx::Point& viewport_port) override;
+ scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
ui::LatencyInfo* latency) override;
// TopControlsManagerClient implementation.
- virtual void SetControlsTopOffset(float offset) override;
- virtual float ControlsTopOffset() const override;
- virtual void DidChangeTopControlsPosition() override;
- virtual bool HaveRootScrollLayer() const override;
+ void SetControlsTopOffset(float offset) override;
+ float ControlsTopOffset() const override;
+ void DidChangeTopControlsPosition() override;
+ bool HaveRootScrollLayer() const override;
struct CC_EXPORT FrameData : public RenderPassSink {
FrameData();
- virtual ~FrameData();
+ ~FrameData() override;
void AsValueInto(base::debug::TracedValue* value) const;
std::vector<gfx::Rect> occluding_screen_space_rects;
@@ -180,7 +178,7 @@
bool has_no_damage;
// RenderPassSink implementation.
- virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override;
+ void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override;
};
virtual void BeginMainFrameAborted(bool did_handle);
@@ -232,45 +230,43 @@
const gfx::Rect ViewportRectForTilePriority() const;
// RendererClient implementation.
- virtual void SetFullRootLayerDamage() override;
+ void SetFullRootLayerDamage() override;
// TileManagerClient implementation.
- virtual const std::vector<PictureLayerImpl*>& GetPictureLayers()
- const override;
- virtual void NotifyReadyToActivate() override;
- virtual void NotifyTileStateChanged(const Tile* tile) override;
- virtual void BuildRasterQueue(RasterTilePriorityQueue* queue,
- TreePriority tree_priority) override;
- virtual void BuildEvictionQueue(EvictionTilePriorityQueue* queue,
- TreePriority tree_priority) override;
+ const std::vector<PictureLayerImpl*>& GetPictureLayers() const override;
+ void NotifyReadyToActivate() override;
+ void NotifyTileStateChanged(const Tile* tile) override;
+ void BuildRasterQueue(RasterTilePriorityQueue* queue,
+ TreePriority tree_priority) override;
+ void BuildEvictionQueue(EvictionTilePriorityQueue* queue,
+ TreePriority tree_priority) override;
// ScrollbarAnimationControllerClient implementation.
- virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
- base::TimeDelta delay) override;
- virtual void SetNeedsScrollbarAnimationFrame() override;
+ void PostDelayedScrollbarFade(const base::Closure& start_fade,
+ base::TimeDelta delay) override;
+ void SetNeedsScrollbarAnimationFrame() override;
// OutputSurfaceClient implementation.
- virtual void DeferredInitialize() override;
- virtual void ReleaseGL() override;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override;
- virtual void SetNeedsRedrawRect(const gfx::Rect& rect) override;
- virtual void BeginFrame(const BeginFrameArgs& args) override;
+ void DeferredInitialize() override;
+ void ReleaseGL() override;
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override;
+ void SetNeedsRedrawRect(const gfx::Rect& rect) override;
+ void BeginFrame(const BeginFrameArgs& args) override;
- virtual void SetExternalDrawConstraints(
+ void SetExternalDrawConstraints(
const gfx::Transform& transform,
const gfx::Rect& viewport,
const gfx::Rect& clip,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority,
bool resourceless_software_draw) override;
- virtual void DidLoseOutputSurface() override;
- virtual void DidSwapBuffers() override;
- virtual void DidSwapBuffersComplete() override;
- virtual void ReclaimResources(const CompositorFrameAck* ack) override;
- virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
- virtual void SetTreeActivationCallback(const base::Closure& callback)
- override;
+ void DidLoseOutputSurface() override;
+ void DidSwapBuffers() override;
+ void DidSwapBuffersComplete() override;
+ void ReclaimResources(const CompositorFrameAck* ack) override;
+ void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
+ void SetTreeActivationCallback(const base::Closure& callback) override;
// Called from LayerTreeImpl.
void OnCanDrawStateChangedForTree();
@@ -429,7 +425,7 @@
return begin_impl_frame_interval_;
}
- virtual void AsValueInto(base::debug::TracedValue* value) const override;
+ void AsValueInto(base::debug::TracedValue* value) const override;
void AsValueWithFrameInto(FrameData* frame,
base::debug::TracedValue* value) const;
scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 0ed582c..7b466d0 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -109,58 +109,50 @@
virtual void TearDown() override {}
- virtual void UpdateRendererCapabilitiesOnImplThread() override {}
- virtual void DidLoseOutputSurfaceOnImplThread() override {}
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override {}
- virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
- virtual void SetMaxSwapsPendingOnImplThread(int max) override {}
- virtual void DidSwapBuffersOnImplThread() override {}
- virtual void DidSwapBuffersCompleteOnImplThread() override {}
- virtual void OnCanDrawStateChanged(bool can_draw) override {
+ void UpdateRendererCapabilitiesOnImplThread() override {}
+ void DidLoseOutputSurfaceOnImplThread() override {}
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override {}
+ void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
+ void SetMaxSwapsPendingOnImplThread(int max) override {}
+ void DidSwapBuffersOnImplThread() override {}
+ void DidSwapBuffersCompleteOnImplThread() override {}
+ void OnCanDrawStateChanged(bool can_draw) override {
on_can_draw_state_changed_called_ = true;
}
- virtual void NotifyReadyToActivate() override {
+ void NotifyReadyToActivate() override {
did_notify_ready_to_activate_ = true;
host_impl_->ActivateSyncTree();
}
- virtual void SetNeedsRedrawOnImplThread() override {
+ void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; }
+ void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override {
did_request_redraw_ = true;
}
- virtual void SetNeedsRedrawRectOnImplThread(
- const gfx::Rect& damage_rect) override {
- did_request_redraw_ = true;
- }
- virtual void SetNeedsAnimateOnImplThread() override {
- did_request_animate_ = true;
- }
- virtual void SetNeedsManageTilesOnImplThread() override {
+ void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; }
+ void SetNeedsManageTilesOnImplThread() override {
did_request_manage_tiles_ = true;
}
- virtual void DidInitializeVisibleTileOnImplThread() override {
+ void DidInitializeVisibleTileOnImplThread() override {
did_upload_visible_tile_ = true;
}
- virtual void SetNeedsCommitOnImplThread() override {
- did_request_commit_ = true;
- }
- virtual void PostAnimationEventsToMainThreadOnImplThread(
+ void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; }
+ void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events) override {}
- virtual bool ReduceContentsTextureMemoryOnImplThread(
- size_t limit_bytes, int priority_cutoff) override {
+ bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
+ int priority_cutoff) override {
current_limit_bytes_ = limit_bytes;
current_priority_cutoff_value_ = priority_cutoff;
return reduce_memory_result_;
}
- virtual bool IsInsideDraw() override { return false; }
- virtual void RenewTreePriority() override {}
- virtual void PostDelayedScrollbarFadeOnImplThread(
- const base::Closure& start_fade,
- base::TimeDelta delay) override {
+ bool IsInsideDraw() override { return false; }
+ void RenewTreePriority() override {}
+ void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade,
+ base::TimeDelta delay) override {
scrollbar_fade_start_ = start_fade;
requested_scrollbar_animation_delay_ = delay;
}
- virtual void DidActivateSyncTree() override {}
- virtual void DidManageTiles() override {}
+ void DidActivateSyncTree() override {}
+ void DidManageTiles() override {}
void set_reduce_memory_result(bool reduce_memory_result) {
reduce_memory_result_ = reduce_memory_result;
@@ -1377,7 +1369,7 @@
NULL,
0) {}
- virtual BeginFrameArgs CurrentBeginFrameArgs() const override {
+ BeginFrameArgs CurrentBeginFrameArgs() const override {
return CreateBeginFrameArgsForTesting(fake_current_physical_time_);
}
@@ -1716,23 +1708,22 @@
return make_scoped_ptr(new DidDrawCheckLayer(tree_impl, id));
}
- virtual bool WillDraw(DrawMode draw_mode, ResourceProvider* provider)
- override {
+ bool WillDraw(DrawMode draw_mode, ResourceProvider* provider) override {
will_draw_called_ = true;
if (will_draw_returns_false_)
return false;
return LayerImpl::WillDraw(draw_mode, provider);
}
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override {
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override {
append_quads_called_ = true;
LayerImpl::AppendQuads(
render_pass, occlusion_in_content_space, append_quads_data);
}
- virtual void DidDraw(ResourceProvider* provider) override {
+ void DidDraw(ResourceProvider* provider) override {
did_draw_called_ = true;
LayerImpl::DidDraw(provider);
}
@@ -1948,9 +1939,9 @@
resource_provider));
}
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override {
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override {
LayerImpl::AppendQuads(
render_pass, occlusion_in_content_space, append_quads_data);
if (had_incomplete_tile_)
@@ -3521,21 +3512,20 @@
min_page_scale_factor_(-1.f),
max_page_scale_factor_(-1.f) {}
- virtual ~TestScrollOffsetDelegate() {}
+ ~TestScrollOffsetDelegate() override {}
- virtual gfx::ScrollOffset GetTotalScrollOffset() override {
+ gfx::ScrollOffset GetTotalScrollOffset() override {
return getter_return_value_;
}
- virtual bool IsExternalFlingActive() const override { return false; }
+ bool IsExternalFlingActive() const override { return false; }
- virtual void UpdateRootLayerState(
- const gfx::ScrollOffset& total_scroll_offset,
- const gfx::ScrollOffset& max_scroll_offset,
- const gfx::SizeF& scrollable_size,
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) override {
+ void UpdateRootLayerState(const gfx::ScrollOffset& total_scroll_offset,
+ const gfx::ScrollOffset& max_scroll_offset,
+ const gfx::SizeF& scrollable_size,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) override {
DCHECK(total_scroll_offset.x() <= max_scroll_offset.x());
DCHECK(total_scroll_offset.y() <= max_scroll_offset.y());
last_set_scroll_offset_ = total_scroll_offset;
@@ -3981,9 +3971,9 @@
new BlendStateCheckLayer(tree_impl, id, resource_provider));
}
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override {
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override {
quads_appended_ = true;
gfx::Rect opaque_rect;
@@ -4393,9 +4383,7 @@
host_impl_->DidDrawAllLayers(frame);
}
- virtual void DidActivateSyncTree() override {
- did_activate_pending_tree_ = true;
- }
+ void DidActivateSyncTree() override { did_activate_pending_tree_ = true; }
void set_gutter_quad_material(DrawQuad::Material material) {
gutter_quad_material_ = material;
@@ -4745,9 +4733,9 @@
return make_scoped_ptr(new FakeLayerWithQuads(tree_impl, id));
}
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override {
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override {
SharedQuadState* shared_quad_state =
render_pass->CreateAndAppendSharedQuadState();
PopulateSharedQuadState(shared_quad_state);
@@ -5183,7 +5171,7 @@
class LayerTreeHostImplTestWithDelegatingRenderer
: public LayerTreeHostImplTest {
protected:
- virtual scoped_ptr<OutputSurface> CreateOutputSurface() override {
+ scoped_ptr<OutputSurface> CreateOutputSurface() override {
return FakeOutputSurface::CreateDelegating3d();
}
@@ -5273,8 +5261,8 @@
return make_scoped_ptr(new FakeMaskLayerImpl(tree_impl, id));
}
- virtual void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
- gfx::Size* resource_size) const override {
+ void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
+ gfx::Size* resource_size) const override {
*resource_id = 0;
}
@@ -6031,7 +6019,7 @@
CompositorFrameMetadataTest()
: swap_buffers_complete_(0) {}
- virtual void DidSwapBuffersCompleteOnImplThread() override {
+ void DidSwapBuffersCompleteOnImplThread() override {
swap_buffers_complete_++;
}
@@ -6056,11 +6044,11 @@
public:
CountingSoftwareDevice() : frames_began_(0), frames_ended_(0) {}
- virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override {
+ SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override {
++frames_began_;
return SoftwareOutputDevice::BeginPaint(damage_rect);
}
- virtual void EndPaint(SoftwareFrameData* frame_data) override {
+ void EndPaint(SoftwareFrameData* frame_data) override {
++frames_ended_;
SoftwareOutputDevice::EndPaint(frame_data);
}
@@ -6165,7 +6153,7 @@
onscreen_context_provider_ = TestContextProvider::Create();
}
- virtual void UpdateRendererCapabilitiesOnImplThread() override {
+ void UpdateRendererCapabilitiesOnImplThread() override {
did_update_renderer_capabilities_ = true;
}
@@ -6883,17 +6871,13 @@
set_needs_redraw_count_(set_needs_redraw_count),
forward_to_main_count_(forward_to_main_count) {}
- virtual ~SimpleSwapPromiseMonitor() {}
+ ~SimpleSwapPromiseMonitor() override {}
- virtual void OnSetNeedsCommitOnMain() override {
- (*set_needs_commit_count_)++;
- }
+ void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; }
- virtual void OnSetNeedsRedrawOnImpl() override {
- (*set_needs_redraw_count_)++;
- }
+ void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; }
- virtual void OnForwardScrollUpdateToMainThreadOnImpl() override {
+ void OnForwardScrollUpdateToMainThreadOnImpl() override {
(*forward_to_main_count_)++;
}
@@ -7503,9 +7487,7 @@
class LayerTreeHostImplCountingLostSurfaces : public LayerTreeHostImplTest {
public:
LayerTreeHostImplCountingLostSurfaces() : num_lost_surfaces_(0) {}
- virtual void DidLoseOutputSurfaceOnImplThread() override {
- num_lost_surfaces_++;
- }
+ void DidLoseOutputSurfaceOnImplThread() override { num_lost_surfaces_++; }
protected:
int num_lost_surfaces_;
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 47d7789..b368c55 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -44,34 +44,34 @@
measure_commit_cost_(false) {
}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->throttle_frame_production = false;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
BuildTree();
PostSetNeedsCommitToMainThread();
}
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
if (begin_frame_driven_drawing_ && !TestEnded()) {
layer_tree_host()->SetNeedsAnimate();
layer_tree_host()->SetNextCommitForcesRedraw();
}
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
if (measure_commit_cost_)
commit_timer_.Start();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) {
commit_timer_.NextLap();
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (TestEnded() || CleanUpStarted())
return;
draw_timer_.NextLap();
@@ -91,7 +91,7 @@
virtual void BuildTree() {}
- virtual void AfterTest() override {
+ void AfterTest() override {
CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest().";
perf_test::PrintResult("layer_tree_host_frame_time", "", test_name_,
1000 * draw_timer_.MsPerLap(), "us", true);
@@ -131,7 +131,7 @@
ASSERT_TRUE(base::ReadFileToString(json_file, &json_));
}
- virtual void BuildTree() override {
+ void BuildTree() override {
gfx::Size viewport = gfx::Size(720, 1038);
layer_tree_host()->SetViewportSize(viewport);
scoped_refptr<Layer> root = ParseTreeFromJson(json_,
@@ -178,7 +178,7 @@
class LayerTreeHostPerfTestLeafInvalidates
: public LayerTreeHostPerfTestJsonReader {
public:
- virtual void BuildTree() override {
+ void BuildTree() override {
LayerTreeHostPerfTestJsonReader::BuildTree();
// Find a leaf layer.
@@ -188,7 +188,7 @@
}
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (TestEnded())
return;
@@ -221,13 +221,13 @@
: LayerTreeHostPerfTestJsonReader() {
}
- virtual void BuildTree() override {
+ void BuildTree() override {
LayerTreeHostPerfTestJsonReader::BuildTree();
scrollable_ = layer_tree_host()->root_layer()->children()[1];
ASSERT_TRUE(scrollable_.get());
}
- virtual void Layout() override {
+ void Layout() override {
if (TestEnded())
return;
static const gfx::Vector2d delta = gfx::Vector2d(0, 10);
@@ -262,7 +262,7 @@
next_sync_point_(1),
clean_up_started_(false) {}
- virtual void BuildTree() override {
+ void BuildTree() override {
LayerTreeHostPerfTestJsonReader::BuildTree();
tab_contents_ =
static_cast<TextureLayer*>(
@@ -273,7 +273,7 @@
ASSERT_TRUE(tab_contents_.get());
}
- virtual void WillCommit() override {
+ void WillCommit() override {
if (CleanUpStarted())
return;
gpu::Mailbox gpu_mailbox;
@@ -289,13 +289,13 @@
tab_contents_->SetTextureMailbox(mailbox, callback.Pass());
}
- virtual void DidCommit() override {
+ void DidCommit() override {
if (CleanUpStarted())
return;
layer_tree_host()->SetNeedsCommit();
}
- virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override {
+ void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override {
clean_up_started_ = true;
MainThreadTaskRunner()->PostTask(
FROM_HERE,
@@ -309,7 +309,7 @@
EndTest();
}
- virtual bool CleanUpStarted() override { return clean_up_started_; }
+ bool CleanUpStarted() override { return clean_up_started_; }
private:
scoped_refptr<TextureLayer> tab_contents_;
diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc
index 4afc4ec..c0438ec 100644
--- a/cc/trees/layer_tree_host_pixeltest_filters.cc
+++ b/cc/trees/layer_tree_host_pixeltest_filters.cc
@@ -159,12 +159,12 @@
class LayerTreeHostFiltersScaledPixelTest
: public LayerTreeHostFiltersPixelTest {
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// Required so that device scale is inherited by content scale.
settings->layer_transforms_should_scale_layer_contents = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_);
LayerTreePixelTest::SetupTree();
}
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index e1ab00e..5aef5e3 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -20,13 +20,13 @@
class MaskContentLayerClient : public ContentLayerClient {
public:
explicit MaskContentLayerClient(const gfx::Size& bounds) : bounds_(bounds) {}
- virtual ~MaskContentLayerClient() {}
+ ~MaskContentLayerClient() override {}
- virtual void DidChangeLayerCanUseLCDText() override {}
+ void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ bool FillsBoundsCompletely() const override { return false; }
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& rect,
ContentLayerClient::GraphicsContextStatus gc_status) override {
diff --git a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
index fa94b0e..0689a27 100644
--- a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
+++ b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
@@ -21,19 +21,18 @@
class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
// Not enough memory available. Enforce on-demand rasterization.
impl->SetMemoryPolicy(
ManagedMemoryPolicy(1, gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
1000));
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
// Find the PictureLayerImpl ask it to append quads to check their material.
// The PictureLayerImpl is assumed to be the first child of the root layer
// in the active tree.
@@ -60,11 +59,11 @@
explicit BlueYellowLayerClient(gfx::Rect layer_rect)
: layer_rect_(layer_rect) {}
- virtual void DidChangeLayerCanUseLCDText() override { }
+ void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ bool FillsBoundsCompletely() const override { return false; }
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {
@@ -109,7 +108,7 @@
class LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced
: public LayerTreeHostOnDemandRasterPixelTest {
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
LayerTreeHostOnDemandRasterPixelTest::InitializeSettings(settings);
settings->gpu_rasterization_forced = true;
}
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc
index 1b7679b..6b67e50 100644
--- a/cc/trees/layer_tree_host_pixeltest_readback.cc
+++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -24,7 +24,7 @@
LayerTreeHostReadbackPixelTest()
: insert_copy_request_after_frame_count_(0) {}
- virtual scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest() override {
+ scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest() override {
scoped_ptr<CopyOutputRequest> request;
switch (test_type_) {
@@ -51,7 +51,7 @@
return request.Pass();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
if (insert_copy_request_after_frame_count_ == 0) {
Layer* const target =
readback_target_ ? readback_target_ : layer_tree_host()->root_layer();
@@ -60,7 +60,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (insert_copy_request_after_frame_count_ ==
layer_tree_host()->source_frame_number()) {
Layer* const target =
@@ -920,17 +920,17 @@
green_client_(SK_ColorGREEN),
blue_client_(SK_ColorBLUE) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// Cause the device scale factor to be inherited by contents scales.
settings->layer_transforms_should_scale_layer_contents = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_);
LayerTreePixelTest::SetupTree();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_EQ(device_scale_factor_,
host_impl->active_tree()->device_scale_factor());
}
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 459ff2a..cb3cdef 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -73,22 +73,22 @@
public:
LayerTreeHostTestSetNeedsCommit1() : num_commits_(0), num_draws_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostSetNeedsCommitToMainThread();
PostSetNeedsCommitToMainThread();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
num_draws_++;
if (!impl->active_tree()->source_frame_number())
EndTest();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
num_commits_++;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_LE(1, num_commits_);
EXPECT_LE(1, num_draws_);
}
@@ -106,13 +106,11 @@
public:
LayerTreeHostTestSetNeedsCommit2() : num_commits_(0), num_draws_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
- ++num_draws_;
- }
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override { ++num_draws_; }
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
++num_commits_;
switch (num_commits_) {
case 1:
@@ -126,7 +124,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(2, num_commits_);
EXPECT_LE(1, num_draws_);
}
@@ -141,7 +139,7 @@
// Verify that we pass property values in PushPropertiesTo.
class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
layer_tree_host()->SetRootLayer(root);
@@ -156,16 +154,16 @@
DONE,
};
- virtual void BeginTest() override {
+ void BeginTest() override {
index_ = STARTUP;
PostSetNeedsCommitToMainThread();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
VerifyAfterValues(impl->active_tree()->root_layer());
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
SetBeforeValues(layer_tree_host()->root_layer());
VerifyBeforeValues(layer_tree_host()->root_layer());
@@ -178,7 +176,7 @@
SetAfterValues(layer_tree_host()->root_layer());
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
void VerifyBeforeValues(Layer* layer) {
EXPECT_EQ(gfx::Size(10, 10).ToString(), layer->bounds().ToString());
@@ -237,9 +235,9 @@
public:
LayerTreeHostTestSetNeedsRedraw() : num_commits_(0), num_draws_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
EXPECT_EQ(0, impl->active_tree()->source_frame_number());
if (!num_draws_) {
// Redraw again to verify that the second redraw doesn't commit.
@@ -250,12 +248,12 @@
num_draws_++;
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
EXPECT_EQ(0, num_draws_);
num_commits_++;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_GE(2, num_draws_);
EXPECT_EQ(1, num_commits_);
}
@@ -277,7 +275,7 @@
invalid_rect_(10, 10, 20, 20),
root_layer_(ContentLayer::Create(&client_)) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
layer_tree_host()->SetRootLayer(root_layer_);
@@ -285,10 +283,9 @@
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
gfx::RectF root_damage_rect;
@@ -306,7 +303,7 @@
return draw_result;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (!num_draws_) {
PostSetNeedsRedrawRectToMainThread(invalid_rect_);
} else {
@@ -315,7 +312,7 @@
num_draws_++;
}
- virtual void AfterTest() override { EXPECT_EQ(2, num_draws_); }
+ void AfterTest() override { EXPECT_EQ(2, num_draws_); }
private:
int num_draws_;
@@ -329,11 +326,11 @@
class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->layer_transforms_should_scale_layer_contents = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 20));
@@ -345,14 +342,14 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() == 1)
EndTest();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// Changing the device scale factor causes a commit. It also changes
@@ -366,7 +363,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(gfx::Size(4, 4).ToString(),
scaled_layer_->content_bounds().ToString());
}
@@ -382,11 +379,11 @@
class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate
: public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->layer_transforms_should_scale_layer_contents = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_ = Layer::Create();
root_layer_->SetBounds(gfx::Size(10, 20));
@@ -403,14 +400,14 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() == 1)
EndTest();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// Changing the device scale factor causes a commit. It also changes
@@ -424,7 +421,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(gfx::Size(40, 40).ToString(),
scrollbar_->content_bounds().ToString());
}
@@ -446,7 +443,7 @@
invalid_rect_(10, 10, 20, 20),
root_layer_(ContentLayer::Create(&client_)) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
layer_tree_host()->SetRootLayer(root_layer_);
@@ -454,15 +451,14 @@
PostSetNeedsCommitToMainThread();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (num_draws_ == 3 && host_impl->settings().impl_side_painting)
host_impl->SetNeedsRedrawRect(invalid_rect_);
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
gfx::RectF root_damage_rect;
@@ -490,7 +486,7 @@
return draw_result;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
switch (num_draws_) {
case 0:
case 1:
@@ -517,7 +513,7 @@
num_draws_++;
}
- virtual void AfterTest() override { EXPECT_EQ(5, num_draws_); }
+ void AfterTest() override { EXPECT_EQ(5, num_draws_); }
private:
int num_draws_;
@@ -537,7 +533,7 @@
LayerTreeHostTestUndrawnLayersDamageLater()
: root_layer_(ContentLayer::Create(&client_)) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(50, 50));
layer_tree_host()->SetRootLayer(root_layer_);
@@ -556,12 +552,11 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
gfx::RectF root_damage_rect;
@@ -589,7 +584,7 @@
return draw_result;
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// Test not owning the surface.
@@ -611,7 +606,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -631,7 +626,7 @@
LayerTreeHostTestUndrawnLayersPushContentBoundsLater()
: root_layer_(Layer::Create()) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(20, 20));
layer_tree_host()->SetRootLayer(root_layer_);
@@ -648,9 +643,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* root = host_impl->active_tree()->root_layer();
LayerImpl* parent = root->children()[0];
LayerImpl* child = parent->children()[0];
@@ -670,7 +665,7 @@
}
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
parent_layer_->SetOpacity(1.0f);
@@ -682,7 +677,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<Layer> root_layer_;
@@ -699,21 +694,21 @@
public:
LayerTreeHostTestCommit() {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
layer_tree_host()->set_background_color(SK_ColorGRAY);
PostSetNeedsCommitToMainThread();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize());
EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color());
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
MULTI_THREAD_TEST_F(LayerTreeHostTestCommit);
@@ -727,21 +722,21 @@
LayerTreeHostTestFrameTimeUpdatesAfterActivationFails()
: frame_count_with_pending_tree_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
layer_tree_host()->set_background_color(SK_ColorGRAY);
PostSetNeedsCommitToMainThread();
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
EXPECT_EQ(frame_count_with_pending_tree_, 0);
if (impl->settings().impl_side_painting)
impl->BlockNotifyReadyToActivateForTesting(true);
}
- virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl,
- const BeginFrameArgs& args) override {
+ void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl,
+ const BeginFrameArgs& args) override {
if (impl->pending_tree())
frame_count_with_pending_tree_++;
@@ -754,7 +749,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (frame_count_with_pending_tree_ > 1) {
EXPECT_NE(first_frame_time_.ToInternalValue(), 0);
EXPECT_NE(first_frame_time_.ToInternalValue(),
@@ -766,12 +761,12 @@
EXPECT_FALSE(impl->settings().impl_side_painting);
EndTest();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
if (impl->settings().impl_side_painting)
EXPECT_NE(frame_count_with_pending_tree_, 1);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int frame_count_with_pending_tree_;
@@ -787,14 +782,14 @@
public:
LayerTreeHostTestFrameTimeUpdatesAfterDraw() : frame_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
layer_tree_host()->set_background_color(SK_ColorGRAY);
PostSetNeedsCommitToMainThread();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
frame_++;
if (frame_ == 1) {
first_frame_time_ = impl->CurrentBeginFrameArgs().frame_time;
@@ -812,7 +807,7 @@
EndTest();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// Ensure there isn't a commit between the two draws, to ensure that a
// commit isn't required for updating the current frame time. We can
// only check for this in the multi-threaded case, since in the single-
@@ -821,7 +816,7 @@
EXPECT_EQ(0, frame_);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int frame_;
@@ -836,7 +831,7 @@
public:
LayerTreeHostTestStartPageScaleAnimation() {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
if (layer_tree_host()->settings().impl_side_painting) {
@@ -862,18 +857,18 @@
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f);
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float) override {
gfx::ScrollOffset offset = scroll_layer_->scroll_offset();
scroll_layer_->SetScrollOffset(ScrollOffsetWithDelta(offset,
scroll_delta));
layer_tree_host()->SetPageScaleFactorAndLimits(scale, 0.5f, 2.f);
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
// We get one commit before the first draw, and the animation doesn't happen
// until the second draw.
switch (impl->active_tree()->source_frame_number()) {
@@ -893,7 +888,7 @@
}
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
layer_tree_host()->StartPageScaleAnimation(
@@ -902,7 +897,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<Layer> scroll_layer_;
@@ -914,7 +909,7 @@
public:
LayerTreeHostTestSetVisible() : num_draws_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostSetNeedsCommitToMainThread();
PostSetVisibleToMainThread(false);
// This is suppressed while we're invisible.
@@ -923,13 +918,13 @@
PostSetVisibleToMainThread(true);
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
EXPECT_TRUE(impl->visible());
++num_draws_;
EndTest();
}
- virtual void AfterTest() override { EXPECT_EQ(1, num_draws_); }
+ void AfterTest() override { EXPECT_EQ(1, num_draws_); }
private:
int num_draws_;
@@ -943,7 +938,7 @@
void SetTestLayer(Layer* test_layer) { test_layer_ = test_layer; }
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {
@@ -951,8 +946,8 @@
if (test_layer_)
test_layer_->SetOpacity(0.f);
}
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override { return false; }
private:
Layer* test_layer_;
@@ -968,8 +963,8 @@
int PaintContentsCount() { return paint_contents_count_; }
void ResetPaintContentsCount() { paint_contents_count_ = 0; }
- virtual bool Update(ResourceUpdateQueue* queue,
- const OcclusionTracker<Layer>* occlusion) override {
+ bool Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker<Layer>* occlusion) override {
bool updated = ContentLayer::Update(queue, occlusion);
paint_contents_count_++;
return updated;
@@ -981,7 +976,7 @@
SetBounds(gfx::Size(10, 10));
SetIsDrawable(true);
}
- virtual ~ContentLayerWithUpdateTracking() {}
+ ~ContentLayerWithUpdateTracking() override {}
int paint_contents_count_;
};
@@ -997,18 +992,16 @@
test_opacity_change_delegate_.SetTestLayer(update_check_layer_.get());
}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(10, 10));
layer_tree_host()->root_layer()->AddChild(update_check_layer_);
PostSetNeedsCommitToMainThread();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
- EndTest();
- }
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { EndTest(); }
- virtual void AfterTest() override {
+ void AfterTest() override {
// Update() should have been called once.
EXPECT_EQ(1, update_check_layer_->PaintContentsCount());
}
@@ -1026,10 +1019,10 @@
return make_scoped_refptr(new NoScaleContentLayer(client));
}
- virtual void CalculateContentsScale(float ideal_contents_scale,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* contentBounds) override {
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* contentBounds) override {
// Skip over the ContentLayer's method to the base Layer class.
Layer::CalculateContentsScale(ideal_contents_scale,
contents_scale_x,
@@ -1040,7 +1033,7 @@
private:
explicit NoScaleContentLayer(ContentLayerClient* client)
: ContentLayer(client) {}
- virtual ~NoScaleContentLayer() {}
+ ~NoScaleContentLayer() override {}
};
class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers
@@ -1050,7 +1043,7 @@
: root_layer_(NoScaleContentLayer::Create(&client_)),
child_layer_(ContentLayer::Create(&client_)) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(60, 60));
layer_tree_host()->SetDeviceScaleFactor(1.5);
EXPECT_EQ(gfx::Size(60, 60), layer_tree_host()->device_viewport_size());
@@ -1069,7 +1062,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
// Should only do one commit.
EXPECT_EQ(0, impl->active_tree()->source_frame_number());
// Device scale factor should come over to impl.
@@ -1135,7 +1128,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -1148,7 +1141,7 @@
// Verify atomicity of commits and reuse of textures.
class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->texture_id_allocation_chunk_size = 1;
// Make sure partial texture updates are turned off.
settings->max_partial_texture_updates = 0;
@@ -1156,7 +1149,7 @@
settings->scrollbar_animator = LayerTreeSettings::NoAnimator;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
layer_ = FakeContentLayer::Create(&client_);
layer_->SetBounds(gfx::Size(10, 20));
@@ -1173,12 +1166,12 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
drew_frame_ = -1;
PostSetNeedsCommitToMainThread();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
ASSERT_EQ(0u, layer_tree_host()->settings().max_partial_texture_updates);
TestWebGraphicsContext3D* context = TestContext();
@@ -1219,7 +1212,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
TestWebGraphicsContext3D* context = TestContext();
if (drew_frame_ == impl->active_tree()->source_frame_number()) {
@@ -1236,12 +1229,12 @@
PostSetNeedsCommitToMainThread();
}
- virtual void Layout() override {
+ void Layout() override {
layer_->SetNeedsDisplay();
scrollbar_->SetNeedsDisplay();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
protected:
FakeContentLayerClient client_;
@@ -1256,7 +1249,7 @@
class LayerTreeHostTestDelegatingRendererAtomicCommit
: public LayerTreeHostTestDirectRendererAtomicCommit {
public:
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
ASSERT_EQ(0u, layer_tree_host()->settings().max_partial_texture_updates);
TestWebGraphicsContext3D* context = TestContext();
@@ -1323,7 +1316,7 @@
class LayerTreeHostTestAtomicCommitWithPartialUpdate
: public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->texture_id_allocation_chunk_size = 1;
// Allow one partial texture update.
settings->max_partial_texture_updates = 1;
@@ -1331,7 +1324,7 @@
settings->impl_side_painting = false;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
parent_ = FakeContentLayer::Create(&client_);
parent_->SetBounds(gfx::Size(10, 20));
@@ -1345,9 +1338,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
parent_->SetNeedsDisplay();
@@ -1374,7 +1367,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
ASSERT_EQ(1u, layer_tree_host()->settings().max_partial_texture_updates);
TestWebGraphicsContext3D* context = TestContext();
@@ -1464,7 +1457,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
EXPECT_LT(impl->active_tree()->source_frame_number(), 5);
TestWebGraphicsContext3D* context = TestContext();
@@ -1481,7 +1474,7 @@
context->ResetUsedTextures();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -1496,7 +1489,7 @@
class LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
: public LayerTreeHostTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_ = FakeContentLayer::Create(&client_);
root_layer_->SetBounds(gfx::Size(100, 100));
@@ -1522,9 +1515,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
Renderer* renderer = host_impl->renderer();
RenderPassId surface1_render_pass_id = host_impl->active_tree()
->root_layer()
@@ -1561,12 +1554,12 @@
}
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (layer_tree_host()->source_frame_number() < 2)
root_layer_->SetNeedsDisplay();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_LE(2u, root_layer_->update_count());
EXPECT_LE(2u, surface_layer1_->update_count());
EXPECT_LE(2u, surface_layer2_->update_count());
@@ -1590,14 +1583,12 @@
return make_scoped_refptr(new EvictionTestLayer());
}
- virtual bool Update(ResourceUpdateQueue*,
- const OcclusionTracker<Layer>*) override;
- virtual bool DrawsContent() const override { return true; }
+ bool Update(ResourceUpdateQueue*, const OcclusionTracker<Layer>*) override;
+ bool DrawsContent() const override { return true; }
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override;
- virtual void PushPropertiesTo(LayerImpl* impl) override;
- virtual void SetTexturePriorities(const PriorityCalculator&) override;
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* impl) override;
+ void SetTexturePriorities(const PriorityCalculator&) override;
bool HaveBackingTexture() const {
return texture_.get() ? texture_->have_backing_texture() : false;
@@ -1605,7 +1596,7 @@
private:
EvictionTestLayer() : Layer() {}
- virtual ~EvictionTestLayer() {}
+ ~EvictionTestLayer() override {}
void CreateTextureIfNeeded() {
if (texture_)
@@ -1626,11 +1617,11 @@
int id) {
return make_scoped_ptr(new EvictionTestLayerImpl(tree_impl, id));
}
- virtual ~EvictionTestLayerImpl() {}
+ ~EvictionTestLayerImpl() override {}
- virtual void AppendQuads(RenderPass* render_pass,
- const Occlusion& occlusion_in_content_space,
- AppendQuadsData* append_quads_data) override {
+ void AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) override {
ASSERT_TRUE(has_texture_);
ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources());
}
@@ -1684,7 +1675,7 @@
impl_for_evict_textures_(0),
num_commits_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetRootLayer(layer_);
layer_tree_host()->SetViewportSize(gfx::Size(10, 20));
@@ -1734,7 +1725,7 @@
// the beginFrame/commit pair.
// Commits 5+6 test the path where an eviction happens during the eviction
// recovery path.
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (num_commits_) {
case 1:
EXPECT_TRUE(layer_->HaveBackingTexture());
@@ -1762,11 +1753,11 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
impl_for_evict_textures_ = impl;
}
- virtual void Layout() override {
+ void Layout() override {
++num_commits_;
switch (num_commits_) {
case 1:
@@ -1795,7 +1786,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -1811,7 +1802,7 @@
LayerTreeHostTestContinuousInvalidate()
: num_commit_complete_(0), num_draw_layers_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(10, 10));
layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10));
@@ -1824,24 +1815,24 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (num_draw_layers_ == 2)
return;
content_layer_->SetNeedsDisplay();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
if (num_draw_layers_ == 1)
num_commit_complete_++;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
num_draw_layers_++;
if (num_draw_layers_ == 2)
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Check that we didn't commit twice between first and second draw.
EXPECT_EQ(1, num_commit_complete_);
}
@@ -1860,14 +1851,14 @@
LayerTreeHostTestDeferCommits()
: num_commits_deferred_(0), num_complete_commits_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidDeferCommit() override {
+ void DidDeferCommit() override {
num_commits_deferred_++;
layer_tree_host()->SetDeferCommits(false);
}
- virtual void DidCommit() override {
+ void DidCommit() override {
num_complete_commits_++;
switch (num_complete_commits_) {
case 1:
@@ -1884,7 +1875,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(1, num_commits_deferred_);
EXPECT_EQ(2, num_complete_commits_);
}
@@ -2061,7 +2052,7 @@
child_layer2_(FakeContentLayer::Create(&client_)),
num_commits_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size(100, 100));
root_layer_->SetBounds(gfx::Size(100, 100));
child_layer1_->SetBounds(gfx::Size(100, 100));
@@ -2072,8 +2063,8 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
- bool visible) override {
+ void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
+ bool visible) override {
if (visible) {
// One backing should remain unevicted.
EXPECT_EQ(
@@ -2091,7 +2082,7 @@
EndTest();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
++num_commits_;
switch (num_commits_) {
case 1:
@@ -2123,7 +2114,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -2147,17 +2138,17 @@
int paint_count() const { return paint_count_; }
int lcd_notification_count() const { return lcd_notification_count_; }
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {
++paint_count_;
}
- virtual void DidChangeLayerCanUseLCDText() override {
+ void DidChangeLayerCanUseLCDText() override {
++lcd_notification_count_;
layer_->SetNeedsDisplay();
}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ bool FillsBoundsCompletely() const override { return false; }
private:
Layer* layer_;
@@ -2165,7 +2156,7 @@
int lcd_notification_count_;
};
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root_layer;
if (layer_tree_host()->settings().impl_side_painting)
root_layer = PictureLayer::Create(&client_);
@@ -2185,10 +2176,10 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void AfterTest() override {}
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void AfterTest() override {}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The first update consists of one LCD notification and one paint.
@@ -2233,25 +2224,24 @@
// Verify that the BeginFrame notification is used to initiate rendering.
class LayerTreeHostTestBeginFrameNotification : public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->begin_frame_scheduling_enabled = true;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
// This will trigger a SetNeedsBeginFrame which will trigger a
// BeginFrame.
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
EndTest();
return DRAW_SUCCESS;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
base::TimeTicks frame_time_;
@@ -2262,14 +2252,14 @@
class LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled
: public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->begin_frame_scheduling_enabled = true;
settings->using_synchronous_renderer_compositor = true;
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// The BeginFrame notification is turned off now but will get enabled
// once we return. End test while it's enabled.
ImplThreadTaskRunner()->PostTask(
@@ -2278,7 +2268,7 @@
base::Unretained(this)));
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
MULTI_THREAD_TEST_F(
@@ -2289,13 +2279,13 @@
LayerTreeHostTestAbortedCommitDoesntStall()
: commit_count_(0), commit_abort_count_(0), commit_complete_count_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->begin_frame_scheduling_enabled = true;
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
commit_count_++;
if (commit_count_ == 4) {
// After two aborted commits, request a real commit now to make sure a
@@ -2305,14 +2295,14 @@
}
}
- virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
- bool did_handle) override {
+ void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
+ bool did_handle) override {
commit_abort_count_++;
// Initiate another abortable commit.
host_impl->SetNeedsCommit();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
commit_complete_count_++;
if (commit_complete_count_ == 1) {
// Initiate an abortable commit after the first commit.
@@ -2322,7 +2312,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(commit_count_, 5);
EXPECT_EQ(commit_abort_count_, 3);
EXPECT_EQ(commit_complete_count_, 2);
@@ -2335,7 +2325,7 @@
class LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor
: public LayerTreeHostTestAbortedCommitDoesntStall {
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings);
settings->using_synchronous_renderer_compositor = true;
}
@@ -2346,7 +2336,7 @@
class LayerTreeHostTestAbortedCommitDoesntStallDisabledVsync
: public LayerTreeHostTestAbortedCommitDoesntStall {
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings);
settings->throttle_frame_production = false;
}
@@ -2357,11 +2347,11 @@
class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation
: public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
scoped_refptr<Layer> layer = PictureLayer::Create(&client_);
@@ -2370,13 +2360,13 @@
layer_tree_host()->root_layer()->AddChild(layer);
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
};
@@ -2393,16 +2383,16 @@
void set_layer(Layer* layer) { layer_ = layer; }
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override {
layer_->SetBounds(gfx::Size(2, 2));
}
- virtual void DidChangeLayerCanUseLCDText() override {}
+ void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override { return false; }
+ bool FillsBoundsCompletely() const override { return false; }
private:
Layer* layer_;
@@ -2410,7 +2400,7 @@
LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
if (layer_tree_host()->settings().impl_side_painting) {
scoped_refptr<PictureLayer> root_layer = PictureLayer::Create(&client_);
layer_tree_host()->SetRootLayer(root_layer);
@@ -2427,10 +2417,10 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void AfterTest() override {}
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void AfterTest() override {}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
num_commits_++;
if (num_commits_ == 1) {
LayerImpl* root_layer = host_impl->active_tree()->root_layer();
@@ -2482,8 +2472,8 @@
class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest {
protected:
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
scoped_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned(
new MockIOSurfaceWebGraphicsContext3D);
mock_context_ = mock_context_owned.get();
@@ -2494,7 +2484,7 @@
return FakeOutputSurface::Create3d(mock_context_owned.Pass());
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
layer_tree_host()->root_layer()->SetIsDrawable(false);
@@ -2510,9 +2500,9 @@
layer_tree_host()->root_layer()->AddChild(io_surface_layer);
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_EQ(0u, host_impl->resource_provider()->num_resources());
// In WillDraw, the IOSurfaceLayer sets up the io surface texture.
@@ -2550,10 +2540,9 @@
EXPECT_CALL(*mock_context_, bindTexture(_, 0)).Times(AnyNumber());
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
Mock::VerifyAndClearExpectations(&mock_context_);
ResourceProvider* resource_provider = host_impl->resource_provider();
EXPECT_EQ(1u, resource_provider->num_resources());
@@ -2585,14 +2574,14 @@
return draw_result;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
Mock::VerifyAndClearExpectations(&mock_context_);
EXPECT_CALL(*mock_context_, deleteTexture(1)).Times(AtLeast(1));
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int io_surface_id_;
MockIOSurfaceWebGraphicsContext3D* mock_context_;
@@ -2603,7 +2592,7 @@
class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest {
public:
- virtual void BeginTest() override {
+ void BeginTest() override {
frame_ = 0;
PostSetNeedsCommitToMainThread();
}
@@ -2612,7 +2601,7 @@
// Round 2: commit only (no draw/swap)
// Round 3: draw only (no commit)
- virtual void DidCommit() override {
+ void DidCommit() override {
int commit = layer_tree_host()->source_frame_number();
switch (commit) {
case 2:
@@ -2623,7 +2612,7 @@
}
}
- virtual void DidCompleteSwapBuffers() override {
+ void DidCompleteSwapBuffers() override {
int commit = layer_tree_host()->source_frame_number();
++frame_;
switch (frame_) {
@@ -2640,7 +2629,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
protected:
int frame_;
@@ -2657,12 +2646,12 @@
class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// PictureLayer can only be used with impl side painting enabled.
settings->impl_side_painting = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
layer_ = FakePictureLayer::Create(&client_);
// Force commits to not be aborted so new frames get drawn, otherwise
// the renderer gets deferred initialized but nothing new needs drawing.
@@ -2671,15 +2660,15 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
did_initialize_gl_ = false;
did_release_gl_ = false;
last_source_frame_number_drawn_ = -1; // Never drawn.
PostSetNeedsCommitToMainThread();
}
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
scoped_ptr<TestWebGraphicsContext3D> context3d(
TestWebGraphicsContext3D::Create());
@@ -2688,7 +2677,7 @@
delegating_renderer());
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
ASSERT_TRUE(host_impl->RootLayer());
FakePictureLayerImpl* layer_impl =
static_cast<FakePictureLayerImpl*>(host_impl->RootLayer());
@@ -2744,8 +2733,7 @@
did_release_gl_ = true;
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ASSERT_TRUE(result);
DelegatedFrameData* delegated_frame_data =
output_surface()->last_sent_frame().delegated_frame_data.get();
@@ -2762,7 +2750,7 @@
host_impl->ReclaimResources(&ack);
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_TRUE(did_initialize_gl_);
EXPECT_TRUE(did_release_gl_);
}
@@ -2779,7 +2767,7 @@
class LayerTreeHostTestDeferredInitializeWithGpuRasterization
: public LayerTreeHostTestDeferredInitialize {
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// PictureLayer can only be used with impl side painting enabled.
settings->impl_side_painting = true;
settings->gpu_rasterization_enabled = true;
@@ -2794,13 +2782,13 @@
public:
LayerTreeHostTestUIResource() : num_ui_resources_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->texture_id_allocation_chunk_size = 1;
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
int frame = layer_tree_host()->source_frame_number();
switch (frame) {
case 1:
@@ -2861,17 +2849,17 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
if (!layer_tree_host()->settings().impl_side_painting)
PerformTest(impl);
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
if (layer_tree_host()->settings().impl_side_painting)
PerformTest(impl);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
// Must clear all resources before exiting.
@@ -2898,9 +2886,9 @@
return make_scoped_ptr(new PushPropertiesCountingLayerImpl(tree_impl, id));
}
- virtual ~PushPropertiesCountingLayerImpl() {}
+ ~PushPropertiesCountingLayerImpl() override {}
- virtual void PushPropertiesTo(LayerImpl* layer) override {
+ void PushPropertiesTo(LayerImpl* layer) override {
LayerImpl::PushPropertiesTo(layer);
push_properties_count_++;
// Push state to the active tree because we can only access it from there.
@@ -2908,8 +2896,7 @@
layer)->push_properties_count_ = push_properties_count_;
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override {
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
return PushPropertiesCountingLayerImpl::Create(tree_impl, id());
}
@@ -2932,15 +2919,14 @@
return new PushPropertiesCountingLayer();
}
- virtual void PushPropertiesTo(LayerImpl* layer) override {
+ void PushPropertiesTo(LayerImpl* layer) override {
Layer::PushPropertiesTo(layer);
push_properties_count_++;
if (persist_needs_push_properties_)
needs_push_properties_ = true;
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override {
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
return PushPropertiesCountingLayerImpl::Create(tree_impl, id());
}
@@ -2958,7 +2944,7 @@
: push_properties_count_(0), persist_needs_push_properties_(false) {
SetBounds(gfx::Size(1, 1));
}
- virtual ~PushPropertiesCountingLayer() {}
+ ~PushPropertiesCountingLayer() override {}
size_t push_properties_count_;
bool persist_needs_push_properties_;
@@ -2966,7 +2952,7 @@
class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
protected:
- virtual void BeginTest() override {
+ void BeginTest() override {
num_commits_ = 0;
expected_push_properties_root_ = 0;
expected_push_properties_child_ = 0;
@@ -2977,7 +2963,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = PushPropertiesCountingLayer::Create();
child_ = PushPropertiesCountingLayer::Create();
child2_ = PushPropertiesCountingLayer::Create();
@@ -2996,7 +2982,7 @@
LayerTreeHostTest::SetupTree();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
++num_commits_;
EXPECT_EQ(expected_push_properties_root_, root_->push_properties_count());
@@ -3136,7 +3122,7 @@
++expected_push_properties_leaf_layer_;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int num_commits_;
FakeContentLayerClient client_;
@@ -3159,7 +3145,7 @@
class LayerTreeHostTestImplLayersPushProperties
: public LayerTreeHostTestLayersPushProperties {
protected:
- virtual void BeginTest() override {
+ void BeginTest() override {
expected_push_properties_root_impl_ = 0;
expected_push_properties_child_impl_ = 0;
expected_push_properties_grandchild_impl_ = 0;
@@ -3168,7 +3154,7 @@
LayerTreeHostTestLayersPushProperties::BeginTest();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
// These commits are in response to the changes made in
// LayerTreeHostTestLayersPushProperties::DidCommitAndDrawFrame()
switch (num_commits_) {
@@ -3359,9 +3345,9 @@
class LayerTreeHostTestPropertyChangesDuringUpdateArePushed
: public LayerTreeHostTest {
protected:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = Layer::Create();
root_->SetBounds(gfx::Size(1, 1));
@@ -3376,7 +3362,7 @@
LayerTreeHostTest::SetupTree();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 0:
break;
@@ -3405,7 +3391,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
scoped_refptr<Layer> root_;
scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer_;
@@ -3415,9 +3401,9 @@
class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest {
protected:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = PushPropertiesCountingLayer::Create();
child_ = PushPropertiesCountingLayer::Create();
root_->AddChild(child_);
@@ -3426,7 +3412,7 @@
LayerTreeHostTest::SetupTree();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 0:
break;
@@ -3458,7 +3444,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
scoped_refptr<PushPropertiesCountingLayer> root_;
scoped_refptr<PushPropertiesCountingLayer> child_;
@@ -3469,7 +3455,7 @@
class LayerTreeHostTestCasePushPropertiesThreeGrandChildren
: public LayerTreeHostTest {
protected:
- virtual void BeginTest() override {
+ void BeginTest() override {
expected_push_properties_root_ = 0;
expected_push_properties_child_ = 0;
expected_push_properties_grandchild1_ = 0;
@@ -3478,7 +3464,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = PushPropertiesCountingLayer::Create();
child_ = PushPropertiesCountingLayer::Create();
grandchild1_ = PushPropertiesCountingLayer::Create();
@@ -3494,7 +3480,7 @@
LayerTreeHostTest::SetupTree();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<PushPropertiesCountingLayer> root_;
@@ -3512,7 +3498,7 @@
class LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3552,7 +3538,7 @@
class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursion
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3635,7 +3621,7 @@
class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursionWithPersistence
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3683,7 +3669,7 @@
class LayerTreeHostTestPushPropertiesSetPropertiesWhileOutsideTree
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3751,7 +3737,7 @@
class LayerTreeHostTestPushPropertiesSetPropertyInParentThenChild
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3815,7 +3801,7 @@
class LayerTreeHostTestPushPropertiesSetPropertyInChildThenParent
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
@@ -3882,15 +3868,14 @@
LayerTreeHostTestTreeActivationCallback()
: num_commits_(0), callback_count_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
EXPECT_TRUE(HasImplThread());
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
++num_commits_;
switch (num_commits_) {
case 1:
@@ -3919,7 +3904,7 @@
host_impl, frame_data, draw_result);
}
- virtual void AfterTest() override { EXPECT_EQ(3, num_commits_); }
+ void AfterTest() override { EXPECT_EQ(3, num_commits_); }
void SetCallback(bool enable) {
output_surface()->SetTreeActivationCallback(
@@ -3948,7 +3933,7 @@
public:
LayerInvalidateCausesDraw() : num_commits_(0), num_draws_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
ASSERT_TRUE(!!invalidate_layer_.get())
<< "Derived tests must set this in SetupTree";
@@ -3956,23 +3941,23 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
// After commit, invalidate the layer. This should cause a commit.
if (layer_tree_host()->source_frame_number() == 1)
invalidate_layer_->SetNeedsDisplay();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
num_draws_++;
if (impl->active_tree()->source_frame_number() == 1)
EndTest();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
num_commits_++;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_GE(2, num_commits_);
EXPECT_GE(2, num_draws_);
}
@@ -3991,7 +3976,7 @@
class LayerTreeHostTestIOSurfaceLayerInvalidate
: public LayerInvalidateCausesDraw {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
scoped_refptr<IOSurfaceLayer> layer = IOSurfaceLayer::Create();
layer->SetBounds(gfx::Size(10, 10));
@@ -4010,7 +3995,7 @@
class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_ = Layer::Create();
root_layer_->SetPosition(gfx::Point());
root_layer_->SetBounds(gfx::Size(10, 10));
@@ -4031,9 +4016,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The layer type used does not need to push properties every frame.
@@ -4053,7 +4038,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
LayerImpl* parent = root->children()[0];
LayerImpl* child = parent->children()[0];
@@ -4065,7 +4050,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
scoped_refptr<Layer> root_layer_;
scoped_refptr<SolidColorLayer> parent_layer_;
@@ -4076,11 +4061,11 @@
class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetBounds(gfx::Size(10, 10));
@@ -4088,21 +4073,21 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
// The viewport is empty, but we still need to update layers on the main
// thread.
layer_tree_host()->SetViewportSize(gfx::Size(0, 0));
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
// The layer should be updated even though the viewport is empty, so we
// are capable of drawing it on the impl tree.
EXPECT_GT(root_layer_->update_count(), 0u);
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<FakePictureLayer> root_layer_;
@@ -4116,7 +4101,7 @@
: num_will_begin_main_frames_(0), num_impl_commits_(0) {}
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<SolidColorLayer> root_layer = SolidColorLayer::Create();
root_layer->SetBounds(gfx::Size(200, 200));
root_layer->SetIsDrawable(true);
@@ -4125,9 +4110,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void WillBeginMainFrame() override {
+ void WillBeginMainFrame() override {
num_will_begin_main_frames_++;
switch (num_will_begin_main_frames_) {
case 2:
@@ -4138,11 +4123,11 @@
}
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
num_impl_commits_++;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
switch (impl->SourceAnimationFrameNumber()) {
case 1:
// Prevent draws until commit.
@@ -4157,7 +4142,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Ensure that the commit was truly aborted.
EXPECT_EQ(2, num_will_begin_main_frames_);
EXPECT_EQ(1, num_impl_commits_);
@@ -4173,12 +4158,12 @@
class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
scoped_refptr<TestContextProvider> context_provider =
TestContextProvider::Create();
context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024);
@@ -4188,7 +4173,7 @@
return FakeOutputSurface::Create3d(context_provider);
}
- virtual void SetupTree() override {
+ void SetupTree() override {
client_.set_fill_with_nonsolid_color(true);
scoped_refptr<FakePictureLayer> root_layer =
FakePictureLayer::Create(&client_);
@@ -4199,9 +4184,9 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
TestWebGraphicsContext3D* context = TestContext();
// Expect that the transfer buffer memory used is equal to the
@@ -4210,7 +4195,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -4225,14 +4210,14 @@
public:
LayerTreeHostTestMemoryLimits() : num_commits_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void WillCommit() override {
+ void WillCommit() override {
// Some commits are aborted, so increment number of attempted commits here.
num_commits_++;
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (num_commits_) {
case 1:
// Verify default values.
@@ -4277,7 +4262,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
switch (num_commits_) {
case 1:
break;
@@ -4302,7 +4287,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_commits_;
@@ -4319,8 +4304,8 @@
: first_output_surface_memory_limit_(4321234),
second_output_surface_memory_limit_(1234321) {}
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
if (!first_context_provider_.get()) {
first_context_provider_ = TestContextProvider::Create();
} else {
@@ -4345,16 +4330,16 @@
return output_surface.Pass();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
// Lost context sometimes takes two frames to recreate. The third frame
// is sometimes aborted, so wait until the fourth frame to verify that
// the memory has been set, and the fifth frame to end the test.
@@ -4365,8 +4350,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* impl, bool result) override {
switch (impl->active_tree()->source_frame_number()) {
case 1:
EXPECT_EQ(first_output_surface_memory_limit_,
@@ -4382,7 +4366,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
scoped_refptr<TestContextProvider> first_context_provider_;
scoped_refptr<TestContextProvider> second_context_provider_;
@@ -4414,19 +4398,19 @@
public:
explicit TestSwapPromise(TestSwapPromiseResult* result) : result_(result) {}
- virtual ~TestSwapPromise() {
+ ~TestSwapPromise() override {
base::AutoLock lock(result_->lock);
result_->dtor_called = true;
}
- virtual void DidSwap(CompositorFrameMetadata* metadata) override {
+ void DidSwap(CompositorFrameMetadata* metadata) override {
base::AutoLock lock(result_->lock);
EXPECT_FALSE(result_->did_swap_called);
EXPECT_FALSE(result_->did_not_swap_called);
result_->did_swap_called = true;
}
- virtual void DidNotSwap(DidNotSwapReason reason) override {
+ void DidNotSwap(DidNotSwapReason reason) override {
base::AutoLock lock(result_->lock);
EXPECT_FALSE(result_->did_swap_called);
EXPECT_FALSE(result_->did_not_swap_called);
@@ -4434,7 +4418,7 @@
result_->reason = reason;
}
- virtual int64 TraceId() const override { return 0; }
+ int64 TraceId() const override { return 0; }
private:
// Not owned.
@@ -4446,16 +4430,16 @@
LayerTreeHostTestBreakSwapPromise()
: commit_count_(0), commit_complete_count_(0) {}
- virtual void WillBeginMainFrame() override {
+ void WillBeginMainFrame() override {
ASSERT_LE(commit_count_, 2);
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_[commit_count_]));
layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
commit_count_++;
if (commit_count_ == 2) {
// This commit will finish.
@@ -4463,7 +4447,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
commit_complete_count_++;
if (commit_complete_count_ == 1) {
// This commit will be aborted because no actual update.
@@ -4473,7 +4457,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// 3 commits are scheduled. 2 completes. 1 is aborted.
EXPECT_EQ(commit_count_, 3);
EXPECT_EQ(commit_complete_count_, 2);
@@ -4517,14 +4501,14 @@
class LayerTreeHostTestBreakSwapPromiseForVisibilityAbortedCommit
: public LayerTreeHostTest {
protected:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
layer_tree_host()->SetDeferCommits(true);
layer_tree_host()->SetNeedsCommit();
}
- virtual void DidDeferCommit() override {
+ void DidDeferCommit() override {
layer_tree_host()->SetVisible(false);
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_));
@@ -4532,12 +4516,12 @@
layer_tree_host()->SetDeferCommits(false);
}
- virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
- bool did_handle) override {
+ void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
+ bool did_handle) override {
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
{
base::AutoLock lock(swap_promise_result_.lock);
EXPECT_FALSE(swap_promise_result_.did_swap_called);
@@ -4556,16 +4540,16 @@
class LayerTreeHostTestBreakSwapPromiseForContextAbortedCommit
: public LayerTreeHostTest {
protected:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
if (TestEnded())
return;
layer_tree_host()->SetDeferCommits(true);
layer_tree_host()->SetNeedsCommit();
}
- virtual void DidDeferCommit() override {
+ void DidDeferCommit() override {
layer_tree_host()->DidLoseOutputSurface();
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_));
@@ -4573,8 +4557,8 @@
layer_tree_host()->SetDeferCommits(false);
}
- virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
- bool did_handle) override {
+ void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl,
+ bool did_handle) override {
EndTest();
// This lets the test finally commit and exit.
MainThreadTaskRunner()->PostTask(
@@ -4588,7 +4572,7 @@
layer_tree_host()->OnCreateAndInitializeOutputSurfaceAttempted(true);
}
- virtual void AfterTest() override {
+ void AfterTest() override {
{
base::AutoLock lock(swap_promise_result_.lock);
EXPECT_FALSE(swap_promise_result_.did_swap_called);
@@ -4613,17 +4597,15 @@
: SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl),
set_needs_commit_count_(set_needs_commit_count) {}
- virtual ~SimpleSwapPromiseMonitor() {}
+ ~SimpleSwapPromiseMonitor() override {}
- virtual void OnSetNeedsCommitOnMain() override {
- (*set_needs_commit_count_)++;
- }
+ void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; }
- virtual void OnSetNeedsRedrawOnImpl() override {
+ void OnSetNeedsRedrawOnImpl() override {
ADD_FAILURE() << "Should not get called on main thread.";
}
- virtual void OnForwardScrollUpdateToMainThreadOnImpl() override {
+ void OnForwardScrollUpdateToMainThreadOnImpl() override {
ADD_FAILURE() << "Should not get called on main thread.";
}
@@ -4633,9 +4615,9 @@
class LayerTreeHostTestSimpleSwapPromiseMonitor : public LayerTreeHostTest {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void WillBeginMainFrame() override {
+ void WillBeginMainFrame() override {
if (TestEnded())
return;
@@ -4684,7 +4666,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor);
@@ -4692,18 +4674,18 @@
class LayerTreeHostTestHighResRequiredAfterEvictingUIResources
: public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
ui_resource_ = FakeScopedUIResource::Create(layer_tree_host());
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
host_impl->EvictAllUIResources();
// Existence of evicted UI resources will trigger NEW_CONTENT_TAKES_PRIORITY
// mode. Active tree should require high-res to draw after entering this
@@ -4712,7 +4694,7 @@
EXPECT_TRUE(host_impl->RequiresHighResToDraw());
}
- virtual void DidCommit() override {
+ void DidCommit() override {
int frame = layer_tree_host()->source_frame_number();
switch (frame) {
case 1:
@@ -4725,7 +4707,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_ptr<FakeScopedUIResource> ui_resource_;
@@ -4736,14 +4718,14 @@
class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
EXPECT_FALSE(settings->gpu_rasterization_enabled);
EXPECT_FALSE(settings->gpu_rasterization_forced);
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_);
@@ -4752,7 +4734,7 @@
layer_tree_host()->root_layer()->AddChild(layer);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
Layer* root = layer_tree_host()->root_layer();
PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0));
PicturePile* pile = layer->GetPicturePileForTesting();
@@ -4772,18 +4754,18 @@
PostSetNeedsCommitToMainThread();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
EXPECT_FALSE(host_impl->use_gpu_rasterization());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
EXPECT_FALSE(host_impl->use_gpu_rasterization());
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient layer_client_;
};
@@ -4792,14 +4774,14 @@
class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
EXPECT_FALSE(settings->gpu_rasterization_enabled);
settings->gpu_rasterization_enabled = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_);
@@ -4808,7 +4790,7 @@
layer_tree_host()->root_layer()->AddChild(layer);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
Layer* root = layer_tree_host()->root_layer();
PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0));
PicturePile* pile = layer->GetPicturePileForTesting();
@@ -4837,18 +4819,18 @@
PostSetNeedsCommitToMainThread();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
EXPECT_FALSE(host_impl->use_gpu_rasterization());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
EXPECT_FALSE(host_impl->use_gpu_rasterization());
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient layer_client_;
};
@@ -4857,14 +4839,14 @@
class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
EXPECT_FALSE(settings->gpu_rasterization_forced);
settings->gpu_rasterization_forced = true;
}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostTest::SetupTree();
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_);
@@ -4873,7 +4855,7 @@
layer_tree_host()->root_layer()->AddChild(layer);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
Layer* root = layer_tree_host()->root_layer();
PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0));
PicturePile* pile = layer->GetPicturePileForTesting();
@@ -4902,18 +4884,18 @@
PostSetNeedsCommitToMainThread();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_TRUE(host_impl->pending_tree()->use_gpu_rasterization());
EXPECT_TRUE(host_impl->use_gpu_rasterization());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_TRUE(host_impl->active_tree()->use_gpu_rasterization());
EXPECT_TRUE(host_impl->use_gpu_rasterization());
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient layer_client_;
};
@@ -4928,7 +4910,7 @@
protected:
enum { kExpectedNumCommits = 10 };
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(bounds_);
@@ -4948,7 +4930,7 @@
LayerTreeHostTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(
@@ -4966,11 +4948,11 @@
milliseconds_per_frame));
}
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
child_layer_->SetNeedsDisplay();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_LE(kExpectedNumCommits, num_commits_);
EXPECT_LE(kExpectedNumCommits, num_draws_);
int update_count = content_layer_.get()
@@ -4979,12 +4961,12 @@
EXPECT_LE(kExpectedNumCommits, update_count);
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (++num_draws_ == kExpectedNumCommits)
EndTest();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
++num_commits_;
}
@@ -5018,24 +5000,24 @@
LayerTreeHostTestActivateOnInvisible()
: activation_count_(0), visible_(true) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
// Kick off the test with a commit.
PostSetNeedsCommitToMainThread();
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
// Make sure we don't activate using the notify signal from tile manager.
host_impl->BlockNotifyReadyToActivateForTesting(true);
}
- virtual void DidCommit() override { layer_tree_host()->SetVisible(false); }
+ void DidCommit() override { layer_tree_host()->SetVisible(false); }
- virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
- bool visible) override {
+ void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
+ bool visible) override {
visible_ = visible;
// Once invisible, we can go visible again.
@@ -5047,12 +5029,12 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
++activation_count_;
EXPECT_FALSE(visible_);
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Ensure we activated even though the signal was blocked.
EXPECT_EQ(1, activation_count_);
EXPECT_TRUE(visible_);
@@ -5075,11 +5057,11 @@
public:
LayerTreeHostTestSynchronousCompositeSwapPromise() : commit_count_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->single_thread_proxy_scheduler = false;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
// Successful composite.
scoped_ptr<SwapPromise> swap_promise0(
new TestSwapPromise(&swap_promise_result_[0]));
@@ -5104,12 +5086,12 @@
EndTest();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
commit_count_++;
ASSERT_LE(commit_count_, 3);
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(3, commit_count_);
// Initial swap promise should have succeded.
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 67fb6f8..cfd8a14 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -21,7 +21,7 @@
class LayerTreeHostAnimationTest : public LayerTreeTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeTest::SetupTree();
layer_tree_host()->root_layer()->set_layer_animation_delegate(this);
}
@@ -35,11 +35,9 @@
LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested()
: num_commits_(0) {}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
// We skip the first commit because its the commit that populates the
// impl thread with a tree. After the second commit, the test is done.
if (num_commits_ != 1)
@@ -52,7 +50,7 @@
// verify that CommitRequested has gone back to false.
}
- virtual void DidCommit() override {
+ void DidCommit() override {
if (!num_commits_) {
EXPECT_FALSE(layer_tree_host()->CommitRequested());
layer_tree_host()->SetNeedsAnimate();
@@ -66,7 +64,7 @@
num_commits_++;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_commits_;
@@ -86,11 +84,9 @@
LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback()
: num_begin_frames_(0) {}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
if (!num_begin_frames_) {
layer_tree_host()->SetNeedsAnimate();
num_begin_frames_++;
@@ -99,7 +95,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_begin_frames_;
@@ -117,13 +113,12 @@
LayerTreeHostAnimationTestAddAnimation()
: num_begin_frames_(0), received_animation_started_notification_(false) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddInstantAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void UpdateAnimationState(
- LayerTreeHostImpl* host_impl,
- bool has_unfinished_animation) override {
+ void UpdateAnimationState(LayerTreeHostImpl* host_impl,
+ bool has_unfinished_animation) override {
if (!num_begin_frames_) {
// The animation had zero duration so LayerTreeHostImpl should no
// longer need to animate its layers.
@@ -146,9 +141,9 @@
}
}
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
received_animation_started_notification_ = true;
start_time_ = monotonic_time;
if (num_begin_frames_) {
@@ -165,7 +160,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_begin_frames_;
@@ -183,29 +178,27 @@
LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws()
: started_animating_(false) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void AnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void AnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
started_animating_ = true;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (started_animating_)
EndTest();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
- virtual void AfterTest() override { }
+ void AfterTest() override {}
private:
bool started_animating_;
@@ -221,13 +214,12 @@
LayerTreeHostAnimationTestAnimationsGetDeleted()
: started_animating_(false) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void AnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void AnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
bool have_animations = !host_impl->animation_registrar()->
active_animation_controllers().empty();
if (!started_animating_ && have_animations) {
@@ -239,16 +231,15 @@
EndTest();
}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
// Animations on the impl-side controller only get deleted during a commit,
// so we need to schedule a commit.
layer_tree_host()->SetNeedsCommit();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
bool started_animating_;
@@ -263,16 +254,15 @@
LayerTreeHostAnimationTestTickAnimationWhileBackgrounded()
: num_begin_frames_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddLongAnimationToMainThread(layer_tree_host()->root_layer());
}
// Use WillAnimateLayers to set visible false before the animation runs and
// causes a commit, so we block the second visible animate in single-thread
// mode.
- virtual void WillAnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void WillAnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
// Verify that the host can draw, it's just not visible.
EXPECT_TRUE(host_impl->CanDraw());
if (num_begin_frames_ < 2) {
@@ -287,7 +277,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_begin_frames_;
@@ -305,18 +295,18 @@
LayerTreeHostAnimationTestAnimationTickTimeIsMonotonic()
: has_background_ticked_(false), num_foreground_animates_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// Make sure that drawing many times doesn't cause a checkerboarded
// animation to start so we avoid flake in this test.
settings->timeout_and_draw_when_animation_checkerboards = false;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddLongAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void AnimateLayers(LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void AnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
EXPECT_GE(monotonic_time, last_tick_time_);
last_tick_time_ = monotonic_time;
if (host_impl->visible()) {
@@ -331,16 +321,15 @@
}
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
if (TestEnded())
return draw_result;
return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
bool has_background_ticked_;
@@ -359,23 +348,22 @@
LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree()
: active_tree_was_animated_(false) {}
- virtual base::TimeDelta LowFrequencyAnimationInterval() const override {
+ base::TimeDelta LowFrequencyAnimationInterval() const override {
return base::TimeDelta::FromMilliseconds(4);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
// Replace animated commits with an empty tree.
layer_tree_host()->SetRootLayer(make_scoped_refptr<Layer>(NULL));
}
- virtual void DidCommit() override {
+ void DidCommit() override {
// This alternates setting an empty tree and a non-empty tree with an
// animation.
switch (layer_tree_host()->source_frame_number()) {
@@ -396,7 +384,7 @@
}
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
// At the start of every commit, block activations and make sure
// we are backgrounded.
if (host_impl->settings().impl_side_painting)
@@ -404,7 +392,7 @@
PostSetVisibleToMainThread(false);
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
if (!host_impl->settings().impl_side_painting) {
// There are no activations to block if we're not impl-side-painting,
// so just advance the test immediately.
@@ -433,7 +421,7 @@
host_impl->BlockNotifyReadyToActivateForTesting(false);
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
active_tree_was_animated_ = false;
// Verify that commits are actually alternating with empty / non-empty
@@ -466,8 +454,8 @@
}
}
- virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void WillAnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
EXPECT_TRUE(host_impl->active_tree()->root_layer());
active_tree_was_animated_ = true;
}
@@ -481,7 +469,7 @@
PostSetVisibleToMainThread(true);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
bool active_tree_was_animated_;
};
@@ -495,20 +483,17 @@
public:
LayerTreeHostAnimationTestAddAnimationWithTimingFunction() {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void BeginTest() override {
- PostAddAnimationToMainThread(content_.get());
- }
+ void BeginTest() override { PostAddAnimationToMainThread(content_.get()); }
- virtual void AnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
+ void AnimateLayers(LayerTreeHostImpl* host_impl,
+ base::TimeTicks monotonic_time) override {
LayerAnimationController* controller_impl =
host_impl->active_tree()->root_layer()->children()[0]->
layer_animation_controller();
@@ -532,7 +517,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> content_;
@@ -550,7 +535,7 @@
: main_start_time_(-1.0),
impl_start_time_(-1.0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
@@ -558,13 +543,11 @@
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void BeginTest() override {
- PostAddAnimationToMainThread(content_.get());
- }
+ void BeginTest() override { PostAddAnimationToMainThread(content_.get()); }
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->children()[0]->
layer_animation_controller();
@@ -578,9 +561,8 @@
EndTest();
}
- virtual void UpdateAnimationState(
- LayerTreeHostImpl* impl_host,
- bool has_unfinished_animation) override {
+ void UpdateAnimationState(LayerTreeHostImpl* impl_host,
+ bool has_unfinished_animation) override {
LayerAnimationController* controller =
impl_host->active_tree()->root_layer()->children()[0]->
layer_animation_controller();
@@ -597,7 +579,7 @@
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_FLOAT_EQ(impl_start_time_, main_start_time_);
}
@@ -617,14 +599,13 @@
public:
LayerTreeHostAnimationTestAnimationFinishedEvents() {}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddInstantAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->layer_animation_controller();
Animation* animation =
@@ -634,7 +615,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
@@ -649,17 +630,17 @@
: update_check_layer_(FakeContentLayer::Create(&client_)) {
}
- virtual void SetupTree() override {
+ void SetupTree() override {
update_check_layer_->SetOpacity(0.f);
layer_tree_host()->SetRootLayer(update_check_layer_);
LayerTreeHostAnimationTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostAddAnimationToMainThread(update_check_layer_.get());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
LayerAnimationController* controller_impl =
host_impl->active_tree()->root_layer()->layer_animation_controller();
Animation* animation_impl =
@@ -668,7 +649,7 @@
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Update() should have been called once, proving that the layer was not
// skipped.
EXPECT_EQ(1u, update_check_layer_->update_count());
@@ -692,11 +673,9 @@
public:
LayerTreeHostAnimationTestLayerAddedWithAnimation() {}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
scoped_refptr<Layer> layer = Layer::Create();
layer->set_layer_animation_delegate(this);
@@ -713,13 +692,12 @@
}
}
- virtual void AnimateLayers(
- LayerTreeHostImpl* impl_host,
- base::TimeTicks monotonic_time) override {
+ void AnimateLayers(LayerTreeHostImpl* impl_host,
+ base::TimeTicks monotonic_time) override {
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
@@ -731,9 +709,9 @@
LayerTreeHostAnimationTestCancelAnimateCommit()
: num_begin_frames_(0), num_commit_calls_(0), num_draw_calls_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
num_begin_frames_++;
// No-op animate will cancel the commit.
if (layer_tree_host()->source_frame_number() == 1) {
@@ -743,19 +721,19 @@
layer_tree_host()->SetNeedsAnimate();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
num_commit_calls_++;
if (impl->active_tree()->source_frame_number() > 1)
FAIL() << "Commit should have been canceled.";
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
num_draw_calls_++;
if (impl->active_tree()->source_frame_number() > 1)
FAIL() << "Draw should have been canceled.";
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(2, num_begin_frames_);
EXPECT_EQ(1, num_commit_calls_);
EXPECT_EQ(1, num_draw_calls_);
@@ -777,23 +755,21 @@
LayerTreeHostAnimationTestForceRedraw()
: num_animate_(0), num_draw_layers_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
if (++num_animate_ < 2)
layer_tree_host()->SetNeedsAnimate();
}
- virtual void Layout() override {
- layer_tree_host()->SetNextCommitForcesRedraw();
- }
+ void Layout() override { layer_tree_host()->SetNextCommitForcesRedraw(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (++num_draw_layers_ == 2)
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// The first commit will always draw; make sure the second draw triggered
// by the animation was not cancelled.
EXPECT_EQ(2, num_draw_layers_);
@@ -813,21 +789,21 @@
LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit()
: num_animate_(0), num_draw_layers_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
+ void BeginMainFrame(const BeginFrameArgs& args) override {
if (++num_animate_ <= 2) {
layer_tree_host()->SetNeedsCommit();
layer_tree_host()->SetNeedsAnimate();
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (++num_draw_layers_ == 2)
EndTest();
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// The first commit will always draw; make sure the second draw triggered
// by the SetNeedsCommit was not cancelled.
EXPECT_EQ(2, num_draw_layers_);
@@ -848,7 +824,7 @@
public:
LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw() : started_times_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
@@ -856,27 +832,24 @@
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->SetViewportSize(gfx::Size());
PostAddAnimationToMainThread(content_.get());
}
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
started_times_++;
}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
EndTest();
}
- virtual void AfterTest() override {
- EXPECT_EQ(1, started_times_);
- }
+ void AfterTest() override { EXPECT_EQ(1, started_times_); }
private:
int started_times_;
@@ -894,7 +867,7 @@
public:
LayerTreeHostAnimationTestRunAnimationWhenNotVisible() : started_times_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
@@ -902,33 +875,32 @@
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
visible_ = true;
PostAddAnimationToMainThread(content_.get());
}
- virtual void DidCommit() override {
+ void DidCommit() override {
visible_ = false;
layer_tree_host()->SetVisible(false);
}
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
EXPECT_FALSE(visible_);
started_times_++;
}
- virtual void NotifyAnimationFinished(
- base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
EXPECT_FALSE(visible_);
EXPECT_EQ(1, started_times_);
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
bool visible_;
@@ -944,7 +916,7 @@
// checkerboard.
class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations
: public LayerTreeHostAnimationTest {
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
@@ -952,13 +924,13 @@
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// Make sure that drawing many times doesn't cause a checkerboarded
// animation to start so we avoid flake in this test.
settings->timeout_and_draw_when_animation_checkerboards = false;
}
- virtual void BeginTest() override {
+ void BeginTest() override {
prevented_draw_ = 0;
added_animations_ = 0;
started_times_ = 0;
@@ -966,10 +938,9 @@
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
if (added_animations_ < 2)
return draw_result;
if (TestEnded())
@@ -981,7 +952,7 @@
return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The animation is longer than 1 BeginFrame interval.
@@ -996,15 +967,15 @@
}
}
- virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
- Animation::TargetProperty target_property,
- int group) override {
+ void NotifyAnimationStarted(base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property,
+ int group) override {
if (TestEnded())
return;
started_times_++;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Make sure we tried to draw the second animation but failed.
EXPECT_LT(0, prevented_draw_);
// The first animation should be started, but the second should not because
@@ -1030,7 +1001,7 @@
public:
LayerTreeHostAnimationTestScrollOffsetChangesArePropagated() {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
scroll_layer_ = FakeContentLayer::Create(&client_);
@@ -1040,11 +1011,9 @@
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1: {
scoped_ptr<ScrollOffsetAnimationCurve> curve(
@@ -1069,7 +1038,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
FakeContentLayerClient client_;
@@ -1088,9 +1057,9 @@
LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers()
: frame_count_with_pending_tree_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
AddAnimatedTransformToLayer(layer_tree_host()->root_layer(), 4, 1, 1);
} else if (layer_tree_host()->source_frame_number() == 2) {
@@ -1105,12 +1074,12 @@
}
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->settings().impl_side_painting)
host_impl->BlockNotifyReadyToActivateForTesting(true);
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// For the commit that added animations to new and existing layers, keep
// blocking activation. We want to verify that even with activation blocked,
// the animation on the layer that's already in the active tree won't get a
@@ -1121,8 +1090,8 @@
}
}
- virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
- const BeginFrameArgs& args) override {
+ void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
+ const BeginFrameArgs& args) override {
if (!host_impl->pending_tree() ||
host_impl->pending_tree()->source_frame_number() != 2)
return;
@@ -1134,8 +1103,8 @@
}
}
- virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl,
- bool has_unfinished_animation) override {
+ void UpdateAnimationState(LayerTreeHostImpl* host_impl,
+ bool has_unfinished_animation) override {
LayerAnimationController* root_controller_impl =
host_impl->active_tree()->root_layer()->layer_animation_controller();
Animation* root_animation =
@@ -1156,7 +1125,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int frame_count_with_pending_tree_;
@@ -1171,16 +1140,16 @@
LayerTreeHostAnimationTestAddAnimationAfterAnimating()
: num_swap_buffers_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostAnimationTest::SetupTree();
content_ = Layer::Create();
content_->SetBounds(gfx::Size(4, 4));
layer_tree_host()->root_layer()->AddChild(content_);
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// First frame: add an animation to the root layer.
@@ -1194,8 +1163,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
// After both animations have started, verify that they have valid
// start times.
num_swap_buffers_++;
@@ -1220,7 +1188,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
scoped_refptr<Layer> content_;
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 687d7cf..b9e15c6 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -74,8 +74,8 @@
return TestWebGraphicsContext3D::Create();
}
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
if (times_to_fail_create_) {
--times_to_fail_create_;
ExpectCreateToFail();
@@ -96,10 +96,9 @@
return FakeOutputSurface::Create3d(context3d.Pass());
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
if (draw_result == DRAW_ABORTED_MISSING_HIGH_RES_CONTENT) {
// Only valid for single-threaded impl-side painting, which activates
// immediately and will try to draw again when content has finished.
@@ -120,7 +119,7 @@
return draw_result;
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
committed_at_least_once_ = true;
if (!times_to_lose_during_commit_)
@@ -132,9 +131,7 @@
times_to_fail_recreate_ = 0;
}
- virtual void DidFailToInitializeOutputSurface() override {
- ++times_create_failed_;
- }
+ void DidFailToInitializeOutputSurface() override { ++times_create_failed_; }
virtual void TearDown() override {
LayerTreeTest::TearDown();
@@ -168,9 +165,9 @@
recovered_context_(true),
first_initialized_(false) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void RequestNewOutputSurface(bool fallback) override {
+ void RequestNewOutputSurface(bool fallback) override {
if (async_output_surface_creation_) {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
@@ -188,7 +185,7 @@
LayerTreeHostContextTest::CreateOutputSurface(fallback));
}
- virtual void DidInitializeOutputSurface() override {
+ void DidInitializeOutputSurface() override {
if (first_initialized_)
++num_losses_;
else
@@ -197,9 +194,9 @@
recovered_context_ = true;
}
- virtual void AfterTest() override { EXPECT_EQ(11u, test_case_); }
+ void AfterTest() override { EXPECT_EQ(11u, test_case_); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
// If the last frame had a context loss, then we'll commit again to
// recover.
if (!recovered_context_)
@@ -351,25 +348,23 @@
LayerTreeHostClientNotReadyDoesNotCreateOutputSurface()
: LayerTreeHostContextTest() {}
- virtual void WillBeginTest() override {
+ void WillBeginTest() override {
// Override and do not signal SetLayerTreeHostClientReady.
}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostSetNeedsCommitToMainThread();
EndTest();
}
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback)
- override {
+ scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override {
EXPECT_TRUE(false);
return nullptr;
}
- virtual void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
+ void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
- virtual void AfterTest() override {
- }
+ void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
@@ -381,29 +376,28 @@
MultipleCompositeDoesNotCreateOutputSurface()
: LayerTreeHostContextTest(), request_count_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->single_thread_proxy_scheduler = false;
}
- virtual void RequestNewOutputSurface(bool fallback) override {
+ void RequestNewOutputSurface(bool fallback) override {
EXPECT_GE(1, ++request_count_);
EndTest();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->Composite(base::TimeTicks());
layer_tree_host()->Composite(base::TimeTicks());
}
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(
- bool fallback) override {
+ scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override {
EXPECT_TRUE(false);
return nullptr;
}
- virtual void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
+ void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int request_count_;
};
@@ -416,11 +410,11 @@
FailedCreateDoesNotCreateExtraOutputSurface()
: LayerTreeHostContextTest(), request_count_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->single_thread_proxy_scheduler = false;
}
- virtual void RequestNewOutputSurface(bool fallback) override {
+ void RequestNewOutputSurface(bool fallback) override {
if (request_count_ == 0) {
ExpectCreateToFail();
layer_tree_host()->SetOutputSurface(nullptr);
@@ -429,20 +423,19 @@
EndTest();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
layer_tree_host()->Composite(base::TimeTicks());
layer_tree_host()->Composite(base::TimeTicks());
}
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(
- bool fallback) override {
+ scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) override {
EXPECT_TRUE(false);
return nullptr;
}
- virtual void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
+ void DidInitializeOutputSurface() override { EXPECT_TRUE(false); }
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int request_count_;
};
@@ -452,7 +445,7 @@
class LayerTreeHostContextTestLostContextSucceedsWithContent
: public LayerTreeHostContextTestLostContextSucceeds {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = Layer::Create();
root_->SetBounds(gfx::Size(10, 10));
root_->SetIsDrawable(true);
@@ -475,7 +468,7 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void InvalidateAndSetNeedsCommit() override {
+ void InvalidateAndSetNeedsCommit() override {
// Invalidate the render surface so we don't try to use a cached copy of the
// surface. We want to make sure to test the drawing paths for drawing to
// a child surface.
@@ -483,7 +476,7 @@
LayerTreeHostContextTestLostContextSucceeds::InvalidateAndSetNeedsCommit();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
if (!host_impl->settings().impl_side_painting) {
FakeContentLayerImpl* content_impl = static_cast<FakeContentLayerImpl*>(
host_impl->active_tree()->root_layer()->children()[0]);
@@ -523,12 +516,10 @@
times_to_fail_create_ = times_to_fail_;
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
scoped_ptr<FakeOutputSurface> surface =
LayerTreeHostContextTest::CreateFakeOutputSurface(fallback);
@@ -539,13 +530,11 @@
return surface.Pass();
}
- virtual void DidInitializeOutputSurface() override { times_initialized_++; }
+ void DidInitializeOutputSurface() override { times_initialized_++; }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
- EndTest();
- }
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { EndTest(); }
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(times_to_fail_, times_create_failed_);
EXPECT_NE(0, times_initialized_);
EXPECT_EQ(expect_fallback_attempt_, did_attempt_fallback_);
@@ -589,7 +578,7 @@
num_commits_(0),
lost_context_(false) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
// Paint non-solid color.
SkPaint paint;
paint.setColor(SkColorSetARGB(100, 80, 200, 200));
@@ -608,7 +597,7 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void PostEvictTextures() {
if (HasImplThread()) {
@@ -632,7 +621,7 @@
}
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (num_commits_ > 1)
return;
if (!layer_tree_host()->settings().impl_side_painting) {
@@ -641,7 +630,7 @@
PostEvictTextures();
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
if (num_commits_ > 1)
return;
@@ -652,7 +641,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (impl->settings().impl_side_painting) {
FakePictureLayerImpl* picture_impl =
static_cast<FakePictureLayerImpl*>(impl->active_tree()->root_layer());
@@ -668,9 +657,9 @@
EndTest();
}
- virtual void DidInitializeOutputSurface() override {}
+ void DidInitializeOutputSurface() override {}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
protected:
bool lose_after_evict_;
@@ -755,7 +744,7 @@
LayerTreeHostContextTestLostContextWhileUpdatingResources()
: num_children_(50), times_to_lose_on_end_query_(3) {}
- virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() override {
+ scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() override {
scoped_ptr<TestWebGraphicsContext3D> context =
LayerTreeHostContextTest::CreateContext3d();
if (times_to_lose_on_end_query_) {
@@ -765,7 +754,7 @@
return context.Pass();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
if (layer_tree_host()->settings().impl_side_painting)
parent_ = FakePictureLayer::Create(&client_);
else
@@ -788,16 +777,14 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
EXPECT_EQ(0, times_to_lose_on_end_query_);
EndTest();
}
- virtual void AfterTest() override {
- EXPECT_EQ(0, times_to_lose_on_end_query_);
- }
+ void AfterTest() override { EXPECT_EQ(0, times_to_lose_on_end_query_); }
private:
FakeContentLayerClient client_;
@@ -814,7 +801,7 @@
LayerTreeHostContextTestLayersNotified()
: LayerTreeHostContextTest(), num_commits_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
if (layer_tree_host()->settings().impl_side_painting) {
root_ = FakePictureLayer::Create(&client_);
child_ = FakePictureLayer::Create(&client_);
@@ -832,9 +819,9 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
LayerTreeHostContextTest::DidActivateTreeOnThread(host_impl);
FakePictureLayerImpl* root_picture = NULL;
@@ -896,7 +883,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
int num_commits_;
@@ -931,7 +918,7 @@
static void EmptyReleaseCallback(unsigned sync_point, bool lost) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
gpu::gles2::GLES2Interface* gl =
child_output_surface_->context_provider()->ContextGL();
@@ -1044,16 +1031,15 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(host_impl);
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
if (host_impl->active_tree()->source_frame_number() == 2) {
// Lose the context during draw on the second commit. This will cause
// a third commit to recover.
@@ -1062,8 +1048,8 @@
return draw_result;
}
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
// This will get called twice:
// First when we create the initial output surface...
if (layer_tree_host()->source_frame_number() > 0) {
@@ -1073,7 +1059,7 @@
return LayerTreeHostContextTest::CreateFakeOutputSurface(fallback);
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
ASSERT_TRUE(layer_tree_host()->hud_layer());
// End the test once we know the 3nd frame drew.
if (layer_tree_host()->source_frame_number() < 5) {
@@ -1084,7 +1070,7 @@
}
}
- virtual void AfterTest() override { EXPECT_TRUE(lost_context_); }
+ void AfterTest() override { EXPECT_TRUE(lost_context_); }
private:
FakeContentLayerClient client_;
@@ -1105,7 +1091,7 @@
class ImplSidePaintingLayerTreeHostContextTest
: public LayerTreeHostContextTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
};
@@ -1113,7 +1099,7 @@
class LayerTreeHostContextTestImplSidePainting
: public ImplSidePaintingLayerTreeHostContextTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
@@ -1127,14 +1113,14 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
times_to_lose_during_commit_ = 1;
PostSetNeedsCommitToMainThread();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
- virtual void DidInitializeOutputSurface() override { EndTest(); }
+ void DidInitializeOutputSurface() override { EndTest(); }
private:
FakeContentLayerClient client_;
@@ -1146,7 +1132,7 @@
public:
ScrollbarLayerLostContext() : commits_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
scoped_refptr<Layer> scroll_layer = Layer::Create();
scrollbar_layer_ =
FakePaintedScrollbarLayer::Create(false, true, scroll_layer->id());
@@ -1156,9 +1142,9 @@
PostSetNeedsCommitToMainThread();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
++commits_;
@@ -1190,11 +1176,11 @@
class UIResourceLostTest : public LayerTreeHostContextTest {
public:
UIResourceLostTest() : time_step_(0) {}
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->texture_id_allocation_chunk_size = 1;
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void AfterTest() override {}
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void AfterTest() override {}
// This is called on the main thread after each commit and
// DidActivateTreeOnThread, with the value of time_step_ at the time
@@ -1241,7 +1227,7 @@
// activated.
virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) = 0;
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
if (!layer_tree_host()->settings().impl_side_painting) {
StepCompleteOnImplThread(impl);
PostStepCompleteToMainThread();
@@ -1249,7 +1235,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
if (layer_tree_host()->settings().impl_side_painting) {
StepCompleteOnImplThread(impl);
PostStepCompleteToMainThread();
@@ -1261,7 +1247,7 @@
// Losing context after an UI resource has been created.
class UIResourceLostAfterCommit : public UIResourceLostTestSimple {
public:
- virtual void StepCompleteOnMainThread(int step) override {
+ void StepCompleteOnMainThread(int step) override {
EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
switch (step) {
case 0:
@@ -1281,7 +1267,7 @@
}
}
- virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
+ void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (time_step_) {
case 1:
@@ -1320,7 +1306,7 @@
public:
UIResourceLostBeforeCommit() : test_id0_(0), test_id1_(0) {}
- virtual void StepCompleteOnMainThread(int step) override {
+ void StepCompleteOnMainThread(int step) override {
switch (step) {
case 0:
ui_resource_ = FakeScopedUIResource::Create(layer_tree_host());
@@ -1370,7 +1356,7 @@
}
}
- virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
+ void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (time_step_) {
case 1:
@@ -1416,7 +1402,7 @@
// Losing UI resource before the pending trees is activated but after the
// commit. Impl-side-painting only.
class UIResourceLostBeforeActivateTree : public UIResourceLostTest {
- virtual void StepCompleteOnMainThread(int step) override {
+ void StepCompleteOnMainThread(int step) override {
EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
switch (step) {
case 0:
@@ -1439,7 +1425,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (time_step_) {
case 2:
@@ -1451,7 +1437,7 @@
}
}
- virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
switch (time_step_) {
case 1:
// The resource creation callback has been called.
@@ -1468,7 +1454,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::DidActivateTreeOnThread(impl);
switch (time_step_) {
case 1:
@@ -1507,7 +1493,7 @@
// Resources evicted explicitly and by visibility changes.
class UIResourceLostEviction : public UIResourceLostTestSimple {
public:
- virtual void StepCompleteOnMainThread(int step) override {
+ void StepCompleteOnMainThread(int step) override {
EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
switch (step) {
case 0:
@@ -1529,8 +1515,7 @@
}
}
- virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* impl,
- bool visible) override {
+ void DidSetVisibleOnImplTree(LayerTreeHostImpl* impl, bool visible) override {
TestWebGraphicsContext3D* context = TestContext();
if (!visible) {
// All resources should have been evicted.
@@ -1546,7 +1531,7 @@
}
}
- virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
+ void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override {
TestWebGraphicsContext3D* context = TestContext();
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (time_step_) {
@@ -1594,7 +1579,7 @@
LayerTreeHostContextTestSurfaceCreateCallback()
: LayerTreeHostContextTest() {}
- virtual void SetupTree() override {
+ void SetupTree() override {
if (layer_tree_host()->settings().impl_side_painting) {
picture_layer_ = FakePictureLayer::Create(&client_);
picture_layer_->SetBounds(gfx::Size(10, 20));
@@ -1608,9 +1593,9 @@
LayerTreeHostContextTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
if (layer_tree_host()->settings().impl_side_painting)
@@ -1642,7 +1627,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
LayerTreeHostContextTest::CommitCompleteOnThread(impl);
switch (LastCommittedSourceFrameNumber(impl)) {
case 0:
@@ -1658,7 +1643,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
protected:
FakeContentLayerClient client_;
@@ -1671,12 +1656,12 @@
class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
: public LayerTreeHostContextTest {
protected:
- virtual void BeginTest() override {
+ void BeginTest() override {
deferred_ = false;
PostSetNeedsCommitToMainThread();
}
- virtual void ScheduledActionWillSendBeginMainFrame() override {
+ void ScheduledActionWillSendBeginMainFrame() override {
if (deferred_)
return;
deferred_ = true;
@@ -1712,14 +1697,14 @@
layer_tree_host()->SetDeferCommits(defer_commits);
}
- virtual void WillBeginMainFrame() override {
+ void WillBeginMainFrame() override {
// Don't begin a frame with a lost surface.
EXPECT_FALSE(layer_tree_host()->output_surface_lost());
}
- virtual void DidCommitAndDrawFrame() override { EndTest(); }
+ void DidCommitAndDrawFrame() override { EndTest(); }
- virtual void AfterTest() override {}
+ void AfterTest() override {}
bool deferred_;
};
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 860f283..1b68cca 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -21,7 +21,7 @@
class LayerTreeHostCopyRequestTestMultipleRequests
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root = FakeContentLayer::Create(&client_);
root->SetBounds(gfx::Size(20, 20));
@@ -33,9 +33,9 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override { WaitForCallback(); }
+ void DidCommitAndDrawFrame() override { WaitForCallback(); }
void WaitForCallback() {
base::MessageLoop::current()->PostTask(
@@ -101,10 +101,10 @@
callbacks_.push_back(result->size());
}
- virtual void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); }
+ void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); }
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
if (use_gl_renderer_)
return FakeOutputSurface::Create3d();
return FakeOutputSurface::CreateSoftware(
@@ -146,7 +146,7 @@
class LayerTreeHostCopyRequestTestLayerDestroyed
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -162,12 +162,12 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
callback_count_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
int frame = layer_tree_host()->source_frame_number();
switch (frame) {
case 1:
@@ -224,7 +224,7 @@
++callback_count_;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int callback_count_;
FakeContentLayerClient client_;
@@ -238,7 +238,7 @@
class LayerTreeHostCopyRequestTestInHiddenSubtree
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -267,7 +267,7 @@
base::Unretained(this))));
}
- virtual void BeginTest() override {
+ void BeginTest() override {
callback_count_ = 0;
PostSetNeedsCommitToMainThread();
@@ -321,7 +321,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int callback_count_;
FakeContentLayerClient client_;
@@ -337,7 +337,7 @@
class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -360,7 +360,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
did_draw_ = false;
PostSetNeedsCommitToMainThread();
@@ -377,7 +377,7 @@
EndTest();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
Renderer* renderer = host_impl->renderer();
LayerImpl* root = host_impl->active_tree()->root_layer();
@@ -398,7 +398,7 @@
did_draw_ = true;
}
- virtual void AfterTest() override { EXPECT_TRUE(did_draw_); }
+ void AfterTest() override { EXPECT_TRUE(did_draw_); }
FakeContentLayerClient client_;
bool did_draw_;
@@ -415,7 +415,7 @@
class LayerTreeHostCopyRequestTestClippedOut
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -433,7 +433,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
PostSetNeedsCommitToMainThread();
copy_layer_->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
@@ -449,7 +449,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> root_;
@@ -463,7 +463,7 @@
class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -482,7 +482,7 @@
base::Unretained(this))));
}
- virtual void BeginTest() override {
+ void BeginTest() override {
saw_copy_request_ = false;
callback_count_ = 0;
PostSetNeedsCommitToMainThread();
@@ -493,7 +493,7 @@
AddCopyRequest(copy_layer_.get());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
if (impl->active_tree()->source_frame_number() == 0) {
LayerImpl* root = impl->active_tree()->root_layer();
EXPECT_TRUE(root->children()[0]->HasCopyRequest());
@@ -501,7 +501,7 @@
}
}
- virtual void DidCommit() override {
+ void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
// Allow drawing.
layer_tree_host()->SetViewportSize(gfx::Size(root_->bounds()));
@@ -519,7 +519,7 @@
EndTest();
}
- virtual void AfterTest() override { EXPECT_TRUE(saw_copy_request_); }
+ void AfterTest() override { EXPECT_TRUE(saw_copy_request_); }
bool saw_copy_request_;
int callback_count_;
@@ -534,8 +534,8 @@
class LayerTreeHostCopyRequestTestLostOutputSurface
: public LayerTreeHostCopyRequestTest {
protected:
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
if (!first_context_provider_.get()) {
first_context_provider_ = TestContextProvider::Create();
return FakeOutputSurface::Create3d(first_context_provider_);
@@ -546,7 +546,7 @@
return FakeOutputSurface::Create3d(second_context_provider_);
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -558,7 +558,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
@@ -573,7 +573,7 @@
layer_tree_host()->SetNeedsCommit();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The layers have been pushed to the impl side. The layer textures have
@@ -605,8 +605,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* impl, bool result) override {
switch (impl->active_tree()->source_frame_number()) {
case 0:
// The layers have been drawn, so their textures have been allocated.
@@ -646,7 +645,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
scoped_refptr<TestContextProvider> first_context_provider_;
scoped_refptr<TestContextProvider> second_context_provider_;
@@ -664,13 +663,13 @@
class LayerTreeHostCopyRequestTestCountTextures
: public LayerTreeHostCopyRequestTest {
protected:
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
- override {
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(
+ bool fallback) override {
context_provider_ = TestContextProvider::Create();
return FakeOutputSurface::Create3d(context_provider_);
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -682,7 +681,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
num_textures_without_readback_ = 0;
num_textures_with_readback_ = 0;
waited_sync_point_after_readback_ = 0;
@@ -691,7 +690,7 @@
virtual void RequestCopy(Layer* layer) = 0;
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
// The layers have been pushed to the impl side. The layer textures have
@@ -701,8 +700,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* impl, bool result) override {
switch (impl->active_tree()->source_frame_number()) {
case 0:
// The layers have been drawn, so their textures have been allocated.
@@ -738,7 +736,7 @@
class LayerTreeHostCopyRequestTestCreatesTexture
: public LayerTreeHostCopyRequestTestCountTextures {
protected:
- virtual void RequestCopy(Layer* layer) override {
+ void RequestCopy(Layer* layer) override {
// Request a normal texture copy. This should create a new texture.
copy_layer_->RequestCopyOfOutput(
CopyOutputRequest::CreateRequest(base::Bind(
@@ -758,7 +756,7 @@
release->Run(0, false);
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// No sync point was needed.
EXPECT_EQ(0u, waited_sync_point_after_readback_);
// Except the copy to have made another texture.
@@ -772,7 +770,7 @@
class LayerTreeHostCopyRequestTestProvideTexture
: public LayerTreeHostCopyRequestTestCountTextures {
protected:
- virtual void BeginTest() override {
+ void BeginTest() override {
external_context_provider_ = TestContextProvider::Create();
EXPECT_TRUE(external_context_provider_->BindToCurrentThread());
LayerTreeHostCopyRequestTestCountTextures::BeginTest();
@@ -788,7 +786,7 @@
EXPECT_FALSE(release);
}
- virtual void RequestCopy(Layer* layer) override {
+ void RequestCopy(Layer* layer) override {
// Request a copy to a provided texture. This should not create a new
// texture.
scoped_ptr<CopyOutputRequest> request =
@@ -807,7 +805,7 @@
copy_layer_->RequestCopyOfOutput(request.Pass());
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// Expect the compositor to have waited for the sync point in the provided
// TextureMailbox.
EXPECT_EQ(sync_point_, waited_sync_point_after_readback_);
@@ -825,7 +823,7 @@
class LayerTreeHostCopyRequestTestDestroyBeforeCopy
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -837,7 +835,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
callback_count_ = 0;
PostSetNeedsCommitToMainThread();
}
@@ -847,7 +845,7 @@
++callback_count_;
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&LayerTreeHostCopyRequestTestDestroyBeforeCopy::DidActivate,
@@ -888,7 +886,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int callback_count_;
FakeContentLayerClient client_;
@@ -902,7 +900,7 @@
class LayerTreeHostCopyRequestTestShutdownBeforeCopy
: public LayerTreeHostCopyRequestTest {
protected:
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
root_->SetBounds(gfx::Size(20, 20));
@@ -914,7 +912,7 @@
LayerTreeHostCopyRequestTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
callback_count_ = 0;
PostSetNeedsCommitToMainThread();
}
@@ -924,7 +922,7 @@
++callback_count_;
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&LayerTreeHostCopyRequestTestShutdownBeforeCopy::DidActivate,
@@ -959,7 +957,7 @@
}
}
- virtual void AfterTest() override { EXPECT_EQ(1, callback_count_); }
+ void AfterTest() override { EXPECT_EQ(1, callback_count_); }
int callback_count_;
FakeContentLayerClient client_;
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index d231553..d541751 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -26,7 +26,7 @@
// LayerTreeHost::SetNeedsRedraw should damage the whole viewport.
class LayerTreeHostDamageTestSetNeedsRedraw
: public LayerTreeHostDamageTest {
- virtual void SetupTree() override {
+ void SetupTree() override {
// Viewport is 10x10.
scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_);
root->SetBounds(gfx::Size(10, 10));
@@ -35,12 +35,12 @@
LayerTreeHostDamageTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
draw_count_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
layer_tree_host()->SetNeedsRedraw();
@@ -48,10 +48,9 @@
}
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
@@ -77,7 +76,7 @@
return draw_result;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int draw_count_;
FakeContentLayerClient client_;
@@ -88,7 +87,7 @@
// LayerTreeHost::SetViewportSize should damage the whole viewport.
class LayerTreeHostDamageTestSetViewportSize
: public LayerTreeHostDamageTest {
- virtual void SetupTree() override {
+ void SetupTree() override {
// Viewport is 10x10.
scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_);
root->SetBounds(gfx::Size(10, 10));
@@ -97,12 +96,12 @@
LayerTreeHostDamageTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
draw_count_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->source_frame_number()) {
case 1:
layer_tree_host()->SetViewportSize(gfx::Size(15, 15));
@@ -110,10 +109,9 @@
}
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
@@ -139,7 +137,7 @@
return draw_result;
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
int draw_count_;
FakeContentLayerClient client_;
@@ -149,14 +147,14 @@
class LayerTreeHostDamageTestNoDamageDoesNotSwap
: public LayerTreeHostDamageTest {
- virtual void BeginTest() override {
+ void BeginTest() override {
expect_swap_and_succeed_ = 0;
did_swaps_ = 0;
did_swap_and_succeed_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_);
root->SetBounds(gfx::Size(10, 10));
@@ -169,10 +167,9 @@
LayerTreeHostDamageTest::SetupTree();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
int source_frame = host_impl->active_tree()->source_frame_number();
@@ -197,15 +194,14 @@
return draw_result;
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
++did_swaps_;
if (result)
++did_swap_and_succeed_;
EXPECT_EQ(expect_swap_and_succeed_, did_swap_and_succeed_);
}
- virtual void DidCommit() override {
+ void DidCommit() override {
int next_frame = layer_tree_host()->source_frame_number();
switch (next_frame) {
case 1:
@@ -224,7 +220,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(4, did_swaps_);
EXPECT_EQ(2, expect_swap_and_succeed_);
EXPECT_EQ(expect_swap_and_succeed_, did_swap_and_succeed_);
@@ -241,11 +237,9 @@
LayerTreeHostDamageTestNoDamageDoesNotSwap);
class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = FakeContentLayer::Create(&client_);
child_ = FakeContentLayer::Create(&client_);
@@ -258,10 +252,9 @@
LayerTreeHostDamageTest::SetupTree();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
@@ -334,7 +327,7 @@
return draw_result;
}
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
if (!TestEnded())
layer_tree_host()->SetNeedsCommit();
@@ -344,7 +337,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> root_;
@@ -355,7 +348,7 @@
SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostDamageTestForcedFullDamage);
class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(400, 400));
root_layer->SetMasksToBounds(true);
@@ -395,15 +388,14 @@
class LayerTreeHostDamageTestScrollbarDoesDamage
: public LayerTreeHostScrollbarDamageTest {
- virtual void BeginTest() override {
+ void BeginTest() override {
did_swaps_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
host_impl->active_tree()->root_layer()->render_surface();
@@ -431,8 +423,7 @@
return draw_result;
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
++did_swaps_;
EXPECT_TRUE(result);
LayerImpl* root = host_impl->active_tree()->root_layer();
@@ -458,9 +449,7 @@
}
}
- virtual void AfterTest() override {
- EXPECT_EQ(4, did_swaps_);
- }
+ void AfterTest() override { EXPECT_EQ(4, did_swaps_); }
int did_swaps_;
};
@@ -469,15 +458,14 @@
class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage
: public LayerTreeHostScrollbarDamageTest {
- virtual void BeginTest() override {
+ void BeginTest() override {
did_swaps_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
RenderSurfaceImpl* root_surface =
host_impl->active_tree()->root_layer()->render_surface();
@@ -507,8 +495,7 @@
return draw_result;
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
++did_swaps_;
EXPECT_TRUE(result);
LayerImpl* root = host_impl->active_tree()->root_layer();
@@ -535,9 +522,7 @@
}
}
- virtual void AfterTest() override {
- EXPECT_EQ(3, did_swaps_);
- }
+ void AfterTest() override { EXPECT_EQ(3, did_swaps_); }
int did_swaps_;
};
@@ -546,16 +531,13 @@
class LayerTreeHostDamageTestVisibleTilesStillTriggerDraws
: public LayerTreeHostDamageTest {
-
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<FakePictureLayer> root = FakePictureLayer::Create(&client_);
root->SetBounds(gfx::Size(500, 500));
layer_tree_host()->SetRootLayer(root);
@@ -566,10 +548,9 @@
update_visible_tile_count_ = 0;
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
prepare_to_draw_count_++;
switch (prepare_to_draw_count_) {
@@ -599,8 +580,7 @@
return draw_result;
}
- virtual void UpdateVisibleTilesOnThread(
- LayerTreeHostImpl* host_impl) override {
+ void UpdateVisibleTilesOnThread(LayerTreeHostImpl* host_impl) override {
// Simulate creating some visible tiles (that trigger prepare-to-draws).
// The first we make into a no-damage-frame during prepare-to-draw (see
// above). This is to ensure we still get UpdateVisibleTiles calls after
@@ -617,14 +597,14 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool didSwap) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
+ bool didSwap) override {
if (!didSwap)
return;
++swap_count_;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
// We should keep getting update-visible-tiles calls
// until we report there are no more incomplete-tiles.
EXPECT_EQ(update_visible_tile_count_, 6);
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index 018df87..3aabeff 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -252,7 +252,7 @@
resource_collection_->SetClient(this);
}
- virtual void SetupTree() override {
+ void SetupTree() override {
root_ = Layer::Create();
root_->SetBounds(gfx::Size(15, 15));
@@ -260,7 +260,7 @@
LayerTreeHostDelegatedTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
resource_collection_->SetClient(this);
PostSetNeedsCommitToMainThread();
}
@@ -297,10 +297,10 @@
return delegated;
}
- virtual void AfterTest() override { resource_collection_->SetClient(NULL); }
+ void AfterTest() override { resource_collection_->SetClient(NULL); }
// DelegatedFrameProviderClient implementation.
- virtual void UnusedResourcesAreAvailable() override { available_ = true; }
+ void UnusedResourcesAreAvailable() override { available_ = true; }
bool TestAndResetAvailable() {
bool available = available_;
@@ -324,13 +324,13 @@
num_activates_(0),
did_reset_child_id_(false) {}
- virtual void DidCommit() override {
+ void DidCommit() override {
if (TestEnded())
return;
SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1)));
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() < 1)
return;
@@ -360,8 +360,8 @@
}
}
- virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
- bool success) override {
+ void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
+ bool success) override {
EXPECT_TRUE(success);
if (num_activates_ < 2)
@@ -392,7 +392,7 @@
LayerTreeHostDelegatedTestInvalidFrameAfterContextLost()
: num_activates_(0), num_output_surfaces_initialized_(0) {}
- virtual void DidCommit() override {
+ void DidCommit() override {
if (TestEnded())
return;
scoped_ptr<DelegatedFrameData> frame1 =
@@ -402,7 +402,7 @@
SetFrameData(frame1.Pass());
}
- virtual void DidInitializeOutputSurface() override {
+ void DidInitializeOutputSurface() override {
if (!num_output_surfaces_initialized_++)
return;
@@ -415,7 +415,7 @@
DCHECK(delegated_.get() == old_delegated.get());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() < 1)
return;
@@ -435,8 +435,8 @@
}
}
- virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
- bool success) override {
+ void InitializedRendererOnThread(LayerTreeHostImpl* host_impl,
+ bool success) override {
EXPECT_TRUE(success);
if (num_activates_ < 2)
@@ -451,7 +451,7 @@
EXPECT_EQ(0U, delegated_impl->Resources().size());
}
- virtual void AfterTest() override {
+ void AfterTest() override {
LayerTreeHostDelegatedTestCaseSingleDelegatedLayer::AfterTest();
EXPECT_EQ(2, num_output_surfaces_initialized_);
}
@@ -471,7 +471,7 @@
: LayerTreeHostDelegatedTestCaseSingleDelegatedLayer(),
first_draw_for_source_frame_(true) {}
- virtual void DidCommit() override {
+ void DidCommit() override {
int next_source_frame_number = layer_tree_host()->source_frame_number();
switch (next_source_frame_number) {
case 1:
@@ -581,10 +581,9 @@
first_draw_for_source_frame_ = true;
}
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
EXPECT_EQ(DRAW_SUCCESS, draw_result);
if (!first_draw_for_source_frame_)
@@ -675,7 +674,7 @@
class LayerTreeHostDelegatedTestMergeResources
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
+ void BeginTest() override {
// Push two frames to the delegated renderer layer with no commit between.
// The first frame has resource 999.
@@ -708,7 +707,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* root_impl = host_impl->active_tree()->root_layer();
FakeDelegatedRendererLayerImpl* delegated_impl =
static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]);
@@ -735,7 +734,7 @@
class LayerTreeHostDelegatedTestRemapResourcesInQuads
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
+ void BeginTest() override {
// Generate a frame with two resources in it.
scoped_ptr<DelegatedFrameData> frame =
CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1));
@@ -748,7 +747,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
LayerImpl* root_impl = host_impl->active_tree()->root_layer();
FakeDelegatedRendererLayerImpl* delegated_impl =
static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]);
@@ -784,11 +783,9 @@
class LayerTreeHostDelegatedTestReturnUnusedResources
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -856,8 +853,7 @@
EXPECT_FALSE(TestAndResetAvailable());
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -868,11 +864,9 @@
class LayerTreeHostDelegatedTestReusedResources
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -928,8 +922,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -939,11 +932,9 @@
class LayerTreeHostDelegatedTestFrameBeforeAck
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -998,7 +989,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() != 3)
return;
@@ -1028,8 +1019,7 @@
EndTest();
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -1039,11 +1029,9 @@
class LayerTreeHostDelegatedTestFrameBeforeTakeResources
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1110,7 +1098,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() != 3)
return;
@@ -1147,8 +1135,7 @@
EXPECT_EQ(map.find(444)->second, quad3->resource_id);
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -1159,11 +1146,9 @@
class LayerTreeHostDelegatedTestBadFrame
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1230,8 +1215,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
if (host_impl->active_tree()->source_frame_number() < 1)
return;
@@ -1313,11 +1297,9 @@
class LayerTreeHostDelegatedTestUnnamedResource
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1353,7 +1335,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() != 1)
return;
@@ -1379,11 +1361,9 @@
class LayerTreeHostDelegatedTestDontLeakResource
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1431,7 +1411,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() != 1)
return;
@@ -1451,8 +1431,7 @@
EXPECT_EQ(1u, delegated_impl->Resources().count(555));
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -1462,7 +1441,7 @@
class LayerTreeHostDelegatedTestResourceSentToParent
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1517,7 +1496,7 @@
host_impl->ReclaimResources(&ack);
}
- virtual void UnusedResourcesAreAvailable() override {
+ void UnusedResourcesAreAvailable() override {
EXPECT_EQ(3, layer_tree_host()->source_frame_number());
ReturnedResourceArray resources;
@@ -1532,7 +1511,7 @@
EndTest();
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() < 1)
return;
@@ -1593,13 +1572,13 @@
class LayerTreeHostDelegatedTestCommitWithoutTake
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override {
+ void BeginTest() override {
// Prevent drawing with resources that are sent to the grandparent.
layer_tree_host()->SetViewportSize(gfx::Size());
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1665,7 +1644,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
if (host_impl->active_tree()->source_frame_number() < 1)
return;
@@ -1715,7 +1694,7 @@
protected:
DelegatedFrameIsActivatedDuringCommit() : returned_resource_count_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
activate_count_ = 0;
scoped_ptr<DelegatedFrameData> frame =
@@ -1727,11 +1706,11 @@
PostSetNeedsCommitToMainThread();
}
- virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
++activate_count_;
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 1: {
// The first frame has been activated. Set a new frame, and
@@ -1758,7 +1737,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
switch (host_impl->active_tree()->source_frame_number()) {
case 0: {
// The activate for the 1st frame should have happened before now.
@@ -1782,12 +1761,11 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
- virtual void UnusedResourcesAreAvailable() override {
+ void UnusedResourcesAreAvailable() override {
LayerTreeHostDelegatedTestCaseSingleDelegatedLayer::
UnusedResourcesAreAvailable();
ReturnedResourceArray resources;
@@ -1808,9 +1786,9 @@
class LayerTreeHostDelegatedTestTwoImplLayers
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1857,8 +1835,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -1868,9 +1845,9 @@
class LayerTreeHostDelegatedTestTwoImplLayersTwoFrames
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -1926,8 +1903,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
};
@@ -1938,9 +1914,9 @@
class LayerTreeHostDelegatedTestTwoLayers
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -2013,8 +1989,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
@@ -2026,9 +2001,9 @@
class LayerTreeHostDelegatedTestRemoveAndAddToTree
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -2105,8 +2080,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
@@ -2118,9 +2092,9 @@
class LayerTreeHostDelegatedTestRemoveAndChangeResources
: public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer {
public:
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommitAndDrawFrame() override {
+ void DidCommitAndDrawFrame() override {
scoped_ptr<DelegatedFrameData> frame;
ReturnedResourceArray resources;
@@ -2187,8 +2161,7 @@
}
}
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) override {
+ void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
ReturnUnusedResourcesFromParent(host_impl);
}
diff --git a/cc/trees/layer_tree_host_unittest_no_message_loop.cc b/cc/trees/layer_tree_host_unittest_no_message_loop.cc
index 4930e86..aa5a508 100644
--- a/cc/trees/layer_tree_host_unittest_no_message_loop.cc
+++ b/cc/trees/layer_tree_host_unittest_no_message_loop.cc
@@ -28,10 +28,10 @@
class NoMessageLoopOutputSurface : public OutputSurface {
public:
NoMessageLoopOutputSurface() : OutputSurface(TestContextProvider::Create()) {}
- virtual ~NoMessageLoopOutputSurface() {}
+ ~NoMessageLoopOutputSurface() override {}
// OutputSurface overrides.
- virtual void SwapBuffers(CompositorFrame* frame) override {
+ void SwapBuffers(CompositorFrame* frame) override {
DCHECK(client_);
client_->DidSwapBuffers();
client_->DidSwapBuffersComplete();
@@ -53,34 +53,32 @@
virtual ~LayerTreeHostNoMessageLoopTest() {}
// LayerTreeHostClient overrides.
- virtual void WillBeginMainFrame(int frame_id) override {}
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {}
- virtual void DidBeginMainFrame() override {}
- virtual void Layout() override {}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
- const gfx::Vector2d& outer_delta,
- float page_scale,
- float top_controls_delta) override {}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float page_scale,
- float top_controls_delta) override {}
- virtual void RequestNewOutputSurface(bool fallback) override {
+ void WillBeginMainFrame(int frame_id) override {}
+ void BeginMainFrame(const BeginFrameArgs& args) override {}
+ void DidBeginMainFrame() override {}
+ void Layout() override {}
+ void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
+ const gfx::Vector2d& outer_delta,
+ float page_scale,
+ float top_controls_delta) override {}
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float page_scale,
+ float top_controls_delta) override {}
+ void RequestNewOutputSurface(bool fallback) override {
layer_tree_host_->SetOutputSurface(
make_scoped_ptr<OutputSurface>(new NoMessageLoopOutputSurface));
}
- virtual void DidInitializeOutputSurface() override {
+ void DidInitializeOutputSurface() override {
did_initialize_output_surface_ = true;
}
- virtual void WillCommit() override {}
- virtual void DidCommit() override { did_commit_ = true; }
- virtual void DidCommitAndDrawFrame() override {
- did_commit_and_draw_frame_ = true;
- }
- virtual void DidCompleteSwapBuffers() override {}
+ void WillCommit() override {}
+ void DidCommit() override { did_commit_ = true; }
+ void DidCommitAndDrawFrame() override { did_commit_and_draw_frame_ = true; }
+ void DidCompleteSwapBuffers() override {}
// LayerTreeHostSingleThreadClient overrides.
- virtual void DidPostSwapBuffers() override {}
- virtual void DidAbortSwapBuffers() override {}
+ void DidPostSwapBuffers() override {}
+ void DidAbortSwapBuffers() override {}
void RunTest() {
no_loop_thread_.Start();
@@ -88,7 +86,7 @@
}
// base::DelegateSimpleThread::Delegate override.
- virtual void Run() override {
+ void Run() override {
ASSERT_FALSE(base::MessageLoopProxy::current().get());
RunTestWithoutMessageLoop();
EXPECT_FALSE(base::MessageLoopProxy::current().get());
@@ -137,7 +135,7 @@
class LayerTreeHostNoMessageLoopSmokeTest
: public LayerTreeHostNoMessageLoopTest {
protected:
- virtual void RunTestWithoutMessageLoop() override {
+ void RunTestWithoutMessageLoop() override {
gfx::Size size(100, 100);
// Set up root layer.
@@ -164,7 +162,7 @@
: public LayerTreeHostNoMessageLoopTest,
public DelegatedFrameResourceCollectionClient {
protected:
- virtual void RunTestWithoutMessageLoop() override {
+ void RunTestWithoutMessageLoop() override {
resource_collection_ = new DelegatedFrameResourceCollection;
frame_provider_ = new DelegatedFrameProvider(
resource_collection_.get(), CreateFrameDataWithResource(998));
@@ -198,7 +196,7 @@
}
// DelegatedFrameResourceCollectionClient overrides.
- virtual void UnusedResourcesAreAvailable() override {}
+ void UnusedResourcesAreAvailable() override {}
private:
scoped_ptr<DelegatedFrameData> CreateFrameDataWithResource(
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 3e22f04..fe87e44 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -19,8 +19,8 @@
return make_scoped_refptr(new TestLayer());
}
- virtual bool Update(ResourceUpdateQueue* update_queue,
- const OcclusionTracker<Layer>* occlusion) override {
+ bool Update(ResourceUpdateQueue* update_queue,
+ const OcclusionTracker<Layer>* occlusion) override {
if (!occlusion)
return false;
@@ -44,7 +44,7 @@
TestLayer() : Layer() {
SetIsDrawable(true);
}
- virtual ~TestLayer() {}
+ ~TestLayer() override {}
SimpleEnclosedRegion occlusion_;
SimpleEnclosedRegion expected_occlusion_;
@@ -60,18 +60,16 @@
mask_(TestLayer::Create()) {
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
TestLayer* root = static_cast<TestLayer*>(layer_tree_host()->root_layer());
VerifyOcclusion(root);
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
void VerifyOcclusion(TestLayer* layer) const {
EXPECT_EQ(layer->expected_occlusion().ToString(),
@@ -99,7 +97,7 @@
}
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->minimum_occlusion_tracking_size = gfx::Size();
}
@@ -116,7 +114,7 @@
class LayerTreeHostOcclusionTestOcclusionSurfaceClipping
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// The child layer is a surface and the grand_child is opaque, but clipped
// to the child and root
SetLayerPropertiesForTesting(
@@ -146,7 +144,7 @@
class LayerTreeHostOcclusionTestOcclusionSurfaceClippingOpaque
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer is opaque, then it adds to the occlusion seen by the
// root_.
SetLayerPropertiesForTesting(
@@ -176,7 +174,7 @@
class LayerTreeHostOcclusionTestOcclusionTwoChildren
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// Add a second child to the root layer and the regions should merge
SetLayerPropertiesForTesting(
root_.get(), NULL, identity_matrix_,
@@ -209,7 +207,7 @@
class LayerTreeHostOcclusionTestOcclusionMask
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a mask on it, then it shouldn't contribute to
// occlusion on stuff below it.
SetLayerPropertiesForTesting(
@@ -242,7 +240,7 @@
class LayerTreeHostOcclusionTestOcclusionMaskBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with a mask is below child2, then child2 should
// contribute to occlusion on everything, and child shouldn't contribute
// to the root_.
@@ -278,7 +276,7 @@
class LayerTreeHostOcclusionTestOcclusionOpacity
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a non-opaque opacity, then it shouldn't
// contribute to occlusion on stuff below it
SetLayerPropertiesForTesting(
@@ -311,7 +309,7 @@
class LayerTreeHostOcclusionTestOcclusionOpacityBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with non-opaque opacity is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
@@ -347,7 +345,7 @@
class LayerTreeHostOcclusionTestOcclusionBlending
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a blend mode, then it shouldn't
// contribute to occlusion on stuff below it
SetLayerPropertiesForTesting(
@@ -380,7 +378,7 @@
class LayerTreeHostOcclusionTestOcclusionBlendingBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with a blend mode is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
@@ -415,7 +413,7 @@
class LayerTreeHostOcclusionTestOcclusionOpacityFilter
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
FilterOperations filters;
filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
@@ -467,7 +465,7 @@
class LayerTreeHostOcclusionTestOcclusionBlurFilter
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
gfx::Transform child_transform;
child_transform.Translate(250.0, 250.0);
child_transform.Rotate(90.0);
@@ -511,7 +509,7 @@
public:
static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has copy request, and is below child2,
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
@@ -546,7 +544,7 @@
class LayerTreeHostOcclusionTestOcclusionReplica
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has copy request, and is below child2,
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
@@ -581,7 +579,7 @@
class LayerTreeHostOcclusionTestManySurfaces
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// We create enough RenderSurfaces that it will trigger Vector reallocation
// while computing occlusion.
std::vector<scoped_refptr<TestLayer>> layers;
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
index a79d075..b81fdff 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -16,7 +16,7 @@
// These tests deal with picture layers.
class LayerTreeHostPictureTest : public LayerTreeTest {
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
// PictureLayer can only be used with impl side painting enabled.
settings->impl_side_painting = true;
}
@@ -24,7 +24,7 @@
class LayerTreeHostPictureTestTwinLayer
: public LayerTreeHostPictureTest {
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostPictureTest::SetupTree();
scoped_refptr<FakePictureLayer> picture =
@@ -32,12 +32,12 @@
layer_tree_host()->root_layer()->AddChild(picture);
}
- virtual void BeginTest() override {
+ void BeginTest() override {
activates_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual void DidCommit() override {
+ void DidCommit() override {
switch (layer_tree_host()->source_frame_number()) {
case 2:
// Drop the picture layer from the tree.
@@ -52,7 +52,7 @@
}
}
- virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* pending_root_impl = impl->pending_tree()->root_layer();
LayerImpl* active_root_impl = impl->active_tree()->root_layer();
@@ -88,7 +88,7 @@
EXPECT_EQ(active_picture_impl, pending_picture_impl->twin_layer());
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* active_root_impl = impl->active_tree()->root_layer();
if (active_root_impl->children().empty()) {
@@ -107,7 +107,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
FakeContentLayerClient client_;
int activates_;
diff --git a/cc/trees/layer_tree_host_unittest_proxy.cc b/cc/trees/layer_tree_host_unittest_proxy.cc
index 5993479..f27b553 100644
--- a/cc/trees/layer_tree_host_unittest_proxy.cc
+++ b/cc/trees/layer_tree_host_unittest_proxy.cc
@@ -37,8 +37,8 @@
RunTest(threaded, delegating_renderer, impl_side_painting);
}
- virtual void BeginTest() override {}
- virtual void AfterTest() override {}
+ void BeginTest() override {}
+ void AfterTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(ProxyTest);
@@ -46,30 +46,24 @@
class ProxyTestScheduledActionsBasic : public ProxyTest {
protected:
- virtual void BeginTest() override {
- proxy()->SetNeedsCommit();
- }
+ void BeginTest() override { proxy()->SetNeedsCommit(); }
- virtual void ScheduledActionBeginOutputSurfaceCreation() override {
+ void ScheduledActionBeginOutputSurfaceCreation() override {
EXPECT_EQ(0, action_phase_++);
}
- virtual void ScheduledActionSendBeginMainFrame() override {
+ void ScheduledActionSendBeginMainFrame() override {
EXPECT_EQ(1, action_phase_++);
}
- virtual void ScheduledActionCommit() override {
- EXPECT_EQ(2, action_phase_++);
- }
+ void ScheduledActionCommit() override { EXPECT_EQ(2, action_phase_++); }
- virtual void ScheduledActionDrawAndSwapIfPossible() override {
+ void ScheduledActionDrawAndSwapIfPossible() override {
EXPECT_EQ(3, action_phase_++);
EndTest();
}
- virtual void AfterTest() override {
- EXPECT_EQ(4, action_phase_);
- }
+ void AfterTest() override { EXPECT_EQ(4, action_phase_); }
ProxyTestScheduledActionsBasic() : action_phase_(0) {
}
@@ -109,7 +103,7 @@
ThreadProxyTestSetNeedsCommit() {}
virtual ~ThreadProxyTestSetNeedsCommit() {}
- virtual void BeginTest() override {
+ void BeginTest() override {
EXPECT_FALSE(ThreadProxyMainOnly().commit_requested);
EXPECT_FALSE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread);
@@ -119,7 +113,7 @@
EXPECT_TRUE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread);
}
- virtual void DidBeginMainFrame() override {
+ void DidBeginMainFrame() override {
EXPECT_FALSE(ThreadProxyMainOnly().commit_requested);
EXPECT_FALSE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread);
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 82f3d55..c4f2eb3 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -33,7 +33,7 @@
scroll_amount_(2, -1),
num_scrolls_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<Layer> scroll_layer = Layer::Create();
root_layer->AddChild(scroll_layer);
@@ -48,7 +48,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void Layout() override {
+ void Layout() override {
Layer* root = layer_tree_host()->root_layer();
Layer* scroll_layer = root->children()[0].get();
if (!layer_tree_host()->source_frame_number()) {
@@ -63,7 +63,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
LayerImpl* scroll_layer = root->children()[0];
EXPECT_VECTOR_EQ(gfx::Vector2d(), scroll_layer->ScrollDelta());
@@ -87,13 +87,13 @@
}
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
num_scrolls_++;
}
- virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
+ void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
private:
gfx::ScrollOffset initial_scroll_;
@@ -110,7 +110,7 @@
LayerTreeHostScrollTestScrollMultipleRedraw()
: initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {}
- virtual void BeginTest() override {
+ void BeginTest() override {
Layer* root_layer = layer_tree_host()->root_layer();
scroll_layer_ = Layer::Create();
root_layer->AddChild(scroll_layer_);
@@ -125,7 +125,7 @@
PostSetNeedsCommitToMainThread();
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
switch (layer_tree_host()->source_frame_number()) {
case 0:
EXPECT_VECTOR_EQ(scroll_layer_->scroll_offset(), initial_scroll_);
@@ -144,7 +144,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* scroll_layer =
impl->active_tree()->LayerById(scroll_layer_->id());
if (impl->active_tree()->source_frame_number() == 0 &&
@@ -178,13 +178,13 @@
}
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
num_scrolls_++;
}
- virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
+ void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
private:
gfx::ScrollOffset initial_scroll_;
@@ -210,9 +210,9 @@
num_impl_commits_(0),
num_impl_scrolls_(0) {}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostScrollTest::SetupTree();
Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<Layer> root_scroll_layer = Layer::Create();
@@ -228,7 +228,7 @@
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
}
- virtual void WillBeginMainFrame() override {
+ void WillBeginMainFrame() override {
num_will_begin_main_frames_++;
Layer* root_scroll_layer =
layer_tree_host()->root_layer()->children()[0].get();
@@ -280,17 +280,17 @@
}
}
- virtual void DidBeginMainFrame() override { num_did_begin_main_frames_++; }
+ void DidBeginMainFrame() override { num_did_begin_main_frames_++; }
- virtual void WillCommit() override { num_will_commits_++; }
+ void WillCommit() override { num_will_commits_++; }
- virtual void DidCommit() override { num_did_commits_++; }
+ void DidCommit() override { num_did_commits_++; }
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
num_impl_commits_++;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root_scroll_layer =
impl->active_tree()->root_layer()->children()[0];
@@ -358,13 +358,13 @@
}
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
num_impl_scrolls_++;
}
- virtual void AfterTest() override {
+ void AfterTest() override {
EXPECT_EQ(3, num_impl_scrolls_);
// Verify that the embedder sees aborted commits as real commits.
EXPECT_EQ(4, num_will_begin_main_frames_);
@@ -394,7 +394,7 @@
public:
LayerTreeHostScrollTestFractionalScroll() : scroll_amount_(1.75, 0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostScrollTest::SetupTree();
Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<Layer> root_scroll_layer = Layer::Create();
@@ -411,11 +411,9 @@
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
LayerImpl* scroll_layer = root->children()[0];
@@ -447,7 +445,7 @@
scroll_layer->ScrollBy(scroll_amount_);
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
gfx::Vector2dF scroll_amount_;
@@ -463,7 +461,7 @@
scroll_amount_(2, -1),
num_scrolls_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_);
scoped_refptr<Layer> root_layer = Layer::Create();
@@ -516,9 +514,9 @@
LayerTreeHostScrollTest::SetupTree();
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void WillCommit() override {
+ void WillCommit() override {
// Keep the test committing (otherwise the early out for no update
// will stall the test).
if (layer_tree_host()->source_frame_number() < 2) {
@@ -530,13 +528,13 @@
final_scroll_offset_ = expected_scroll_layer_->scroll_offset();
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
num_scrolls_++;
}
- virtual void Layout() override {
+ void Layout() override {
EXPECT_VECTOR_EQ(gfx::Vector2d(),
expected_no_scroll_layer_->scroll_offset());
@@ -561,7 +559,7 @@
}
}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
+ void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root_impl = impl->active_tree()->root_layer();
FakePictureLayerImpl* root_scroll_layer_impl =
static_cast<FakePictureLayerImpl*>(root_impl->children()[0]);
@@ -632,7 +630,7 @@
}
}
- virtual void AfterTest() override {
+ void AfterTest() override {
if (scroll_child_layer_) {
EXPECT_EQ(0, num_scrolls_);
EXPECT_VECTOR_EQ(gfx::ScrollOffsetWithDelta(javascript_scroll_,
@@ -748,11 +746,11 @@
class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest {
public:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->impl_side_painting = true;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
if (impl->pending_tree())
impl->SetNeedsRedraw();
}
@@ -767,7 +765,7 @@
impl_thread_scroll2_(-3, 10),
num_scrolls_(0) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostScrollTest::SetupTree();
Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<Layer> root_scroll_layer = Layer::Create();
@@ -785,11 +783,9 @@
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void Layout() override {
+ void Layout() override {
Layer* root = layer_tree_host()->root_layer();
Layer* scroll_layer = root->children()[0].get();
if (!layer_tree_host()->source_frame_number()) {
@@ -807,14 +803,14 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
// We force a second draw here of the first commit before activating
// the second commit.
if (impl->active_tree()->source_frame_number() == 0)
impl->SetNeedsRedraw();
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
ImplSidePaintingScrollTest::DrawLayersOnThread(impl);
LayerImpl* root = impl->active_tree()->root_layer();
@@ -872,13 +868,13 @@
}
}
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float scale,
- float top_controls_delta) override {
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float scale,
+ float top_controls_delta) override {
num_scrolls_++;
}
- virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
+ void AfterTest() override { EXPECT_EQ(1, num_scrolls_); }
private:
gfx::ScrollOffset initial_scroll_;
@@ -900,7 +896,7 @@
ImplSidePaintingScrollTestImplOnlyScroll()
: initial_scroll_(20, 10), impl_thread_scroll_(-2, 3) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeHostScrollTest::SetupTree();
Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<Layer> root_scroll_layer = Layer::Create();
@@ -918,11 +914,9 @@
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f);
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void WillCommit() override {
+ void WillCommit() override {
Layer* root = layer_tree_host()->root_layer();
Layer* scroll_layer = root->children()[0].get();
switch (layer_tree_host()->source_frame_number()) {
@@ -938,7 +932,7 @@
}
}
- virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
+ void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
// Scroll after the 2nd commit has started.
if (impl->active_tree()->source_frame_number() == 0) {
LayerImpl* active_root = impl->active_tree()->root_layer();
@@ -949,7 +943,7 @@
}
}
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
+ void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
// We force a second draw here of the first commit before activating
// the second commit.
LayerImpl* active_root = impl->active_tree()->root_layer();
@@ -998,7 +992,7 @@
}
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
ImplSidePaintingScrollTest::DrawLayersOnThread(impl);
LayerImpl* root = impl->active_tree()->root_layer();
@@ -1020,7 +1014,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
private:
gfx::ScrollOffset initial_scroll_;
@@ -1034,15 +1028,15 @@
public:
LayerTreeHostScrollTestScrollZeroMaxScrollOffset() {}
- virtual void SetupTree() override {
+ void SetupTree() override {
LayerTreeTest::SetupTree();
scoped_refptr<Layer> scroll_layer = Layer::Create();
layer_tree_host()->root_layer()->AddChild(scroll_layer);
}
- virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
LayerImpl* scroll_layer = root->children()[0];
scroll_layer->SetScrollClipLayer(root->id());
@@ -1069,7 +1063,7 @@
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(
@@ -1081,26 +1075,25 @@
bool* received_stop_flinging)
: task_runner_(runner), received_stop_flinging_(received_stop_flinging) {}
- virtual void WillShutdown() override {
+ void WillShutdown() override {
if (!received_stop_flinging_)
ADD_FAILURE() << "WillShutdown() called before fling stopped";
}
- virtual void Animate(base::TimeTicks time) override {
+ void Animate(base::TimeTicks time) override {
if (!task_runner_->BelongsToCurrentThread())
ADD_FAILURE() << "Animate called on wrong thread";
}
- virtual void MainThreadHasStoppedFlinging() override {
+ void MainThreadHasStoppedFlinging() override {
if (!task_runner_->BelongsToCurrentThread())
ADD_FAILURE() << "MainThreadHasStoppedFlinging called on wrong thread";
*received_stop_flinging_ = true;
}
- virtual void DidOverscroll(
- const gfx::PointF& causal_event_viewport_point,
- const gfx::Vector2dF& accumulated_overscroll,
- const gfx::Vector2dF& latest_overscroll_delta) override {
+ void DidOverscroll(const gfx::PointF& causal_event_viewport_point,
+ const gfx::Vector2dF& accumulated_overscroll,
+ const gfx::Vector2dF& latest_overscroll_delta) override {
if (!task_runner_->BelongsToCurrentThread())
ADD_FAILURE() << "DidOverscroll called on wrong thread";
}
@@ -1156,7 +1149,7 @@
LayerTreeHostScrollTestLayerStructureChange()
: scroll_destroy_whole_tree_(false) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(10, 10));
@@ -1169,11 +1162,9 @@
LayerTreeHostScrollTest::SetupTree();
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
switch (impl->active_tree()->source_frame_number()) {
case 0:
@@ -1188,7 +1179,7 @@
}
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
virtual void DidScroll(Layer* layer) {
if (scroll_destroy_whole_tree_) {
diff --git a/cc/trees/layer_tree_host_unittest_video.cc b/cc/trees/layer_tree_host_unittest_video.cc
index 8d8b130..ffeda72 100644
--- a/cc/trees/layer_tree_host_unittest_video.cc
+++ b/cc/trees/layer_tree_host_unittest_video.cc
@@ -22,7 +22,7 @@
class LayerTreeHostVideoTestSetNeedsDisplay
: public LayerTreeHostVideoTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
root->SetIsDrawable(true);
@@ -39,14 +39,14 @@
LayerTreeHostVideoTest::SetupTree();
}
- virtual void BeginTest() override {
+ void BeginTest() override {
num_draws_ = 0;
PostSetNeedsCommitToMainThread();
}
- virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame,
+ DrawResult draw_result) override {
LayerImpl* root_layer = host_impl->active_tree()->root_layer();
RenderSurfaceImpl* root_surface = root_layer->render_surface();
gfx::RectF damage_rect =
@@ -70,7 +70,7 @@
return draw_result;
}
- virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
VideoLayerImpl* video = static_cast<VideoLayerImpl*>(
host_impl->active_tree()->root_layer()->children()[0]);
@@ -82,9 +82,7 @@
++num_draws_;
}
- virtual void AfterTest() override {
- EXPECT_EQ(2, num_draws_);
- }
+ void AfterTest() override { EXPECT_EQ(2, num_draws_); }
private:
int num_draws_;
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 5fc01fc..206ec60 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -49,17 +49,16 @@
}
// LayerScrollOffsetDelegate implementation.
- virtual void SetTotalScrollOffset(
- const gfx::ScrollOffset& new_offset) override {
+ void SetTotalScrollOffset(const gfx::ScrollOffset& new_offset) override {
last_set_scroll_offset_ = new_offset;
layer_tree_impl_->UpdateScrollOffsetDelegate();
}
- virtual gfx::ScrollOffset GetTotalScrollOffset() override {
+ gfx::ScrollOffset GetTotalScrollOffset() override {
return layer_tree_impl_->GetDelegatedScrollOffset(layer_);
}
- virtual bool IsExternalFlingActive() const override {
+ bool IsExternalFlingActive() const override {
return delegate_->IsExternalFlingActive();
}
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index f839439..8e11015 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -49,6 +49,7 @@
max_partial_texture_updates(std::numeric_limits<size_t>::max()),
default_tile_size(gfx::Size(256, 256)),
max_untiled_layer_size(gfx::Size(512, 512)),
+ default_tile_grid_size(gfx::Size(256, 256)),
minimum_occlusion_tracking_size(gfx::Size(160, 160)),
use_pinch_zoom_scrollbars(false),
use_pinch_virtual_viewport(false),
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 71cb253..c0c1453 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -60,6 +60,7 @@
size_t max_partial_texture_updates;
gfx::Size default_tile_size;
gfx::Size max_untiled_layer_size;
+ gfx::Size default_tile_grid_size;
gfx::Size minimum_occlusion_tracking_size;
bool use_pinch_zoom_scrollbars;
bool use_pinch_virtual_viewport;
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 6ab3397..75cd243 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -33,7 +33,7 @@
SetIsDrawable(true);
}
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override {
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override {
if (override_opaque_contents_rect_) {
return SimpleEnclosedRegion(
gfx::IntersectRects(opaque_contents_rect_, visible_content_rect()));
@@ -46,7 +46,7 @@
}
private:
- virtual ~TestContentLayer() {}
+ ~TestContentLayer() override {}
bool override_opaque_contents_rect_;
gfx::Rect opaque_contents_rect_;
@@ -59,7 +59,7 @@
SetDrawsContent(true);
}
- virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override {
+ SimpleEnclosedRegion VisibleContentOpaqueRegion() const override {
if (override_opaque_contents_rect_) {
return SimpleEnclosedRegion(
gfx::IntersectRects(opaque_contents_rect_, visible_content_rect()));
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index ed7b101..89378f5 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -31,82 +31,79 @@
LayerTreeHost* layer_tree_host,
LayerTreeHostSingleThreadClient* client,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
- virtual ~SingleThreadProxy();
+ ~SingleThreadProxy() override;
// Proxy implementation
- virtual void FinishAllRendering() override;
- virtual bool IsStarted() const override;
- virtual void SetOutputSurface(scoped_ptr<OutputSurface>) override;
- virtual void SetLayerTreeHostClientReady() override;
- virtual void SetVisible(bool visible) override;
- virtual const RendererCapabilities& GetRendererCapabilities() const override;
- virtual void SetNeedsAnimate() override;
- virtual void SetNeedsUpdateLayers() override;
- virtual void SetNeedsCommit() override;
- virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) override;
- virtual void SetNextCommitWaitsForActivation() override;
- virtual void NotifyInputThrottledUntilCommit() override {}
- virtual void SetDeferCommits(bool defer_commits) override;
- virtual bool CommitRequested() const override;
- virtual bool BeginMainFrameRequested() const override;
- virtual void MainThreadHasStoppedFlinging() override {}
- virtual void Start() override;
- virtual void Stop() override;
- virtual size_t MaxPartialTextureUpdates() const override;
- virtual void ForceSerializeOnSwapBuffers() override;
- virtual bool SupportsImplScrolling() const override;
- virtual void AsValueInto(base::debug::TracedValue* state) const override;
- virtual bool MainFrameWillHappenForTesting() override;
+ void FinishAllRendering() override;
+ bool IsStarted() const override;
+ void SetOutputSurface(scoped_ptr<OutputSurface>) override;
+ void SetLayerTreeHostClientReady() override;
+ void SetVisible(bool visible) override;
+ const RendererCapabilities& GetRendererCapabilities() const override;
+ void SetNeedsAnimate() override;
+ void SetNeedsUpdateLayers() override;
+ void SetNeedsCommit() override;
+ void SetNeedsRedraw(const gfx::Rect& damage_rect) override;
+ void SetNextCommitWaitsForActivation() override;
+ void NotifyInputThrottledUntilCommit() override {}
+ void SetDeferCommits(bool defer_commits) override;
+ bool CommitRequested() const override;
+ bool BeginMainFrameRequested() const override;
+ void MainThreadHasStoppedFlinging() override {}
+ void Start() override;
+ void Stop() override;
+ size_t MaxPartialTextureUpdates() const override;
+ void ForceSerializeOnSwapBuffers() override;
+ bool SupportsImplScrolling() const override;
+ void AsValueInto(base::debug::TracedValue* state) const override;
+ bool MainFrameWillHappenForTesting() override;
// SchedulerClient implementation
- virtual BeginFrameSource* ExternalBeginFrameSource() override;
- virtual void WillBeginImplFrame(const BeginFrameArgs& args) override;
- virtual void ScheduledActionSendBeginMainFrame() override;
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override;
- virtual DrawResult ScheduledActionDrawAndSwapForced() override;
- virtual void ScheduledActionCommit() override;
- virtual void ScheduledActionAnimate() override;
- virtual void ScheduledActionUpdateVisibleTiles() override;
- virtual void ScheduledActionActivateSyncTree() override;
- virtual void ScheduledActionBeginOutputSurfaceCreation() override;
- virtual void ScheduledActionManageTiles() override;
- virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) override;
- virtual base::TimeDelta DrawDurationEstimate() override;
- virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
- virtual base::TimeDelta CommitToActivateDurationEstimate() override;
- virtual void DidBeginImplFrameDeadline() override;
+ BeginFrameSource* ExternalBeginFrameSource() override;
+ void WillBeginImplFrame(const BeginFrameArgs& args) override;
+ void ScheduledActionSendBeginMainFrame() override;
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override;
+ DrawResult ScheduledActionDrawAndSwapForced() override;
+ void ScheduledActionCommit() override;
+ void ScheduledActionAnimate() override;
+ void ScheduledActionUpdateVisibleTiles() override;
+ void ScheduledActionActivateSyncTree() override;
+ void ScheduledActionBeginOutputSurfaceCreation() override;
+ void ScheduledActionManageTiles() override;
+ void DidAnticipatedDrawTimeChange(base::TimeTicks time) override;
+ base::TimeDelta DrawDurationEstimate() override;
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
+ base::TimeDelta CommitToActivateDurationEstimate() override;
+ void DidBeginImplFrameDeadline() override;
// LayerTreeHostImplClient implementation
- virtual void UpdateRendererCapabilitiesOnImplThread() override;
- virtual void DidLoseOutputSurfaceOnImplThread() override;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override {}
- virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
- virtual void SetMaxSwapsPendingOnImplThread(int max) override {}
- virtual void DidSwapBuffersOnImplThread() override;
- virtual void DidSwapBuffersCompleteOnImplThread() override;
- virtual void OnCanDrawStateChanged(bool can_draw) override;
- virtual void NotifyReadyToActivate() override;
- virtual void SetNeedsRedrawOnImplThread() override;
- virtual void SetNeedsRedrawRectOnImplThread(
- const gfx::Rect& dirty_rect) override;
- virtual void SetNeedsAnimateOnImplThread() override;
- virtual void SetNeedsManageTilesOnImplThread() override;
- virtual void DidInitializeVisibleTileOnImplThread() override;
- virtual void SetNeedsCommitOnImplThread() override;
- virtual void PostAnimationEventsToMainThreadOnImplThread(
+ void UpdateRendererCapabilitiesOnImplThread() override;
+ void DidLoseOutputSurfaceOnImplThread() override;
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override {}
+ void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
+ void SetMaxSwapsPendingOnImplThread(int max) override {}
+ void DidSwapBuffersOnImplThread() override;
+ void DidSwapBuffersCompleteOnImplThread() override;
+ void OnCanDrawStateChanged(bool can_draw) override;
+ void NotifyReadyToActivate() override;
+ void SetNeedsRedrawOnImplThread() override;
+ void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) override;
+ void SetNeedsAnimateOnImplThread() override;
+ void SetNeedsManageTilesOnImplThread() override;
+ void DidInitializeVisibleTileOnImplThread() override;
+ void SetNeedsCommitOnImplThread() override;
+ void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events) override;
- virtual bool ReduceContentsTextureMemoryOnImplThread(
- size_t limit_bytes,
- int priority_cutoff) override;
- virtual bool IsInsideDraw() override;
- virtual void RenewTreePriority() override {}
- virtual void PostDelayedScrollbarFadeOnImplThread(
- const base::Closure& start_fade,
- base::TimeDelta delay) override {}
- virtual void DidActivateSyncTree() override;
- virtual void DidManageTiles() override;
- virtual void SetDebugState(const LayerTreeDebugState& debug_state) override {}
+ bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
+ int priority_cutoff) override;
+ bool IsInsideDraw() override;
+ void RenewTreePriority() override {}
+ void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade,
+ base::TimeDelta delay) override {}
+ void DidActivateSyncTree() override;
+ void DidManageTiles() override;
+ void SetDebugState(const LayerTreeDebugState& debug_state) override {}
void RequestNewOutputSurface();
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index c2440e5..2f3e7c5 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -42,7 +42,7 @@
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
- virtual ~ThreadProxy();
+ ~ThreadProxy() override;
struct BeginMainFrameAndCommitState {
BeginMainFrameAndCommitState();
@@ -146,85 +146,82 @@
const CompositorThreadOnly& impl() const;
// Proxy implementation
- virtual void FinishAllRendering() override;
- virtual bool IsStarted() const override;
- virtual void SetOutputSurface(scoped_ptr<OutputSurface>) override;
- virtual void SetLayerTreeHostClientReady() override;
- virtual void SetVisible(bool visible) override;
- virtual const RendererCapabilities& GetRendererCapabilities() const override;
- virtual void SetNeedsAnimate() override;
- virtual void SetNeedsUpdateLayers() override;
- virtual void SetNeedsCommit() override;
- virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) override;
- virtual void SetNextCommitWaitsForActivation() override;
- virtual void NotifyInputThrottledUntilCommit() override;
- virtual void SetDeferCommits(bool defer_commits) override;
- virtual bool CommitRequested() const override;
- virtual bool BeginMainFrameRequested() const override;
- virtual void MainThreadHasStoppedFlinging() override;
- virtual void Start() override;
- virtual void Stop() override;
- virtual size_t MaxPartialTextureUpdates() const override;
- virtual void ForceSerializeOnSwapBuffers() override;
- virtual bool SupportsImplScrolling() const override;
- virtual void SetDebugState(const LayerTreeDebugState& debug_state) override;
- virtual void AsValueInto(base::debug::TracedValue* value) const override;
- virtual bool MainFrameWillHappenForTesting() override;
+ void FinishAllRendering() override;
+ bool IsStarted() const override;
+ void SetOutputSurface(scoped_ptr<OutputSurface>) override;
+ void SetLayerTreeHostClientReady() override;
+ void SetVisible(bool visible) override;
+ const RendererCapabilities& GetRendererCapabilities() const override;
+ void SetNeedsAnimate() override;
+ void SetNeedsUpdateLayers() override;
+ void SetNeedsCommit() override;
+ void SetNeedsRedraw(const gfx::Rect& damage_rect) override;
+ void SetNextCommitWaitsForActivation() override;
+ void NotifyInputThrottledUntilCommit() override;
+ void SetDeferCommits(bool defer_commits) override;
+ bool CommitRequested() const override;
+ bool BeginMainFrameRequested() const override;
+ void MainThreadHasStoppedFlinging() override;
+ void Start() override;
+ void Stop() override;
+ size_t MaxPartialTextureUpdates() const override;
+ void ForceSerializeOnSwapBuffers() override;
+ bool SupportsImplScrolling() const override;
+ void SetDebugState(const LayerTreeDebugState& debug_state) override;
+ void AsValueInto(base::debug::TracedValue* value) const override;
+ bool MainFrameWillHappenForTesting() override;
// LayerTreeHostImplClient implementation
- virtual void UpdateRendererCapabilitiesOnImplThread() override;
- virtual void DidLoseOutputSurfaceOnImplThread() override;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override;
- virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override;
- virtual void SetMaxSwapsPendingOnImplThread(int max) override;
- virtual void DidSwapBuffersOnImplThread() override;
- virtual void DidSwapBuffersCompleteOnImplThread() override;
- virtual void OnCanDrawStateChanged(bool can_draw) override;
- virtual void NotifyReadyToActivate() override;
+ void UpdateRendererCapabilitiesOnImplThread() override;
+ void DidLoseOutputSurfaceOnImplThread() override;
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override;
+ void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override;
+ void SetMaxSwapsPendingOnImplThread(int max) override;
+ void DidSwapBuffersOnImplThread() override;
+ void DidSwapBuffersCompleteOnImplThread() override;
+ void OnCanDrawStateChanged(bool can_draw) override;
+ void NotifyReadyToActivate() override;
// Please call these 3 functions through
// LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and
// SetNeedsAnimate().
- virtual void SetNeedsRedrawOnImplThread() override;
- virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect)
- override;
- virtual void SetNeedsAnimateOnImplThread() override;
- virtual void SetNeedsManageTilesOnImplThread() override;
- virtual void DidInitializeVisibleTileOnImplThread() override;
- virtual void SetNeedsCommitOnImplThread() override;
- virtual void PostAnimationEventsToMainThreadOnImplThread(
+ void SetNeedsRedrawOnImplThread() override;
+ void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) override;
+ void SetNeedsAnimateOnImplThread() override;
+ void SetNeedsManageTilesOnImplThread() override;
+ void DidInitializeVisibleTileOnImplThread() override;
+ void SetNeedsCommitOnImplThread() override;
+ void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> queue) override;
- virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
- int priority_cutoff)
- override;
- virtual bool IsInsideDraw() override;
- virtual void RenewTreePriority() override;
- virtual void PostDelayedScrollbarFadeOnImplThread(
- const base::Closure& start_fade,
- base::TimeDelta delay) override;
- virtual void DidActivateSyncTree() override;
- virtual void DidManageTiles() override;
+ bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
+ int priority_cutoff) override;
+ bool IsInsideDraw() override;
+ void RenewTreePriority() override;
+ void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade,
+ base::TimeDelta delay) override;
+ void DidActivateSyncTree() override;
+ void DidManageTiles() override;
// SchedulerClient implementation
- virtual BeginFrameSource* ExternalBeginFrameSource() override;
- virtual void WillBeginImplFrame(const BeginFrameArgs& args) override;
- virtual void ScheduledActionSendBeginMainFrame() override;
- virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override;
- virtual DrawResult ScheduledActionDrawAndSwapForced() override;
- virtual void ScheduledActionAnimate() override;
- virtual void ScheduledActionCommit() override;
- virtual void ScheduledActionUpdateVisibleTiles() override;
- virtual void ScheduledActionActivateSyncTree() override;
- virtual void ScheduledActionBeginOutputSurfaceCreation() override;
- virtual void ScheduledActionManageTiles() override;
- virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) override;
- virtual base::TimeDelta DrawDurationEstimate() override;
- virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
- virtual base::TimeDelta CommitToActivateDurationEstimate() override;
- virtual void DidBeginImplFrameDeadline() override;
+ BeginFrameSource* ExternalBeginFrameSource() override;
+ void WillBeginImplFrame(const BeginFrameArgs& args) override;
+ void ScheduledActionSendBeginMainFrame() override;
+ DrawResult ScheduledActionDrawAndSwapIfPossible() override;
+ DrawResult ScheduledActionDrawAndSwapForced() override;
+ void ScheduledActionAnimate() override;
+ void ScheduledActionCommit() override;
+ void ScheduledActionUpdateVisibleTiles() override;
+ void ScheduledActionActivateSyncTree() override;
+ void ScheduledActionBeginOutputSurfaceCreation() override;
+ void ScheduledActionManageTiles() override;
+ void DidAnticipatedDrawTimeChange(base::TimeTicks time) override;
+ base::TimeDelta DrawDurationEstimate() override;
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
+ base::TimeDelta CommitToActivateDurationEstimate() override;
+ void DidBeginImplFrameDeadline() override;
// ResourceUpdateControllerClient implementation
- virtual void ReadyToFinalizeTextureUpdates() override;
+ void ReadyToFinalizeTextureUpdates() override;
protected:
ThreadProxy(LayerTreeHost* layer_tree_host,
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc
index 2b8f5df..2715727 100644
--- a/cc/trees/tree_synchronizer_unittest.cc
+++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -30,7 +30,7 @@
int layer_id) {
return make_scoped_ptr(new MockLayerImpl(tree_impl, layer_id));
}
- virtual ~MockLayerImpl() {
+ ~MockLayerImpl() override {
if (layer_impl_destruction_list_)
layer_impl_destruction_list_->push_back(id());
}
@@ -54,12 +54,11 @@
return make_scoped_refptr(new MockLayer(layer_impl_destruction_list));
}
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- override {
+ scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
return MockLayerImpl::Create(tree_impl, layer_id_);
}
- virtual void PushPropertiesTo(LayerImpl* layer_impl) override {
+ void PushPropertiesTo(LayerImpl* layer_impl) override {
Layer::PushPropertiesTo(layer_impl);
MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl);
@@ -69,7 +68,7 @@
private:
explicit MockLayer(std::vector<int>* layer_impl_destruction_list)
: Layer(), layer_impl_destruction_list_(layer_impl_destruction_list) {}
- virtual ~MockLayer() {}
+ ~MockLayer() override {}
std::vector<int>* layer_impl_destruction_list_;
};
@@ -88,10 +87,10 @@
: LayerAnimationController(1),
synchronized_animations_(false) {}
- virtual ~FakeLayerAnimationController() {}
+ ~FakeLayerAnimationController() override {}
- virtual void PushAnimationUpdatesTo(LayerAnimationController* controller_impl)
- override {
+ void PushAnimationUpdatesTo(
+ LayerAnimationController* controller_impl) override {
LayerAnimationController::PushAnimationUpdatesTo(controller_impl);
synchronized_animations_ = true;
}
diff --git a/crypto/ec_private_key_nss.cc b/crypto/ec_private_key_nss.cc
index b38c396..2daa0c0 100644
--- a/crypto/ec_private_key_nss.cc
+++ b/crypto/ec_private_key_nss.cc
@@ -340,7 +340,7 @@
};
ec_parameters.data[0] = SEC_ASN1_OBJECT_ID;
- ec_parameters.data[1] = oid_data->oid.len;
+ ec_parameters.data[1] = static_cast<unsigned char>(oid_data->oid.len);
memcpy(ec_parameters.data + 2, oid_data->oid.data, oid_data->oid.len);
result->key_ = PK11_GenerateKeyPair(slot,
diff --git a/crypto/nss_util_unittest.cc b/crypto/nss_util_unittest.cc
index b687885..2859191 100644
--- a/crypto/nss_util_unittest.cc
+++ b/crypto/nss_util_unittest.cc
@@ -19,14 +19,17 @@
prxtime.tm_params.tp_gmt_offset = 0;
prxtime.tm_params.tp_dst_offset = 0;
base::Time::Exploded exploded;
- prxtime.tm_year = exploded.year = 2011;
+ exploded.year = prxtime.tm_year = 2011;
exploded.month = 12;
prxtime.tm_month = 11;
- prxtime.tm_wday = exploded.day_of_week = 0; // Should be unusued.
- prxtime.tm_mday = exploded.day_of_month = 10;
- prxtime.tm_hour = exploded.hour = 2;
- prxtime.tm_min = exploded.minute = 52;
- prxtime.tm_sec = exploded.second = 19;
+ // PRExplodedTime::tm_wday is a smaller type than Exploded::day_of_week, so
+ // assigning the two in this order instead of the reverse avoids potential
+ // warnings about type downcasting.
+ exploded.day_of_week = prxtime.tm_wday = 0; // Should be unused.
+ exploded.day_of_month = prxtime.tm_mday = 10;
+ exploded.hour = prxtime.tm_hour = 2;
+ exploded.minute = prxtime.tm_min = 52;
+ exploded.second = prxtime.tm_sec = 19;
exploded.millisecond = 342;
prxtime.tm_usec = 342000;
diff --git a/crypto/signature_verifier_unittest.cc b/crypto/signature_verifier_unittest.cc
index 3329799..f6c42e0 100644
--- a/crypto/signature_verifier_unittest.cc
+++ b/crypto/signature_verifier_unittest.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "crypto/signature_verifier.h"
+
+#include "base/numerics/safe_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(SignatureVerifierTest, BasicTest) {
@@ -1005,36 +1007,36 @@
public_key_info->insert(public_key_info->begin(),
public_exponent_e.begin(),
public_exponent_e.end());
- uint8 length = public_exponent_e.size();
- public_key_info->insert(public_key_info->begin(), length);
+ uint8 exponent_size = base::checked_cast<uint8>(public_exponent_e.size());
+ public_key_info->insert(public_key_info->begin(), exponent_size);
public_key_info->insert(public_key_info->begin(), kIntegerTag);
// Encode the modulus n as an INTEGER.
public_key_info->insert(public_key_info->begin(),
modulus_n.begin(), modulus_n.end());
- uint16 length16 = modulus_n.size();
+ uint16 modulus_size = base::checked_cast<uint16>(modulus_n.size());
if (modulus_n[0] & 0x80) {
public_key_info->insert(public_key_info->begin(), 0x00);
- length16++;
+ modulus_size++;
}
- public_key_info->insert(public_key_info->begin(), length16 & 0xff);
- public_key_info->insert(public_key_info->begin(), (length16 >> 8) & 0xff);
+ public_key_info->insert(public_key_info->begin(), modulus_size & 0xff);
+ public_key_info->insert(public_key_info->begin(), (modulus_size >> 8) & 0xff);
public_key_info->insert(public_key_info->begin(), 0x82);
public_key_info->insert(public_key_info->begin(), kIntegerTag);
// Encode the RSAPublicKey SEQUENCE.
- length16 = public_key_info->size();
- public_key_info->insert(public_key_info->begin(), length16 & 0xff);
- public_key_info->insert(public_key_info->begin(), (length16 >> 8) & 0xff);
+ uint16 info_size = base::checked_cast<uint16>(public_key_info->size());
+ public_key_info->insert(public_key_info->begin(), info_size & 0xff);
+ public_key_info->insert(public_key_info->begin(), (info_size >> 8) & 0xff);
public_key_info->insert(public_key_info->begin(), 0x82);
public_key_info->insert(public_key_info->begin(), kSequenceTag);
// Encode the BIT STRING.
// Number of unused bits.
public_key_info->insert(public_key_info->begin(), 0x00);
- length16 = public_key_info->size();
- public_key_info->insert(public_key_info->begin(), length16 & 0xff);
- public_key_info->insert(public_key_info->begin(), (length16 >> 8) & 0xff);
+ info_size = base::checked_cast<uint16>(public_key_info->size());
+ public_key_info->insert(public_key_info->begin(), info_size & 0xff);
+ public_key_info->insert(public_key_info->begin(), (info_size >> 8) & 0xff);
public_key_info->insert(public_key_info->begin(), 0x82);
public_key_info->insert(public_key_info->begin(), kBitStringTag);
@@ -1049,9 +1051,9 @@
algorithm, algorithm + sizeof(algorithm));
// Encode the outermost SEQUENCE.
- length16 = public_key_info->size();
- public_key_info->insert(public_key_info->begin(), length16 & 0xff);
- public_key_info->insert(public_key_info->begin(), (length16 >> 8) & 0xff);
+ info_size = base::checked_cast<uint16>(public_key_info->size());
+ public_key_info->insert(public_key_info->begin(), info_size & 0xff);
+ public_key_info->insert(public_key_info->begin(), (info_size >> 8) & 0xff);
public_key_info->insert(public_key_info->begin(), 0x82);
public_key_info->insert(public_key_info->begin(), kSequenceTag);
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 14191f2..14c778a 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -3139,7 +3139,7 @@
"""Writes the GLES2 Implemention declaration."""
impl_decl = func.GetInfo('impl_decl')
if impl_decl == None or impl_decl == True:
- file.Write("virtual %s %s(%s) override;\n" %
+ file.Write("%s %s(%s) override;\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
file.Write("\n")
@@ -3180,7 +3180,7 @@
def WriteGLES2TraceImplementationHeader(self, func, file):
"""Writes the GLES2 Trace Implemention header."""
- file.Write("virtual %s %s(%s) override;\n" %
+ file.Write("%s %s(%s) override;\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
@@ -3231,7 +3231,7 @@
def WriteGLES2InterfaceStub(self, func, file):
"""Writes the GLES2 Interface stub declaration."""
- file.Write("virtual %s %s(%s) override;\n" %
+ file.Write("%s %s(%s) override;\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
@@ -3828,7 +3828,7 @@
def WriteGLES2ImplementationHeader(self, func, file):
"""Overrriden from TypeHandler."""
- file.Write("virtual %s %s(%s) override;\n" %
+ file.Write("%s %s(%s) override;\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
file.Write("\n")
diff --git a/gpu/command_buffer/client/buffer_tracker_unittest.cc b/gpu/command_buffer/client/buffer_tracker_unittest.cc
index 39ff633..a244009 100644
--- a/gpu/command_buffer/client/buffer_tracker_unittest.cc
+++ b/gpu/command_buffer/client/buffer_tracker_unittest.cc
@@ -23,10 +23,10 @@
MockClientCommandBufferImpl()
: MockClientCommandBuffer(),
context_lost_(false) {}
- virtual ~MockClientCommandBufferImpl() {}
+ ~MockClientCommandBufferImpl() override {}
- virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
- int32* id) override {
+ scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
+ int32* id) override {
if (context_lost_) {
*id = -1;
return NULL;
diff --git a/gpu/command_buffer/client/client_test_helper.h b/gpu/command_buffer/client/client_test_helper.h
index 51c6b6d..2cf18e6 100644
--- a/gpu/command_buffer/client/client_test_helper.h
+++ b/gpu/command_buffer/client/client_test_helper.h
@@ -26,21 +26,21 @@
static const int32 kMaxTransferBuffers = 6;
MockCommandBufferBase();
- virtual ~MockCommandBufferBase();
+ ~MockCommandBufferBase() override;
- virtual bool Initialize() override;
- virtual State GetLastState() override;
- virtual int32 GetLastToken() override;
- virtual void WaitForTokenInRange(int32 start, int32 end) override;
- virtual void WaitForGetOffsetInRange(int32 start, int32 end) override;
- virtual void SetGetBuffer(int transfer_buffer_id) override;
- virtual void SetGetOffset(int32 get_offset) override;
- virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
- int32* id) override;
- virtual scoped_refptr<gpu::Buffer> GetTransferBuffer(int32 id) override;
- virtual void SetToken(int32 token) override;
- virtual void SetParseError(error::Error error) override;
- virtual void SetContextLostReason(error::ContextLostReason reason) override;
+ bool Initialize() override;
+ State GetLastState() override;
+ int32 GetLastToken() override;
+ void WaitForTokenInRange(int32 start, int32 end) override;
+ void WaitForGetOffsetInRange(int32 start, int32 end) override;
+ void SetGetBuffer(int transfer_buffer_id) override;
+ void SetGetOffset(int32 get_offset) override;
+ scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
+ int32* id) override;
+ scoped_refptr<gpu::Buffer> GetTransferBuffer(int32 id) override;
+ void SetToken(int32 token) override;
+ void SetParseError(error::Error error) override;
+ void SetContextLostReason(error::ContextLostReason reason) override;
// Get's the Id of the next transfer buffer that will be returned
// by CreateTransferBuffer. This is useful for testing expected ids.
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index 2d367ac..3ff9d3a 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -46,9 +46,9 @@
flush_locked_(false),
last_flush_(-1),
flush_count_(0) {}
- virtual ~CommandBufferServiceLocked() {}
+ ~CommandBufferServiceLocked() override {}
- virtual void Flush(int32 put_offset) override {
+ void Flush(int32 put_offset) override {
flush_count_++;
if (!flush_locked_) {
last_flush_ = -1;
@@ -64,7 +64,7 @@
int FlushCount() { return flush_count_; }
- virtual void WaitForGetOffsetInRange(int32 start, int32 end) override {
+ void WaitForGetOffsetInRange(int32 start, int32 end) override {
if (last_flush_ != -1) {
CommandBufferService::Flush(last_flush_);
last_flush_ = -1;
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
index e877119..7f24bd6 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -48,7 +48,7 @@
public:
explicit GLInProcessContextImpl(
const GLInProcessContextSharedMemoryLimits& mem_limits);
- virtual ~GLInProcessContextImpl();
+ ~GLInProcessContextImpl() override;
bool Initialize(
scoped_refptr<gfx::GLSurface> surface,
@@ -62,9 +62,9 @@
const scoped_refptr<InProcessCommandBuffer::Service>& service);
// GLInProcessContext implementation:
- virtual void SetContextLostCallback(const base::Closure& callback) override;
- virtual gles2::GLES2Implementation* GetImplementation() override;
- virtual size_t GetMappedMemoryLimit() override;
+ void SetContextLostCallback(const base::Closure& callback) override;
+ gles2::GLES2Implementation* GetImplementation() override;
+ size_t GetMappedMemoryLimit() override;
#if defined(OS_ANDROID)
virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
diff --git a/gpu/command_buffer/client/gles2_cmd_helper.h b/gpu/command_buffer/client/gles2_cmd_helper.h
index af6cc5d..8a5cde1 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper.h
@@ -16,7 +16,7 @@
class GPU_EXPORT GLES2CmdHelper : public CommandBufferHelper {
public:
explicit GLES2CmdHelper(CommandBuffer* command_buffer);
- virtual ~GLES2CmdHelper();
+ ~GLES2CmdHelper() override;
// Include the auto-generated part of this class. We split this because it
// means we can easily edit the non-auto generated parts right here in this
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 1025a3e..972291e 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -191,7 +191,7 @@
bool lose_context_when_out_of_memory,
GpuControl* gpu_control);
- virtual ~GLES2Implementation();
+ ~GLES2Implementation() override;
bool Initialize(
unsigned int starting_transfer_buffer_size,
@@ -211,23 +211,21 @@
// this file instead of having to edit some template or the code generator.
#include "gpu/command_buffer/client/gles2_implementation_autogen.h"
- virtual void DisableVertexAttribArray(GLuint index) override;
- virtual void EnableVertexAttribArray(GLuint index) override;
- virtual void GetVertexAttribfv(
- GLuint index, GLenum pname, GLfloat* params) override;
- virtual void GetVertexAttribiv(
- GLuint index, GLenum pname, GLint* params) override;
+ void DisableVertexAttribArray(GLuint index) override;
+ void EnableVertexAttribArray(GLuint index) override;
+ void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) override;
+ void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) override;
// ContextSupport implementation.
- virtual void Swap() override;
- virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
- virtual void ScheduleOverlayPlane(int plane_z_order,
- gfx::OverlayTransform plane_transform,
- unsigned overlay_texture_id,
- const gfx::Rect& display_bounds,
- const gfx::RectF& uv_rect) override;
- virtual GLuint InsertFutureSyncPointCHROMIUM() override;
- virtual void RetireSyncPointCHROMIUM(GLuint sync_point) override;
+ void Swap() override;
+ void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
+ void ScheduleOverlayPlane(int plane_z_order,
+ gfx::OverlayTransform plane_transform,
+ unsigned overlay_texture_id,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& uv_rect) override;
+ GLuint InsertFutureSyncPointCHROMIUM() override;
+ void RetireSyncPointCHROMIUM(GLuint sync_point) override;
void GetProgramInfoCHROMIUMHelper(GLuint program, std::vector<int8>* result);
GLint GetAttribLocationHelper(GLuint program, const char* name);
@@ -243,11 +241,10 @@
void FreeEverything();
// ContextSupport implementation.
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
void SetErrorMessageCallback(
GLES2ImplementationErrorMessageCallback* callback) {
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 5465fc7..5177941 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -13,720 +13,682 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
-virtual void ActiveTexture(GLenum texture) override;
+void ActiveTexture(GLenum texture) override;
-virtual void AttachShader(GLuint program, GLuint shader) override;
+void AttachShader(GLuint program, GLuint shader) override;
-virtual void BindAttribLocation(GLuint program,
- GLuint index,
- const char* name) override;
+void BindAttribLocation(GLuint program,
+ GLuint index,
+ const char* name) override;
-virtual void BindBuffer(GLenum target, GLuint buffer) override;
+void BindBuffer(GLenum target, GLuint buffer) override;
-virtual void BindFramebuffer(GLenum target, GLuint framebuffer) override;
+void BindFramebuffer(GLenum target, GLuint framebuffer) override;
-virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
+void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
-virtual void BindTexture(GLenum target, GLuint texture) override;
+void BindTexture(GLenum target, GLuint texture) override;
-virtual void BlendColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
+void BlendColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
-virtual void BlendEquation(GLenum mode) override;
+void BlendEquation(GLenum mode) override;
-virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
+void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
-virtual void BlendFunc(GLenum sfactor, GLenum dfactor) override;
+void BlendFunc(GLenum sfactor, GLenum dfactor) override;
-virtual void BlendFuncSeparate(GLenum srcRGB,
- GLenum dstRGB,
- GLenum srcAlpha,
- GLenum dstAlpha) override;
+void BlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) override;
-virtual void BufferData(GLenum target,
- GLsizeiptr size,
- const void* data,
- GLenum usage) override;
+void BufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) override;
-virtual void BufferSubData(GLenum target,
- GLintptr offset,
- GLsizeiptr size,
- const void* data) override;
+void BufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) override;
-virtual GLenum CheckFramebufferStatus(GLenum target) override;
+GLenum CheckFramebufferStatus(GLenum target) override;
-virtual void Clear(GLbitfield mask) override;
+void Clear(GLbitfield mask) override;
-virtual void ClearColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
+void ClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
-virtual void ClearDepthf(GLclampf depth) override;
+void ClearDepthf(GLclampf depth) override;
-virtual void ClearStencil(GLint s) override;
+void ClearStencil(GLint s) override;
-virtual void ColorMask(GLboolean red,
- GLboolean green,
- GLboolean blue,
- GLboolean alpha) override;
+void ColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) override;
-virtual void CompileShader(GLuint shader) override;
+void CompileShader(GLuint shader) override;
-virtual void CompressedTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLsizei imageSize,
- const void* data) override;
+void CompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) override;
-virtual void CompressedTexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLsizei imageSize,
- const void* data) override;
+void CompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) override;
-virtual void CopyTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLint border) override;
+void CopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) override;
-virtual void CopyTexSubImage2D(GLenum target,
+void CopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) override;
+
+GLuint CreateProgram() override;
+
+GLuint CreateShader(GLenum type) override;
+
+void CullFace(GLenum mode) override;
+
+void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
+
+void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
+
+void DeleteProgram(GLuint program) override;
+
+void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) override;
+
+void DeleteShader(GLuint shader) override;
+
+void DeleteTextures(GLsizei n, const GLuint* textures) override;
+
+void DepthFunc(GLenum func) override;
+
+void DepthMask(GLboolean flag) override;
+
+void DepthRangef(GLclampf zNear, GLclampf zFar) override;
+
+void DetachShader(GLuint program, GLuint shader) override;
+
+void Disable(GLenum cap) override;
+
+void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
+
+void DrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+
+void Enable(GLenum cap) override;
+
+void Finish() override;
+
+void Flush() override;
+
+void FramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) override;
+
+void FramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) override;
+
+void FrontFace(GLenum mode) override;
+
+void GenBuffers(GLsizei n, GLuint* buffers) override;
+
+void GenerateMipmap(GLenum target) override;
+
+void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
+
+void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
+
+void GenTextures(GLsizei n, GLuint* textures) override;
+
+void GetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+
+void GetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+
+void GetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) override;
+
+GLint GetAttribLocation(GLuint program, const char* name) override;
+
+void GetBooleanv(GLenum pname, GLboolean* params) override;
+
+void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) override;
+
+GLenum GetError() override;
+
+void GetFloatv(GLenum pname, GLfloat* params) override;
+
+void GetFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) override;
+
+void GetIntegerv(GLenum pname, GLint* params) override;
+
+void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
+
+void GetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+
+void GetRenderbufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) override;
+
+void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
+
+void GetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+
+void GetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override;
+
+void GetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) override;
+
+const GLubyte* GetString(GLenum name) override;
+
+void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) override;
+
+void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) override;
+
+void GetUniformfv(GLuint program, GLint location, GLfloat* params) override;
+
+void GetUniformiv(GLuint program, GLint location, GLint* params) override;
+
+GLint GetUniformLocation(GLuint program, const char* name) override;
+
+void GetVertexAttribPointerv(GLuint index,
+ GLenum pname,
+ void** pointer) override;
+
+void Hint(GLenum target, GLenum mode) override;
+
+GLboolean IsBuffer(GLuint buffer) override;
+
+GLboolean IsEnabled(GLenum cap) override;
+
+GLboolean IsFramebuffer(GLuint framebuffer) override;
+
+GLboolean IsProgram(GLuint program) override;
+
+GLboolean IsRenderbuffer(GLuint renderbuffer) override;
+
+GLboolean IsShader(GLuint shader) override;
+
+GLboolean IsTexture(GLuint texture) override;
+
+void LineWidth(GLfloat width) override;
+
+void LinkProgram(GLuint program) override;
+
+void PixelStorei(GLenum pname, GLint param) override;
+
+void PolygonOffset(GLfloat factor, GLfloat units) override;
+
+void ReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) override;
+
+void ReleaseShaderCompiler() override;
+
+void RenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+
+void SampleCoverage(GLclampf value, GLboolean invert) override;
+
+void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
+
+void ShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) override;
+
+void ShaderSource(GLuint shader,
+ GLsizei count,
+ const GLchar* const* str,
+ const GLint* length) override;
+
+void ShallowFinishCHROMIUM() override;
+
+void ShallowFlushCHROMIUM() override;
+
+void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
+
+void StencilFuncSeparate(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) override;
+
+void StencilMask(GLuint mask) override;
+
+void StencilMaskSeparate(GLenum face, GLuint mask) override;
+
+void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
+
+void StencilOpSeparate(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) override;
+
+void TexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+
+void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
+
+void TexParameterfv(GLenum target,
+ GLenum pname,
+ const GLfloat* params) override;
+
+void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+
+void TexParameteriv(GLenum target, GLenum pname, const GLint* params) override;
+
+void TexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+
+void Uniform1f(GLint location, GLfloat x) override;
+
+void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) override;
+
+void Uniform1i(GLint location, GLint x) override;
+
+void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
+
+void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
+
+void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) override;
+
+void Uniform2i(GLint location, GLint x, GLint y) override;
+
+void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
+
+void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) override;
+
+void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) override;
+
+void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
+
+void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
+
+void Uniform4f(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+
+void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) override;
+
+void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) override;
+
+void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
+
+void UniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+
+void UniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+
+void UniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+
+void UseProgram(GLuint program) override;
+
+void ValidateProgram(GLuint program) override;
+
+void VertexAttrib1f(GLuint indx, GLfloat x) override;
+
+void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
+
+void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
+
+void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
+
+void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) override;
+
+void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
+
+void VertexAttrib4f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+
+void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
+
+void VertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) override;
+
+void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
+
+void BlitFramebufferCHROMIUM(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+
+void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+
+void RenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+
+void FramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) override;
+
+void TexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalFormat,
+ GLsizei width,
+ GLsizei height) override;
+
+void GenQueriesEXT(GLsizei n, GLuint* queries) override;
+
+void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
+
+GLboolean IsQueryEXT(GLuint id) override;
+
+void BeginQueryEXT(GLenum target, GLuint id) override;
+
+void EndQueryEXT(GLenum target) override;
+
+void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+
+void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+
+void InsertEventMarkerEXT(GLsizei length, const GLchar* marker) override;
+
+void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
+
+void PopGroupMarkerEXT() override;
+
+void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
+
+void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
+
+GLboolean IsVertexArrayOES(GLuint array) override;
+
+void BindVertexArrayOES(GLuint array) override;
+
+void SwapBuffers() override;
+
+GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
+ GLsizei count,
+ GLenum type,
+ GLuint offset) override;
+
+GLboolean EnableFeatureCHROMIUM(const char* feature) override;
+
+void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
+
+GLboolean UnmapBufferCHROMIUM(GLuint target) override;
+
+void* MapBufferSubDataCHROMIUM(GLuint target,
+ GLintptr offset,
+ GLsizeiptr size,
+ GLenum access) override;
+
+void UnmapBufferSubDataCHROMIUM(const void* mem) override;
+
+void* MapTexSubImage2DCHROMIUM(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
- GLint x,
- GLint y,
GLsizei width,
- GLsizei height) override;
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access) override;
-virtual GLuint CreateProgram() override;
+void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-virtual GLuint CreateShader(GLenum type) override;
+void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
-virtual void CullFace(GLenum mode) override;
+const GLchar* GetRequestableExtensionsCHROMIUM() override;
-virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
+void RequestExtensionCHROMIUM(const char* extension) override;
-virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
+void RateLimitOffscreenContextCHROMIUM() override;
-virtual void DeleteProgram(GLuint program) override;
+void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
+ GLuint count,
+ GLint* results,
+ GLsizeiptr size) override;
-virtual void DeleteRenderbuffers(GLsizei n,
- const GLuint* renderbuffers) override;
+void GetProgramInfoCHROMIUM(GLuint program,
+ GLsizei bufsize,
+ GLsizei* size,
+ void* info) override;
-virtual void DeleteShader(GLuint shader) override;
+GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
-virtual void DeleteTextures(GLsizei n, const GLuint* textures) override;
-
-virtual void DepthFunc(GLenum func) override;
-
-virtual void DepthMask(GLboolean flag) override;
-
-virtual void DepthRangef(GLclampf zNear, GLclampf zFar) override;
-
-virtual void DetachShader(GLuint program, GLuint shader) override;
-
-virtual void Disable(GLenum cap) override;
-
-virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
-
-virtual void DrawElements(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices) override;
-
-virtual void Enable(GLenum cap) override;
-
-virtual void Finish() override;
-
-virtual void Flush() override;
-
-virtual void FramebufferRenderbuffer(GLenum target,
- GLenum attachment,
- GLenum renderbuffertarget,
- GLuint renderbuffer) override;
-
-virtual void FramebufferTexture2D(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level) override;
-
-virtual void FrontFace(GLenum mode) override;
-
-virtual void GenBuffers(GLsizei n, GLuint* buffers) override;
-
-virtual void GenerateMipmap(GLenum target) override;
-
-virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
-
-virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
-
-virtual void GenTextures(GLsizei n, GLuint* textures) override;
-
-virtual void GetActiveAttrib(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-
-virtual void GetActiveUniform(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-
-virtual void GetAttachedShaders(GLuint program,
- GLsizei maxcount,
- GLsizei* count,
- GLuint* shaders) override;
-
-virtual GLint GetAttribLocation(GLuint program, const char* name) override;
-
-virtual void GetBooleanv(GLenum pname, GLboolean* params) override;
-
-virtual void GetBufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-
-virtual GLenum GetError() override;
-
-virtual void GetFloatv(GLenum pname, GLfloat* params) override;
-
-virtual void GetFramebufferAttachmentParameteriv(GLenum target,
- GLenum attachment,
- GLenum pname,
- GLint* params) override;
-
-virtual void GetIntegerv(GLenum pname, GLint* params) override;
-
-virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
-
-virtual void GetProgramInfoLog(GLuint program,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-
-virtual void GetRenderbufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-
-virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
-
-virtual void GetShaderInfoLog(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-
-virtual void GetShaderPrecisionFormat(GLenum shadertype,
- GLenum precisiontype,
- GLint* range,
- GLint* precision) override;
-
-virtual void GetShaderSource(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
-
-virtual const GLubyte* GetString(GLenum name) override;
-
-virtual void GetTexParameterfv(GLenum target,
- GLenum pname,
- GLfloat* params) override;
-
-virtual void GetTexParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-
-virtual void GetUniformfv(GLuint program,
- GLint location,
- GLfloat* params) override;
-
-virtual void GetUniformiv(GLuint program,
- GLint location,
- GLint* params) override;
-
-virtual GLint GetUniformLocation(GLuint program, const char* name) override;
-
-virtual void GetVertexAttribPointerv(GLuint index,
- GLenum pname,
- void** pointer) override;
-
-virtual void Hint(GLenum target, GLenum mode) override;
-
-virtual GLboolean IsBuffer(GLuint buffer) override;
-
-virtual GLboolean IsEnabled(GLenum cap) override;
-
-virtual GLboolean IsFramebuffer(GLuint framebuffer) override;
-
-virtual GLboolean IsProgram(GLuint program) override;
-
-virtual GLboolean IsRenderbuffer(GLuint renderbuffer) override;
-
-virtual GLboolean IsShader(GLuint shader) override;
-
-virtual GLboolean IsTexture(GLuint texture) override;
-
-virtual void LineWidth(GLfloat width) override;
-
-virtual void LinkProgram(GLuint program) override;
-
-virtual void PixelStorei(GLenum pname, GLint param) override;
-
-virtual void PolygonOffset(GLfloat factor, GLfloat units) override;
-
-virtual void ReadPixels(GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- void* pixels) override;
-
-virtual void ReleaseShaderCompiler() override;
-
-virtual void RenderbufferStorage(GLenum target,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-
-virtual void SampleCoverage(GLclampf value, GLboolean invert) override;
-
-virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
-
-virtual void ShaderBinary(GLsizei n,
- const GLuint* shaders,
- GLenum binaryformat,
- const void* binary,
- GLsizei length) override;
-
-virtual void ShaderSource(GLuint shader,
- GLsizei count,
- const GLchar* const* str,
- const GLint* length) override;
-
-virtual void ShallowFinishCHROMIUM() override;
-
-virtual void ShallowFlushCHROMIUM() override;
-
-virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
-
-virtual void StencilFuncSeparate(GLenum face,
- GLenum func,
- GLint ref,
- GLuint mask) override;
-
-virtual void StencilMask(GLuint mask) override;
-
-virtual void StencilMaskSeparate(GLenum face, GLuint mask) override;
-
-virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
-
-virtual void StencilOpSeparate(GLenum face,
- GLenum fail,
- GLenum zfail,
- GLenum zpass) override;
-
-virtual void TexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-
-virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
-
-virtual void TexParameterfv(GLenum target,
- GLenum pname,
- const GLfloat* params) override;
-
-virtual void TexParameteri(GLenum target, GLenum pname, GLint param) override;
-
-virtual void TexParameteriv(GLenum target,
- GLenum pname,
- const GLint* params) override;
-
-virtual void TexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
+GLuint CreateImageCHROMIUM(ClientBuffer buffer,
GLsizei width,
GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
+ GLenum internalformat) override;
-virtual void Uniform1f(GLint location, GLfloat x) override;
+void DestroyImageCHROMIUM(GLuint image_id) override;
-virtual void Uniform1fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
+GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
+ GLsizei height,
+ GLenum internalformat,
+ GLenum usage) override;
-virtual void Uniform1i(GLint location, GLint x) override;
-
-virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
-
-virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
-
-virtual void Uniform2fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-
-virtual void Uniform2i(GLint location, GLint x, GLint y) override;
-
-virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
-
-virtual void Uniform3f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-
-virtual void Uniform3fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-
-virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
-
-virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
-
-virtual void Uniform4f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-
-virtual void Uniform4fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-
-virtual void Uniform4i(GLint location,
- GLint x,
- GLint y,
- GLint z,
- GLint w) override;
-
-virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
-
-virtual void UniformMatrix2fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-
-virtual void UniformMatrix3fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-
-virtual void UniformMatrix4fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-
-virtual void UseProgram(GLuint program) override;
-
-virtual void ValidateProgram(GLuint program) override;
-
-virtual void VertexAttrib1f(GLuint indx, GLfloat x) override;
-
-virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
-
-virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
-
-virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
-
-virtual void VertexAttrib3f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-
-virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
-
-virtual void VertexAttrib4f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-
-virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
-
-virtual void VertexAttribPointer(GLuint indx,
- GLint size,
- GLenum type,
- GLboolean normalized,
- GLsizei stride,
- const void* ptr) override;
-
-virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
-
-virtual void BlitFramebufferCHROMIUM(GLint srcX0,
- GLint srcY0,
- GLint srcX1,
- GLint srcY1,
- GLint dstX0,
- GLint dstY0,
- GLint dstX1,
- GLint dstY1,
- GLbitfield mask,
- GLenum filter) override;
-
-virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-
-virtual void RenderbufferStorageMultisampleEXT(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-
-virtual void FramebufferTexture2DMultisampleEXT(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level,
- GLsizei samples) override;
-
-virtual void TexStorage2DEXT(GLenum target,
- GLsizei levels,
- GLenum internalFormat,
- GLsizei width,
- GLsizei height) override;
-
-virtual void GenQueriesEXT(GLsizei n, GLuint* queries) override;
-
-virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
-
-virtual GLboolean IsQueryEXT(GLuint id) override;
-
-virtual void BeginQueryEXT(GLenum target, GLuint id) override;
-
-virtual void EndQueryEXT(GLenum target) override;
-
-virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
-
-virtual void GetQueryObjectuivEXT(GLuint id,
- GLenum pname,
- GLuint* params) override;
-
-virtual void InsertEventMarkerEXT(GLsizei length,
- const GLchar* marker) override;
-
-virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
-
-virtual void PopGroupMarkerEXT() override;
-
-virtual void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
-
-virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
-
-virtual GLboolean IsVertexArrayOES(GLuint array) override;
-
-virtual void BindVertexArrayOES(GLuint array) override;
-
-virtual void SwapBuffers() override;
-
-virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
- GLsizei count,
- GLenum type,
- GLuint offset) override;
-
-virtual GLboolean EnableFeatureCHROMIUM(const char* feature) override;
-
-virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
-
-virtual GLboolean UnmapBufferCHROMIUM(GLuint target) override;
-
-virtual void* MapBufferSubDataCHROMIUM(GLuint target,
- GLintptr offset,
- GLsizeiptr size,
- GLenum access) override;
-
-virtual void UnmapBufferSubDataCHROMIUM(const void* mem) override;
-
-virtual void* MapTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- GLenum access) override;
-
-virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-
-virtual void ResizeCHROMIUM(GLuint width,
- GLuint height,
- GLfloat scale_factor) override;
-
-virtual const GLchar* GetRequestableExtensionsCHROMIUM() override;
-
-virtual void RequestExtensionCHROMIUM(const char* extension) override;
-
-virtual void RateLimitOffscreenContextCHROMIUM() override;
-
-virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
- GLuint count,
- GLint* results,
- GLsizeiptr size) override;
-
-virtual void GetProgramInfoCHROMIUM(GLuint program,
+void GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
- GLsizei* size,
- void* info) override;
+ GLsizei* length,
+ char* source) override;
-virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
+void PostSubBufferCHROMIUM(GLint x,
+ GLint y,
+ GLint width,
+ GLint height) override;
-virtual GLuint CreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat) override;
+void TexImageIOSurface2DCHROMIUM(GLenum target,
+ GLsizei width,
+ GLsizei height,
+ GLuint ioSurfaceId,
+ GLuint plane) override;
-virtual void DestroyImageCHROMIUM(GLuint image_id) override;
+void CopyTextureCHROMIUM(GLenum target,
+ GLenum source_id,
+ GLenum dest_id,
+ GLint level,
+ GLint internalformat,
+ GLenum dest_type) override;
-virtual GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage) override;
+void DrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) override;
-virtual void GetTranslatedShaderSourceANGLE(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
+void DrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) override;
-virtual void PostSubBufferCHROMIUM(GLint x,
- GLint y,
- GLint width,
- GLint height) override;
+void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
-virtual void TexImageIOSurface2DCHROMIUM(GLenum target,
- GLsizei width,
- GLsizei height,
- GLuint ioSurfaceId,
- GLuint plane) override;
+void GenMailboxCHROMIUM(GLbyte* mailbox) override;
-virtual void CopyTextureCHROMIUM(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint level,
- GLint internalformat,
- GLenum dest_type) override;
+void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
-virtual void DrawArraysInstancedANGLE(GLenum mode,
- GLint first,
- GLsizei count,
- GLsizei primcount) override;
+void ProduceTextureDirectCHROMIUM(GLuint texture,
+ GLenum target,
+ const GLbyte* mailbox) override;
-virtual void DrawElementsInstancedANGLE(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices,
- GLsizei primcount) override;
+void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
-virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
+GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
+ const GLbyte* mailbox) override;
-virtual void GenMailboxCHROMIUM(GLbyte* mailbox) override;
+void BindUniformLocationCHROMIUM(GLuint program,
+ GLint location,
+ const char* name) override;
-virtual void ProduceTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
+void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void ProduceTextureDirectCHROMIUM(GLuint texture,
- GLenum target,
- const GLbyte* mailbox) override;
+void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void ConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
+void TraceBeginCHROMIUM(const char* name) override;
-virtual GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
+void TraceEndCHROMIUM() override;
-virtual void BindUniformLocationCHROMIUM(GLuint program,
- GLint location,
- const char* name) override;
+void AsyncTexSubImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* data) override;
-virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void AsyncTexImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
-virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
-virtual void TraceBeginCHROMIUM(const char* name) override;
+void WaitAllAsyncTexImage2DCHROMIUM() override;
-virtual void TraceEndCHROMIUM() override;
+void DiscardFramebufferEXT(GLenum target,
+ GLsizei count,
+ const GLenum* attachments) override;
-virtual void AsyncTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* data) override;
+void LoseContextCHROMIUM(GLenum current, GLenum other) override;
-virtual void AsyncTexImage2DCHROMIUM(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
+GLuint InsertSyncPointCHROMIUM() override;
-virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
+void WaitSyncPointCHROMIUM(GLuint sync_point) override;
-virtual void WaitAllAsyncTexImage2DCHROMIUM() override;
+void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
-virtual void DiscardFramebufferEXT(GLenum target,
- GLsizei count,
- const GLenum* attachments) override;
+void DiscardBackbufferCHROMIUM() override;
-virtual void LoseContextCHROMIUM(GLenum current, GLenum other) override;
+void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
+ GLenum plane_transform,
+ GLuint overlay_texture_id,
+ GLint bounds_x,
+ GLint bounds_y,
+ GLint bounds_width,
+ GLint bounds_height,
+ GLfloat uv_x,
+ GLfloat uv_y,
+ GLfloat uv_width,
+ GLfloat uv_height) override;
-virtual GLuint InsertSyncPointCHROMIUM() override;
+void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
-virtual void WaitSyncPointCHROMIUM(GLuint sync_point) override;
-
-virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
-
-virtual void DiscardBackbufferCHROMIUM() override;
-
-virtual void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
- GLenum plane_transform,
- GLuint overlay_texture_id,
- GLint bounds_x,
- GLint bounds_y,
- GLint bounds_width,
- GLint bounds_height,
- GLfloat uv_x,
- GLfloat uv_y,
- GLfloat uv_width,
- GLfloat uv_height) override;
-
-virtual void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
-
-virtual void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
+void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index b4e2667..7b3ec2d 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -114,25 +114,23 @@
}
}
- virtual ~MockTransferBuffer() { }
+ ~MockTransferBuffer() override {}
- virtual bool Initialize(
- unsigned int starting_buffer_size,
- unsigned int result_size,
- unsigned int /* min_buffer_size */,
- unsigned int /* max_buffer_size */,
- unsigned int alignment,
- unsigned int size_to_flush) override;
- virtual int GetShmId() override;
- virtual void* GetResultBuffer() override;
- virtual int GetResultOffset() override;
- virtual void Free() override;
- virtual bool HaveBuffer() const override;
- virtual void* AllocUpTo(
- unsigned int size, unsigned int* size_allocated) override;
- virtual void* Alloc(unsigned int size) override;
- virtual RingBuffer::Offset GetOffset(void* pointer) const override;
- virtual void FreePendingToken(void* p, unsigned int /* token */) override;
+ bool Initialize(unsigned int starting_buffer_size,
+ unsigned int result_size,
+ unsigned int /* min_buffer_size */,
+ unsigned int /* max_buffer_size */,
+ unsigned int alignment,
+ unsigned int size_to_flush) override;
+ int GetShmId() override;
+ void* GetResultBuffer() override;
+ int GetResultOffset() override;
+ void Free() override;
+ bool HaveBuffer() const override;
+ void* AllocUpTo(unsigned int size, unsigned int* size_allocated) override;
+ void* Alloc(unsigned int size) override;
+ RingBuffer::Offset GetOffset(void* pointer) const override;
+ void FreePendingToken(void* p, unsigned int /* token */) override;
size_t MaxTransferBufferSize() {
return size_ - result_size_;
diff --git a/gpu/command_buffer/client/gles2_interface_stub.h b/gpu/command_buffer/client/gles2_interface_stub.h
index cf3fb41..589a79c 100644
--- a/gpu/command_buffer/client/gles2_interface_stub.h
+++ b/gpu/command_buffer/client/gles2_interface_stub.h
@@ -14,7 +14,7 @@
class GLES2InterfaceStub : public GLES2Interface {
public:
GLES2InterfaceStub();
- virtual ~GLES2InterfaceStub();
+ ~GLES2InterfaceStub() override;
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
index b021b56..bd1a73e 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -12,520 +12,478 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_AUTOGEN_H_
-virtual void ActiveTexture(GLenum texture) override;
-virtual void AttachShader(GLuint program, GLuint shader) override;
-virtual void BindAttribLocation(GLuint program,
- GLuint index,
- const char* name) override;
-virtual void BindBuffer(GLenum target, GLuint buffer) override;
-virtual void BindFramebuffer(GLenum target, GLuint framebuffer) override;
-virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
-virtual void BindTexture(GLenum target, GLuint texture) override;
-virtual void BlendColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
-virtual void BlendEquation(GLenum mode) override;
-virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
-virtual void BlendFunc(GLenum sfactor, GLenum dfactor) override;
-virtual void BlendFuncSeparate(GLenum srcRGB,
- GLenum dstRGB,
- GLenum srcAlpha,
- GLenum dstAlpha) override;
-virtual void BufferData(GLenum target,
- GLsizeiptr size,
- const void* data,
- GLenum usage) override;
-virtual void BufferSubData(GLenum target,
- GLintptr offset,
- GLsizeiptr size,
- const void* data) override;
-virtual GLenum CheckFramebufferStatus(GLenum target) override;
-virtual void Clear(GLbitfield mask) override;
-virtual void ClearColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
-virtual void ClearDepthf(GLclampf depth) override;
-virtual void ClearStencil(GLint s) override;
-virtual void ColorMask(GLboolean red,
- GLboolean green,
- GLboolean blue,
- GLboolean alpha) override;
-virtual void CompileShader(GLuint shader) override;
-virtual void CompressedTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLsizei imageSize,
- const void* data) override;
-virtual void CompressedTexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLsizei imageSize,
- const void* data) override;
-virtual void CopyTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLint border) override;
-virtual void CopyTexSubImage2D(GLenum target,
+void ActiveTexture(GLenum texture) override;
+void AttachShader(GLuint program, GLuint shader) override;
+void BindAttribLocation(GLuint program,
+ GLuint index,
+ const char* name) override;
+void BindBuffer(GLenum target, GLuint buffer) override;
+void BindFramebuffer(GLenum target, GLuint framebuffer) override;
+void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
+void BindTexture(GLenum target, GLuint texture) override;
+void BlendColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void BlendEquation(GLenum mode) override;
+void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
+void BlendFunc(GLenum sfactor, GLenum dfactor) override;
+void BlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) override;
+void BufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) override;
+void BufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) override;
+GLenum CheckFramebufferStatus(GLenum target) override;
+void Clear(GLbitfield mask) override;
+void ClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void ClearDepthf(GLclampf depth) override;
+void ClearStencil(GLint s) override;
+void ColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) override;
+void CompileShader(GLuint shader) override;
+void CompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) override;
+void CompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) override;
+void CopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) override;
+void CopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) override;
+GLuint CreateProgram() override;
+GLuint CreateShader(GLenum type) override;
+void CullFace(GLenum mode) override;
+void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
+void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
+void DeleteProgram(GLuint program) override;
+void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) override;
+void DeleteShader(GLuint shader) override;
+void DeleteTextures(GLsizei n, const GLuint* textures) override;
+void DepthFunc(GLenum func) override;
+void DepthMask(GLboolean flag) override;
+void DepthRangef(GLclampf zNear, GLclampf zFar) override;
+void DetachShader(GLuint program, GLuint shader) override;
+void Disable(GLenum cap) override;
+void DisableVertexAttribArray(GLuint index) override;
+void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
+void DrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+void Enable(GLenum cap) override;
+void EnableVertexAttribArray(GLuint index) override;
+void Finish() override;
+void Flush() override;
+void FramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) override;
+void FramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) override;
+void FrontFace(GLenum mode) override;
+void GenBuffers(GLsizei n, GLuint* buffers) override;
+void GenerateMipmap(GLenum target) override;
+void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
+void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
+void GenTextures(GLsizei n, GLuint* textures) override;
+void GetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void GetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void GetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) override;
+GLint GetAttribLocation(GLuint program, const char* name) override;
+void GetBooleanv(GLenum pname, GLboolean* params) override;
+void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) override;
+GLenum GetError() override;
+void GetFloatv(GLenum pname, GLfloat* params) override;
+void GetFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) override;
+void GetIntegerv(GLenum pname, GLint* params) override;
+void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
+void GetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void GetRenderbufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) override;
+void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
+void GetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void GetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override;
+void GetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) override;
+const GLubyte* GetString(GLenum name) override;
+void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) override;
+void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) override;
+void GetUniformfv(GLuint program, GLint location, GLfloat* params) override;
+void GetUniformiv(GLuint program, GLint location, GLint* params) override;
+GLint GetUniformLocation(GLuint program, const char* name) override;
+void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) override;
+void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) override;
+void GetVertexAttribPointerv(GLuint index,
+ GLenum pname,
+ void** pointer) override;
+void Hint(GLenum target, GLenum mode) override;
+GLboolean IsBuffer(GLuint buffer) override;
+GLboolean IsEnabled(GLenum cap) override;
+GLboolean IsFramebuffer(GLuint framebuffer) override;
+GLboolean IsProgram(GLuint program) override;
+GLboolean IsRenderbuffer(GLuint renderbuffer) override;
+GLboolean IsShader(GLuint shader) override;
+GLboolean IsTexture(GLuint texture) override;
+void LineWidth(GLfloat width) override;
+void LinkProgram(GLuint program) override;
+void PixelStorei(GLenum pname, GLint param) override;
+void PolygonOffset(GLfloat factor, GLfloat units) override;
+void ReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) override;
+void ReleaseShaderCompiler() override;
+void RenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void SampleCoverage(GLclampf value, GLboolean invert) override;
+void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
+void ShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) override;
+void ShaderSource(GLuint shader,
+ GLsizei count,
+ const GLchar* const* str,
+ const GLint* length) override;
+void ShallowFinishCHROMIUM() override;
+void ShallowFlushCHROMIUM() override;
+void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
+void StencilFuncSeparate(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) override;
+void StencilMask(GLuint mask) override;
+void StencilMaskSeparate(GLenum face, GLuint mask) override;
+void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
+void StencilOpSeparate(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) override;
+void TexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
+void TexParameterfv(GLenum target,
+ GLenum pname,
+ const GLfloat* params) override;
+void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+void TexParameteriv(GLenum target, GLenum pname, const GLint* params) override;
+void TexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void Uniform1f(GLint location, GLfloat x) override;
+void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform1i(GLint location, GLint x) override;
+void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
+void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform2i(GLint location, GLint x, GLint y) override;
+void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) override;
+void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
+void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform4f(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) override;
+void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
+void UniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UseProgram(GLuint program) override;
+void ValidateProgram(GLuint program) override;
+void VertexAttrib1f(GLuint indx, GLfloat x) override;
+void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
+void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) override;
+void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib4f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
+void VertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) override;
+void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
+void BlitFramebufferCHROMIUM(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void RenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void FramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) override;
+void TexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalFormat,
+ GLsizei width,
+ GLsizei height) override;
+void GenQueriesEXT(GLsizei n, GLuint* queries) override;
+void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
+GLboolean IsQueryEXT(GLuint id) override;
+void BeginQueryEXT(GLenum target, GLuint id) override;
+void EndQueryEXT(GLenum target) override;
+void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+void InsertEventMarkerEXT(GLsizei length, const GLchar* marker) override;
+void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
+void PopGroupMarkerEXT() override;
+void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
+void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
+GLboolean IsVertexArrayOES(GLuint array) override;
+void BindVertexArrayOES(GLuint array) override;
+void SwapBuffers() override;
+GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
+ GLsizei count,
+ GLenum type,
+ GLuint offset) override;
+GLboolean EnableFeatureCHROMIUM(const char* feature) override;
+void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
+GLboolean UnmapBufferCHROMIUM(GLuint target) override;
+void* MapBufferSubDataCHROMIUM(GLuint target,
+ GLintptr offset,
+ GLsizeiptr size,
+ GLenum access) override;
+void UnmapBufferSubDataCHROMIUM(const void* mem) override;
+void* MapTexSubImage2DCHROMIUM(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
- GLint x,
- GLint y,
GLsizei width,
- GLsizei height) override;
-virtual GLuint CreateProgram() override;
-virtual GLuint CreateShader(GLenum type) override;
-virtual void CullFace(GLenum mode) override;
-virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
-virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
-virtual void DeleteProgram(GLuint program) override;
-virtual void DeleteRenderbuffers(GLsizei n,
- const GLuint* renderbuffers) override;
-virtual void DeleteShader(GLuint shader) override;
-virtual void DeleteTextures(GLsizei n, const GLuint* textures) override;
-virtual void DepthFunc(GLenum func) override;
-virtual void DepthMask(GLboolean flag) override;
-virtual void DepthRangef(GLclampf zNear, GLclampf zFar) override;
-virtual void DetachShader(GLuint program, GLuint shader) override;
-virtual void Disable(GLenum cap) override;
-virtual void DisableVertexAttribArray(GLuint index) override;
-virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
-virtual void DrawElements(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices) override;
-virtual void Enable(GLenum cap) override;
-virtual void EnableVertexAttribArray(GLuint index) override;
-virtual void Finish() override;
-virtual void Flush() override;
-virtual void FramebufferRenderbuffer(GLenum target,
- GLenum attachment,
- GLenum renderbuffertarget,
- GLuint renderbuffer) override;
-virtual void FramebufferTexture2D(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level) override;
-virtual void FrontFace(GLenum mode) override;
-virtual void GenBuffers(GLsizei n, GLuint* buffers) override;
-virtual void GenerateMipmap(GLenum target) override;
-virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
-virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
-virtual void GenTextures(GLsizei n, GLuint* textures) override;
-virtual void GetActiveAttrib(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-virtual void GetActiveUniform(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-virtual void GetAttachedShaders(GLuint program,
- GLsizei maxcount,
- GLsizei* count,
- GLuint* shaders) override;
-virtual GLint GetAttribLocation(GLuint program, const char* name) override;
-virtual void GetBooleanv(GLenum pname, GLboolean* params) override;
-virtual void GetBufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual GLenum GetError() override;
-virtual void GetFloatv(GLenum pname, GLfloat* params) override;
-virtual void GetFramebufferAttachmentParameteriv(GLenum target,
- GLenum attachment,
- GLenum pname,
- GLint* params) override;
-virtual void GetIntegerv(GLenum pname, GLint* params) override;
-virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
-virtual void GetProgramInfoLog(GLuint program,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-virtual void GetRenderbufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
-virtual void GetShaderInfoLog(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-virtual void GetShaderPrecisionFormat(GLenum shadertype,
- GLenum precisiontype,
- GLint* range,
- GLint* precision) override;
-virtual void GetShaderSource(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
-virtual const GLubyte* GetString(GLenum name) override;
-virtual void GetTexParameterfv(GLenum target,
- GLenum pname,
- GLfloat* params) override;
-virtual void GetTexParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual void GetUniformfv(GLuint program,
- GLint location,
- GLfloat* params) override;
-virtual void GetUniformiv(GLuint program,
- GLint location,
- GLint* params) override;
-virtual GLint GetUniformLocation(GLuint program, const char* name) override;
-virtual void GetVertexAttribfv(GLuint index,
- GLenum pname,
- GLfloat* params) override;
-virtual void GetVertexAttribiv(GLuint index,
- GLenum pname,
- GLint* params) override;
-virtual void GetVertexAttribPointerv(GLuint index,
- GLenum pname,
- void** pointer) override;
-virtual void Hint(GLenum target, GLenum mode) override;
-virtual GLboolean IsBuffer(GLuint buffer) override;
-virtual GLboolean IsEnabled(GLenum cap) override;
-virtual GLboolean IsFramebuffer(GLuint framebuffer) override;
-virtual GLboolean IsProgram(GLuint program) override;
-virtual GLboolean IsRenderbuffer(GLuint renderbuffer) override;
-virtual GLboolean IsShader(GLuint shader) override;
-virtual GLboolean IsTexture(GLuint texture) override;
-virtual void LineWidth(GLfloat width) override;
-virtual void LinkProgram(GLuint program) override;
-virtual void PixelStorei(GLenum pname, GLint param) override;
-virtual void PolygonOffset(GLfloat factor, GLfloat units) override;
-virtual void ReadPixels(GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- void* pixels) override;
-virtual void ReleaseShaderCompiler() override;
-virtual void RenderbufferStorage(GLenum target,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void SampleCoverage(GLclampf value, GLboolean invert) override;
-virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
-virtual void ShaderBinary(GLsizei n,
- const GLuint* shaders,
- GLenum binaryformat,
- const void* binary,
- GLsizei length) override;
-virtual void ShaderSource(GLuint shader,
- GLsizei count,
- const GLchar* const* str,
- const GLint* length) override;
-virtual void ShallowFinishCHROMIUM() override;
-virtual void ShallowFlushCHROMIUM() override;
-virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
-virtual void StencilFuncSeparate(GLenum face,
- GLenum func,
- GLint ref,
- GLuint mask) override;
-virtual void StencilMask(GLuint mask) override;
-virtual void StencilMaskSeparate(GLenum face, GLuint mask) override;
-virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
-virtual void StencilOpSeparate(GLenum face,
- GLenum fail,
- GLenum zfail,
- GLenum zpass) override;
-virtual void TexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
-virtual void TexParameterfv(GLenum target,
- GLenum pname,
- const GLfloat* params) override;
-virtual void TexParameteri(GLenum target, GLenum pname, GLint param) override;
-virtual void TexParameteriv(GLenum target,
- GLenum pname,
- const GLint* params) override;
-virtual void TexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access) override;
+void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
+void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
+const GLchar* GetRequestableExtensionsCHROMIUM() override;
+void RequestExtensionCHROMIUM(const char* extension) override;
+void RateLimitOffscreenContextCHROMIUM() override;
+void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
+ GLuint count,
+ GLint* results,
+ GLsizeiptr size) override;
+void GetProgramInfoCHROMIUM(GLuint program,
+ GLsizei bufsize,
+ GLsizei* size,
+ void* info) override;
+GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
+GLuint CreateImageCHROMIUM(ClientBuffer buffer,
GLsizei width,
GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void Uniform1f(GLint location, GLfloat x) override;
-virtual void Uniform1fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform1i(GLint location, GLint x) override;
-virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
-virtual void Uniform2fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform2i(GLint location, GLint x, GLint y) override;
-virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform3f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-virtual void Uniform3fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
-virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform4f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-virtual void Uniform4fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform4i(GLint location,
- GLint x,
- GLint y,
- GLint z,
- GLint w) override;
-virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void UniformMatrix2fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UniformMatrix3fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UniformMatrix4fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UseProgram(GLuint program) override;
-virtual void ValidateProgram(GLuint program) override;
-virtual void VertexAttrib1f(GLuint indx, GLfloat x) override;
-virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
-virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib3f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib4f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttribPointer(GLuint indx,
- GLint size,
- GLenum type,
- GLboolean normalized,
- GLsizei stride,
- const void* ptr) override;
-virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
-virtual void BlitFramebufferCHROMIUM(GLint srcX0,
- GLint srcY0,
- GLint srcX1,
- GLint srcY1,
- GLint dstX0,
- GLint dstY0,
- GLint dstX1,
- GLint dstY1,
- GLbitfield mask,
- GLenum filter) override;
-virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void RenderbufferStorageMultisampleEXT(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void FramebufferTexture2DMultisampleEXT(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level,
- GLsizei samples) override;
-virtual void TexStorage2DEXT(GLenum target,
- GLsizei levels,
- GLenum internalFormat,
- GLsizei width,
- GLsizei height) override;
-virtual void GenQueriesEXT(GLsizei n, GLuint* queries) override;
-virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
-virtual GLboolean IsQueryEXT(GLuint id) override;
-virtual void BeginQueryEXT(GLenum target, GLuint id) override;
-virtual void EndQueryEXT(GLenum target) override;
-virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
-virtual void GetQueryObjectuivEXT(GLuint id,
- GLenum pname,
- GLuint* params) override;
-virtual void InsertEventMarkerEXT(GLsizei length,
- const GLchar* marker) override;
-virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
-virtual void PopGroupMarkerEXT() override;
-virtual void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
-virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
-virtual GLboolean IsVertexArrayOES(GLuint array) override;
-virtual void BindVertexArrayOES(GLuint array) override;
-virtual void SwapBuffers() override;
-virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
- GLsizei count,
- GLenum type,
- GLuint offset) override;
-virtual GLboolean EnableFeatureCHROMIUM(const char* feature) override;
-virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
-virtual GLboolean UnmapBufferCHROMIUM(GLuint target) override;
-virtual void* MapBufferSubDataCHROMIUM(GLuint target,
- GLintptr offset,
- GLsizeiptr size,
- GLenum access) override;
-virtual void UnmapBufferSubDataCHROMIUM(const void* mem) override;
-virtual void* MapTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- GLenum access) override;
-virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-virtual void ResizeCHROMIUM(GLuint width,
- GLuint height,
- GLfloat scale_factor) override;
-virtual const GLchar* GetRequestableExtensionsCHROMIUM() override;
-virtual void RequestExtensionCHROMIUM(const char* extension) override;
-virtual void RateLimitOffscreenContextCHROMIUM() override;
-virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
- GLuint count,
- GLint* results,
- GLsizeiptr size) override;
-virtual void GetProgramInfoCHROMIUM(GLuint program,
+ GLenum internalformat) override;
+void DestroyImageCHROMIUM(GLuint image_id) override;
+GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
+ GLsizei height,
+ GLenum internalformat,
+ GLenum usage) override;
+void GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
- GLsizei* size,
- void* info) override;
-virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
-virtual GLuint CreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat) override;
-virtual void DestroyImageCHROMIUM(GLuint image_id) override;
-virtual GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage) override;
-virtual void GetTranslatedShaderSourceANGLE(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
-virtual void PostSubBufferCHROMIUM(GLint x,
- GLint y,
- GLint width,
- GLint height) override;
-virtual void TexImageIOSurface2DCHROMIUM(GLenum target,
- GLsizei width,
- GLsizei height,
- GLuint ioSurfaceId,
- GLuint plane) override;
-virtual void CopyTextureCHROMIUM(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint level,
- GLint internalformat,
- GLenum dest_type) override;
-virtual void DrawArraysInstancedANGLE(GLenum mode,
- GLint first,
- GLsizei count,
- GLsizei primcount) override;
-virtual void DrawElementsInstancedANGLE(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices,
- GLsizei primcount) override;
-virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
-virtual void GenMailboxCHROMIUM(GLbyte* mailbox) override;
-virtual void ProduceTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual void ProduceTextureDirectCHROMIUM(GLuint texture,
- GLenum target,
- const GLbyte* mailbox) override;
-virtual void ConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual void BindUniformLocationCHROMIUM(GLuint program,
- GLint location,
- const char* name) override;
-virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void TraceBeginCHROMIUM(const char* name) override;
-virtual void TraceEndCHROMIUM() override;
-virtual void AsyncTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* data) override;
-virtual void AsyncTexImage2DCHROMIUM(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
-virtual void WaitAllAsyncTexImage2DCHROMIUM() override;
-virtual void DiscardFramebufferEXT(GLenum target,
- GLsizei count,
- const GLenum* attachments) override;
-virtual void LoseContextCHROMIUM(GLenum current, GLenum other) override;
-virtual GLuint InsertSyncPointCHROMIUM() override;
-virtual void WaitSyncPointCHROMIUM(GLuint sync_point) override;
-virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
-virtual void DiscardBackbufferCHROMIUM() override;
-virtual void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
- GLenum plane_transform,
- GLuint overlay_texture_id,
- GLint bounds_x,
- GLint bounds_y,
- GLint bounds_width,
- GLint bounds_height,
- GLfloat uv_x,
- GLfloat uv_y,
- GLfloat uv_width,
- GLfloat uv_height) override;
-virtual void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
-virtual void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
+ GLsizei* length,
+ char* source) override;
+void PostSubBufferCHROMIUM(GLint x,
+ GLint y,
+ GLint width,
+ GLint height) override;
+void TexImageIOSurface2DCHROMIUM(GLenum target,
+ GLsizei width,
+ GLsizei height,
+ GLuint ioSurfaceId,
+ GLuint plane) override;
+void CopyTextureCHROMIUM(GLenum target,
+ GLenum source_id,
+ GLenum dest_id,
+ GLint level,
+ GLint internalformat,
+ GLenum dest_type) override;
+void DrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) override;
+void DrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) override;
+void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
+void GenMailboxCHROMIUM(GLbyte* mailbox) override;
+void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+void ProduceTextureDirectCHROMIUM(GLuint texture,
+ GLenum target,
+ const GLbyte* mailbox) override;
+void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
+ const GLbyte* mailbox) override;
+void BindUniformLocationCHROMIUM(GLuint program,
+ GLint location,
+ const char* name) override;
+void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void TraceBeginCHROMIUM(const char* name) override;
+void TraceEndCHROMIUM() override;
+void AsyncTexSubImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* data) override;
+void AsyncTexImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
+void WaitAllAsyncTexImage2DCHROMIUM() override;
+void DiscardFramebufferEXT(GLenum target,
+ GLsizei count,
+ const GLenum* attachments) override;
+void LoseContextCHROMIUM(GLenum current, GLenum other) override;
+GLuint InsertSyncPointCHROMIUM() override;
+void WaitSyncPointCHROMIUM(GLuint sync_point) override;
+void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
+void DiscardBackbufferCHROMIUM() override;
+void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
+ GLenum plane_transform,
+ GLuint overlay_texture_id,
+ GLint bounds_x,
+ GLint bounds_y,
+ GLint bounds_width,
+ GLint bounds_height,
+ GLfloat uv_x,
+ GLfloat uv_y,
+ GLfloat uv_width,
+ GLfloat uv_height) override;
+void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
+void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_AUTOGEN_H_
diff --git a/gpu/command_buffer/client/gles2_trace_implementation.h b/gpu/command_buffer/client/gles2_trace_implementation.h
index c215231..780a608 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation.h
@@ -17,7 +17,7 @@
: NON_EXPORTED_BASE(public GLES2Interface) {
public:
explicit GLES2TraceImplementation(GLES2Interface* gl);
- virtual ~GLES2TraceImplementation();
+ ~GLES2TraceImplementation() override;
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index aa0c96f..22c12bc 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -12,520 +12,478 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_TRACE_IMPLEMENTATION_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_CLIENT_GLES2_TRACE_IMPLEMENTATION_AUTOGEN_H_
-virtual void ActiveTexture(GLenum texture) override;
-virtual void AttachShader(GLuint program, GLuint shader) override;
-virtual void BindAttribLocation(GLuint program,
- GLuint index,
- const char* name) override;
-virtual void BindBuffer(GLenum target, GLuint buffer) override;
-virtual void BindFramebuffer(GLenum target, GLuint framebuffer) override;
-virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
-virtual void BindTexture(GLenum target, GLuint texture) override;
-virtual void BlendColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
-virtual void BlendEquation(GLenum mode) override;
-virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
-virtual void BlendFunc(GLenum sfactor, GLenum dfactor) override;
-virtual void BlendFuncSeparate(GLenum srcRGB,
- GLenum dstRGB,
- GLenum srcAlpha,
- GLenum dstAlpha) override;
-virtual void BufferData(GLenum target,
- GLsizeiptr size,
- const void* data,
- GLenum usage) override;
-virtual void BufferSubData(GLenum target,
- GLintptr offset,
- GLsizeiptr size,
- const void* data) override;
-virtual GLenum CheckFramebufferStatus(GLenum target) override;
-virtual void Clear(GLbitfield mask) override;
-virtual void ClearColor(GLclampf red,
- GLclampf green,
- GLclampf blue,
- GLclampf alpha) override;
-virtual void ClearDepthf(GLclampf depth) override;
-virtual void ClearStencil(GLint s) override;
-virtual void ColorMask(GLboolean red,
- GLboolean green,
- GLboolean blue,
- GLboolean alpha) override;
-virtual void CompileShader(GLuint shader) override;
-virtual void CompressedTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLsizei imageSize,
- const void* data) override;
-virtual void CompressedTexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLsizei imageSize,
- const void* data) override;
-virtual void CopyTexImage2D(GLenum target,
- GLint level,
- GLenum internalformat,
- GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLint border) override;
-virtual void CopyTexSubImage2D(GLenum target,
+void ActiveTexture(GLenum texture) override;
+void AttachShader(GLuint program, GLuint shader) override;
+void BindAttribLocation(GLuint program,
+ GLuint index,
+ const char* name) override;
+void BindBuffer(GLenum target, GLuint buffer) override;
+void BindFramebuffer(GLenum target, GLuint framebuffer) override;
+void BindRenderbuffer(GLenum target, GLuint renderbuffer) override;
+void BindTexture(GLenum target, GLuint texture) override;
+void BlendColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void BlendEquation(GLenum mode) override;
+void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) override;
+void BlendFunc(GLenum sfactor, GLenum dfactor) override;
+void BlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) override;
+void BufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) override;
+void BufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) override;
+GLenum CheckFramebufferStatus(GLenum target) override;
+void Clear(GLbitfield mask) override;
+void ClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void ClearDepthf(GLclampf depth) override;
+void ClearStencil(GLint s) override;
+void ColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) override;
+void CompileShader(GLuint shader) override;
+void CompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) override;
+void CompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) override;
+void CopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) override;
+void CopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) override;
+GLuint CreateProgram() override;
+GLuint CreateShader(GLenum type) override;
+void CullFace(GLenum mode) override;
+void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
+void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
+void DeleteProgram(GLuint program) override;
+void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) override;
+void DeleteShader(GLuint shader) override;
+void DeleteTextures(GLsizei n, const GLuint* textures) override;
+void DepthFunc(GLenum func) override;
+void DepthMask(GLboolean flag) override;
+void DepthRangef(GLclampf zNear, GLclampf zFar) override;
+void DetachShader(GLuint program, GLuint shader) override;
+void Disable(GLenum cap) override;
+void DisableVertexAttribArray(GLuint index) override;
+void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
+void DrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+void Enable(GLenum cap) override;
+void EnableVertexAttribArray(GLuint index) override;
+void Finish() override;
+void Flush() override;
+void FramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) override;
+void FramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) override;
+void FrontFace(GLenum mode) override;
+void GenBuffers(GLsizei n, GLuint* buffers) override;
+void GenerateMipmap(GLenum target) override;
+void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
+void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
+void GenTextures(GLsizei n, GLuint* textures) override;
+void GetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void GetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void GetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) override;
+GLint GetAttribLocation(GLuint program, const char* name) override;
+void GetBooleanv(GLenum pname, GLboolean* params) override;
+void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) override;
+GLenum GetError() override;
+void GetFloatv(GLenum pname, GLfloat* params) override;
+void GetFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) override;
+void GetIntegerv(GLenum pname, GLint* params) override;
+void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
+void GetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void GetRenderbufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) override;
+void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
+void GetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void GetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override;
+void GetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) override;
+const GLubyte* GetString(GLenum name) override;
+void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) override;
+void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) override;
+void GetUniformfv(GLuint program, GLint location, GLfloat* params) override;
+void GetUniformiv(GLuint program, GLint location, GLint* params) override;
+GLint GetUniformLocation(GLuint program, const char* name) override;
+void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) override;
+void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) override;
+void GetVertexAttribPointerv(GLuint index,
+ GLenum pname,
+ void** pointer) override;
+void Hint(GLenum target, GLenum mode) override;
+GLboolean IsBuffer(GLuint buffer) override;
+GLboolean IsEnabled(GLenum cap) override;
+GLboolean IsFramebuffer(GLuint framebuffer) override;
+GLboolean IsProgram(GLuint program) override;
+GLboolean IsRenderbuffer(GLuint renderbuffer) override;
+GLboolean IsShader(GLuint shader) override;
+GLboolean IsTexture(GLuint texture) override;
+void LineWidth(GLfloat width) override;
+void LinkProgram(GLuint program) override;
+void PixelStorei(GLenum pname, GLint param) override;
+void PolygonOffset(GLfloat factor, GLfloat units) override;
+void ReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) override;
+void ReleaseShaderCompiler() override;
+void RenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void SampleCoverage(GLclampf value, GLboolean invert) override;
+void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
+void ShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) override;
+void ShaderSource(GLuint shader,
+ GLsizei count,
+ const GLchar* const* str,
+ const GLint* length) override;
+void ShallowFinishCHROMIUM() override;
+void ShallowFlushCHROMIUM() override;
+void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
+void StencilFuncSeparate(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) override;
+void StencilMask(GLuint mask) override;
+void StencilMaskSeparate(GLenum face, GLuint mask) override;
+void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
+void StencilOpSeparate(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) override;
+void TexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
+void TexParameterfv(GLenum target,
+ GLenum pname,
+ const GLfloat* params) override;
+void TexParameteri(GLenum target, GLenum pname, GLint param) override;
+void TexParameteriv(GLenum target, GLenum pname, const GLint* params) override;
+void TexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void Uniform1f(GLint location, GLfloat x) override;
+void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform1i(GLint location, GLint x) override;
+void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
+void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform2i(GLint location, GLint x, GLint y) override;
+void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) override;
+void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
+void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
+void Uniform4f(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) override;
+void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) override;
+void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
+void UniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void UseProgram(GLuint program) override;
+void ValidateProgram(GLuint program) override;
+void VertexAttrib1f(GLuint indx, GLfloat x) override;
+void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
+void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) override;
+void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
+void VertexAttrib4f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
+void VertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) override;
+void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
+void BlitFramebufferCHROMIUM(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void RenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void FramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) override;
+void TexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalFormat,
+ GLsizei width,
+ GLsizei height) override;
+void GenQueriesEXT(GLsizei n, GLuint* queries) override;
+void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
+GLboolean IsQueryEXT(GLuint id) override;
+void BeginQueryEXT(GLenum target, GLuint id) override;
+void EndQueryEXT(GLenum target) override;
+void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+void InsertEventMarkerEXT(GLsizei length, const GLchar* marker) override;
+void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
+void PopGroupMarkerEXT() override;
+void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
+void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
+GLboolean IsVertexArrayOES(GLuint array) override;
+void BindVertexArrayOES(GLuint array) override;
+void SwapBuffers() override;
+GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
+ GLsizei count,
+ GLenum type,
+ GLuint offset) override;
+GLboolean EnableFeatureCHROMIUM(const char* feature) override;
+void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
+GLboolean UnmapBufferCHROMIUM(GLuint target) override;
+void* MapBufferSubDataCHROMIUM(GLuint target,
+ GLintptr offset,
+ GLsizeiptr size,
+ GLenum access) override;
+void UnmapBufferSubDataCHROMIUM(const void* mem) override;
+void* MapTexSubImage2DCHROMIUM(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
- GLint x,
- GLint y,
GLsizei width,
- GLsizei height) override;
-virtual GLuint CreateProgram() override;
-virtual GLuint CreateShader(GLenum type) override;
-virtual void CullFace(GLenum mode) override;
-virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
-virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
-virtual void DeleteProgram(GLuint program) override;
-virtual void DeleteRenderbuffers(GLsizei n,
- const GLuint* renderbuffers) override;
-virtual void DeleteShader(GLuint shader) override;
-virtual void DeleteTextures(GLsizei n, const GLuint* textures) override;
-virtual void DepthFunc(GLenum func) override;
-virtual void DepthMask(GLboolean flag) override;
-virtual void DepthRangef(GLclampf zNear, GLclampf zFar) override;
-virtual void DetachShader(GLuint program, GLuint shader) override;
-virtual void Disable(GLenum cap) override;
-virtual void DisableVertexAttribArray(GLuint index) override;
-virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) override;
-virtual void DrawElements(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices) override;
-virtual void Enable(GLenum cap) override;
-virtual void EnableVertexAttribArray(GLuint index) override;
-virtual void Finish() override;
-virtual void Flush() override;
-virtual void FramebufferRenderbuffer(GLenum target,
- GLenum attachment,
- GLenum renderbuffertarget,
- GLuint renderbuffer) override;
-virtual void FramebufferTexture2D(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level) override;
-virtual void FrontFace(GLenum mode) override;
-virtual void GenBuffers(GLsizei n, GLuint* buffers) override;
-virtual void GenerateMipmap(GLenum target) override;
-virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
-virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
-virtual void GenTextures(GLsizei n, GLuint* textures) override;
-virtual void GetActiveAttrib(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-virtual void GetActiveUniform(GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-virtual void GetAttachedShaders(GLuint program,
- GLsizei maxcount,
- GLsizei* count,
- GLuint* shaders) override;
-virtual GLint GetAttribLocation(GLuint program, const char* name) override;
-virtual void GetBooleanv(GLenum pname, GLboolean* params) override;
-virtual void GetBufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual GLenum GetError() override;
-virtual void GetFloatv(GLenum pname, GLfloat* params) override;
-virtual void GetFramebufferAttachmentParameteriv(GLenum target,
- GLenum attachment,
- GLenum pname,
- GLint* params) override;
-virtual void GetIntegerv(GLenum pname, GLint* params) override;
-virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
-virtual void GetProgramInfoLog(GLuint program,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-virtual void GetRenderbufferParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
-virtual void GetShaderInfoLog(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* infolog) override;
-virtual void GetShaderPrecisionFormat(GLenum shadertype,
- GLenum precisiontype,
- GLint* range,
- GLint* precision) override;
-virtual void GetShaderSource(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
-virtual const GLubyte* GetString(GLenum name) override;
-virtual void GetTexParameterfv(GLenum target,
- GLenum pname,
- GLfloat* params) override;
-virtual void GetTexParameteriv(GLenum target,
- GLenum pname,
- GLint* params) override;
-virtual void GetUniformfv(GLuint program,
- GLint location,
- GLfloat* params) override;
-virtual void GetUniformiv(GLuint program,
- GLint location,
- GLint* params) override;
-virtual GLint GetUniformLocation(GLuint program, const char* name) override;
-virtual void GetVertexAttribfv(GLuint index,
- GLenum pname,
- GLfloat* params) override;
-virtual void GetVertexAttribiv(GLuint index,
- GLenum pname,
- GLint* params) override;
-virtual void GetVertexAttribPointerv(GLuint index,
- GLenum pname,
- void** pointer) override;
-virtual void Hint(GLenum target, GLenum mode) override;
-virtual GLboolean IsBuffer(GLuint buffer) override;
-virtual GLboolean IsEnabled(GLenum cap) override;
-virtual GLboolean IsFramebuffer(GLuint framebuffer) override;
-virtual GLboolean IsProgram(GLuint program) override;
-virtual GLboolean IsRenderbuffer(GLuint renderbuffer) override;
-virtual GLboolean IsShader(GLuint shader) override;
-virtual GLboolean IsTexture(GLuint texture) override;
-virtual void LineWidth(GLfloat width) override;
-virtual void LinkProgram(GLuint program) override;
-virtual void PixelStorei(GLenum pname, GLint param) override;
-virtual void PolygonOffset(GLfloat factor, GLfloat units) override;
-virtual void ReadPixels(GLint x,
- GLint y,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- void* pixels) override;
-virtual void ReleaseShaderCompiler() override;
-virtual void RenderbufferStorage(GLenum target,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void SampleCoverage(GLclampf value, GLboolean invert) override;
-virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
-virtual void ShaderBinary(GLsizei n,
- const GLuint* shaders,
- GLenum binaryformat,
- const void* binary,
- GLsizei length) override;
-virtual void ShaderSource(GLuint shader,
- GLsizei count,
- const GLchar* const* str,
- const GLint* length) override;
-virtual void ShallowFinishCHROMIUM() override;
-virtual void ShallowFlushCHROMIUM() override;
-virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
-virtual void StencilFuncSeparate(GLenum face,
- GLenum func,
- GLint ref,
- GLuint mask) override;
-virtual void StencilMask(GLuint mask) override;
-virtual void StencilMaskSeparate(GLenum face, GLuint mask) override;
-virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) override;
-virtual void StencilOpSeparate(GLenum face,
- GLenum fail,
- GLenum zfail,
- GLenum zpass) override;
-virtual void TexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) override;
-virtual void TexParameterfv(GLenum target,
- GLenum pname,
- const GLfloat* params) override;
-virtual void TexParameteri(GLenum target, GLenum pname, GLint param) override;
-virtual void TexParameteriv(GLenum target,
- GLenum pname,
- const GLint* params) override;
-virtual void TexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access) override;
+void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
+void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) override;
+const GLchar* GetRequestableExtensionsCHROMIUM() override;
+void RequestExtensionCHROMIUM(const char* extension) override;
+void RateLimitOffscreenContextCHROMIUM() override;
+void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
+ GLuint count,
+ GLint* results,
+ GLsizeiptr size) override;
+void GetProgramInfoCHROMIUM(GLuint program,
+ GLsizei bufsize,
+ GLsizei* size,
+ void* info) override;
+GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
+GLuint CreateImageCHROMIUM(ClientBuffer buffer,
GLsizei width,
GLsizei height,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void Uniform1f(GLint location, GLfloat x) override;
-virtual void Uniform1fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform1i(GLint location, GLint x) override;
-virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) override;
-virtual void Uniform2fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform2i(GLint location, GLint x, GLint y) override;
-virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform3f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-virtual void Uniform3fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) override;
-virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void Uniform4f(GLint location,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-virtual void Uniform4fv(GLint location,
- GLsizei count,
- const GLfloat* v) override;
-virtual void Uniform4i(GLint location,
- GLint x,
- GLint y,
- GLint z,
- GLint w) override;
-virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) override;
-virtual void UniformMatrix2fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UniformMatrix3fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UniformMatrix4fv(GLint location,
- GLsizei count,
- GLboolean transpose,
- const GLfloat* value) override;
-virtual void UseProgram(GLuint program) override;
-virtual void ValidateProgram(GLuint program) override;
-virtual void VertexAttrib1f(GLuint indx, GLfloat x) override;
-virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) override;
-virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib3f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z) override;
-virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttrib4f(GLuint indx,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w) override;
-virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) override;
-virtual void VertexAttribPointer(GLuint indx,
- GLint size,
- GLenum type,
- GLboolean normalized,
- GLsizei stride,
- const void* ptr) override;
-virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
-virtual void BlitFramebufferCHROMIUM(GLint srcX0,
- GLint srcY0,
- GLint srcX1,
- GLint srcY1,
- GLint dstX0,
- GLint dstY0,
- GLint dstX1,
- GLint dstY1,
- GLbitfield mask,
- GLenum filter) override;
-virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void RenderbufferStorageMultisampleEXT(GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height) override;
-virtual void FramebufferTexture2DMultisampleEXT(GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level,
- GLsizei samples) override;
-virtual void TexStorage2DEXT(GLenum target,
- GLsizei levels,
- GLenum internalFormat,
- GLsizei width,
- GLsizei height) override;
-virtual void GenQueriesEXT(GLsizei n, GLuint* queries) override;
-virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
-virtual GLboolean IsQueryEXT(GLuint id) override;
-virtual void BeginQueryEXT(GLenum target, GLuint id) override;
-virtual void EndQueryEXT(GLenum target) override;
-virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
-virtual void GetQueryObjectuivEXT(GLuint id,
- GLenum pname,
- GLuint* params) override;
-virtual void InsertEventMarkerEXT(GLsizei length,
- const GLchar* marker) override;
-virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) override;
-virtual void PopGroupMarkerEXT() override;
-virtual void GenVertexArraysOES(GLsizei n, GLuint* arrays) override;
-virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
-virtual GLboolean IsVertexArrayOES(GLuint array) override;
-virtual void BindVertexArrayOES(GLuint array) override;
-virtual void SwapBuffers() override;
-virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
- GLsizei count,
- GLenum type,
- GLuint offset) override;
-virtual GLboolean EnableFeatureCHROMIUM(const char* feature) override;
-virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
-virtual GLboolean UnmapBufferCHROMIUM(GLuint target) override;
-virtual void* MapBufferSubDataCHROMIUM(GLuint target,
- GLintptr offset,
- GLsizeiptr size,
- GLenum access) override;
-virtual void UnmapBufferSubDataCHROMIUM(const void* mem) override;
-virtual void* MapTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- GLenum access) override;
-virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) override;
-virtual void ResizeCHROMIUM(GLuint width,
- GLuint height,
- GLfloat scale_factor) override;
-virtual const GLchar* GetRequestableExtensionsCHROMIUM() override;
-virtual void RequestExtensionCHROMIUM(const char* extension) override;
-virtual void RateLimitOffscreenContextCHROMIUM() override;
-virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames,
- GLuint count,
- GLint* results,
- GLsizeiptr size) override;
-virtual void GetProgramInfoCHROMIUM(GLuint program,
+ GLenum internalformat) override;
+void DestroyImageCHROMIUM(GLuint image_id) override;
+GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
+ GLsizei height,
+ GLenum internalformat,
+ GLenum usage) override;
+void GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
- GLsizei* size,
- void* info) override;
-virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) override;
-virtual GLuint CreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat) override;
-virtual void DestroyImageCHROMIUM(GLuint image_id) override;
-virtual GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage) override;
-virtual void GetTranslatedShaderSourceANGLE(GLuint shader,
- GLsizei bufsize,
- GLsizei* length,
- char* source) override;
-virtual void PostSubBufferCHROMIUM(GLint x,
- GLint y,
- GLint width,
- GLint height) override;
-virtual void TexImageIOSurface2DCHROMIUM(GLenum target,
- GLsizei width,
- GLsizei height,
- GLuint ioSurfaceId,
- GLuint plane) override;
-virtual void CopyTextureCHROMIUM(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint level,
- GLint internalformat,
- GLenum dest_type) override;
-virtual void DrawArraysInstancedANGLE(GLenum mode,
- GLint first,
- GLsizei count,
- GLsizei primcount) override;
-virtual void DrawElementsInstancedANGLE(GLenum mode,
- GLsizei count,
- GLenum type,
- const void* indices,
- GLsizei primcount) override;
-virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
-virtual void GenMailboxCHROMIUM(GLbyte* mailbox) override;
-virtual void ProduceTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual void ProduceTextureDirectCHROMIUM(GLuint texture,
- GLenum target,
- const GLbyte* mailbox) override;
-virtual void ConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* mailbox) override;
-virtual void BindUniformLocationCHROMIUM(GLuint program,
- GLint location,
- const char* name) override;
-virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
-virtual void TraceBeginCHROMIUM(const char* name) override;
-virtual void TraceEndCHROMIUM() override;
-virtual void AsyncTexSubImage2DCHROMIUM(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const void* data) override;
-virtual void AsyncTexImage2DCHROMIUM(GLenum target,
- GLint level,
- GLenum internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const void* pixels) override;
-virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
-virtual void WaitAllAsyncTexImage2DCHROMIUM() override;
-virtual void DiscardFramebufferEXT(GLenum target,
- GLsizei count,
- const GLenum* attachments) override;
-virtual void LoseContextCHROMIUM(GLenum current, GLenum other) override;
-virtual GLuint InsertSyncPointCHROMIUM() override;
-virtual void WaitSyncPointCHROMIUM(GLuint sync_point) override;
-virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
-virtual void DiscardBackbufferCHROMIUM() override;
-virtual void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
- GLenum plane_transform,
- GLuint overlay_texture_id,
- GLint bounds_x,
- GLint bounds_y,
- GLint bounds_width,
- GLint bounds_height,
- GLfloat uv_x,
- GLfloat uv_y,
- GLfloat uv_width,
- GLfloat uv_height) override;
-virtual void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
-virtual void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
+ GLsizei* length,
+ char* source) override;
+void PostSubBufferCHROMIUM(GLint x,
+ GLint y,
+ GLint width,
+ GLint height) override;
+void TexImageIOSurface2DCHROMIUM(GLenum target,
+ GLsizei width,
+ GLsizei height,
+ GLuint ioSurfaceId,
+ GLuint plane) override;
+void CopyTextureCHROMIUM(GLenum target,
+ GLenum source_id,
+ GLenum dest_id,
+ GLint level,
+ GLint internalformat,
+ GLenum dest_type) override;
+void DrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) override;
+void DrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) override;
+void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
+void GenMailboxCHROMIUM(GLbyte* mailbox) override;
+void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+void ProduceTextureDirectCHROMIUM(GLuint texture,
+ GLenum target,
+ const GLbyte* mailbox) override;
+void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
+GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
+ const GLbyte* mailbox) override;
+void BindUniformLocationCHROMIUM(GLuint program,
+ GLint location,
+ const char* name) override;
+void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) override;
+void TraceBeginCHROMIUM(const char* name) override;
+void TraceEndCHROMIUM() override;
+void AsyncTexSubImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* data) override;
+void AsyncTexImage2DCHROMIUM(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
+void WaitAllAsyncTexImage2DCHROMIUM() override;
+void DiscardFramebufferEXT(GLenum target,
+ GLsizei count,
+ const GLenum* attachments) override;
+void LoseContextCHROMIUM(GLenum current, GLenum other) override;
+GLuint InsertSyncPointCHROMIUM() override;
+void WaitSyncPointCHROMIUM(GLuint sync_point) override;
+void DrawBuffersEXT(GLsizei count, const GLenum* bufs) override;
+void DiscardBackbufferCHROMIUM() override;
+void ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
+ GLenum plane_transform,
+ GLuint overlay_texture_id,
+ GLint bounds_x,
+ GLint bounds_y,
+ GLint bounds_width,
+ GLint bounds_height,
+ GLfloat uv_x,
+ GLfloat uv_y,
+ GLfloat uv_width,
+ GLfloat uv_height) override;
+void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
+void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_TRACE_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc
index a74b4f0..c0f8600 100644
--- a/gpu/command_buffer/client/program_info_manager.cc
+++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -17,43 +17,42 @@
class NonCachedProgramInfoManager : public ProgramInfoManager {
public:
NonCachedProgramInfoManager();
- virtual ~NonCachedProgramInfoManager();
+ ~NonCachedProgramInfoManager() override;
- virtual void CreateInfo(GLuint program) override;
+ void CreateInfo(GLuint program) override;
- virtual void DeleteInfo(GLuint program) override;
+ void DeleteInfo(GLuint program) override;
- virtual bool GetProgramiv(GLES2Implementation* gl,
- GLuint program,
- GLenum pname,
- GLint* params) override;
+ bool GetProgramiv(GLES2Implementation* gl,
+ GLuint program,
+ GLenum pname,
+ GLint* params) override;
- virtual GLint GetAttribLocation(GLES2Implementation* gl,
- GLuint program,
- const char* name) override;
+ GLint GetAttribLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) override;
- virtual GLint GetUniformLocation(GLES2Implementation* gl,
- GLuint program,
- const char* name) override;
+ GLint GetUniformLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) override;
- virtual bool GetActiveAttrib(GLES2Implementation* gl,
- GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
+ bool GetActiveAttrib(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
- virtual bool GetActiveUniform(GLES2Implementation* gl,
- GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
-
+ bool GetActiveUniform(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
};
NonCachedProgramInfoManager::NonCachedProgramInfoManager() {
@@ -105,42 +104,42 @@
class CachedProgramInfoManager : public ProgramInfoManager {
public:
CachedProgramInfoManager();
- virtual ~CachedProgramInfoManager();
+ ~CachedProgramInfoManager() override;
- virtual void CreateInfo(GLuint program) override;
+ void CreateInfo(GLuint program) override;
- virtual void DeleteInfo(GLuint program) override;
+ void DeleteInfo(GLuint program) override;
- virtual bool GetProgramiv(GLES2Implementation* gl,
- GLuint program,
- GLenum pname,
- GLint* params) override;
+ bool GetProgramiv(GLES2Implementation* gl,
+ GLuint program,
+ GLenum pname,
+ GLint* params) override;
- virtual GLint GetAttribLocation(GLES2Implementation* gl,
- GLuint program,
- const char* name) override;
+ GLint GetAttribLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) override;
- virtual GLint GetUniformLocation(GLES2Implementation* gl,
- GLuint program,
- const char* name) override;
+ GLint GetUniformLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) override;
- virtual bool GetActiveAttrib(GLES2Implementation* gl,
- GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
+ bool GetActiveAttrib(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
- virtual bool GetActiveUniform(GLES2Implementation* gl,
- GLuint program,
- GLuint index,
- GLsizei bufsize,
- GLsizei* length,
- GLint* size,
- GLenum* type,
- char* name) override;
+ bool GetActiveUniform(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
private:
class Program {
diff --git a/gpu/command_buffer/client/share_group.cc b/gpu/command_buffer/client/share_group.cc
index b99ad1e..c7e3845 100644
--- a/gpu/command_buffer/client/share_group.cc
+++ b/gpu/command_buffer/client/share_group.cc
@@ -26,12 +26,13 @@
class IdHandler : public IdHandlerInterface {
public:
IdHandler() { }
- virtual ~IdHandler() { }
+ ~IdHandler() override {}
// Overridden from IdHandlerInterface.
- virtual void MakeIds(
- GLES2Implementation* /* gl_impl */,
- GLuint id_offset, GLsizei n, GLuint* ids) override {
+ void MakeIds(GLES2Implementation* /* gl_impl */,
+ GLuint id_offset,
+ GLsizei n,
+ GLuint* ids) override {
base::AutoLock auto_lock(lock_);
if (id_offset == 0) {
for (GLsizei ii = 0; ii < n; ++ii) {
@@ -46,9 +47,10 @@
}
// Overridden from IdHandlerInterface.
- virtual bool FreeIds(
- GLES2Implementation* gl_impl,
- GLsizei n, const GLuint* ids, DeleteFn delete_fn) override {
+ bool FreeIds(GLES2Implementation* gl_impl,
+ GLsizei n,
+ const GLuint* ids,
+ DeleteFn delete_fn) override {
base::AutoLock auto_lock(lock_);
for (GLsizei ii = 0; ii < n; ++ii) {
@@ -65,14 +67,14 @@
}
// Overridden from IdHandlerInterface.
- virtual bool MarkAsUsedForBind(GLuint id) override {
+ bool MarkAsUsedForBind(GLuint id) override {
if (id == 0)
return true;
base::AutoLock auto_lock(lock_);
return id_allocator_.MarkAsUsed(id);
}
- virtual void FreeContext(GLES2Implementation* gl_impl) override {}
+ void FreeContext(GLES2Implementation* gl_impl) override {}
private:
base::Lock lock_;
@@ -83,13 +85,13 @@
class StrictIdHandler : public IdHandlerInterface {
public:
explicit StrictIdHandler(int id_namespace) : id_namespace_(id_namespace) {}
- virtual ~StrictIdHandler() {}
+ ~StrictIdHandler() override {}
// Overridden from IdHandler.
- virtual void MakeIds(GLES2Implementation* gl_impl,
- GLuint /* id_offset */,
- GLsizei n,
- GLuint* ids) override {
+ void MakeIds(GLES2Implementation* gl_impl,
+ GLuint /* id_offset */,
+ GLsizei n,
+ GLuint* ids) override {
base::AutoLock auto_lock(lock_);
// Collect pending FreeIds from other flush_generation.
@@ -113,11 +115,10 @@
}
// Overridden from IdHandler.
- virtual bool FreeIds(GLES2Implementation* gl_impl,
- GLsizei n,
- const GLuint* ids,
- DeleteFn delete_fn) override {
-
+ bool FreeIds(GLES2Implementation* gl_impl,
+ GLsizei n,
+ const GLuint* ids,
+ DeleteFn delete_fn) override {
// Delete stub must run before CollectPendingFreeIds.
(gl_impl->*delete_fn)(n, ids);
@@ -146,7 +147,7 @@
}
// Overridden from IdHandler.
- virtual bool MarkAsUsedForBind(GLuint id) override {
+ bool MarkAsUsedForBind(GLuint id) override {
#ifndef NDEBUG
if (id != 0) {
base::AutoLock auto_lock(lock_);
@@ -157,7 +158,7 @@
}
// Overridden from IdHandlerInterface.
- virtual void FreeContext(GLES2Implementation* gl_impl) override {
+ void FreeContext(GLES2Implementation* gl_impl) override {
base::AutoLock auto_lock(lock_);
CollectPendingFreeIds(gl_impl);
}
@@ -193,12 +194,13 @@
class NonReusedIdHandler : public IdHandlerInterface {
public:
NonReusedIdHandler() : last_id_(0) {}
- virtual ~NonReusedIdHandler() {}
+ ~NonReusedIdHandler() override {}
// Overridden from IdHandlerInterface.
- virtual void MakeIds(
- GLES2Implementation* /* gl_impl */,
- GLuint id_offset, GLsizei n, GLuint* ids) override {
+ void MakeIds(GLES2Implementation* /* gl_impl */,
+ GLuint id_offset,
+ GLsizei n,
+ GLuint* ids) override {
base::AutoLock auto_lock(lock_);
for (GLsizei ii = 0; ii < n; ++ii) {
ids[ii] = ++last_id_ + id_offset;
@@ -206,21 +208,22 @@
}
// Overridden from IdHandlerInterface.
- virtual bool FreeIds(
- GLES2Implementation* gl_impl,
- GLsizei n, const GLuint* ids, DeleteFn delete_fn) override {
+ bool FreeIds(GLES2Implementation* gl_impl,
+ GLsizei n,
+ const GLuint* ids,
+ DeleteFn delete_fn) override {
// Ids are never freed.
(gl_impl->*delete_fn)(n, ids);
return true;
}
// Overridden from IdHandlerInterface.
- virtual bool MarkAsUsedForBind(GLuint /* id */) override {
+ bool MarkAsUsedForBind(GLuint /* id */) override {
// This is only used for Shaders and Programs which have no bind.
return false;
}
- virtual void FreeContext(GLES2Implementation* gl_impl) override {}
+ void FreeContext(GLES2Implementation* gl_impl) override {}
private:
base::Lock lock_;
diff --git a/gpu/command_buffer/client/transfer_buffer.h b/gpu/command_buffer/client/transfer_buffer.h
index c27dd21..39e62a6 100644
--- a/gpu/command_buffer/client/transfer_buffer.h
+++ b/gpu/command_buffer/client/transfer_buffer.h
@@ -54,26 +54,24 @@
class GPU_EXPORT TransferBuffer : public TransferBufferInterface {
public:
TransferBuffer(CommandBufferHelper* helper);
- virtual ~TransferBuffer();
+ ~TransferBuffer() override;
// Overridden from TransferBufferInterface.
- virtual bool Initialize(
- unsigned int default_buffer_size,
- unsigned int result_size,
- unsigned int min_buffer_size,
- unsigned int max_buffer_size,
- unsigned int alignment,
- unsigned int size_to_flush) override;
- virtual int GetShmId() override;
- virtual void* GetResultBuffer() override;
- virtual int GetResultOffset() override;
- virtual void Free() override;
- virtual bool HaveBuffer() const override;
- virtual void* AllocUpTo(
- unsigned int size, unsigned int* size_allocated) override;
- virtual void* Alloc(unsigned int size) override;
- virtual RingBuffer::Offset GetOffset(void* pointer) const override;
- virtual void FreePendingToken(void* p, unsigned int token) override;
+ bool Initialize(unsigned int default_buffer_size,
+ unsigned int result_size,
+ unsigned int min_buffer_size,
+ unsigned int max_buffer_size,
+ unsigned int alignment,
+ unsigned int size_to_flush) override;
+ int GetShmId() override;
+ void* GetResultBuffer() override;
+ int GetResultOffset() override;
+ void Free() override;
+ bool HaveBuffer() const override;
+ void* AllocUpTo(unsigned int size, unsigned int* size_allocated) override;
+ void* Alloc(unsigned int size) override;
+ RingBuffer::Offset GetOffset(void* pointer) const override;
+ void FreePendingToken(void* p, unsigned int token) override;
// These are for testing.
unsigned int GetCurrentMaxAllocationWithoutRealloc() const;
diff --git a/gpu/command_buffer/common/buffer.h b/gpu/command_buffer/common/buffer.h
index 6685ac5..5942f7f 100644
--- a/gpu/command_buffer/common/buffer.h
+++ b/gpu/command_buffer/common/buffer.h
@@ -28,9 +28,9 @@
public:
SharedMemoryBufferBacking(scoped_ptr<base::SharedMemory> shared_memory,
size_t size);
- virtual ~SharedMemoryBufferBacking();
- virtual void* GetMemory() const override;
- virtual size_t GetSize() const override;
+ ~SharedMemoryBufferBacking() override;
+ void* GetMemory() const override;
+ size_t GetSize() const override;
base::SharedMemory* shared_memory() { return shared_memory_.get(); }
private:
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager.h b/gpu/command_buffer/service/async_pixel_transfer_manager.h
index 66b8bf7..3f52e1e 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager.h
@@ -45,7 +45,7 @@
public:
static AsyncPixelTransferManager* Create(gfx::GLContext* context);
- virtual ~AsyncPixelTransferManager();
+ ~AsyncPixelTransferManager() override;
void Initialize(gles2::TextureManager* texture_manager);
@@ -82,9 +82,8 @@
bool AsyncTransferIsInProgress(gles2::TextureRef* ref);
// gles2::TextureRef::DestructionObserver implementation:
- virtual void OnTextureManagerDestroying(gles2::TextureManager* manager)
- override;
- virtual void OnTextureRefDestroying(gles2::TextureRef* texture) override;
+ void OnTextureManagerDestroying(gles2::TextureManager* manager) override;
+ void OnTextureRefDestroying(gles2::TextureRef* texture) override;
protected:
AsyncPixelTransferManager();
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc
index c43491d..61db3b6 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_idle.cc
@@ -36,18 +36,16 @@
AsyncPixelTransferManagerIdle::SharedState* state,
GLuint texture_id,
const AsyncTexImage2DParams& define_params);
- virtual ~AsyncPixelTransferDelegateIdle();
+ ~AsyncPixelTransferDelegateIdle() override;
// Implement AsyncPixelTransferDelegate:
- virtual void AsyncTexImage2D(
- const AsyncTexImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params,
- const base::Closure& bind_callback) override;
- virtual void AsyncTexSubImage2D(
- const AsyncTexSubImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params) override;
- virtual bool TransferIsInProgress() override;
- virtual void WaitForTransferCompletion() override;
+ void AsyncTexImage2D(const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params,
+ const base::Closure& bind_callback) override;
+ void AsyncTexSubImage2D(const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) override;
+ bool TransferIsInProgress() override;
+ void WaitForTransferCompletion() override;
private:
void PerformAsyncTexImage2D(AsyncTexImage2DParams tex_params,
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_idle.h b/gpu/command_buffer/service/async_pixel_transfer_manager_idle.h
index 0ec950c..8aba7ff 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_idle.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_idle.h
@@ -14,18 +14,18 @@
class AsyncPixelTransferManagerIdle : public AsyncPixelTransferManager {
public:
AsyncPixelTransferManagerIdle();
- virtual ~AsyncPixelTransferManagerIdle();
+ ~AsyncPixelTransferManagerIdle() override;
// AsyncPixelTransferManager implementation:
- virtual void BindCompletedAsyncTransfers() override;
- virtual void AsyncNotifyCompletion(
+ void BindCompletedAsyncTransfers() override;
+ void AsyncNotifyCompletion(
const AsyncMemoryParams& mem_params,
AsyncPixelTransferCompletionObserver* observer) override;
- virtual uint32 GetTextureUploadCount() override;
- virtual base::TimeDelta GetTotalTextureUploadTime() override;
- virtual void ProcessMorePendingTransfers() override;
- virtual bool NeedsProcessMorePendingTransfers() override;
- virtual void WaitAllAsyncTexImage2D() override;
+ uint32 GetTextureUploadCount() override;
+ base::TimeDelta GetTotalTextureUploadTime() override;
+ void ProcessMorePendingTransfers() override;
+ bool NeedsProcessMorePendingTransfers() override;
+ void WaitAllAsyncTexImage2D() override;
struct Task {
Task(uint64 transfer_id,
@@ -54,7 +54,7 @@
private:
// AsyncPixelTransferManager implementation:
- virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
+ AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
gles2::TextureRef* ref,
const AsyncTexImage2DParams& define_params) override;
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
index e28ff82..b6506bf 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
@@ -51,7 +51,7 @@
#endif
}
- virtual ~TransferThread() {
+ ~TransferThread() override {
// The only instance of this class was declared leaky.
NOTREACHED();
}
@@ -71,7 +71,7 @@
wait_for_init.Wait();
}
- virtual void CleanUp() override {
+ void CleanUp() override {
surface_ = NULL;
context_ = NULL;
}
@@ -377,20 +377,18 @@
AsyncPixelTransferManagerShareGroup::SharedState* shared_state,
GLuint texture_id,
const AsyncTexImage2DParams& define_params);
- virtual ~AsyncPixelTransferDelegateShareGroup();
+ ~AsyncPixelTransferDelegateShareGroup() override;
void BindTransfer() { state_->BindTransfer(); }
// Implement AsyncPixelTransferDelegate:
- virtual void AsyncTexImage2D(
- const AsyncTexImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params,
- const base::Closure& bind_callback) override;
- virtual void AsyncTexSubImage2D(
- const AsyncTexSubImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params) override;
- virtual bool TransferIsInProgress() override;
- virtual void WaitForTransferCompletion() override;
+ void AsyncTexImage2D(const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params,
+ const base::Closure& bind_callback) override;
+ void AsyncTexSubImage2D(const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) override;
+ bool TransferIsInProgress() override;
+ void WaitForTransferCompletion() override;
private:
// A raw pointer is safe because the SharedState is owned by the Manager,
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h
index 9f9f04e..081fcc4 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h
@@ -20,18 +20,18 @@
class AsyncPixelTransferManagerShareGroup : public AsyncPixelTransferManager {
public:
explicit AsyncPixelTransferManagerShareGroup(gfx::GLContext* context);
- virtual ~AsyncPixelTransferManagerShareGroup();
+ ~AsyncPixelTransferManagerShareGroup() override;
// AsyncPixelTransferManager implementation:
- virtual void BindCompletedAsyncTransfers() override;
- virtual void AsyncNotifyCompletion(
+ void BindCompletedAsyncTransfers() override;
+ void AsyncNotifyCompletion(
const AsyncMemoryParams& mem_params,
AsyncPixelTransferCompletionObserver* observer) override;
- virtual uint32 GetTextureUploadCount() override;
- virtual base::TimeDelta GetTotalTextureUploadTime() override;
- virtual void ProcessMorePendingTransfers() override;
- virtual bool NeedsProcessMorePendingTransfers() override;
- virtual void WaitAllAsyncTexImage2D() override;
+ uint32 GetTextureUploadCount() override;
+ base::TimeDelta GetTotalTextureUploadTime() override;
+ void ProcessMorePendingTransfers() override;
+ bool NeedsProcessMorePendingTransfers() override;
+ void WaitAllAsyncTexImage2D() override;
// State shared between Managers and Delegates.
struct SharedState {
@@ -46,7 +46,7 @@
private:
// AsyncPixelTransferManager implementation:
- virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
+ AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
gles2::TextureRef* ref,
const AsyncTexImage2DParams& define_params) override;
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc
index 4b8ce1d..a2fbc8e 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc
@@ -11,18 +11,16 @@
class AsyncPixelTransferDelegateStub : public AsyncPixelTransferDelegate {
public:
AsyncPixelTransferDelegateStub();
- virtual ~AsyncPixelTransferDelegateStub();
+ ~AsyncPixelTransferDelegateStub() override;
// Implement AsyncPixelTransferDelegate:
- virtual void AsyncTexImage2D(
- const AsyncTexImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params,
- const base::Closure& bind_callback) override;
- virtual void AsyncTexSubImage2D(
- const AsyncTexSubImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params) override;
- virtual bool TransferIsInProgress() override;
- virtual void WaitForTransferCompletion() override;
+ void AsyncTexImage2D(const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params,
+ const base::Closure& bind_callback) override;
+ void AsyncTexSubImage2D(const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) override;
+ bool TransferIsInProgress() override;
+ void WaitForTransferCompletion() override;
private:
DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub);
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_stub.h b/gpu/command_buffer/service/async_pixel_transfer_manager_stub.h
index c2fa3eb..f8ced57 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_stub.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_stub.h
@@ -12,22 +12,22 @@
class AsyncPixelTransferManagerStub : public AsyncPixelTransferManager {
public:
AsyncPixelTransferManagerStub();
- virtual ~AsyncPixelTransferManagerStub();
+ ~AsyncPixelTransferManagerStub() override;
// AsyncPixelTransferManager implementation:
- virtual void BindCompletedAsyncTransfers() override;
- virtual void AsyncNotifyCompletion(
+ void BindCompletedAsyncTransfers() override;
+ void AsyncNotifyCompletion(
const AsyncMemoryParams& mem_params,
AsyncPixelTransferCompletionObserver* observer) override;
- virtual uint32 GetTextureUploadCount() override;
- virtual base::TimeDelta GetTotalTextureUploadTime() override;
- virtual void ProcessMorePendingTransfers() override;
- virtual bool NeedsProcessMorePendingTransfers() override;
- virtual void WaitAllAsyncTexImage2D() override;
+ uint32 GetTextureUploadCount() override;
+ base::TimeDelta GetTotalTextureUploadTime() override;
+ void ProcessMorePendingTransfers() override;
+ bool NeedsProcessMorePendingTransfers() override;
+ void WaitAllAsyncTexImage2D() override;
private:
// AsyncPixelTransferManager implementation:
- virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
+ AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
gles2::TextureRef* ref,
const AsyncTexImage2DParams& define_params) override;
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc
index b5851d2..4bc2ba2 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc
@@ -13,18 +13,16 @@
public:
explicit AsyncPixelTransferDelegateSync(
AsyncPixelTransferManagerSync::SharedState* shared_state);
- virtual ~AsyncPixelTransferDelegateSync();
+ ~AsyncPixelTransferDelegateSync() override;
// Implement AsyncPixelTransferDelegate:
- virtual void AsyncTexImage2D(
- const AsyncTexImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params,
- const base::Closure& bind_callback) override;
- virtual void AsyncTexSubImage2D(
- const AsyncTexSubImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params) override;
- virtual bool TransferIsInProgress() override;
- virtual void WaitForTransferCompletion() override;
+ void AsyncTexImage2D(const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params,
+ const base::Closure& bind_callback) override;
+ void AsyncTexSubImage2D(const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) override;
+ bool TransferIsInProgress() override;
+ void WaitForTransferCompletion() override;
private:
// Safe to hold a raw pointer because SharedState is owned by the Manager
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_sync.h b/gpu/command_buffer/service/async_pixel_transfer_manager_sync.h
index a08e915..b965d6f 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_sync.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_sync.h
@@ -12,18 +12,18 @@
class AsyncPixelTransferManagerSync : public AsyncPixelTransferManager {
public:
AsyncPixelTransferManagerSync();
- virtual ~AsyncPixelTransferManagerSync();
+ ~AsyncPixelTransferManagerSync() override;
// AsyncPixelTransferManager implementation:
- virtual void BindCompletedAsyncTransfers() override;
- virtual void AsyncNotifyCompletion(
+ void BindCompletedAsyncTransfers() override;
+ void AsyncNotifyCompletion(
const AsyncMemoryParams& mem_params,
AsyncPixelTransferCompletionObserver* observer) override;
- virtual uint32 GetTextureUploadCount() override;
- virtual base::TimeDelta GetTotalTextureUploadTime() override;
- virtual void ProcessMorePendingTransfers() override;
- virtual bool NeedsProcessMorePendingTransfers() override;
- virtual void WaitAllAsyncTexImage2D() override;
+ uint32 GetTextureUploadCount() override;
+ base::TimeDelta GetTotalTextureUploadTime() override;
+ void ProcessMorePendingTransfers() override;
+ bool NeedsProcessMorePendingTransfers() override;
+ void WaitAllAsyncTexImage2D() override;
// State shared between Managers and Delegates.
struct SharedState {
@@ -36,7 +36,7 @@
private:
// AsyncPixelTransferManager implementation:
- virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
+ AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
gles2::TextureRef* ref,
const AsyncTexImage2DParams& define_params) override;
diff --git a/gpu/command_buffer/service/command_buffer_service.h b/gpu/command_buffer/service/command_buffer_service.h
index e3e2ebd..15f865f 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -42,26 +42,25 @@
typedef base::Callback<bool(int32)> GetBufferChangedCallback;
explicit CommandBufferService(
TransferBufferManagerInterface* transfer_buffer_manager);
- virtual ~CommandBufferService();
+ ~CommandBufferService() override;
// CommandBuffer implementation:
- virtual bool Initialize() override;
- virtual State GetLastState() override;
- virtual int32 GetLastToken() override;
- virtual void Flush(int32 put_offset) override;
- virtual void WaitForTokenInRange(int32 start, int32 end) override;
- virtual void WaitForGetOffsetInRange(int32 start, int32 end) override;
- virtual void SetGetBuffer(int32 transfer_buffer_id) override;
- virtual scoped_refptr<Buffer> CreateTransferBuffer(size_t size,
- int32* id) override;
- virtual void DestroyTransferBuffer(int32 id) override;
+ bool Initialize() override;
+ State GetLastState() override;
+ int32 GetLastToken() override;
+ void Flush(int32 put_offset) override;
+ void WaitForTokenInRange(int32 start, int32 end) override;
+ void WaitForGetOffsetInRange(int32 start, int32 end) override;
+ void SetGetBuffer(int32 transfer_buffer_id) override;
+ scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32* id) override;
+ void DestroyTransferBuffer(int32 id) override;
// CommandBufferServiceBase implementation:
- virtual void SetGetOffset(int32 get_offset) override;
- virtual scoped_refptr<Buffer> GetTransferBuffer(int32 id) override;
- virtual void SetToken(int32 token) override;
- virtual void SetParseError(error::Error error) override;
- virtual void SetContextLostReason(error::ContextLostReason) override;
+ void SetGetOffset(int32 get_offset) override;
+ scoped_refptr<Buffer> GetTransferBuffer(int32 id) override;
+ void SetToken(int32 token) override;
+ void SetParseError(error::Error error) override;
+ void SetContextLostReason(error::ContextLostReason) override;
// Sets a callback that is called whenever the put offset is changed. When
// called with sync==true, the callback must not return until some progress
diff --git a/gpu/command_buffer/service/common_decoder.h b/gpu/command_buffer/service/common_decoder.h
index 2132afb..aaf860f 100644
--- a/gpu/command_buffer/service/common_decoder.h
+++ b/gpu/command_buffer/service/common_decoder.h
@@ -95,7 +95,7 @@
};
CommonDecoder();
- virtual ~CommonDecoder();
+ ~CommonDecoder() override;
// Sets the engine, to get shared memory buffers from, and to set the token
// to.
diff --git a/gpu/command_buffer/service/common_decoder_unittest.cc b/gpu/command_buffer/service/common_decoder_unittest.cc
index cc965cd..aa1ed1b 100644
--- a/gpu/command_buffer/service/common_decoder_unittest.cc
+++ b/gpu/command_buffer/service/common_decoder_unittest.cc
@@ -51,15 +51,14 @@
class TestCommonDecoder : public CommonDecoder {
public:
// Overridden from AsyncAPIInterface
- virtual const char* GetCommandName(unsigned int command_id) const override {
+ const char* GetCommandName(unsigned int command_id) const override {
return GetCommonCommandName(static_cast<cmd::CommandId>(command_id));
}
// Overridden from AsyncAPIInterface
- virtual error::Error DoCommand(
- unsigned int command,
- unsigned int arg_count,
- const void* cmd_data) override {
+ error::Error DoCommand(unsigned int command,
+ unsigned int arg_count,
+ const void* cmd_data) override {
return DoCommonCommand(command, arg_count, cmd_data);
}
@@ -87,8 +86,7 @@
}
// Overridden from CommandBufferEngine.
- virtual scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id)
- override {
+ scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override {
if (IsValidSharedMemoryId(shm_id))
return buffer_;
return NULL;
@@ -110,22 +108,20 @@
}
// Overridden from CommandBufferEngine.
- virtual void set_token(int32 token) override {
- token_ = token;
- }
+ void set_token(int32 token) override { token_ = token; }
int32 token() const {
return token_;
}
// Overridden from CommandBufferEngine.
- virtual bool SetGetBuffer(int32 transfer_buffer_id) override {
+ bool SetGetBuffer(int32 transfer_buffer_id) override {
NOTREACHED();
return false;
}
// Overridden from CommandBufferEngine.
- virtual bool SetGetOffset(int32 offset) override {
+ bool SetGetOffset(int32 offset) override {
if (static_cast<size_t>(offset) < kBufferSize) {
get_offset_ = offset;
return true;
@@ -134,9 +130,7 @@
}
// Overridden from CommandBufferEngine.
- virtual int32 GetGetOffset() override {
- return get_offset_;
- }
+ int32 GetGetOffset() override { return get_offset_; }
private:
bool IsValidSharedMemoryId(int32 shm_id) {
diff --git a/gpu/command_buffer/service/error_state.cc b/gpu/command_buffer/service/error_state.cc
index c71a159..42131aa 100644
--- a/gpu/command_buffer/service/error_state.cc
+++ b/gpu/command_buffer/service/error_state.cc
@@ -17,45 +17,44 @@
class ErrorStateImpl : public ErrorState {
public:
explicit ErrorStateImpl(ErrorStateClient* client, Logger* logger);
- virtual ~ErrorStateImpl();
+ ~ErrorStateImpl() override;
- virtual uint32 GetGLError() override;
+ uint32 GetGLError() override;
- virtual void SetGLError(
- const char* filename,
- int line,
- unsigned int error,
- const char* function_name,
- const char* msg) override;
- virtual void SetGLErrorInvalidEnum(
- const char* filename,
- int line,
- const char* function_name,
- unsigned int value,
- const char* label) override;
- virtual void SetGLErrorInvalidParami(
- const char* filename,
- int line,
- unsigned int error,
- const char* function_name,
- unsigned int pname,
- int param) override;
- virtual void SetGLErrorInvalidParamf(
- const char* filename,
- int line,
- unsigned int error,
- const char* function_name,
- unsigned int pname,
- float param) override;
+ void SetGLError(const char* filename,
+ int line,
+ unsigned int error,
+ const char* function_name,
+ const char* msg) override;
+ void SetGLErrorInvalidEnum(const char* filename,
+ int line,
+ const char* function_name,
+ unsigned int value,
+ const char* label) override;
+ void SetGLErrorInvalidParami(const char* filename,
+ int line,
+ unsigned int error,
+ const char* function_name,
+ unsigned int pname,
+ int param) override;
+ void SetGLErrorInvalidParamf(const char* filename,
+ int line,
+ unsigned int error,
+ const char* function_name,
+ unsigned int pname,
+ float param) override;
- virtual unsigned int PeekGLError(
- const char* filename, int line, const char* function_name) override;
+ unsigned int PeekGLError(const char* filename,
+ int line,
+ const char* function_name) override;
- virtual void CopyRealGLErrorsToWrapper(
- const char* filename, int line, const char* function_name) override;
+ void CopyRealGLErrorsToWrapper(const char* filename,
+ int line,
+ const char* function_name) override;
- virtual void ClearRealGLErrors(
- const char* filename, int line, const char* function_name) override;
+ void ClearRealGLErrors(const char* filename,
+ int line,
+ const char* function_name) override;
private:
// The last error message set.
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 60f3ac9..d766abb 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -48,61 +48,42 @@
: renderbuffer_(renderbuffer) {
}
- virtual GLsizei width() const override {
- return renderbuffer_->width();
- }
+ GLsizei width() const override { return renderbuffer_->width(); }
- virtual GLsizei height() const override {
- return renderbuffer_->height();
- }
+ GLsizei height() const override { return renderbuffer_->height(); }
- virtual GLenum internal_format() const override {
+ GLenum internal_format() const override {
return renderbuffer_->internal_format();
}
- virtual GLenum texture_type() const override {
- return 0;
- }
+ GLenum texture_type() const override { return 0; }
- virtual GLsizei samples() const override {
- return renderbuffer_->samples();
- }
+ GLsizei samples() const override { return renderbuffer_->samples(); }
- virtual GLuint object_name() const override {
- return renderbuffer_->client_id();
- }
+ GLuint object_name() const override { return renderbuffer_->client_id(); }
- virtual bool cleared() const override {
- return renderbuffer_->cleared();
- }
+ bool cleared() const override { return renderbuffer_->cleared(); }
- virtual void SetCleared(
- RenderbufferManager* renderbuffer_manager,
- TextureManager* /* texture_manager */,
- bool cleared) override {
+ void SetCleared(RenderbufferManager* renderbuffer_manager,
+ TextureManager* /* texture_manager */,
+ bool cleared) override {
renderbuffer_manager->SetCleared(renderbuffer_.get(), cleared);
}
- virtual bool IsTexture(
- TextureRef* /* texture */) const override {
- return false;
- }
+ bool IsTexture(TextureRef* /* texture */) const override { return false; }
- virtual bool IsRenderbuffer(
- Renderbuffer* renderbuffer) const override {
+ bool IsRenderbuffer(Renderbuffer* renderbuffer) const override {
return renderbuffer_.get() == renderbuffer;
}
- virtual bool CanRenderTo() const override {
- return true;
- }
+ bool CanRenderTo() const override { return true; }
- virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const override {
+ void DetachFromFramebuffer(Framebuffer* framebuffer) const override {
// Nothing to do for renderbuffers.
}
- virtual bool ValidForAttachmentType(
- GLenum attachment_type, uint32 max_color_attachments) override {
+ bool ValidForAttachmentType(GLenum attachment_type,
+ uint32 max_color_attachments) override {
uint32 need = GLES2Util::GetChannelsNeededForAttachmentType(
attachment_type, max_color_attachments);
uint32 have = GLES2Util::GetChannelsForFormat(internal_format());
@@ -113,26 +94,25 @@
return renderbuffer_.get();
}
- virtual size_t GetSignatureSize(
- TextureManager* texture_manager) const override {
+ size_t GetSignatureSize(TextureManager* texture_manager) const override {
return renderbuffer_->GetSignatureSize();
}
- virtual void AddToSignature(
- TextureManager* texture_manager, std::string* signature) const override {
+ void AddToSignature(TextureManager* texture_manager,
+ std::string* signature) const override {
DCHECK(signature);
renderbuffer_->AddToSignature(signature);
}
- virtual void OnWillRenderTo() const override {}
- virtual void OnDidRenderTo() const override {}
- virtual bool FormsFeedbackLoop(
- TextureRef* /* texture */, GLint /*level */) const override {
+ void OnWillRenderTo() const override {}
+ void OnDidRenderTo() const override {}
+ bool FormsFeedbackLoop(TextureRef* /* texture */,
+ GLint /*level */) const override {
return false;
}
protected:
- virtual ~RenderbufferAttachment() { }
+ ~RenderbufferAttachment() override {}
private:
scoped_refptr<Renderbuffer> renderbuffer_;
@@ -151,7 +131,7 @@
samples_(samples) {
}
- virtual GLsizei width() const override {
+ GLsizei width() const override {
GLsizei temp_width = 0;
GLsizei temp_height = 0;
texture_ref_->texture()->GetLevelSize(
@@ -159,7 +139,7 @@
return temp_width;
}
- virtual GLsizei height() const override {
+ GLsizei height() const override {
GLsizei temp_width = 0;
GLsizei temp_height = 0;
texture_ref_->texture()->GetLevelSize(
@@ -167,7 +147,7 @@
return temp_height;
}
- virtual GLenum internal_format() const override {
+ GLenum internal_format() const override {
GLenum temp_type = 0;
GLenum temp_internal_format = 0;
texture_ref_->texture()->GetLevelType(
@@ -175,7 +155,7 @@
return temp_internal_format;
}
- virtual GLenum texture_type() const override {
+ GLenum texture_type() const override {
GLenum temp_type = 0;
GLenum temp_internal_format = 0;
texture_ref_->texture()->GetLevelType(
@@ -183,33 +163,26 @@
return temp_type;
}
- virtual GLsizei samples() const override {
- return samples_;
- }
+ GLsizei samples() const override { return samples_; }
- virtual GLuint object_name() const override {
- return texture_ref_->client_id();
- }
+ GLuint object_name() const override { return texture_ref_->client_id(); }
- virtual bool cleared() const override {
+ bool cleared() const override {
return texture_ref_->texture()->IsLevelCleared(target_, level_);
}
- virtual void SetCleared(
- RenderbufferManager* /* renderbuffer_manager */,
- TextureManager* texture_manager,
- bool cleared) override {
+ void SetCleared(RenderbufferManager* /* renderbuffer_manager */,
+ TextureManager* texture_manager,
+ bool cleared) override {
texture_manager->SetLevelCleared(
texture_ref_.get(), target_, level_, cleared);
}
- virtual bool IsTexture(TextureRef* texture) const override {
+ bool IsTexture(TextureRef* texture) const override {
return texture == texture_ref_.get();
}
- virtual bool IsRenderbuffer(
- Renderbuffer* /* renderbuffer */)
- const override {
+ bool IsRenderbuffer(Renderbuffer* /* renderbuffer */) const override {
return false;
}
@@ -217,18 +190,17 @@
return texture_ref_.get();
}
- virtual bool CanRenderTo() const override {
+ bool CanRenderTo() const override {
return texture_ref_->texture()->CanRenderTo();
}
- virtual void DetachFromFramebuffer(Framebuffer* framebuffer)
- const override {
+ void DetachFromFramebuffer(Framebuffer* framebuffer) const override {
texture_ref_->texture()->DetachFromFramebuffer();
framebuffer->OnTextureRefDetached(texture_ref_.get());
}
- virtual bool ValidForAttachmentType(
- GLenum attachment_type, uint32 max_color_attachments) override {
+ bool ValidForAttachmentType(GLenum attachment_type,
+ uint32 max_color_attachments) override {
GLenum type = 0;
GLenum internal_format = 0;
if (!texture_ref_->texture()->GetLevelType(
@@ -248,33 +220,31 @@
return (need & have) != 0;
}
- virtual size_t GetSignatureSize(
- TextureManager* texture_manager) const override {
+ size_t GetSignatureSize(TextureManager* texture_manager) const override {
return texture_manager->GetSignatureSize();
}
- virtual void AddToSignature(
- TextureManager* texture_manager, std::string* signature) const override {
+ void AddToSignature(TextureManager* texture_manager,
+ std::string* signature) const override {
DCHECK(signature);
texture_manager->AddToSignature(
texture_ref_.get(), target_, level_, signature);
}
- virtual void OnWillRenderTo() const override {
+ void OnWillRenderTo() const override {
texture_ref_->texture()->OnWillModifyPixels();
}
- virtual void OnDidRenderTo() const override {
+ void OnDidRenderTo() const override {
texture_ref_->texture()->OnDidModifyPixels();
}
- virtual bool FormsFeedbackLoop(
- TextureRef* texture, GLint level) const override {
+ bool FormsFeedbackLoop(TextureRef* texture, GLint level) const override {
return texture == texture_ref_.get() && level == level_;
}
protected:
- virtual ~TextureAttachment() {}
+ ~TextureAttachment() override {}
private:
scoped_refptr<TextureRef> texture_ref_;
diff --git a/gpu/command_buffer/service/gl_context_virtual.h b/gpu/command_buffer/service/gl_context_virtual.h
index 76f4021..ed61016 100644
--- a/gpu/command_buffer/service/gl_context_virtual.h
+++ b/gpu/command_buffer/service/gl_context_virtual.h
@@ -34,23 +34,22 @@
gfx::Display* display();
// Implement GLContext.
- virtual bool Initialize(
- gfx::GLSurface* compatible_surface,
- gfx::GpuPreference gpu_preference) override;
- virtual void Destroy() override;
- virtual bool MakeCurrent(gfx::GLSurface* surface) override;
- virtual void ReleaseCurrent(gfx::GLSurface* surface) override;
- virtual bool IsCurrent(gfx::GLSurface* surface) override;
- virtual void* GetHandle() override;
- virtual void SetSwapInterval(int interval) override;
- virtual std::string GetExtensions() override;
- virtual bool GetTotalGpuMemory(size_t* bytes) override;
- virtual void SetSafeToForceGpuSwitch() override;
- virtual bool WasAllocatedUsingRobustnessExtension() override;
- virtual void SetUnbindFboOnMakeCurrent() override;
+ bool Initialize(gfx::GLSurface* compatible_surface,
+ gfx::GpuPreference gpu_preference) override;
+ void Destroy() override;
+ bool MakeCurrent(gfx::GLSurface* surface) override;
+ void ReleaseCurrent(gfx::GLSurface* surface) override;
+ bool IsCurrent(gfx::GLSurface* surface) override;
+ void* GetHandle() override;
+ void SetSwapInterval(int interval) override;
+ std::string GetExtensions() override;
+ bool GetTotalGpuMemory(size_t* bytes) override;
+ void SetSafeToForceGpuSwitch() override;
+ bool WasAllocatedUsingRobustnessExtension() override;
+ void SetUnbindFboOnMakeCurrent() override;
protected:
- virtual ~GLContextVirtual();
+ ~GLContextVirtual() override;
private:
scoped_refptr<gfx::GLContext> shared_context_;
diff --git a/gpu/command_buffer/service/gl_state_restorer_impl.h b/gpu/command_buffer/service/gl_state_restorer_impl.h
index b8ccc44..91d3408 100644
--- a/gpu/command_buffer/service/gl_state_restorer_impl.h
+++ b/gpu/command_buffer/service/gl_state_restorer_impl.h
@@ -22,13 +22,13 @@
class GPU_EXPORT GLStateRestorerImpl : public gfx::GLStateRestorer {
public:
explicit GLStateRestorerImpl(base::WeakPtr<gles2::GLES2Decoder> decoder);
- virtual ~GLStateRestorerImpl();
+ ~GLStateRestorerImpl() override;
- virtual bool IsInitialized() override;
- virtual void RestoreState(const gfx::GLStateRestorer* prev_state) override;
- virtual void RestoreAllTextureUnitBindings() override;
- virtual void RestoreActiveTextureUnitBinding(unsigned int target) override;
- virtual void RestoreFramebufferBindings() override;
+ bool IsInitialized() override;
+ void RestoreState(const gfx::GLStateRestorer* prev_state) override;
+ void RestoreAllTextureUnitBindings() override;
+ void RestoreActiveTextureUnitBinding(unsigned int target) override;
+ void RestoreFramebufferBindings() override;
private:
const gles2::ContextState* GetContextState() const;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 6253cc8..1bc8aad 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -511,7 +511,7 @@
: async_upload_token_(async_upload_token) {
}
- virtual void DidComplete(const AsyncMemoryParams& mem_params) override {
+ void DidComplete(const AsyncMemoryParams& mem_params) override {
DCHECK(mem_params.buffer().get());
void* data = mem_params.GetDataAddress();
AsyncUploadSync* sync = static_cast<AsyncUploadSync*>(data);
@@ -519,8 +519,7 @@
}
private:
- virtual ~AsyncUploadTokenCompletionObserver() {
- }
+ ~AsyncUploadTokenCompletionObserver() override {}
uint32 async_upload_token_;
@@ -558,17 +557,17 @@
public ErrorStateClient {
public:
explicit GLES2DecoderImpl(ContextGroup* group);
- virtual ~GLES2DecoderImpl();
+ ~GLES2DecoderImpl() override;
// Overridden from AsyncAPIInterface.
- virtual Error DoCommand(unsigned int command,
- unsigned int arg_count,
- const void* args) override;
+ Error DoCommand(unsigned int command,
+ unsigned int arg_count,
+ const void* args) override;
- virtual error::Error DoCommands(unsigned int num_commands,
- const void* buffer,
- int num_entries,
- int* entries_processed) override;
+ error::Error DoCommands(unsigned int num_commands,
+ const void* buffer,
+ int num_entries,
+ int* entries_processed) override;
template <bool DebugImpl>
error::Error DoCommandsImpl(unsigned int num_commands,
@@ -577,104 +576,91 @@
int* entries_processed);
// Overridden from AsyncAPIInterface.
- virtual const char* GetCommandName(unsigned int command_id) const override;
+ const char* GetCommandName(unsigned int command_id) const override;
// Overridden from GLES2Decoder.
- virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
- const scoped_refptr<gfx::GLContext>& context,
- bool offscreen,
- const gfx::Size& size,
- const DisallowedFeatures& disallowed_features,
- const std::vector<int32>& attribs) override;
- virtual void Destroy(bool have_context) override;
- virtual void SetSurface(
- const scoped_refptr<gfx::GLSurface>& surface) override;
- virtual void ProduceFrontBuffer(const Mailbox& mailbox) override;
- virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) override;
+ bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
+ const scoped_refptr<gfx::GLContext>& context,
+ bool offscreen,
+ const gfx::Size& size,
+ const DisallowedFeatures& disallowed_features,
+ const std::vector<int32>& attribs) override;
+ void Destroy(bool have_context) override;
+ void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) override;
+ void ProduceFrontBuffer(const Mailbox& mailbox) override;
+ bool ResizeOffscreenFrameBuffer(const gfx::Size& size) override;
void UpdateParentTextureInfo();
- virtual bool MakeCurrent() override;
- virtual GLES2Util* GetGLES2Util() override { return &util_; }
- virtual gfx::GLContext* GetGLContext() override { return context_.get(); }
- virtual ContextGroup* GetContextGroup() override { return group_.get(); }
- virtual Capabilities GetCapabilities() override;
- virtual void RestoreState(const ContextState* prev_state) override;
+ bool MakeCurrent() override;
+ GLES2Util* GetGLES2Util() override { return &util_; }
+ gfx::GLContext* GetGLContext() override { return context_.get(); }
+ ContextGroup* GetContextGroup() override { return group_.get(); }
+ Capabilities GetCapabilities() override;
+ void RestoreState(const ContextState* prev_state) override;
- virtual void RestoreActiveTexture() const override {
- state_.RestoreActiveTexture();
- }
- virtual void RestoreAllTextureUnitBindings(
+ void RestoreActiveTexture() const override { state_.RestoreActiveTexture(); }
+ void RestoreAllTextureUnitBindings(
const ContextState* prev_state) const override {
state_.RestoreAllTextureUnitBindings(prev_state);
}
- virtual void RestoreActiveTextureUnitBinding(
- unsigned int target) const override {
+ void RestoreActiveTextureUnitBinding(unsigned int target) const override {
state_.RestoreActiveTextureUnitBinding(target);
}
- virtual void RestoreBufferBindings() const override {
+ void RestoreBufferBindings() const override {
state_.RestoreBufferBindings();
}
- virtual void RestoreGlobalState() const override {
- state_.RestoreGlobalState(NULL);
- }
- virtual void RestoreProgramBindings() const override {
+ void RestoreGlobalState() const override { state_.RestoreGlobalState(NULL); }
+ void RestoreProgramBindings() const override {
state_.RestoreProgramBindings();
}
- virtual void RestoreTextureUnitBindings(unsigned unit) const override {
+ void RestoreTextureUnitBindings(unsigned unit) const override {
state_.RestoreTextureUnitBindings(unit, NULL);
}
- virtual void RestoreFramebufferBindings() const override;
- virtual void RestoreRenderbufferBindings() override;
- virtual void RestoreTextureState(unsigned service_id) const override;
+ void RestoreFramebufferBindings() const override;
+ void RestoreRenderbufferBindings() override;
+ void RestoreTextureState(unsigned service_id) const override;
- virtual void ClearAllAttributes() const override;
- virtual void RestoreAllAttributes() const override;
+ void ClearAllAttributes() const override;
+ void RestoreAllAttributes() const override;
- virtual QueryManager* GetQueryManager() override {
- return query_manager_.get();
- }
- virtual VertexArrayManager* GetVertexArrayManager() override {
+ QueryManager* GetQueryManager() override { return query_manager_.get(); }
+ VertexArrayManager* GetVertexArrayManager() override {
return vertex_array_manager_.get();
}
- virtual ImageManager* GetImageManager() override {
- return image_manager_.get();
- }
- virtual bool ProcessPendingQueries() override;
- virtual bool HasMoreIdleWork() override;
- virtual void PerformIdleWork() override;
+ ImageManager* GetImageManager() override { return image_manager_.get(); }
+ bool ProcessPendingQueries() override;
+ bool HasMoreIdleWork() override;
+ void PerformIdleWork() override;
- virtual void WaitForReadPixels(base::Closure callback) override;
+ void WaitForReadPixels(base::Closure callback) override;
- virtual void SetResizeCallback(
+ void SetResizeCallback(
const base::Callback<void(gfx::Size, float)>& callback) override;
- virtual Logger* GetLogger() override;
+ Logger* GetLogger() override;
- virtual void BeginDecoding() override;
- virtual void EndDecoding() override;
+ void BeginDecoding() override;
+ void EndDecoding() override;
- virtual ErrorState* GetErrorState() override;
- virtual const ContextState* GetContextState() override { return &state_; }
+ ErrorState* GetErrorState() override;
+ const ContextState* GetContextState() override { return &state_; }
- virtual void SetShaderCacheCallback(
- const ShaderCacheCallback& callback) override;
- virtual void SetWaitSyncPointCallback(
- const WaitSyncPointCallback& callback) override;
+ void SetShaderCacheCallback(const ShaderCacheCallback& callback) override;
+ void SetWaitSyncPointCallback(const WaitSyncPointCallback& callback) override;
- virtual AsyncPixelTransferManager*
- GetAsyncPixelTransferManager() override;
- virtual void ResetAsyncPixelTransferManagerForTest() override;
- virtual void SetAsyncPixelTransferManagerForTest(
+ AsyncPixelTransferManager* GetAsyncPixelTransferManager() override;
+ void ResetAsyncPixelTransferManagerForTest() override;
+ void SetAsyncPixelTransferManagerForTest(
AsyncPixelTransferManager* manager) override;
- virtual void SetIgnoreCachedStateForTest(bool ignore) override;
+ void SetIgnoreCachedStateForTest(bool ignore) override;
void ProcessFinishedAsyncTransfers();
- virtual bool GetServiceTextureId(uint32 client_texture_id,
- uint32* service_texture_id) override;
+ bool GetServiceTextureId(uint32 client_texture_id,
+ uint32* service_texture_id) override;
- virtual uint32 GetTextureUploadCount() override;
- virtual base::TimeDelta GetTotalTextureUploadTime() override;
- virtual base::TimeDelta GetTotalProcessingCommandsTime() override;
- virtual void AddProcessingCommandsTime(base::TimeDelta) override;
+ uint32 GetTextureUploadCount() override;
+ base::TimeDelta GetTotalTextureUploadTime() override;
+ base::TimeDelta GetTotalProcessingCommandsTime() override;
+ void AddProcessingCommandsTime(base::TimeDelta) override;
// Restores the current state to the user's settings.
void RestoreCurrentFramebufferBindings();
@@ -690,14 +676,13 @@
bool BoundFramebufferHasDepthAttachment();
bool BoundFramebufferHasStencilAttachment();
- virtual error::ContextLostReason GetContextLostReason() override;
+ error::ContextLostReason GetContextLostReason() override;
// Overridden from FramebufferManager::TextureDetachObserver:
- virtual void OnTextureRefDetachedFromFramebuffer(
- TextureRef* texture) override;
+ void OnTextureRefDetachedFromFramebuffer(TextureRef* texture) override;
// Overriden from ErrorStateClient.
- virtual void OnOutOfMemoryError() override;
+ void OnOutOfMemoryError() override;
// Ensure Renderbuffer corresponding to last DoBindRenderbuffer() is bound.
void EnsureRenderbufferBound();
@@ -1155,16 +1140,16 @@
void ClearUnclearedAttachments(GLenum target, Framebuffer* framebuffer);
// overridden from GLES2Decoder
- virtual bool ClearLevel(unsigned service_id,
- unsigned bind_target,
- unsigned target,
- int level,
- unsigned internal_format,
- unsigned format,
- unsigned type,
- int width,
- int height,
- bool is_texture_immutable) override;
+ bool ClearLevel(unsigned service_id,
+ unsigned bind_target,
+ unsigned target,
+ int level,
+ unsigned internal_format,
+ unsigned format,
+ unsigned type,
+ int width,
+ int height,
+ bool is_texture_immutable) override;
// Restore all GL state that affects clearing.
void RestoreClearState();
@@ -1577,9 +1562,9 @@
void** result, GLenum* result_type);
void MaybeExitOnContextLost();
- virtual bool WasContextLost() override;
- virtual bool WasContextLostByRobustnessExtension() override;
- virtual void LoseContext(uint32 reset_status) override;
+ bool WasContextLost() override;
+ bool WasContextLostByRobustnessExtension() override;
+ void LoseContext(uint32 reset_status) override;
#if defined(OS_MACOSX)
void ReleaseIOSurfaceForTexture(GLuint texture_id);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 5c94b93..8d72335 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -68,7 +68,7 @@
// Creates a decoder.
static GLES2Decoder* Create(ContextGroup* group);
- virtual ~GLES2Decoder();
+ ~GLES2Decoder() override;
bool initialized() const {
return initialized_;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index d510946..1e7db3f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -554,24 +554,23 @@
public:
MockCommandBufferEngine();
- virtual ~MockCommandBufferEngine();
+ ~MockCommandBufferEngine() override;
- virtual scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id)
- override;
+ scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override;
void ClearSharedMemory() {
memset(valid_buffer_->memory(), kInitialMemoryValue, kSharedBufferSize);
}
- virtual void set_token(int32 token) override;
+ void set_token(int32 token) override;
- virtual bool SetGetBuffer(int32 /* transfer_buffer_id */) override;
+ bool SetGetBuffer(int32 /* transfer_buffer_id */) override;
// Overridden from CommandBufferEngine.
- virtual bool SetGetOffset(int32 offset) override;
+ bool SetGetOffset(int32 offset) override;
// Overridden from CommandBufferEngine.
- virtual int32 GetGetOffset() override;
+ int32 GetGetOffset() override;
private:
scoped_refptr<gpu::Buffer> valid_buffer_;
diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h
index fed0ce4..5e47d4a 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -56,7 +56,7 @@
AsyncAPIInterface* handler,
gles2::GLES2Decoder* decoder);
- virtual ~GpuScheduler();
+ ~GpuScheduler() override;
void PutChanged();
@@ -83,11 +83,11 @@
void SetSchedulingChangedCallback(const SchedulingChangedCallback& callback);
// Implementation of CommandBufferEngine.
- virtual scoped_refptr<Buffer> GetSharedMemoryBuffer(int32 shm_id) override;
- virtual void set_token(int32 token) override;
- virtual bool SetGetBuffer(int32 transfer_buffer_id) override;
- virtual bool SetGetOffset(int32 offset) override;
- virtual int32 GetGetOffset() override;
+ scoped_refptr<Buffer> GetSharedMemoryBuffer(int32 shm_id) override;
+ void set_token(int32 token) override;
+ bool SetGetBuffer(int32 transfer_buffer_id) override;
+ bool SetGetOffset(int32 offset) override;
+ int32 GetGetOffset() override;
void SetCommandProcessedCallback(const base::Closure& callback);
diff --git a/gpu/command_buffer/service/gpu_state_tracer.cc b/gpu/command_buffer/service/gpu_state_tracer.cc
index 5311e9c..51b0eba 100644
--- a/gpu/command_buffer/service/gpu_state_tracer.cc
+++ b/gpu/command_buffer/service/gpu_state_tracer.cc
@@ -24,11 +24,11 @@
bool SaveScreenshot(const gfx::Size& size);
// base::debug::ConvertableToTraceFormat implementation.
- virtual void AppendAsTraceFormat(std::string* out) const override;
+ void AppendAsTraceFormat(std::string* out) const override;
private:
explicit Snapshot(const ContextState* state);
- virtual ~Snapshot() {}
+ ~Snapshot() override {}
const ContextState* state_;
diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h
index 8099230..2e81b4e 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -115,14 +115,14 @@
class TraceOutputter : public Outputter {
public:
static scoped_refptr<TraceOutputter> Create(const std::string& name);
- virtual void Trace(const std::string& name,
- int64 start_time,
- int64 end_time) override;
+ void Trace(const std::string& name,
+ int64 start_time,
+ int64 end_time) override;
protected:
friend class base::RefCounted<Outputter>;
explicit TraceOutputter(const std::string& name);
- virtual ~TraceOutputter();
+ ~TraceOutputter() override;
base::Thread named_thread_;
uint64 local_trace_id_;
diff --git a/gpu/command_buffer/service/gpu_tracer_unittest.cc b/gpu/command_buffer/service/gpu_tracer_unittest.cc
index 6be4d5b..fe353c3 100644
--- a/gpu/command_buffer/service/gpu_tracer_unittest.cc
+++ b/gpu/command_buffer/service/gpu_tracer_unittest.cc
@@ -207,16 +207,12 @@
class GpuARBTimerTracerTest : public BaseGpuTracerTest {
protected:
- virtual GpuTracerType GetTracerType() override {
- return kTracerTypeARBTimer;
- }
+ GpuTracerType GetTracerType() override { return kTracerTypeARBTimer; }
};
class GpuDisjointTimerTracerTest : public BaseGpuTracerTest {
protected:
- virtual GpuTracerType GetTracerType() override {
- return kTracerTypeDisjointTimer;
- }
+ GpuTracerType GetTracerType() override { return kTracerTypeDisjointTimer; }
};
TEST_F(GpuARBTimerTracerTest, GPUTrace) {
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 310fced..33e5a2c 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -62,21 +62,21 @@
public:
GpuInProcessThread();
- virtual void AddRef() const override {
+ void AddRef() const override {
base::RefCountedThreadSafe<GpuInProcessThread>::AddRef();
}
- virtual void Release() const override {
+ void Release() const override {
base::RefCountedThreadSafe<GpuInProcessThread>::Release();
}
- virtual void ScheduleTask(const base::Closure& task) override;
- virtual void ScheduleIdleWork(const base::Closure& callback) override;
- virtual bool UseVirtualizedGLContexts() override { return false; }
- virtual scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache()
+ void ScheduleTask(const base::Closure& task) override;
+ void ScheduleIdleWork(const base::Closure& callback) override;
+ bool UseVirtualizedGLContexts() override { return false; }
+ scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache()
override;
private:
- virtual ~GpuInProcessThread();
+ ~GpuInProcessThread() override;
friend class base::RefCountedThreadSafe<GpuInProcessThread>;
scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h
index 65cf1ec..ec06ecd 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.h
+++ b/gpu/command_buffer/service/in_process_command_buffer.h
@@ -64,7 +64,7 @@
public:
class Service;
explicit InProcessCommandBuffer(const scoped_refptr<Service>& service);
- virtual ~InProcessCommandBuffer();
+ ~InProcessCommandBuffer() override;
// If |surface| is not NULL, use it directly; in this case, the command
// buffer gpu thread must be the same as the client thread. Otherwise create
@@ -80,38 +80,37 @@
void Destroy();
// CommandBuffer implementation:
- virtual bool Initialize() override;
- virtual State GetLastState() override;
- virtual int32 GetLastToken() override;
- virtual void Flush(int32 put_offset) override;
- virtual void WaitForTokenInRange(int32 start, int32 end) override;
- virtual void WaitForGetOffsetInRange(int32 start, int32 end) override;
- virtual void SetGetBuffer(int32 shm_id) override;
- virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
- int32* id) override;
- virtual void DestroyTransferBuffer(int32 id) override;
- virtual gpu::error::Error GetLastError() override;
+ bool Initialize() override;
+ State GetLastState() override;
+ int32 GetLastToken() override;
+ void Flush(int32 put_offset) override;
+ void WaitForTokenInRange(int32 start, int32 end) override;
+ void WaitForGetOffsetInRange(int32 start, int32 end) override;
+ void SetGetBuffer(int32 shm_id) override;
+ scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
+ int32* id) override;
+ void DestroyTransferBuffer(int32 id) override;
+ gpu::error::Error GetLastError() override;
// GpuControl implementation:
- virtual gpu::Capabilities GetCapabilities() override;
- virtual int32 CreateImage(ClientBuffer buffer,
- size_t width,
- size_t height,
- unsigned internalformat) override;
- virtual void DestroyImage(int32 id) override;
- virtual int32 CreateGpuMemoryBufferImage(size_t width,
- size_t height,
- unsigned internalformat,
- unsigned usage) override;
- virtual uint32 InsertSyncPoint() override;
- virtual uint32 InsertFutureSyncPoint() override;
- virtual void RetireSyncPoint(uint32 sync_point) override;
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query_id,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
- virtual uint32 CreateStreamTexture(uint32 texture_id) override;
+ gpu::Capabilities GetCapabilities() override;
+ int32 CreateImage(ClientBuffer buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) override;
+ void DestroyImage(int32 id) override;
+ int32 CreateGpuMemoryBufferImage(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage) override;
+ uint32 InsertSyncPoint() override;
+ uint32 InsertFutureSyncPoint() override;
+ void RetireSyncPoint(uint32 sync_point) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query_id, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
+ uint32 CreateStreamTexture(uint32 texture_id) override;
// The serializer interface to the GPU service (i.e. thread).
class Service {
diff --git a/gpu/command_buffer/service/memory_program_cache.h b/gpu/command_buffer/service/memory_program_cache.h
index 804547e..7560d01 100644
--- a/gpu/command_buffer/service/memory_program_cache.h
+++ b/gpu/command_buffer/service/memory_program_cache.h
@@ -24,9 +24,9 @@
public:
MemoryProgramCache();
explicit MemoryProgramCache(const size_t max_cache_size_bytes);
- virtual ~MemoryProgramCache();
+ ~MemoryProgramCache() override;
- virtual ProgramLoadResult LoadLinkedProgram(
+ ProgramLoadResult LoadLinkedProgram(
GLuint program,
Shader* shader_a,
const ShaderTranslatorInterface* translator_a,
@@ -34,19 +34,18 @@
const ShaderTranslatorInterface* translator_b,
const LocationMap* bind_attrib_location_map,
const ShaderCacheCallback& shader_callback) override;
- virtual void SaveLinkedProgram(
- GLuint program,
- const Shader* shader_a,
- const ShaderTranslatorInterface* translator_a,
- const Shader* shader_b,
- const ShaderTranslatorInterface* translator_b,
- const LocationMap* bind_attrib_location_map,
- const ShaderCacheCallback& shader_callback) override;
+ void SaveLinkedProgram(GLuint program,
+ const Shader* shader_a,
+ const ShaderTranslatorInterface* translator_a,
+ const Shader* shader_b,
+ const ShaderTranslatorInterface* translator_b,
+ const LocationMap* bind_attrib_location_map,
+ const ShaderCacheCallback& shader_callback) override;
- virtual void LoadProgram(const std::string& program) override;
+ void LoadProgram(const std::string& program) override;
private:
- virtual void ClearBackend() override;
+ void ClearBackend() override;
class ProgramCacheValue : public base::RefCounted<ProgramCacheValue> {
public:
diff --git a/gpu/command_buffer/service/program_cache_unittest.cc b/gpu/command_buffer/service/program_cache_unittest.cc
index 37597d3..525fea1 100644
--- a/gpu/command_buffer/service/program_cache_unittest.cc
+++ b/gpu/command_buffer/service/program_cache_unittest.cc
@@ -15,7 +15,7 @@
class NoBackendProgramCache : public ProgramCache {
public:
- virtual ProgramLoadResult LoadLinkedProgram(
+ ProgramLoadResult LoadLinkedProgram(
GLuint /* program */,
Shader* /* shader_a */,
const ShaderTranslatorInterface* /* translator_a */,
@@ -25,18 +25,17 @@
const ShaderCacheCallback& /* callback */) override {
return PROGRAM_LOAD_SUCCESS;
}
- virtual void SaveLinkedProgram(
- GLuint /* program */,
- const Shader* /* shader_a */,
- const ShaderTranslatorInterface* /* translator_b */,
- const Shader* /* shader_b */,
- const ShaderTranslatorInterface* /* translator_b */,
- const LocationMap* /* bind_attrib_location_map */,
- const ShaderCacheCallback& /* callback */) override { }
+ void SaveLinkedProgram(GLuint /* program */,
+ const Shader* /* shader_a */,
+ const ShaderTranslatorInterface* /* translator_b */,
+ const Shader* /* shader_b */,
+ const ShaderTranslatorInterface* /* translator_b */,
+ const LocationMap* /* bind_attrib_location_map */,
+ const ShaderCacheCallback& /* callback */) override {}
- virtual void LoadProgram(const std::string& /* program */) override {}
+ void LoadProgram(const std::string& /* program */) override {}
- virtual void ClearBackend() override {}
+ void ClearBackend() override {}
void SaySuccessfullyCached(const std::string& shader1,
const ShaderTranslatorInterface* translator_1,
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
index fdc7d0a..5f518ec 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -34,7 +34,7 @@
cancelled_ = true;
}
- virtual void DidComplete(const AsyncMemoryParams& mem_params) override {
+ void DidComplete(const AsyncMemoryParams& mem_params) override {
base::AutoLock locked(lock_);
if (!cancelled_) {
DCHECK(mem_params.buffer().get());
@@ -45,7 +45,7 @@
}
private:
- virtual ~AsyncPixelTransferCompletionObserverImpl() {}
+ ~AsyncPixelTransferCompletionObserverImpl() override {}
base::subtle::Atomic32 submit_count_;
@@ -62,13 +62,13 @@
AsyncPixelTransfersCompletedQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~AsyncPixelTransfersCompletedQuery();
+ ~AsyncPixelTransfersCompletedQuery() override;
scoped_refptr<AsyncPixelTransferCompletionObserverImpl> observer_;
};
@@ -139,13 +139,13 @@
AllSamplesPassedQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset,
GLuint service_id);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~AllSamplesPassedQuery();
+ ~AllSamplesPassedQuery() override;
private:
// Service side query id.
@@ -198,13 +198,13 @@
CommandsIssuedQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~CommandsIssuedQuery();
+ ~CommandsIssuedQuery() override;
private:
base::TimeTicks begin_time_;
@@ -245,13 +245,13 @@
CommandLatencyQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~CommandLatencyQuery();
+ ~CommandLatencyQuery() override;
};
CommandLatencyQuery::CommandLatencyQuery(
@@ -291,14 +291,14 @@
AsyncReadPixelsCompletedQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
void Complete();
- virtual ~AsyncReadPixelsCompletedQuery();
+ ~AsyncReadPixelsCompletedQuery() override;
private:
bool completed_;
@@ -351,13 +351,13 @@
GetErrorQuery(
QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~GetErrorQuery();
+ ~GetErrorQuery() override;
private:
};
@@ -398,13 +398,13 @@
uint32 shm_offset);
// Overridden from QueryManager::Query:
- virtual bool Begin() override;
- virtual bool End(base::subtle::Atomic32 submit_count) override;
- virtual bool Process() override;
- virtual void Destroy(bool have_context) override;
+ bool Begin() override;
+ bool End(base::subtle::Atomic32 submit_count) override;
+ bool Process() override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~CommandsCompletedQuery();
+ ~CommandsCompletedQuery() override;
private:
scoped_ptr<gfx::GLFence> fence_;
diff --git a/gpu/command_buffer/service/query_manager_unittest.cc b/gpu/command_buffer/service/query_manager_unittest.cc
index f6335e8..b4f1653 100644
--- a/gpu/command_buffer/service/query_manager_unittest.cc
+++ b/gpu/command_buffer/service/query_manager_unittest.cc
@@ -96,11 +96,9 @@
ClearSharedMemory();
}
- virtual ~MockCommandBufferEngine() {
- }
+ ~MockCommandBufferEngine() override {}
- virtual scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id)
- override {
+ scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override {
return shm_id == kSharedMemoryId ? valid_buffer_ : invalid_buffer_;
}
@@ -108,23 +106,21 @@
memset(data_, kInitialMemoryValue, kSharedBufferSize);
}
- virtual void set_token(int32 token) override {
- DCHECK(false);
- }
+ void set_token(int32 token) override { DCHECK(false); }
- virtual bool SetGetBuffer(int32 /* transfer_buffer_id */) override {
+ bool SetGetBuffer(int32 /* transfer_buffer_id */) override {
DCHECK(false);
return false;
}
// Overridden from CommandBufferEngine.
- virtual bool SetGetOffset(int32 offset) override {
+ bool SetGetOffset(int32 offset) override {
DCHECK(false);
return false;
}
// Overridden from CommandBufferEngine.
- virtual int32 GetGetOffset() override {
+ int32 GetGetOffset() override {
DCHECK(false);
return 0;
}
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h
index ff9d741..6075896 100644
--- a/gpu/command_buffer/service/shader_translator.h
+++ b/gpu/command_buffer/service/shader_translator.h
@@ -83,24 +83,22 @@
ShaderTranslator();
// Overridden from ShaderTranslatorInterface.
- virtual bool Init(
- sh::GLenum shader_type,
- ShShaderSpec shader_spec,
- const ShBuiltInResources* resources,
- GlslImplementationType glsl_implementation_type,
- ShCompileOptions driver_bug_workarounds) override;
+ bool Init(sh::GLenum shader_type,
+ ShShaderSpec shader_spec,
+ const ShBuiltInResources* resources,
+ GlslImplementationType glsl_implementation_type,
+ ShCompileOptions driver_bug_workarounds) override;
// Overridden from ShaderTranslatorInterface.
- virtual bool Translate(const std::string& shader_source,
- std::string* info_log,
- std::string* translated_source,
- AttributeMap* attrib_map,
- UniformMap* uniform_map,
- VaryingMap* varying_map,
- NameMap* name_map) const override;
+ bool Translate(const std::string& shader_source,
+ std::string* info_log,
+ std::string* translated_source,
+ AttributeMap* attrib_map,
+ UniformMap* uniform_map,
+ VaryingMap* varying_map,
+ NameMap* name_map) const override;
- virtual std::string GetStringForOptionsThatWouldAffectCompilation() const
- override;
+ std::string GetStringForOptionsThatWouldAffectCompilation() const override;
void AddDestructionObserver(DestructionObserver* observer);
void RemoveDestructionObserver(DestructionObserver* observer);
@@ -108,7 +106,7 @@
private:
friend class base::RefCounted<ShaderTranslator>;
- virtual ~ShaderTranslator();
+ ~ShaderTranslator() override;
int GetCompileOptions() const;
ShHandle compiler_;
diff --git a/gpu/command_buffer/service/shader_translator_cache.h b/gpu/command_buffer/service/shader_translator_cache.h
index 02f5829..e804ef2 100644
--- a/gpu/command_buffer/service/shader_translator_cache.h
+++ b/gpu/command_buffer/service/shader_translator_cache.h
@@ -29,7 +29,7 @@
ShaderTranslatorCache();
// ShaderTranslator::DestructionObserver implementation
- virtual void OnDestruct(ShaderTranslator* translator) override;
+ void OnDestruct(ShaderTranslator* translator) override;
scoped_refptr<ShaderTranslator> GetTranslator(
sh::GLenum shader_type,
@@ -41,7 +41,7 @@
private:
friend class base::RefCounted<ShaderTranslatorCache>;
- virtual ~ShaderTranslatorCache();
+ ~ShaderTranslatorCache() override;
// Parameters passed into ShaderTranslator::Init
struct ShaderTranslatorInitParams {
diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc
index 6255a1c..cf385d2 100644
--- a/gpu/command_buffer/service/texture_definition.cc
+++ b/gpu/command_buffer/service/texture_definition.cc
@@ -30,23 +30,23 @@
const gfx::Size& size);
// Implement GLImage.
- virtual void Destroy(bool have_context) override;
- virtual gfx::Size GetSize() override;
- virtual bool BindTexImage(unsigned target) override;
- virtual void ReleaseTexImage(unsigned target) override;
- virtual bool CopyTexImage(unsigned target) override;
- virtual void WillUseTexImage() override;
- virtual void WillModifyTexImage() override;
- virtual void DidModifyTexImage() override;
- virtual void DidUseTexImage() override;
- virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
- int z_order,
- gfx::OverlayTransform transform,
- const gfx::Rect& bounds_rect,
- const gfx::RectF& crop_rect) override;
+ void Destroy(bool have_context) override;
+ gfx::Size GetSize() override;
+ bool BindTexImage(unsigned target) override;
+ void ReleaseTexImage(unsigned target) override;
+ bool CopyTexImage(unsigned target) override;
+ void WillUseTexImage() override;
+ void WillModifyTexImage() override;
+ void DidModifyTexImage() override;
+ void DidUseTexImage() override;
+ bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+ int z_order,
+ gfx::OverlayTransform transform,
+ const gfx::Rect& bounds_rect,
+ const gfx::RectF& crop_rect) override;
protected:
- virtual ~GLImageSync();
+ ~GLImageSync() override;
private:
scoped_refptr<NativeImageBuffer> buffer_;
@@ -306,15 +306,15 @@
NativeImageBufferStub() : NativeImageBuffer() {}
private:
- virtual ~NativeImageBufferStub() {}
- virtual void AddClient(gfx::GLImage* client) override {}
- virtual void RemoveClient(gfx::GLImage* client) override {}
- virtual bool IsClient(gfx::GLImage* client) override { return true; }
- virtual void BindToTexture(GLenum target) override {}
- virtual void WillRead(gfx::GLImage* client) override {}
- virtual void WillWrite(gfx::GLImage* client) override {}
- virtual void DidRead(gfx::GLImage* client) override {}
- virtual void DidWrite(gfx::GLImage* client) override {}
+ ~NativeImageBufferStub() override {}
+ void AddClient(gfx::GLImage* client) override {}
+ void RemoveClient(gfx::GLImage* client) override {}
+ bool IsClient(gfx::GLImage* client) override { return true; }
+ void BindToTexture(GLenum target) override {}
+ void WillRead(gfx::GLImage* client) override {}
+ void WillWrite(gfx::GLImage* client) override {}
+ void DidRead(gfx::GLImage* client) override {}
+ void DidWrite(gfx::GLImage* client) override {}
DISALLOW_COPY_AND_ASSIGN(NativeImageBufferStub);
};
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index 9604cb1..157138f 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -2167,16 +2167,14 @@
current_size_[1] = 0;
}
- virtual void TrackMemoryAllocatedChange(size_t old_size,
- size_t new_size,
- Pool pool) override {
+ void TrackMemoryAllocatedChange(size_t old_size,
+ size_t new_size,
+ Pool pool) override {
DCHECK_LT(static_cast<size_t>(pool), arraysize(current_size_));
current_size_[pool] += new_size - old_size;
}
- virtual bool EnsureGPUMemoryAvailable(size_t size_needed) override {
- return true;
- }
+ bool EnsureGPUMemoryAvailable(size_t size_needed) override { return true; }
size_t GetSize(Pool pool) {
DCHECK_LT(static_cast<size_t>(pool), arraysize(current_size_));
@@ -2184,7 +2182,7 @@
}
private:
- virtual ~CountingMemoryTracker() {}
+ ~CountingMemoryTracker() override {}
size_t current_size_[2];
DISALLOW_COPY_AND_ASSIGN(CountingMemoryTracker);
diff --git a/gpu/command_buffer/service/transfer_buffer_manager.h b/gpu/command_buffer/service/transfer_buffer_manager.h
index 40cd168..f867790 100644
--- a/gpu/command_buffer/service/transfer_buffer_manager.h
+++ b/gpu/command_buffer/service/transfer_buffer_manager.h
@@ -32,14 +32,14 @@
TransferBufferManager();
bool Initialize();
- virtual bool RegisterTransferBuffer(int32 id,
- scoped_ptr<BufferBacking> buffer_backing)
- override;
- virtual void DestroyTransferBuffer(int32 id) override;
- virtual scoped_refptr<Buffer> GetTransferBuffer(int32 id) override;
+ bool RegisterTransferBuffer(
+ int32 id,
+ scoped_ptr<BufferBacking> buffer_backing) override;
+ void DestroyTransferBuffer(int32 id) override;
+ scoped_refptr<Buffer> GetTransferBuffer(int32 id) override;
private:
- virtual ~TransferBufferManager();
+ ~TransferBufferManager() override;
typedef base::hash_map<int32, scoped_refptr<Buffer> > BufferMap;
BufferMap registered_buffers_;
diff --git a/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc b/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc
index 44d0840..563b6cb 100644
--- a/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc
+++ b/gpu/command_buffer/service/transfer_buffer_manager_unittest.cc
@@ -57,10 +57,10 @@
class FakeBufferBacking : public BufferBacking {
public:
- virtual void* GetMemory() const override {
+ void* GetMemory() const override {
return reinterpret_cast<void*>(0xBADF00D0);
}
- virtual size_t GetSize() const override { return 42; }
+ size_t GetSize() const override { return 42; }
static scoped_ptr<BufferBacking> Make() {
return scoped_ptr<BufferBacking>(new FakeBufferBacking);
}
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 5678778..bb2acbd 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -62,21 +62,21 @@
}
// Overridden from gfx::GpuMemoryBuffer:
- virtual void* Map() override {
+ void* Map() override {
mapped_ = true;
return &bytes_->data().front();
}
- virtual void Unmap() override { mapped_ = false; }
- virtual bool IsMapped() const override { return mapped_; }
- virtual Format GetFormat() const override { return format_; }
- virtual uint32 GetStride() const override {
+ void Unmap() override { mapped_ = false; }
+ bool IsMapped() const override { return mapped_; }
+ Format GetFormat() const override { return format_; }
+ uint32 GetStride() const override {
return size_.width() * BytesPerPixel(format_);
}
- virtual gfx::GpuMemoryBufferHandle GetHandle() const override {
+ gfx::GpuMemoryBufferHandle GetHandle() const override {
NOTREACHED();
return gfx::GpuMemoryBufferHandle();
}
- virtual ClientBuffer AsClientBuffer() override {
+ ClientBuffer AsClientBuffer() override {
return reinterpret_cast<ClientBuffer>(this);
}
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h
index d76ca5b..03ed6a1 100644
--- a/gpu/command_buffer/tests/gl_manager.h
+++ b/gpu/command_buffer/tests/gl_manager.h
@@ -59,7 +59,7 @@
bool context_lost_allowed;
};
GLManager();
- virtual ~GLManager();
+ ~GLManager() override;
static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
const gfx::Size& size,
@@ -95,25 +95,24 @@
const gpu::gles2::FeatureInfo::Workarounds& workarounds() const;
// GpuControl implementation.
- virtual Capabilities GetCapabilities() override;
- virtual int32 CreateImage(ClientBuffer buffer,
- size_t width,
- size_t height,
- unsigned internalformat) override;
- virtual void DestroyImage(int32 id) override;
- virtual int32 CreateGpuMemoryBufferImage(size_t width,
- size_t height,
- unsigned internalformat,
- unsigned usage) override;
- virtual uint32 InsertSyncPoint() override;
- virtual uint32 InsertFutureSyncPoint() override;
- virtual void RetireSyncPoint(uint32 sync_point) override;
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
- virtual uint32 CreateStreamTexture(uint32 texture_id) override;
+ Capabilities GetCapabilities() override;
+ int32 CreateImage(ClientBuffer buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) override;
+ void DestroyImage(int32 id) override;
+ int32 CreateGpuMemoryBufferImage(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage) override;
+ uint32 InsertSyncPoint() override;
+ uint32 InsertFutureSyncPoint() override;
+ void RetireSyncPoint(uint32 sync_point) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
+ uint32 CreateStreamTexture(uint32 texture_id) override;
private:
void PumpCommands();
diff --git a/gpu/config/gpu_blacklist.h b/gpu/config/gpu_blacklist.h
index 4311212..6b2138a 100644
--- a/gpu/config/gpu_blacklist.h
+++ b/gpu/config/gpu_blacklist.h
@@ -13,7 +13,7 @@
class GPU_EXPORT GpuBlacklist : public GpuControlList {
public:
- virtual ~GpuBlacklist();
+ ~GpuBlacklist() override;
static GpuBlacklist* Create();
diff --git a/gpu/config/gpu_driver_bug_list.h b/gpu/config/gpu_driver_bug_list.h
index a4bd3bb..8830cac 100644
--- a/gpu/config/gpu_driver_bug_list.h
+++ b/gpu/config/gpu_driver_bug_list.h
@@ -17,7 +17,7 @@
class GPU_EXPORT GpuDriverBugList : public GpuControlList {
public:
- virtual ~GpuDriverBugList();
+ ~GpuDriverBugList() override;
static GpuDriverBugList* Create();
diff --git a/gpu/config/gpu_test_config.h b/gpu/config/gpu_test_config.h
index 8600a4a..b83e027 100644
--- a/gpu/config/gpu_test_config.h
+++ b/gpu/config/gpu_test_config.h
@@ -92,10 +92,10 @@
class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig {
public:
GPUTestBotConfig() { }
- virtual ~GPUTestBotConfig();
+ ~GPUTestBotConfig() override;
// This should only be called when no gpu_vendor is added.
- virtual void AddGPUVendor(uint32 gpu_vendor) override;
+ void AddGPUVendor(uint32 gpu_vendor) override;
// Return false if gpu_info does not have valid vendor_id and device_id.
bool SetGPUInfo(const GPUInfo& gpu_info);
@@ -103,7 +103,7 @@
// Check if the bot config is valid, i.e., if it is one valid test-bot
// environment. For example, if a field is unknown, or if OS is not one
// fully defined OS, then it's valid.
- virtual bool IsValid() const override;
+ bool IsValid() const override;
// Check if a bot config matches a test config, i.e., the test config is a
// superset of the bot config.
diff --git a/gpu/gles2_conform_support/egl/display.h b/gpu/gles2_conform_support/egl/display.h
index a1e82fe..651ab1a 100644
--- a/gpu/gles2_conform_support/egl/display.h
+++ b/gpu/gles2_conform_support/egl/display.h
@@ -38,7 +38,7 @@
class Display : private gpu::GpuControl {
public:
explicit Display(EGLNativeDisplayType display_id);
- virtual ~Display();
+ ~Display() override;
void SetCreateOffscreen(int width, int height) {
create_offscreen_ = true;
@@ -74,25 +74,24 @@
bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx);
// GpuControl implementation.
- virtual gpu::Capabilities GetCapabilities() override;
- virtual int32_t CreateImage(ClientBuffer buffer,
- size_t width,
- size_t height,
- unsigned internalformat) override;
- virtual void DestroyImage(int32_t id) override;
- virtual int32_t CreateGpuMemoryBufferImage(size_t width,
- size_t height,
- unsigned internalformat,
- unsigned usage) override;
- virtual uint32 InsertSyncPoint() override;
- virtual uint32 InsertFutureSyncPoint() override;
- virtual void RetireSyncPoint(uint32 sync_point) override;
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
- virtual uint32 CreateStreamTexture(uint32 texture_id) override;
+ gpu::Capabilities GetCapabilities() override;
+ int32_t CreateImage(ClientBuffer buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) override;
+ void DestroyImage(int32_t id) override;
+ int32_t CreateGpuMemoryBufferImage(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage) override;
+ uint32 InsertSyncPoint() override;
+ uint32 InsertFutureSyncPoint() override;
+ void RetireSyncPoint(uint32 sync_point) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
+ uint32 CreateStreamTexture(uint32 texture_id) override;
private:
EGLNativeDisplayType display_id_;
diff --git a/mojo/android/javatests/AndroidManifest.xml b/mojo/android/javatests/AndroidManifest.xml
index 290a1de..1b0a907 100644
--- a/mojo/android/javatests/AndroidManifest.xml
+++ b/mojo/android/javatests/AndroidManifest.xml
@@ -12,7 +12,7 @@
<application>
<uses-library android:name="android.test.runner" />
</application>
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="20" />
+ <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="org.chromium.mojo.tests"
android:label="Tests for org.chromium.mojo"/>
diff --git a/mojo/application_manager/application_loader.h b/mojo/application_manager/application_loader.h
index b7d9f19..f6e4e40 100644
--- a/mojo/application_manager/application_loader.h
+++ b/mojo/application_manager/application_loader.h
@@ -47,13 +47,13 @@
: public LoadCallbacks {
public:
SimpleLoadCallbacks(ScopedMessagePipeHandle shell_handle);
- virtual ScopedMessagePipeHandle RegisterApplication() override;
- virtual void LoadWithContentHandler(const GURL& content_handler_url,
- URLResponsePtr response) override;
+ ScopedMessagePipeHandle RegisterApplication() override;
+ void LoadWithContentHandler(const GURL& content_handler_url,
+ URLResponsePtr response) override;
private:
ScopedMessagePipeHandle shell_handle_;
- virtual ~SimpleLoadCallbacks();
+ ~SimpleLoadCallbacks() override;
};
virtual ~ApplicationLoader() {}
diff --git a/mojo/application_manager/application_manager.cc b/mojo/application_manager/application_manager.cc
index 38ee972..75ef7a7 100644
--- a/mojo/application_manager/application_manager.cc
+++ b/mojo/application_manager/application_manager.cc
@@ -29,9 +29,8 @@
ServiceProvider* GetRemoteServiceProvider() { return client(); }
private:
- virtual void ConnectToService(
- const String& service_name,
- ScopedMessagePipeHandle client_handle) override {}
+ void ConnectToService(const String& service_name,
+ ScopedMessagePipeHandle client_handle) override {}
};
} // namespace
@@ -51,10 +50,10 @@
service_provider_(service_provider.Pass()) {}
private:
- virtual ~LoadCallbacksImpl() {}
+ ~LoadCallbacksImpl() override {}
// LoadCallbacks implementation
- virtual ScopedMessagePipeHandle RegisterApplication() override {
+ ScopedMessagePipeHandle RegisterApplication() override {
ScopedMessagePipeHandle shell_handle;
if (manager_) {
manager_->RegisterLoadedApplication(requested_url_,
@@ -65,8 +64,8 @@
return shell_handle.Pass();
}
- virtual void LoadWithContentHandler(const GURL& content_handler_url,
- URLResponsePtr url_response) override {
+ void LoadWithContentHandler(const GURL& content_handler_url,
+ URLResponsePtr url_response) override {
if (manager_) {
manager_->LoadWithContentHandler(requested_url_,
requestor_url_,
@@ -87,7 +86,7 @@
ShellImpl(ApplicationManager* manager, const GURL& url)
: manager_(manager), url_(url) {}
- virtual ~ShellImpl() {}
+ ~ShellImpl() override {}
void ConnectToClient(const GURL& requestor_url,
ServiceProviderPtr service_provider) {
@@ -96,7 +95,7 @@
}
// ServiceProvider implementation:
- virtual void ConnectToApplication(
+ void ConnectToApplication(
const String& app_url,
InterfaceRequest<ServiceProvider> in_service_provider) override {
ServiceProviderPtr out_service_provider;
@@ -108,9 +107,7 @@
const GURL& url() const { return url_; }
private:
- virtual void OnConnectionError() override {
- manager_->OnShellImplError(this);
- }
+ void OnConnectionError() override { manager_->OnShellImplError(this); }
ApplicationManager* const manager_;
const GURL url_;
diff --git a/mojo/application_manager/application_manager_unittest.cc b/mojo/application_manager/application_manager_unittest.cc
index 1800dce..27688c6 100644
--- a/mojo/application_manager/application_manager_unittest.cc
+++ b/mojo/application_manager/application_manager_unittest.cc
@@ -34,10 +34,10 @@
class QuitMessageLoopErrorHandler : public ErrorHandler {
public:
QuitMessageLoopErrorHandler() {}
- virtual ~QuitMessageLoopErrorHandler() {}
+ ~QuitMessageLoopErrorHandler() override {}
// |ErrorHandler| implementation:
- virtual void OnConnectionError() override {
+ void OnConnectionError() override {
base::MessageLoop::current()->QuitWhenIdle();
}
@@ -51,16 +51,16 @@
++context_->num_impls;
}
- virtual ~TestServiceImpl() { --context_->num_impls; }
+ ~TestServiceImpl() override { --context_->num_impls; }
- virtual void OnConnectionError() override {
+ void OnConnectionError() override {
if (!base::MessageLoop::current()->is_running())
return;
base::MessageLoop::current()->Quit();
}
// TestService implementation:
- virtual void Test(const String& test_string) override {
+ void Test(const String& test_string) override {
context_->last_test_string = test_string;
client()->AckTest();
}
@@ -76,9 +76,9 @@
service_.set_client(this);
}
- virtual ~TestClientImpl() { service_.reset(); }
+ ~TestClientImpl() override { service_.reset(); }
- virtual void AckTest() override {
+ void AckTest() override {
if (quit_after_ack_)
base::MessageLoop::current()->Quit();
}
@@ -100,7 +100,7 @@
public:
TestApplicationLoader() : context_(NULL), num_loads_(0) {}
- virtual ~TestApplicationLoader() {
+ ~TestApplicationLoader() override {
if (context_)
++context_->num_loader_deletes;
test_app_.reset(NULL);
@@ -112,27 +112,26 @@
private:
// ApplicationLoader implementation.
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
++num_loads_;
test_app_.reset(
new ApplicationImpl(this, callbacks->RegisterApplication().Pass()));
}
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override {}
// ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService(this);
return true;
}
// InterfaceFactory implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestService> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestService> request) override {
BindToRequest(new TestServiceImpl(context_), &request);
}
@@ -244,18 +243,18 @@
: test_context_(test_context) {
connection->ConnectToApplication(kTestBURLString)->ConnectToService(&b_);
}
- virtual ~TestAImpl() {
+ ~TestAImpl() override {
test_context_->IncrementNumADeletes();
if (base::MessageLoop::current()->is_running())
Quit();
}
private:
- virtual void CallB() override {
+ void CallB() override {
b_->B(base::Bind(&TestAImpl::Quit, base::Unretained(this)));
}
- virtual void CallCFromB() override {
+ void CallCFromB() override {
b_->CallC(base::Bind(&TestAImpl::Quit, base::Unretained(this)));
}
@@ -276,7 +275,7 @@
connection->ConnectToService(&c_);
}
- virtual ~TestBImpl() {
+ ~TestBImpl() override {
test_context_->IncrementNumBDeletes();
if (base::MessageLoop::current()->is_running())
base::MessageLoop::current()->Quit();
@@ -284,12 +283,12 @@
}
private:
- virtual void B(const mojo::Callback<void()>& callback) override {
+ void B(const mojo::Callback<void()>& callback) override {
test_context_->IncrementNumBCalls();
callback.Run();
}
- virtual void CallC(const mojo::Callback<void()>& callback) override {
+ void CallC(const mojo::Callback<void()>& callback) override {
test_context_->IncrementNumBCalls();
c_->C(callback);
}
@@ -303,10 +302,10 @@
TestCImpl(ApplicationConnection* connection, TesterContext* test_context)
: test_context_(test_context) {}
- virtual ~TestCImpl() { test_context_->IncrementNumCDeletes(); }
+ ~TestCImpl() override { test_context_->IncrementNumCDeletes(); }
private:
- virtual void C(const mojo::Callback<void()>& callback) override {
+ void C(const mojo::Callback<void()>& callback) override {
test_context_->IncrementNumCCalls();
callback.Run();
}
@@ -321,21 +320,20 @@
public:
Tester(TesterContext* context, const std::string& requestor_url)
: context_(context), requestor_url_(requestor_url) {}
- virtual ~Tester() {}
+ ~Tester() override {}
private:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
app_.reset(
new ApplicationImpl(this, callbacks->RegisterApplication().Pass()));
}
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override {}
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
if (!requestor_url_.empty() &&
requestor_url_ != connection->GetRemoteApplicationURL()) {
context_->set_tester_called_quit();
@@ -351,26 +349,25 @@
return true;
}
- virtual bool ConfigureOutgoingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureOutgoingConnection(ApplicationConnection* connection) override {
// If we're connecting to B, then add C.
if (connection->GetRemoteApplicationURL() == kTestBURLString)
connection->AddService<TestC>(this);
return true;
}
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestA> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestA> request) override {
BindToRequest(new TestAImpl(connection, context_), &request);
}
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestB> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestB> request) override {
BindToRequest(new TestBImpl(connection, context_), &request);
}
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestC> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestC> request) override {
BindToRequest(new TestCImpl(connection, context_), &request);
}
@@ -383,7 +380,7 @@
public:
TestServiceInterceptor() : call_count_(0) {}
- virtual ServiceProviderPtr OnConnectToClient(
+ ServiceProviderPtr OnConnectToClient(
const GURL& url,
ServiceProviderPtr service_provider) override {
++call_count_;
diff --git a/mojo/application_manager/background_shell_application_loader.h b/mojo/application_manager/background_shell_application_loader.h
index 3c56290..399df43 100644
--- a/mojo/application_manager/background_shell_application_loader.h
+++ b/mojo/application_manager/background_shell_application_loader.h
@@ -24,20 +24,20 @@
BackgroundShellApplicationLoader(scoped_ptr<ApplicationLoader> real_loader,
const std::string& thread_name,
base::MessageLoop::Type message_loop_type);
- virtual ~BackgroundShellApplicationLoader();
+ ~BackgroundShellApplicationLoader() override;
// ApplicationLoader overrides:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override;
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override;
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override;
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override;
private:
class BackgroundLoader;
// |base::DelegateSimpleThread::Delegate| method:
- virtual void Run() override;
+ void Run() override;
// These functions are exected on the background thread. They call through
// to |background_loader_| to do the actual loading.
diff --git a/mojo/application_manager/background_shell_application_loader_unittest.cc b/mojo/application_manager/background_shell_application_loader_unittest.cc
index acf1a01..ae9eae9 100644
--- a/mojo/application_manager/background_shell_application_loader_unittest.cc
+++ b/mojo/application_manager/background_shell_application_loader_unittest.cc
@@ -13,18 +13,18 @@
class DummyLoader : public ApplicationLoader {
public:
DummyLoader() : simulate_app_quit_(true) {}
- virtual ~DummyLoader() {}
+ ~DummyLoader() override {}
// ApplicationLoader overrides:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
if (simulate_app_quit_)
base::MessageLoop::current()->Quit();
}
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override {}
void DontSimulateAppQuit() { simulate_app_quit_ = false; }
diff --git a/mojo/apps/js/application_delegate_impl.h b/mojo/apps/js/application_delegate_impl.h
index 4c2f2e2..81a481c 100644
--- a/mojo/apps/js/application_delegate_impl.h
+++ b/mojo/apps/js/application_delegate_impl.h
@@ -29,7 +29,7 @@
class ApplicationDelegateImpl : public ApplicationDelegate {
public:
ApplicationDelegateImpl();
- virtual ~ApplicationDelegateImpl();
+ ~ApplicationDelegateImpl() override;
// Add app to the AppVector and call its Start() method.
void StartJSApp(scoped_ptr<JSApp> app);
@@ -43,7 +43,7 @@
protected:
// ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* app) override;
+ void Initialize(ApplicationImpl* app) override;
private:
typedef ScopedVector<JSApp> AppVector;
diff --git a/mojo/apps/js/bindings/gl/context.h b/mojo/apps/js/bindings/gl/context.h
index 2166860..72ab2a2 100644
--- a/mojo/apps/js/bindings/gl/context.h
+++ b/mojo/apps/js/bindings/gl/context.h
@@ -54,13 +54,13 @@
uint64_t offset);
private:
- virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
+ gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) override;
explicit Context(v8::Isolate* isolate,
mojo::Handle handle,
v8::Handle<v8::Function> context_lost_callback);
- virtual ~Context();
+ ~Context() override;
void ContextLost();
static void ContextLostThunk(void* closure);
diff --git a/mojo/apps/js/content_handler_impl.cc b/mojo/apps/js/content_handler_impl.cc
index 01897a0..233e8af 100644
--- a/mojo/apps/js/content_handler_impl.cc
+++ b/mojo/apps/js/content_handler_impl.cc
@@ -19,7 +19,7 @@
content_(content.Pass()) {
}
- virtual bool Load(std::string* source, std::string* file_name) override {
+ bool Load(std::string* source, std::string* file_name) override {
*file_name = content_->url;
if (content_.is_null())
return false;
diff --git a/mojo/apps/js/content_handler_impl.h b/mojo/apps/js/content_handler_impl.h
index 04c2603..925d495 100644
--- a/mojo/apps/js/content_handler_impl.h
+++ b/mojo/apps/js/content_handler_impl.h
@@ -18,11 +18,10 @@
ContentHandlerImpl(ApplicationDelegateImpl* app_delegate_impl);
private:
- virtual ~ContentHandlerImpl();
- virtual void OnConnect(
- const mojo::String& url,
- URLResponsePtr content,
- InterfaceRequest<ServiceProvider> service_provider) override;
+ ~ContentHandlerImpl() override;
+ void OnConnect(const mojo::String& url,
+ URLResponsePtr content,
+ InterfaceRequest<ServiceProvider> service_provider) override;
ApplicationDelegateImpl* app_delegate_impl_;
};
diff --git a/mojo/apps/js/content_handler_main.cc b/mojo/apps/js/content_handler_main.cc
index 1edf10d..6c6a0a8 100644
--- a/mojo/apps/js/content_handler_main.cc
+++ b/mojo/apps/js/content_handler_main.cc
@@ -21,13 +21,12 @@
}
private:
- virtual void Initialize(ApplicationImpl* app) override {
+ void Initialize(ApplicationImpl* app) override {
base::i18n::InitializeICU();
ApplicationDelegateImpl::Initialize(app);
}
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService(&content_handler_factory_);
return true;
}
diff --git a/mojo/apps/js/mojo_runner_delegate.h b/mojo/apps/js/mojo_runner_delegate.h
index 8a7b448..ddc9598 100644
--- a/mojo/apps/js/mojo_runner_delegate.h
+++ b/mojo/apps/js/mojo_runner_delegate.h
@@ -15,14 +15,14 @@
class MojoRunnerDelegate : public gin::ModuleRunnerDelegate {
public:
MojoRunnerDelegate();
- virtual ~MojoRunnerDelegate();
+ ~MojoRunnerDelegate() override;
void Start(gin::Runner* runner, MojoHandle pipe, const std::string& module);
private:
// From ModuleRunnerDelegate:
- virtual void UnhandledException(gin::ShellRunner* runner,
- gin::TryCatch& try_catch) override;
+ void UnhandledException(gin::ShellRunner* runner,
+ gin::TryCatch& try_catch) override;
DISALLOW_COPY_AND_ASSIGN(MojoRunnerDelegate);
};
diff --git a/mojo/apps/js/standalone_main.cc b/mojo/apps/js/standalone_main.cc
index f776960..cc39bf0 100644
--- a/mojo/apps/js/standalone_main.cc
+++ b/mojo/apps/js/standalone_main.cc
@@ -22,7 +22,7 @@
path_(path) {
}
- virtual bool Load(std::string* source, std::string* file_name) override {
+ bool Load(std::string* source, std::string* file_name) override {
*file_name = path_.AsUTF8Unsafe();
return ReadFileToString(path_, source);
}
@@ -33,7 +33,7 @@
class StandaloneApplicationDelegateImpl : public ApplicationDelegateImpl {
private:
- virtual void Initialize(ApplicationImpl* app) override {
+ void Initialize(ApplicationImpl* app) override {
base::i18n::InitializeICU();
ApplicationDelegateImpl::Initialize(app);
diff --git a/mojo/apps/js/test/handle_unittest.cc b/mojo/apps/js/test/handle_unittest.cc
index 9167197..d282593 100644
--- a/mojo/apps/js/test/handle_unittest.cc
+++ b/mojo/apps/js/test/handle_unittest.cc
@@ -16,7 +16,7 @@
public:
HandleWrapperTest() : closes_observed_(0) {}
- virtual void OnWillCloseHandle() override { closes_observed_++; }
+ void OnWillCloseHandle() override { closes_observed_++; }
protected:
int closes_observed_;
diff --git a/mojo/apps/js/test/js_to_cpp_unittest.cc b/mojo/apps/js/test/js_to_cpp_unittest.cc
index 44526a4..0c44b75 100644
--- a/mojo/apps/js/test/js_to_cpp_unittest.cc
+++ b/mojo/apps/js/test/js_to_cpp_unittest.cc
@@ -212,7 +212,7 @@
js_side_(NULL),
mishandled_messages_(0) {
}
- virtual ~CppSideConnection() {}
+ ~CppSideConnection() override {}
void set_run_loop(base::RunLoop* run_loop) { run_loop_ = run_loop; }
base::RunLoop* run_loop() { return run_loop_; }
@@ -221,28 +221,21 @@
js_to_cpp::JsSide* js_side() { return js_side_; }
// js_to_cpp::CppSide:
- virtual void StartTest() override {
- NOTREACHED();
- }
+ void StartTest() override { NOTREACHED(); }
- virtual void TestFinished() override {
- NOTREACHED();
- }
+ void TestFinished() override { NOTREACHED(); }
- virtual void PingResponse() override {
+ void PingResponse() override { mishandled_messages_ += 1; }
+
+ void EchoResponse(js_to_cpp::EchoArgsListPtr list) override {
mishandled_messages_ += 1;
}
- virtual void EchoResponse(js_to_cpp::EchoArgsListPtr list) override {
+ void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override {
mishandled_messages_ += 1;
}
- virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override {
- mishandled_messages_ += 1;
- }
-
- virtual void BackPointerResponse(
- js_to_cpp::EchoArgsListPtr list) override {
+ void BackPointerResponse(js_to_cpp::EchoArgsListPtr list) override {
mishandled_messages_ += 1;
}
@@ -259,14 +252,12 @@
class PingCppSideConnection : public CppSideConnection {
public:
PingCppSideConnection() : got_message_(false) {}
- virtual ~PingCppSideConnection() {}
+ ~PingCppSideConnection() override {}
// js_to_cpp::CppSide:
- virtual void StartTest() override {
- js_side_->Ping();
- }
+ void StartTest() override { js_side_->Ping(); }
- virtual void PingResponse() override {
+ void PingResponse() override {
got_message_ = true;
run_loop()->Quit();
}
@@ -287,14 +278,14 @@
message_count_(0),
termination_seen_(false) {
}
- virtual ~EchoCppSideConnection() {}
+ ~EchoCppSideConnection() override {}
// js_to_cpp::CppSide:
- virtual void StartTest() override {
+ void StartTest() override {
js_side_->Echo(kExpectedMessageCount, BuildSampleEchoArgs());
}
- virtual void EchoResponse(js_to_cpp::EchoArgsListPtr list) override {
+ void EchoResponse(js_to_cpp::EchoArgsListPtr list) override {
const js_to_cpp::EchoArgsPtr& special_arg = list->item;
message_count_ += 1;
EXPECT_EQ(-1, special_arg->si64);
@@ -305,7 +296,7 @@
CheckSampleEchoArgsList(list->next);
}
- virtual void TestFinished() override {
+ void TestFinished() override {
termination_seen_ = true;
run_loop()->Quit();
}
@@ -327,18 +318,16 @@
class BitFlipCppSideConnection : public CppSideConnection {
public:
BitFlipCppSideConnection() : termination_seen_(false) {}
- virtual ~BitFlipCppSideConnection() {}
+ ~BitFlipCppSideConnection() override {}
// js_to_cpp::CppSide:
- virtual void StartTest() override {
- js_side_->BitFlip(BuildSampleEchoArgs());
- }
+ void StartTest() override { js_side_->BitFlip(BuildSampleEchoArgs()); }
- virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override {
+ void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override {
CheckCorruptedEchoArgsList(list);
}
- virtual void TestFinished() override {
+ void TestFinished() override {
termination_seen_ = true;
run_loop()->Quit();
}
@@ -356,19 +345,16 @@
class BackPointerCppSideConnection : public CppSideConnection {
public:
BackPointerCppSideConnection() : termination_seen_(false) {}
- virtual ~BackPointerCppSideConnection() {}
+ ~BackPointerCppSideConnection() override {}
// js_to_cpp::CppSide:
- virtual void StartTest() override {
- js_side_->BackPointer(BuildSampleEchoArgs());
- }
+ void StartTest() override { js_side_->BackPointer(BuildSampleEchoArgs()); }
- virtual void BackPointerResponse(
- js_to_cpp::EchoArgsListPtr list) override {
+ void BackPointerResponse(js_to_cpp::EchoArgsListPtr list) override {
CheckCorruptedEchoArgsList(list);
}
- virtual void TestFinished() override {
+ void TestFinished() override {
termination_seen_ = true;
run_loop()->Quit();
}
diff --git a/mojo/aura/screen_mojo.h b/mojo/aura/screen_mojo.h
index 184ccff..2fab17f 100644
--- a/mojo/aura/screen_mojo.h
+++ b/mojo/aura/screen_mojo.h
@@ -20,26 +20,22 @@
class ScreenMojo : public gfx::Screen {
public:
static ScreenMojo* Create();
- virtual ~ScreenMojo();
+ ~ScreenMojo() override;
protected:
// gfx::Screen overrides:
- virtual bool IsDIPEnabled() override;
- virtual gfx::Point GetCursorScreenPoint() override;
- virtual gfx::NativeWindow GetWindowUnderCursor() override;
- virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- override;
- virtual int GetNumDisplays() const override;
- virtual std::vector<gfx::Display> GetAllDisplays() const override;
- virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const override;
- virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const override;
- virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const override;
- virtual gfx::Display GetPrimaryDisplay() const override;
- virtual void AddObserver(gfx::DisplayObserver* observer) override;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) override;
+ bool IsDIPEnabled() override;
+ gfx::Point GetCursorScreenPoint() override;
+ gfx::NativeWindow GetWindowUnderCursor() override;
+ gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
+ int GetNumDisplays() const override;
+ std::vector<gfx::Display> GetAllDisplays() const override;
+ gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
+ gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
+ gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
+ gfx::Display GetPrimaryDisplay() const override;
+ void AddObserver(gfx::DisplayObserver* observer) override;
+ void RemoveObserver(gfx::DisplayObserver* observer) override;
private:
explicit ScreenMojo(const gfx::Rect& screen_bounds);
diff --git a/mojo/aura/surface_binding.cc b/mojo/aura/surface_binding.cc
index fc1d31a..8c1da68 100644
--- a/mojo/aura/surface_binding.cc
+++ b/mojo/aura/surface_binding.cc
@@ -35,10 +35,10 @@
class SurfaceClientImpl : public SurfaceClient {
public:
SurfaceClientImpl() {}
- virtual ~SurfaceClientImpl() {}
+ ~SurfaceClientImpl() override {}
// SurfaceClient:
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override {
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override {
// TODO (sky|jamesr): figure out right way to recycle resources.
}
@@ -56,10 +56,10 @@
const scoped_refptr<cc::ContextProvider>& context_provider,
Surface* surface,
cc::SurfaceIdAllocator* id_allocator);
- virtual ~OutputSurfaceImpl();
+ ~OutputSurfaceImpl() override;
// cc::OutputSurface:
- virtual void SwapBuffers(cc::CompositorFrame* frame) override;
+ void SwapBuffers(cc::CompositorFrame* frame) override;
private:
View* view_;
diff --git a/mojo/aura/surface_context_factory.h b/mojo/aura/surface_context_factory.h
index 8dd4721..d60080e 100644
--- a/mojo/aura/surface_context_factory.h
+++ b/mojo/aura/surface_context_factory.h
@@ -15,26 +15,24 @@
class SurfaceContextFactory : public ui::ContextFactory {
public:
SurfaceContextFactory(Shell* shell, View* view);
- virtual ~SurfaceContextFactory();
+ ~SurfaceContextFactory() override;
private:
// ContextFactory:
- virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
+ scoped_ptr<cc::OutputSurface> CreateOutputSurface(
ui::Compositor* compositor,
bool software_fallback) override;
- virtual scoped_refptr<ui::Reflector> CreateReflector(
+ scoped_refptr<ui::Reflector> CreateReflector(
ui::Compositor* mirrored_compositor,
ui::Layer* mirroring_layer) override;
- virtual void RemoveReflector(scoped_refptr<ui::Reflector> reflector) override;
- virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
- override;
- virtual void RemoveCompositor(ui::Compositor* compositor) override;
- virtual bool DoesCreateTestContexts() override;
- virtual cc::SharedBitmapManager* GetSharedBitmapManager() override;
- virtual cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
- virtual base::MessageLoopProxy* GetCompositorMessageLoop() override;
- virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator()
- override;
+ void RemoveReflector(scoped_refptr<ui::Reflector> reflector) override;
+ scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
+ void RemoveCompositor(ui::Compositor* compositor) override;
+ bool DoesCreateTestContexts() override;
+ cc::SharedBitmapManager* GetSharedBitmapManager() override;
+ cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
+ base::MessageLoopProxy* GetCompositorMessageLoop() override;
+ scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override;
SurfaceBinding surface_binding_;
diff --git a/mojo/aura/window_tree_host_mojo.h b/mojo/aura/window_tree_host_mojo.h
index f43e90d..f3f4be9 100644
--- a/mojo/aura/window_tree_host_mojo.h
+++ b/mojo/aura/window_tree_host_mojo.h
@@ -27,7 +27,7 @@
public ViewObserver {
public:
WindowTreeHostMojo(Shell* shell, View* view);
- virtual ~WindowTreeHostMojo();
+ ~WindowTreeHostMojo() override;
const gfx::Rect& bounds() const { return bounds_; }
@@ -37,27 +37,27 @@
private:
// WindowTreeHost:
- virtual ui::EventSource* GetEventSource() override;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
- virtual void Show() override;
- virtual void Hide() override;
- virtual gfx::Rect GetBounds() const override;
- virtual void SetBounds(const gfx::Rect& bounds) override;
- virtual gfx::Point GetLocationOnNativeScreen() const override;
- virtual void SetCapture() override;
- virtual void ReleaseCapture() override;
- virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
- virtual void SetCursorNative(gfx::NativeCursor cursor) override;
- virtual void MoveCursorToNative(const gfx::Point& location) override;
- virtual void OnCursorVisibilityChangedNative(bool show) override;
+ ui::EventSource* GetEventSource() override;
+ gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ void Show() override;
+ void Hide() override;
+ gfx::Rect GetBounds() const override;
+ void SetBounds(const gfx::Rect& bounds) override;
+ gfx::Point GetLocationOnNativeScreen() const override;
+ void SetCapture() override;
+ void ReleaseCapture() override;
+ void PostNativeEvent(const base::NativeEvent& native_event) override;
+ void SetCursorNative(gfx::NativeCursor cursor) override;
+ void MoveCursorToNative(const gfx::Point& location) override;
+ void OnCursorVisibilityChangedNative(bool show) override;
// ui::EventSource:
- virtual ui::EventProcessor* GetEventProcessor() override;
+ ui::EventProcessor* GetEventProcessor() override;
// ViewObserver:
- virtual void OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
+ void OnViewBoundsChanged(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
View* view_;
diff --git a/mojo/bindings/js/handle.h b/mojo/bindings/js/handle.h
index 4f0d9b5..b0f250c 100644
--- a/mojo/bindings/js/handle.h
+++ b/mojo/bindings/js/handle.h
@@ -35,7 +35,7 @@
protected:
HandleWrapper(MojoHandle handle);
- virtual ~HandleWrapper();
+ ~HandleWrapper() override;
void NotifyCloseObservers();
mojo::ScopedHandle handle_;
diff --git a/mojo/bindings/js/waiting_callback.h b/mojo/bindings/js/waiting_callback.h
index 2a4374a..8baa8a0 100644
--- a/mojo/bindings/js/waiting_callback.h
+++ b/mojo/bindings/js/waiting_callback.h
@@ -37,7 +37,7 @@
WaitingCallback(v8::Isolate* isolate,
v8::Handle<v8::Function> callback,
gin::Handle<HandleWrapper> handle_wrapper);
- virtual ~WaitingCallback();
+ ~WaitingCallback() override;
// Callback from MojoAsyncWaiter. |closure| is the WaitingCallback.
static void CallOnHandleReady(void* closure, MojoResult result);
@@ -47,7 +47,7 @@
// Invoked by the HandleWrapper if the handle is closed while this wait is
// still in progress.
- virtual void OnWillCloseHandle() override;
+ void OnWillCloseHandle() override;
base::WeakPtr<gin::Runner> runner_;
MojoAsyncWaitID wait_id_;
diff --git a/mojo/cc/context_provider_mojo.h b/mojo/cc/context_provider_mojo.h
index 294bd5d..014b973 100644
--- a/mojo/cc/context_provider_mojo.h
+++ b/mojo/cc/context_provider_mojo.h
@@ -17,24 +17,24 @@
explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle);
// cc::ContextProvider implementation.
- virtual bool BindToCurrentThread() override;
- virtual gpu::gles2::GLES2Interface* ContextGL() override;
- virtual gpu::ContextSupport* ContextSupport() override;
- virtual class GrContext* GrContext() override;
- virtual Capabilities ContextCapabilities() override;
- virtual bool IsContextLost() override;
- virtual void VerifyContexts() override {}
- virtual void DeleteCachedResources() override {}
- virtual bool DestroyedOnMainThread() override;
- virtual void SetLostContextCallback(
+ bool BindToCurrentThread() override;
+ gpu::gles2::GLES2Interface* ContextGL() override;
+ gpu::ContextSupport* ContextSupport() override;
+ class GrContext* GrContext() override;
+ Capabilities ContextCapabilities() override;
+ bool IsContextLost() override;
+ void VerifyContexts() override {}
+ void DeleteCachedResources() override {}
+ bool DestroyedOnMainThread() override;
+ void SetLostContextCallback(
const LostContextCallback& lost_context_callback) override {}
- virtual void SetMemoryPolicyChangedCallback(
+ void SetMemoryPolicyChangedCallback(
const MemoryPolicyChangedCallback& memory_policy_changed_callback)
override {}
protected:
friend class base::RefCountedThreadSafe<ContextProviderMojo>;
- virtual ~ContextProviderMojo();
+ ~ContextProviderMojo() override;
private:
static void ContextLostThunk(void* closure) {
diff --git a/mojo/cc/direct_output_surface.h b/mojo/cc/direct_output_surface.h
index 50e6c40..fa997b0 100644
--- a/mojo/cc/direct_output_surface.h
+++ b/mojo/cc/direct_output_surface.h
@@ -15,10 +15,10 @@
public:
explicit DirectOutputSurface(
const scoped_refptr<cc::ContextProvider>& context_provider);
- virtual ~DirectOutputSurface() override;
+ ~DirectOutputSurface() override;
// cc::OutputSurface implementation
- virtual void SwapBuffers(cc::CompositorFrame* frame) override;
+ void SwapBuffers(cc::CompositorFrame* frame) override;
private:
base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
diff --git a/mojo/cc/output_surface_mojo.h b/mojo/cc/output_surface_mojo.h
index b8f2bab..feef5a2 100644
--- a/mojo/cc/output_surface_mojo.h
+++ b/mojo/cc/output_surface_mojo.h
@@ -28,14 +28,14 @@
uint32_t id_namespace);
// SurfaceClient implementation.
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override;
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override;
// cc::OutputSurface implementation.
- virtual void SwapBuffers(cc::CompositorFrame* frame) override;
- virtual bool BindToClient(cc::OutputSurfaceClient* client) override;
+ void SwapBuffers(cc::CompositorFrame* frame) override;
+ bool BindToClient(cc::OutputSurfaceClient* client) override;
protected:
- virtual ~OutputSurfaceMojo();
+ ~OutputSurfaceMojo() override;
private:
OutputSurfaceMojoClient* output_surface_mojo_client_;
diff --git a/mojo/common/handle_watcher.cc b/mojo/common/handle_watcher.cc
index e8df765..737449a 100644
--- a/mojo/common/handle_watcher.cc
+++ b/mojo/common/handle_watcher.cc
@@ -61,7 +61,7 @@
class WatcherBackend : public MessagePumpMojoHandler {
public:
WatcherBackend();
- virtual ~WatcherBackend();
+ ~WatcherBackend() override;
void StartWatching(const WatchData& data);
@@ -79,8 +79,8 @@
bool GetMojoHandleByWatcherID(WatcherID watcher_id, Handle* handle) const;
// MessagePumpMojoHandler overrides:
- virtual void OnHandleReady(const Handle& handle) override;
- virtual void OnHandleError(const Handle& handle, MojoResult result) override;
+ void OnHandleReady(const Handle& handle) override;
+ void OnHandleError(const Handle& handle, MojoResult result) override;
// Maps from assigned id to WatchData.
HandleToWatchDataMap handle_to_data_;
@@ -325,7 +325,7 @@
base::MessageLoop::current()->AddDestructionObserver(this);
}
- virtual ~StateBase() {
+ ~StateBase() override {
base::MessageLoop::current()->RemoveDestructionObserver(this);
}
@@ -338,7 +338,7 @@
bool got_ready() const { return got_ready_; }
private:
- virtual void WillDestroyCurrentMessageLoop() override {
+ void WillDestroyCurrentMessageLoop() override {
// The current thread is exiting. Simulate a watch error.
NotifyAndDestroy(MOJO_RESULT_ABORTED);
}
@@ -378,18 +378,18 @@
this, handle, handle_signals, MojoDeadlineToTimeTicks(deadline));
}
- virtual ~SameThreadWatchingState() {
+ ~SameThreadWatchingState() override {
if (!got_ready())
MessagePumpMojo::current()->RemoveHandler(handle_);
}
private:
// MessagePumpMojoHandler overrides:
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
StopWatchingAndNotifyReady(handle, MOJO_RESULT_OK);
}
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
StopWatchingAndNotifyReady(handle, result);
}
@@ -424,7 +424,7 @@
weak_factory_.GetWeakPtr()));
}
- virtual ~SecondaryThreadWatchingState() {
+ ~SecondaryThreadWatchingState() override {
// If we've been notified the handle is ready (|got_ready()| is true) then
// the watch has been implicitly removed by
// WatcherThreadManager/MessagePumpMojo and we don't have to call
diff --git a/mojo/common/message_pump_mojo.h b/mojo/common/message_pump_mojo.h
index 4dd7155..2d91d4c 100644
--- a/mojo/common/message_pump_mojo.h
+++ b/mojo/common/message_pump_mojo.h
@@ -36,7 +36,7 @@
};
MessagePumpMojo();
- virtual ~MessagePumpMojo();
+ ~MessagePumpMojo() override;
// Static factory function (for using with |base::Thread::Options|, wrapped
// using |base::Bind()|).
@@ -61,11 +61,10 @@
void RemoveObserver(Observer*);
// MessagePump:
- virtual void Run(Delegate* delegate) override;
- virtual void Quit() override;
- virtual void ScheduleWork() override;
- virtual void ScheduleDelayedWork(
- const base::TimeTicks& delayed_work_time) override;
+ void Run(Delegate* delegate) override;
+ void Quit() override;
+ void ScheduleWork() override;
+ void ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) override;
private:
struct RunState;
diff --git a/mojo/common/message_pump_mojo_unittest.cc b/mojo/common/message_pump_mojo_unittest.cc
index f340132..09cbe54 100644
--- a/mojo/common/message_pump_mojo_unittest.cc
+++ b/mojo/common/message_pump_mojo_unittest.cc
@@ -24,7 +24,7 @@
public:
CountingMojoHandler() : success_count_(0), error_count_(0) {}
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
ReadMessageRaw(static_cast<const MessagePipeHandle&>(handle),
NULL,
NULL,
@@ -33,7 +33,7 @@
MOJO_READ_MESSAGE_FLAG_NONE);
++success_count_;
}
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
++error_count_;
}
@@ -49,12 +49,8 @@
class CountingObserver : public MessagePumpMojo::Observer {
public:
- virtual void WillSignalHandler() override {
- will_signal_handler_count++;
- }
- virtual void DidSignalHandler() override {
- did_signal_handler_count++;
- }
+ void WillSignalHandler() override { will_signal_handler_count++; }
+ void DidSignalHandler() override { did_signal_handler_count++; }
int will_signal_handler_count = 0;
int did_signal_handler_count = 0;
diff --git a/mojo/converters/input_events/mojo_extended_key_event_data.h b/mojo/converters/input_events/mojo_extended_key_event_data.h
index b8927e3..d398539 100644
--- a/mojo/converters/input_events/mojo_extended_key_event_data.h
+++ b/mojo/converters/input_events/mojo_extended_key_event_data.h
@@ -17,14 +17,14 @@
MojoExtendedKeyEventData(int32_t windows_key_code,
uint16_t text,
uint16_t unmodified_text);
- virtual ~MojoExtendedKeyEventData();
+ ~MojoExtendedKeyEventData() override;
int32_t windows_key_code() const { return windows_key_code_; }
uint16_t text() const { return text_; }
uint16_t unmodified_text() const { return unmodified_text_; }
// ui::ExtendedKeyEventData:
- virtual ui::ExtendedKeyEventData* Clone() const override;
+ ui::ExtendedKeyEventData* Clone() const override;
private:
const int32_t windows_key_code_;
diff --git a/mojo/edk/embedder/embedder_unittest.cc b/mojo/edk/embedder/embedder_unittest.cc
index 551ea27..5c4d0d8 100644
--- a/mojo/edk/embedder/embedder_unittest.cc
+++ b/mojo/edk/embedder/embedder_unittest.cc
@@ -102,7 +102,7 @@
class EmbedderTest : public testing::Test {
public:
EmbedderTest() : test_io_thread_(base::TestIOThread::kAutoStart) {}
- virtual ~EmbedderTest() {}
+ ~EmbedderTest() override {}
protected:
base::TestIOThread* test_io_thread() { return &test_io_thread_; }
diff --git a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
index 355e573..926bbc5 100644
--- a/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
+++ b/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
@@ -42,16 +42,16 @@
class PlatformChannelPairPosixTest : public testing::Test {
public:
PlatformChannelPairPosixTest() {}
- virtual ~PlatformChannelPairPosixTest() {}
+ ~PlatformChannelPairPosixTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
// Make sure |SIGPIPE| isn't being ignored.
struct sigaction action = {};
action.sa_handler = SIG_DFL;
ASSERT_EQ(0, sigaction(SIGPIPE, &action, &old_action_));
}
- virtual void TearDown() override {
+ void TearDown() override {
// Restore the |SIGPIPE| handler.
ASSERT_EQ(0, sigaction(SIGPIPE, &old_action_, nullptr));
}
diff --git a/mojo/edk/embedder/simple_platform_shared_buffer.h b/mojo/edk/embedder/simple_platform_shared_buffer.h
index 110637e..b4958b9 100644
--- a/mojo/edk/embedder/simple_platform_shared_buffer.h
+++ b/mojo/edk/embedder/simple_platform_shared_buffer.h
@@ -27,19 +27,18 @@
ScopedPlatformHandle platform_handle);
// |PlatformSharedBuffer| implementation:
- virtual size_t GetNumBytes() const override;
- virtual scoped_ptr<PlatformSharedBufferMapping> Map(size_t offset,
- size_t length) override;
- virtual bool IsValidMap(size_t offset, size_t length) override;
- virtual scoped_ptr<PlatformSharedBufferMapping> MapNoCheck(
- size_t offset,
- size_t length) override;
- virtual ScopedPlatformHandle DuplicatePlatformHandle() override;
- virtual ScopedPlatformHandle PassPlatformHandle() override;
+ size_t GetNumBytes() const override;
+ scoped_ptr<PlatformSharedBufferMapping> Map(size_t offset,
+ size_t length) override;
+ bool IsValidMap(size_t offset, size_t length) override;
+ scoped_ptr<PlatformSharedBufferMapping> MapNoCheck(size_t offset,
+ size_t length) override;
+ ScopedPlatformHandle DuplicatePlatformHandle() override;
+ ScopedPlatformHandle PassPlatformHandle() override;
private:
explicit SimplePlatformSharedBuffer(size_t num_bytes);
- virtual ~SimplePlatformSharedBuffer();
+ ~SimplePlatformSharedBuffer() override;
// Implemented in simple_platform_shared_buffer_{posix,win}.cc:
@@ -69,10 +68,10 @@
class MOJO_SYSTEM_IMPL_EXPORT SimplePlatformSharedBufferMapping
: public PlatformSharedBufferMapping {
public:
- virtual ~SimplePlatformSharedBufferMapping();
+ ~SimplePlatformSharedBufferMapping() override;
- virtual void* GetBase() const override;
- virtual size_t GetLength() const override;
+ void* GetBase() const override;
+ size_t GetLength() const override;
private:
friend class SimplePlatformSharedBuffer;
diff --git a/mojo/edk/embedder/simple_platform_support.h b/mojo/edk/embedder/simple_platform_support.h
index fc5371d..2013f8d 100644
--- a/mojo/edk/embedder/simple_platform_support.h
+++ b/mojo/edk/embedder/simple_platform_support.h
@@ -20,10 +20,10 @@
class MOJO_SYSTEM_IMPL_EXPORT SimplePlatformSupport : public PlatformSupport {
public:
SimplePlatformSupport() {}
- virtual ~SimplePlatformSupport() {}
+ ~SimplePlatformSupport() override {}
- virtual PlatformSharedBuffer* CreateSharedBuffer(size_t num_bytes) override;
- virtual PlatformSharedBuffer* CreateSharedBufferFromHandle(
+ PlatformSharedBuffer* CreateSharedBuffer(size_t num_bytes) override;
+ PlatformSharedBuffer* CreateSharedBufferFromHandle(
size_t num_bytes,
ScopedPlatformHandle platform_handle) override;
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index c09f4c0..fd718e5 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -128,13 +128,13 @@
private:
friend class base::RefCountedThreadSafe<Channel>;
- virtual ~Channel();
+ ~Channel() override;
// |RawChannel::Delegate| implementation (only called on the creation thread):
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& message_view,
embedder::ScopedPlatformHandleVectorPtr platform_handles) override;
- virtual void OnError(Error error) override;
+ void OnError(Error error) override;
// Helpers for |OnReadMessage| (only called on the creation thread):
void OnReadMessageForDownstream(
diff --git a/mojo/edk/system/channel_unittest.cc b/mojo/edk/system/channel_unittest.cc
index e5a9508..7d45f6e 100644
--- a/mojo/edk/system/channel_unittest.cc
+++ b/mojo/edk/system/channel_unittest.cc
@@ -33,9 +33,9 @@
ChannelTest()
: io_thread_(base::TestIOThread::kAutoStart),
init_result_(TRISTATE_UNKNOWN) {}
- virtual ~ChannelTest() {}
+ ~ChannelTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
io_thread_.PostTaskAndWait(
FROM_HERE,
base::Bind(&ChannelTest::SetUpOnIOThread, base::Unretained(this)));
@@ -118,42 +118,42 @@
class MockRawChannelOnInitFails : public RawChannel {
public:
MockRawChannelOnInitFails() : on_init_called_(false) {}
- virtual ~MockRawChannelOnInitFails() {}
+ ~MockRawChannelOnInitFails() override {}
// |RawChannel| public methods:
- virtual size_t GetSerializedPlatformHandleSize() const override { return 0; }
+ size_t GetSerializedPlatformHandleSize() const override { return 0; }
private:
// |RawChannel| protected methods:
- virtual IOResult Read(size_t*) override {
+ IOResult Read(size_t*) override {
CHECK(false);
return IO_FAILED_UNKNOWN;
}
- virtual IOResult ScheduleRead() override {
+ IOResult ScheduleRead() override {
CHECK(false);
return IO_FAILED_UNKNOWN;
}
- virtual embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
+ embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
size_t,
const void*) override {
CHECK(false);
return embedder::ScopedPlatformHandleVectorPtr();
}
- virtual IOResult WriteNoLock(size_t*, size_t*) override {
+ IOResult WriteNoLock(size_t*, size_t*) override {
CHECK(false);
return IO_FAILED_UNKNOWN;
}
- virtual IOResult ScheduleWriteNoLock() override {
+ IOResult ScheduleWriteNoLock() override {
CHECK(false);
return IO_FAILED_UNKNOWN;
}
- virtual bool OnInit() override {
+ bool OnInit() override {
EXPECT_FALSE(on_init_called_);
on_init_called_ = true;
return false;
}
- virtual void OnShutdownNoLock(scoped_ptr<ReadBuffer>,
- scoped_ptr<WriteBuffer>) override {
+ void OnShutdownNoLock(scoped_ptr<ReadBuffer>,
+ scoped_ptr<WriteBuffer>) override {
CHECK(false);
}
diff --git a/mojo/edk/system/core_test_base.cc b/mojo/edk/system/core_test_base.cc
index 0f2c7cc..d1a1a24 100644
--- a/mojo/edk/system/core_test_base.cc
+++ b/mojo/edk/system/core_test_base.cc
@@ -31,18 +31,18 @@
}
// |Dispatcher| private methods:
- virtual Type GetType() const override { return kTypeUnknown; }
+ Type GetType() const override { return kTypeUnknown; }
private:
- virtual ~MockDispatcher() { info_->IncrementDtorCallCount(); }
+ ~MockDispatcher() override { info_->IncrementDtorCallCount(); }
// |Dispatcher| protected methods:
- virtual void CloseImplNoLock() override {
+ void CloseImplNoLock() override {
info_->IncrementCloseCallCount();
lock().AssertAcquired();
}
- virtual MojoResult WriteMessageImplNoLock(
+ MojoResult WriteMessageImplNoLock(
UserPointer<const void> bytes,
uint32_t num_bytes,
std::vector<DispatcherTransport>* transports,
@@ -59,12 +59,11 @@
return MOJO_RESULT_OK;
}
- virtual MojoResult ReadMessageImplNoLock(
- UserPointer<void> bytes,
- UserPointer<uint32_t> num_bytes,
- DispatcherVector* dispatchers,
- uint32_t* num_dispatchers,
- MojoReadMessageFlags /*flags*/) override {
+ MojoResult ReadMessageImplNoLock(UserPointer<void> bytes,
+ UserPointer<uint32_t> num_bytes,
+ DispatcherVector* dispatchers,
+ uint32_t* num_dispatchers,
+ MojoReadMessageFlags /*flags*/) override {
info_->IncrementReadMessageCallCount();
lock().AssertAcquired();
@@ -79,16 +78,15 @@
return MOJO_RESULT_OK;
}
- virtual MojoResult WriteDataImplNoLock(
- UserPointer<const void> /*elements*/,
- UserPointer<uint32_t> /*num_bytes*/,
- MojoWriteDataFlags /*flags*/) override {
+ MojoResult WriteDataImplNoLock(UserPointer<const void> /*elements*/,
+ UserPointer<uint32_t> /*num_bytes*/,
+ MojoWriteDataFlags /*flags*/) override {
info_->IncrementWriteDataCallCount();
lock().AssertAcquired();
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult BeginWriteDataImplNoLock(
+ MojoResult BeginWriteDataImplNoLock(
UserPointer<void*> /*buffer*/,
UserPointer<uint32_t> /*buffer_num_bytes*/,
MojoWriteDataFlags /*flags*/) override {
@@ -97,42 +95,38 @@
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult EndWriteDataImplNoLock(
- uint32_t /*num_bytes_written*/) override {
+ MojoResult EndWriteDataImplNoLock(uint32_t /*num_bytes_written*/) override {
info_->IncrementEndWriteDataCallCount();
lock().AssertAcquired();
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult ReadDataImplNoLock(UserPointer<void> /*elements*/,
- UserPointer<uint32_t> /*num_bytes*/,
- MojoReadDataFlags /*flags*/) override {
+ MojoResult ReadDataImplNoLock(UserPointer<void> /*elements*/,
+ UserPointer<uint32_t> /*num_bytes*/,
+ MojoReadDataFlags /*flags*/) override {
info_->IncrementReadDataCallCount();
lock().AssertAcquired();
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult BeginReadDataImplNoLock(
- UserPointer<const void*> /*buffer*/,
- UserPointer<uint32_t> /*buffer_num_bytes*/,
- MojoReadDataFlags /*flags*/) override {
+ MojoResult BeginReadDataImplNoLock(UserPointer<const void*> /*buffer*/,
+ UserPointer<uint32_t> /*buffer_num_bytes*/,
+ MojoReadDataFlags /*flags*/) override {
info_->IncrementBeginReadDataCallCount();
lock().AssertAcquired();
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult EndReadDataImplNoLock(
- uint32_t /*num_bytes_read*/) override {
+ MojoResult EndReadDataImplNoLock(uint32_t /*num_bytes_read*/) override {
info_->IncrementEndReadDataCallCount();
lock().AssertAcquired();
return MOJO_RESULT_UNIMPLEMENTED;
}
- virtual MojoResult AddWaiterImplNoLock(
- Waiter* /*waiter*/,
- MojoHandleSignals /*signals*/,
- uint32_t /*context*/,
- HandleSignalsState* signals_state) override {
+ MojoResult AddWaiterImplNoLock(Waiter* /*waiter*/,
+ MojoHandleSignals /*signals*/,
+ uint32_t /*context*/,
+ HandleSignalsState* signals_state) override {
info_->IncrementAddWaiterCallCount();
lock().AssertAcquired();
if (signals_state)
@@ -140,22 +134,21 @@
return MOJO_RESULT_FAILED_PRECONDITION;
}
- virtual void RemoveWaiterImplNoLock(
- Waiter* /*waiter*/,
- HandleSignalsState* signals_state) override {
+ void RemoveWaiterImplNoLock(Waiter* /*waiter*/,
+ HandleSignalsState* signals_state) override {
info_->IncrementRemoveWaiterCallCount();
lock().AssertAcquired();
if (signals_state)
*signals_state = HandleSignalsState();
}
- virtual void CancelAllWaitersNoLock() override {
+ void CancelAllWaitersNoLock() override {
info_->IncrementCancelAllWaitersCallCount();
lock().AssertAcquired();
}
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override {
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override {
return scoped_refptr<Dispatcher>(new MockDispatcher(info_));
}
diff --git a/mojo/edk/system/core_test_base.h b/mojo/edk/system/core_test_base.h
index 409f7e1..2881176 100644
--- a/mojo/edk/system/core_test_base.h
+++ b/mojo/edk/system/core_test_base.h
@@ -25,10 +25,10 @@
typedef CoreTestBase_MockHandleInfo MockHandleInfo;
CoreTestBase();
- virtual ~CoreTestBase();
+ ~CoreTestBase() override;
- virtual void SetUp() override;
- virtual void TearDown() override;
+ void SetUp() override;
+ void TearDown() override;
protected:
// |info| must remain alive until the returned handle is closed.
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.h b/mojo/edk/system/data_pipe_consumer_dispatcher.h
index 59c1239..6555fb5 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.h
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.h
@@ -26,34 +26,31 @@
void Init(scoped_refptr<DataPipe> data_pipe);
// |Dispatcher| public methods:
- virtual Type GetType() const override;
+ Type GetType() const override;
private:
- virtual ~DataPipeConsumerDispatcher();
+ ~DataPipeConsumerDispatcher() override;
// |Dispatcher| protected methods:
- virtual void CancelAllWaitersNoLock() override;
- virtual void CloseImplNoLock() override;
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override;
- virtual MojoResult ReadDataImplNoLock(UserPointer<void> elements,
- UserPointer<uint32_t> num_bytes,
- MojoReadDataFlags flags) override;
- virtual MojoResult BeginReadDataImplNoLock(
- UserPointer<const void*> buffer,
- UserPointer<uint32_t> buffer_num_bytes,
- MojoReadDataFlags flags) override;
- virtual MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read) override;
- virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
- virtual MojoResult AddWaiterImplNoLock(
- Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) override;
- virtual void RemoveWaiterImplNoLock(
- Waiter* waiter,
- HandleSignalsState* signals_state) override;
- virtual bool IsBusyNoLock() const override;
+ void CancelAllWaitersNoLock() override;
+ void CloseImplNoLock() override;
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override;
+ MojoResult ReadDataImplNoLock(UserPointer<void> elements,
+ UserPointer<uint32_t> num_bytes,
+ MojoReadDataFlags flags) override;
+ MojoResult BeginReadDataImplNoLock(UserPointer<const void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
+ MojoReadDataFlags flags) override;
+ MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read) override;
+ HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
+ MojoResult AddWaiterImplNoLock(Waiter* waiter,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) override;
+ void RemoveWaiterImplNoLock(Waiter* waiter,
+ HandleSignalsState* signals_state) override;
+ bool IsBusyNoLock() const override;
// Protected by |lock()|:
scoped_refptr<DataPipe> data_pipe_; // This will be null if closed.
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.h b/mojo/edk/system/data_pipe_producer_dispatcher.h
index a53357a..bf13148 100644
--- a/mojo/edk/system/data_pipe_producer_dispatcher.h
+++ b/mojo/edk/system/data_pipe_producer_dispatcher.h
@@ -26,35 +26,31 @@
void Init(scoped_refptr<DataPipe> data_pipe);
// |Dispatcher| public methods:
- virtual Type GetType() const override;
+ Type GetType() const override;
private:
- virtual ~DataPipeProducerDispatcher();
+ ~DataPipeProducerDispatcher() override;
// |Dispatcher| protected methods:
- virtual void CancelAllWaitersNoLock() override;
- virtual void CloseImplNoLock() override;
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override;
- virtual MojoResult WriteDataImplNoLock(UserPointer<const void> elements,
- UserPointer<uint32_t> num_bytes,
- MojoWriteDataFlags flags) override;
- virtual MojoResult BeginWriteDataImplNoLock(
- UserPointer<void*> buffer,
- UserPointer<uint32_t> buffer_num_bytes,
- MojoWriteDataFlags flags) override;
- virtual MojoResult EndWriteDataImplNoLock(
- uint32_t num_bytes_written) override;
- virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
- virtual MojoResult AddWaiterImplNoLock(
- Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) override;
- virtual void RemoveWaiterImplNoLock(
- Waiter* waiter,
- HandleSignalsState* signals_state) override;
- virtual bool IsBusyNoLock() const override;
+ void CancelAllWaitersNoLock() override;
+ void CloseImplNoLock() override;
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override;
+ MojoResult WriteDataImplNoLock(UserPointer<const void> elements,
+ UserPointer<uint32_t> num_bytes,
+ MojoWriteDataFlags flags) override;
+ MojoResult BeginWriteDataImplNoLock(UserPointer<void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
+ MojoWriteDataFlags flags) override;
+ MojoResult EndWriteDataImplNoLock(uint32_t num_bytes_written) override;
+ HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
+ MojoResult AddWaiterImplNoLock(Waiter* waiter,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) override;
+ void RemoveWaiterImplNoLock(Waiter* waiter,
+ HandleSignalsState* signals_state) override;
+ bool IsBusyNoLock() const override;
// Protected by |lock()|:
scoped_refptr<DataPipe> data_pipe_; // This will be null if closed.
diff --git a/mojo/edk/system/dispatcher_unittest.cc b/mojo/edk/system/dispatcher_unittest.cc
index d9d526d..b5a05d4 100644
--- a/mojo/edk/system/dispatcher_unittest.cc
+++ b/mojo/edk/system/dispatcher_unittest.cc
@@ -23,14 +23,14 @@
public:
TrivialDispatcher() {}
- virtual Type GetType() const override { return kTypeUnknown; }
+ Type GetType() const override { return kTypeUnknown; }
private:
friend class base::RefCountedThreadSafe<TrivialDispatcher>;
- virtual ~TrivialDispatcher() {}
+ ~TrivialDispatcher() override {}
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override {
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override {
lock().AssertAcquired();
return scoped_refptr<Dispatcher>(new TrivialDispatcher());
}
@@ -157,10 +157,10 @@
CHECK_LT(op_, DISPATCHER_OP_COUNT);
}
- virtual ~ThreadSafetyStressThread() { Join(); }
+ ~ThreadSafetyStressThread() override { Join(); }
private:
- virtual void Run() override {
+ void Run() override {
event_->Wait();
waiter_.Init();
diff --git a/mojo/edk/system/local_data_pipe.h b/mojo/edk/system/local_data_pipe.h
index 8d3b75b..8a46c52 100644
--- a/mojo/edk/system/local_data_pipe.h
+++ b/mojo/edk/system/local_data_pipe.h
@@ -27,43 +27,40 @@
private:
friend class base::RefCountedThreadSafe<LocalDataPipe>;
- virtual ~LocalDataPipe();
+ ~LocalDataPipe() override;
// |DataPipe| implementation:
- virtual void ProducerCloseImplNoLock() override;
- virtual MojoResult ProducerWriteDataImplNoLock(
+ void ProducerCloseImplNoLock() override;
+ MojoResult ProducerWriteDataImplNoLock(
UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
uint32_t max_num_bytes_to_write,
uint32_t min_num_bytes_to_write) override;
- virtual MojoResult ProducerBeginWriteDataImplNoLock(
+ MojoResult ProducerBeginWriteDataImplNoLock(
UserPointer<void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
uint32_t min_num_bytes_to_write) override;
- virtual MojoResult ProducerEndWriteDataImplNoLock(
+ MojoResult ProducerEndWriteDataImplNoLock(
uint32_t num_bytes_written) override;
- virtual HandleSignalsState ProducerGetHandleSignalsStateImplNoLock()
- const override;
- virtual void ConsumerCloseImplNoLock() override;
- virtual MojoResult ConsumerReadDataImplNoLock(
+ HandleSignalsState ProducerGetHandleSignalsStateImplNoLock() const override;
+ void ConsumerCloseImplNoLock() override;
+ MojoResult ConsumerReadDataImplNoLock(
UserPointer<void> elements,
UserPointer<uint32_t> num_bytes,
uint32_t max_num_bytes_to_read,
uint32_t min_num_bytes_to_read) override;
- virtual MojoResult ConsumerDiscardDataImplNoLock(
+ MojoResult ConsumerDiscardDataImplNoLock(
UserPointer<uint32_t> num_bytes,
uint32_t max_num_bytes_to_discard,
uint32_t min_num_bytes_to_discard) override;
- virtual MojoResult ConsumerQueryDataImplNoLock(
+ MojoResult ConsumerQueryDataImplNoLock(
UserPointer<uint32_t> num_bytes) override;
- virtual MojoResult ConsumerBeginReadDataImplNoLock(
+ MojoResult ConsumerBeginReadDataImplNoLock(
UserPointer<const void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
uint32_t min_num_bytes_to_read) override;
- virtual MojoResult ConsumerEndReadDataImplNoLock(
- uint32_t num_bytes_read) override;
- virtual HandleSignalsState ConsumerGetHandleSignalsStateImplNoLock()
- const override;
+ MojoResult ConsumerEndReadDataImplNoLock(uint32_t num_bytes_read) override;
+ HandleSignalsState ConsumerGetHandleSignalsStateImplNoLock() const override;
void EnsureBufferNoLock();
void DestroyBufferNoLock();
diff --git a/mojo/edk/system/local_message_pipe_endpoint.h b/mojo/edk/system/local_message_pipe_endpoint.h
index ccff26d..7eb3949 100644
--- a/mojo/edk/system/local_message_pipe_endpoint.h
+++ b/mojo/edk/system/local_message_pipe_endpoint.h
@@ -20,29 +20,28 @@
: public MessagePipeEndpoint {
public:
LocalMessagePipeEndpoint();
- virtual ~LocalMessagePipeEndpoint();
+ ~LocalMessagePipeEndpoint() override;
// |MessagePipeEndpoint| implementation:
- virtual Type GetType() const override;
- virtual bool OnPeerClose() override;
- virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) override;
+ Type GetType() const override;
+ bool OnPeerClose() override;
+ void EnqueueMessage(scoped_ptr<MessageInTransit> message) override;
// There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to
// implement/override these:
- virtual void Close() override;
- virtual void CancelAllWaiters() override;
- virtual MojoResult ReadMessage(UserPointer<void> bytes,
- UserPointer<uint32_t> num_bytes,
- DispatcherVector* dispatchers,
- uint32_t* num_dispatchers,
- MojoReadMessageFlags flags) override;
- virtual HandleSignalsState GetHandleSignalsState() const override;
- virtual MojoResult AddWaiter(Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) override;
- virtual void RemoveWaiter(Waiter* waiter,
- HandleSignalsState* signals_state) override;
+ void Close() override;
+ void CancelAllWaiters() override;
+ MojoResult ReadMessage(UserPointer<void> bytes,
+ UserPointer<uint32_t> num_bytes,
+ DispatcherVector* dispatchers,
+ uint32_t* num_dispatchers,
+ MojoReadMessageFlags flags) override;
+ HandleSignalsState GetHandleSignalsState() const override;
+ MojoResult AddWaiter(Waiter* waiter,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) override;
+ void RemoveWaiter(Waiter* waiter, HandleSignalsState* signals_state) override;
// This is only to be used by |MessagePipe|:
MessageInTransitQueue* message_queue() { return &message_queue_; }
diff --git a/mojo/edk/system/message_pipe.h b/mojo/edk/system/message_pipe.h
index e1d9f63..a52743d 100644
--- a/mojo/edk/system/message_pipe.h
+++ b/mojo/edk/system/message_pipe.h
@@ -99,7 +99,7 @@
MessagePipe();
friend class base::RefCountedThreadSafe<MessagePipe>;
- virtual ~MessagePipe();
+ ~MessagePipe();
// This is used internally by |WriteMessage()| and by |EnqueueMessage()|.
// |transports| may be non-null only if it's nonempty and |message| has no
diff --git a/mojo/edk/system/message_pipe_dispatcher.h b/mojo/edk/system/message_pipe_dispatcher.h
index de789ba..9afdb70 100644
--- a/mojo/edk/system/message_pipe_dispatcher.h
+++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -43,7 +43,7 @@
void Init(scoped_refptr<MessagePipe> message_pipe, unsigned port);
// |Dispatcher| public methods:
- virtual Type GetType() const override;
+ Type GetType() const override;
// Creates a |MessagePipe| with a local endpoint (at port 0) and a proxy
// endpoint, and creates/initializes a |MessagePipeDispatcher| (attached to
@@ -62,7 +62,7 @@
private:
friend class MessagePipeDispatcherTransport;
- virtual ~MessagePipeDispatcher();
+ ~MessagePipeDispatcher() override;
// Gets a dumb pointer to |message_pipe_|. This must be called under the
// |Dispatcher| lock (that it's a dumb pointer is okay since it's under lock).
@@ -73,33 +73,31 @@
unsigned GetPortNoLock() const;
// |Dispatcher| protected methods:
- virtual void CancelAllWaitersNoLock() override;
- virtual void CloseImplNoLock() override;
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override;
- virtual MojoResult WriteMessageImplNoLock(
+ void CancelAllWaitersNoLock() override;
+ void CloseImplNoLock() override;
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override;
+ MojoResult WriteMessageImplNoLock(
UserPointer<const void> bytes,
uint32_t num_bytes,
std::vector<DispatcherTransport>* transports,
MojoWriteMessageFlags flags) override;
- virtual MojoResult ReadMessageImplNoLock(UserPointer<void> bytes,
- UserPointer<uint32_t> num_bytes,
- DispatcherVector* dispatchers,
- uint32_t* num_dispatchers,
- MojoReadMessageFlags flags) override;
- virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
- virtual MojoResult AddWaiterImplNoLock(
- Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) override;
- virtual void RemoveWaiterImplNoLock(
- Waiter* waiter,
- HandleSignalsState* signals_state) override;
- virtual void StartSerializeImplNoLock(Channel* channel,
- size_t* max_size,
- size_t* max_platform_handles) override;
- virtual bool EndSerializeAndCloseImplNoLock(
+ MojoResult ReadMessageImplNoLock(UserPointer<void> bytes,
+ UserPointer<uint32_t> num_bytes,
+ DispatcherVector* dispatchers,
+ uint32_t* num_dispatchers,
+ MojoReadMessageFlags flags) override;
+ HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
+ MojoResult AddWaiterImplNoLock(Waiter* waiter,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) override;
+ void RemoveWaiterImplNoLock(Waiter* waiter,
+ HandleSignalsState* signals_state) override;
+ void StartSerializeImplNoLock(Channel* channel,
+ size_t* max_size,
+ size_t* max_platform_handles) override;
+ bool EndSerializeAndCloseImplNoLock(
Channel* channel,
void* destination,
size_t* actual_size,
diff --git a/mojo/edk/system/message_pipe_dispatcher_unittest.cc b/mojo/edk/system/message_pipe_dispatcher_unittest.cc
index 96ca436..ae651fa 100644
--- a/mojo/edk/system/message_pipe_dispatcher_unittest.cc
+++ b/mojo/edk/system/message_pipe_dispatcher_unittest.cc
@@ -528,10 +528,10 @@
*bytes_written_ = 0;
}
- virtual ~WriterThread() { Join(); }
+ ~WriterThread() override { Join(); }
private:
- virtual void Run() override {
+ void Run() override {
// Make some data to write.
unsigned char buffer[kMaxMessageSize];
for (size_t i = 0; i < kMaxMessageSize; i++)
@@ -581,10 +581,10 @@
*bytes_read_ = 0;
}
- virtual ~ReaderThread() { Join(); }
+ ~ReaderThread() override { Join(); }
private:
- virtual void Run() override {
+ void Run() override {
unsigned char buffer[kMaxMessageSize];
Waiter w;
HandleSignalsState hss;
diff --git a/mojo/edk/system/message_pipe_test_utils.h b/mojo/edk/system/message_pipe_test_utils.h
index 9e6a4b7..c9d9c8b 100644
--- a/mojo/edk/system/message_pipe_test_utils.h
+++ b/mojo/edk/system/message_pipe_test_utils.h
@@ -49,7 +49,7 @@
class MultiprocessMessagePipeTestBase : public testing::Test {
public:
MultiprocessMessagePipeTestBase();
- virtual ~MultiprocessMessagePipeTestBase();
+ ~MultiprocessMessagePipeTestBase() override;
protected:
void Init(scoped_refptr<ChannelEndpoint> ep);
diff --git a/mojo/edk/system/platform_handle_dispatcher.h b/mojo/edk/system/platform_handle_dispatcher.h
index eb5eb5d..6eb56b7 100644
--- a/mojo/edk/system/platform_handle_dispatcher.h
+++ b/mojo/edk/system/platform_handle_dispatcher.h
@@ -24,7 +24,7 @@
embedder::ScopedPlatformHandle PassPlatformHandle();
// |Dispatcher| public methods:
- virtual Type GetType() const override;
+ Type GetType() const override;
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
@@ -35,16 +35,16 @@
embedder::PlatformHandleVector* platform_handles);
private:
- virtual ~PlatformHandleDispatcher();
+ ~PlatformHandleDispatcher() override;
// |Dispatcher| protected methods:
- virtual void CloseImplNoLock() override;
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override;
- virtual void StartSerializeImplNoLock(Channel* channel,
- size_t* max_size,
- size_t* max_platform_handles) override;
- virtual bool EndSerializeAndCloseImplNoLock(
+ void CloseImplNoLock() override;
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override;
+ void StartSerializeImplNoLock(Channel* channel,
+ size_t* max_size,
+ size_t* max_platform_handles) override;
+ bool EndSerializeAndCloseImplNoLock(
Channel* channel,
void* destination,
size_t* actual_size,
diff --git a/mojo/edk/system/proxy_message_pipe_endpoint.h b/mojo/edk/system/proxy_message_pipe_endpoint.h
index c884240..3426869 100644
--- a/mojo/edk/system/proxy_message_pipe_endpoint.h
+++ b/mojo/edk/system/proxy_message_pipe_endpoint.h
@@ -31,13 +31,13 @@
: public MessagePipeEndpoint {
public:
explicit ProxyMessagePipeEndpoint(ChannelEndpoint* channel_endpoint);
- virtual ~ProxyMessagePipeEndpoint();
+ ~ProxyMessagePipeEndpoint() override;
// |MessagePipeEndpoint| implementation:
- virtual Type GetType() const override;
- virtual bool OnPeerClose() override;
- virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) override;
- virtual void Close() override;
+ Type GetType() const override;
+ bool OnPeerClose() override;
+ void EnqueueMessage(scoped_ptr<MessageInTransit> message) override;
+ void Close() override;
private:
void DetachIfNecessary();
diff --git a/mojo/edk/system/raw_channel_posix.cc b/mojo/edk/system/raw_channel_posix.cc
index 05a01aa..45d93e8 100644
--- a/mojo/edk/system/raw_channel_posix.cc
+++ b/mojo/edk/system/raw_channel_posix.cc
@@ -33,35 +33,34 @@
public base::MessageLoopForIO::Watcher {
public:
explicit RawChannelPosix(embedder::ScopedPlatformHandle handle);
- virtual ~RawChannelPosix();
+ ~RawChannelPosix() override;
// |RawChannel| public methods:
- virtual size_t GetSerializedPlatformHandleSize() const override;
+ size_t GetSerializedPlatformHandleSize() const override;
private:
// |RawChannel| protected methods:
// Actually override this so that we can send multiple messages with (only)
// FDs if necessary.
- virtual void EnqueueMessageNoLock(
- scoped_ptr<MessageInTransit> message) override;
+ void EnqueueMessageNoLock(scoped_ptr<MessageInTransit> message) override;
// Override this to handle those extra FD-only messages.
- virtual bool OnReadMessageForRawChannel(
+ bool OnReadMessageForRawChannel(
const MessageInTransit::View& message_view) override;
- virtual IOResult Read(size_t* bytes_read) override;
- virtual IOResult ScheduleRead() override;
- virtual embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
+ IOResult Read(size_t* bytes_read) override;
+ IOResult ScheduleRead() override;
+ embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
size_t num_platform_handles,
const void* platform_handle_table) override;
- virtual IOResult WriteNoLock(size_t* platform_handles_written,
- size_t* bytes_written) override;
- virtual IOResult ScheduleWriteNoLock() override;
- virtual bool OnInit() override;
- virtual void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
- scoped_ptr<WriteBuffer> write_buffer) override;
+ IOResult WriteNoLock(size_t* platform_handles_written,
+ size_t* bytes_written) override;
+ IOResult ScheduleWriteNoLock() override;
+ bool OnInit() override;
+ void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
+ scoped_ptr<WriteBuffer> write_buffer) override;
// |base::MessageLoopForIO::Watcher| implementation:
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
// Implements most of |Read()| (except for a bit of clean-up):
IOResult ReadImpl(size_t* bytes_read);
diff --git a/mojo/edk/system/raw_channel_unittest.cc b/mojo/edk/system/raw_channel_unittest.cc
index 7531cf3..9ee937d 100644
--- a/mojo/edk/system/raw_channel_unittest.cc
+++ b/mojo/edk/system/raw_channel_unittest.cc
@@ -73,16 +73,16 @@
class RawChannelTest : public testing::Test {
public:
RawChannelTest() : io_thread_(base::TestIOThread::kManualStart) {}
- virtual ~RawChannelTest() {}
+ ~RawChannelTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
embedder::PlatformChannelPair channel_pair;
handles[0] = channel_pair.PassServerHandle();
handles[1] = channel_pair.PassClientHandle();
io_thread_.Start();
}
- virtual void TearDown() override {
+ void TearDown() override {
io_thread_.Stop();
handles[0].reset();
handles[1].reset();
@@ -104,15 +104,15 @@
class WriteOnlyRawChannelDelegate : public RawChannel::Delegate {
public:
WriteOnlyRawChannelDelegate() {}
- virtual ~WriteOnlyRawChannelDelegate() {}
+ ~WriteOnlyRawChannelDelegate() override {}
// |RawChannel::Delegate| implementation:
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& /*message_view*/,
embedder::ScopedPlatformHandleVectorPtr /*platform_handles*/) override {
CHECK(false); // Should not get called.
}
- virtual void OnError(Error error) override {
+ void OnError(Error error) override {
// We'll get a read (shutdown) error when the connection is closed.
CHECK_EQ(error, ERROR_READ_SHUTDOWN);
}
@@ -220,10 +220,10 @@
class ReadCheckerRawChannelDelegate : public RawChannel::Delegate {
public:
ReadCheckerRawChannelDelegate() : done_event_(false, false), position_(0) {}
- virtual ~ReadCheckerRawChannelDelegate() {}
+ ~ReadCheckerRawChannelDelegate() override {}
// |RawChannel::Delegate| implementation (called on the I/O thread):
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& message_view,
embedder::ScopedPlatformHandleVectorPtr platform_handles) override {
EXPECT_FALSE(platform_handles);
@@ -251,7 +251,7 @@
if (should_signal)
done_event_.Signal();
}
- virtual void OnError(Error error) override {
+ void OnError(Error error) override {
// We'll get a read (shutdown) error when the connection is closed.
CHECK_EQ(error, ERROR_READ_SHUTDOWN);
}
@@ -316,10 +316,10 @@
raw_channel_(raw_channel),
left_to_write_(write_count) {}
- virtual ~RawChannelWriterThread() { Join(); }
+ ~RawChannelWriterThread() override { Join(); }
private:
- virtual void Run() override {
+ void Run() override {
static const int kMaxRandomMessageSize = 25000;
while (left_to_write_-- > 0) {
@@ -338,10 +338,10 @@
public:
explicit ReadCountdownRawChannelDelegate(size_t expected_count)
: done_event_(false, false), expected_count_(expected_count), count_(0) {}
- virtual ~ReadCountdownRawChannelDelegate() {}
+ ~ReadCountdownRawChannelDelegate() override {}
// |RawChannel::Delegate| implementation (called on the I/O thread):
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& message_view,
embedder::ScopedPlatformHandleVectorPtr platform_handles) override {
EXPECT_FALSE(platform_handles);
@@ -355,7 +355,7 @@
if (count_ >= expected_count_)
done_event_.Signal();
}
- virtual void OnError(Error error) override {
+ void OnError(Error error) override {
// We'll get a read (shutdown) error when the connection is closed.
CHECK_EQ(error, ERROR_READ_SHUTDOWN);
}
@@ -430,9 +430,9 @@
expecting_read_error_(expect_read_error),
expecting_write_error_(expect_write_error) {}
- virtual ~ErrorRecordingRawChannelDelegate() {}
+ ~ErrorRecordingRawChannelDelegate() override {}
- virtual void OnError(Error error) override {
+ void OnError(Error error) override {
switch (error) {
case ERROR_READ_SHUTDOWN:
ASSERT_TRUE(expecting_read_error_);
@@ -562,10 +562,10 @@
: raw_channel_(raw_channel),
done_event_(false, false),
did_shutdown_(false) {}
- virtual ~ShutdownOnReadMessageRawChannelDelegate() {}
+ ~ShutdownOnReadMessageRawChannelDelegate() override {}
// |RawChannel::Delegate| implementation (called on the I/O thread):
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& message_view,
embedder::ScopedPlatformHandleVectorPtr platform_handles) override {
EXPECT_FALSE(platform_handles);
@@ -576,7 +576,7 @@
did_shutdown_ = true;
done_event_.Signal();
}
- virtual void OnError(Error /*error*/) override {
+ void OnError(Error /*error*/) override {
CHECK(false); // Should not get called.
}
@@ -619,15 +619,15 @@
shutdown_on_error_type_(shutdown_on_error_type),
done_event_(false, false),
did_shutdown_(false) {}
- virtual ~ShutdownOnErrorRawChannelDelegate() {}
+ ~ShutdownOnErrorRawChannelDelegate() override {}
// |RawChannel::Delegate| implementation (called on the I/O thread):
- virtual void OnReadMessage(
+ void OnReadMessage(
const MessageInTransit::View& /*message_view*/,
embedder::ScopedPlatformHandleVectorPtr /*platform_handles*/) override {
CHECK(false); // Should not get called.
}
- virtual void OnError(Error error) override {
+ void OnError(Error error) override {
EXPECT_FALSE(did_shutdown_);
if (error != shutdown_on_error_type_)
return;
diff --git a/mojo/edk/system/raw_channel_win.cc b/mojo/edk/system/raw_channel_win.cc
index 208d595..98380a9 100644
--- a/mojo/edk/system/raw_channel_win.cc
+++ b/mojo/edk/system/raw_channel_win.cc
@@ -72,10 +72,10 @@
class RawChannelWin : public RawChannel {
public:
RawChannelWin(embedder::ScopedPlatformHandle handle);
- virtual ~RawChannelWin();
+ ~RawChannelWin() override;
// |RawChannel| public methods:
- virtual size_t GetSerializedPlatformHandleSize() const override;
+ size_t GetSerializedPlatformHandleSize() const override;
private:
// RawChannelIOHandler receives OS notifications for I/O completion. It must
@@ -109,9 +109,9 @@
// |base::MessageLoopForIO::IOHandler| implementation:
// Must be called on the I/O thread. It could be called before or after
// detached from the owner.
- virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
- DWORD bytes_transferred,
- DWORD error) override;
+ void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
+ DWORD bytes_transferred,
+ DWORD error) override;
// Must be called on the I/O thread under |owner_->write_lock()|.
// After this call, the owner must not make any further calls on this
@@ -121,7 +121,7 @@
scoped_ptr<WriteBuffer> write_buffer);
private:
- virtual ~RawChannelIOHandler();
+ ~RawChannelIOHandler() override;
// Returns true if |owner_| has been reset and there is not pending read or
// write.
@@ -160,17 +160,17 @@
};
// |RawChannel| private methods:
- virtual IOResult Read(size_t* bytes_read) override;
- virtual IOResult ScheduleRead() override;
- virtual embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
+ IOResult Read(size_t* bytes_read) override;
+ IOResult ScheduleRead() override;
+ embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
size_t num_platform_handles,
const void* platform_handle_table) override;
- virtual IOResult WriteNoLock(size_t* platform_handles_written,
- size_t* bytes_written) override;
- virtual IOResult ScheduleWriteNoLock() override;
- virtual bool OnInit() override;
- virtual void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
- scoped_ptr<WriteBuffer> write_buffer) override;
+ IOResult WriteNoLock(size_t* platform_handles_written,
+ size_t* bytes_written) override;
+ IOResult ScheduleWriteNoLock() override;
+ bool OnInit() override;
+ void OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
+ scoped_ptr<WriteBuffer> write_buffer) override;
// Passed to |io_handler_| during initialization.
embedder::ScopedPlatformHandle handle_;
diff --git a/mojo/edk/system/remote_message_pipe_unittest.cc b/mojo/edk/system/remote_message_pipe_unittest.cc
index f7095d2..6e0b991 100644
--- a/mojo/edk/system/remote_message_pipe_unittest.cc
+++ b/mojo/edk/system/remote_message_pipe_unittest.cc
@@ -44,16 +44,16 @@
class RemoteMessagePipeTest : public testing::Test {
public:
RemoteMessagePipeTest() : io_thread_(base::TestIOThread::kAutoStart) {}
- virtual ~RemoteMessagePipeTest() {}
+ ~RemoteMessagePipeTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
io_thread_.PostTaskAndWait(
FROM_HERE,
base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread,
base::Unretained(this)));
}
- virtual void TearDown() override {
+ void TearDown() override {
io_thread_.PostTaskAndWait(
FROM_HERE,
base::Bind(&RemoteMessagePipeTest::TearDownOnIOThread,
diff --git a/mojo/edk/system/shared_buffer_dispatcher.h b/mojo/edk/system/shared_buffer_dispatcher.h
index 3e5ade0..db04d2a 100644
--- a/mojo/edk/system/shared_buffer_dispatcher.h
+++ b/mojo/edk/system/shared_buffer_dispatcher.h
@@ -47,7 +47,7 @@
scoped_refptr<SharedBufferDispatcher>* result);
// |Dispatcher| public methods:
- virtual Type GetType() const override;
+ Type GetType() const override;
// The "opposite" of |SerializeAndClose()|. (Typically this is called by
// |Dispatcher::Deserialize()|.)
@@ -60,7 +60,7 @@
private:
explicit SharedBufferDispatcher(
scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer_);
- virtual ~SharedBufferDispatcher();
+ ~SharedBufferDispatcher() override;
// Validates and/or sets default options for
// |MojoDuplicateBufferHandleOptions|. If non-null, |in_options| must point to
@@ -72,21 +72,21 @@
MojoDuplicateBufferHandleOptions* out_options);
// |Dispatcher| protected methods:
- virtual void CloseImplNoLock() override;
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override;
- virtual MojoResult DuplicateBufferHandleImplNoLock(
+ void CloseImplNoLock() override;
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override;
+ MojoResult DuplicateBufferHandleImplNoLock(
UserPointer<const MojoDuplicateBufferHandleOptions> options,
scoped_refptr<Dispatcher>* new_dispatcher) override;
- virtual MojoResult MapBufferImplNoLock(
+ MojoResult MapBufferImplNoLock(
uint64_t offset,
uint64_t num_bytes,
MojoMapBufferFlags flags,
scoped_ptr<embedder::PlatformSharedBufferMapping>* mapping) override;
- virtual void StartSerializeImplNoLock(Channel* channel,
- size_t* max_size,
- size_t* max_platform_handles) override;
- virtual bool EndSerializeAndCloseImplNoLock(
+ void StartSerializeImplNoLock(Channel* channel,
+ size_t* max_size,
+ size_t* max_platform_handles) override;
+ bool EndSerializeAndCloseImplNoLock(
Channel* channel,
void* destination,
size_t* actual_size,
diff --git a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
index d46ffe3..a80f71d 100644
--- a/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
+++ b/mojo/edk/system/shared_buffer_dispatcher_unittest.cc
@@ -43,7 +43,7 @@
class SharedBufferDispatcherTest : public testing::Test {
public:
SharedBufferDispatcherTest() {}
- virtual ~SharedBufferDispatcherTest() {}
+ ~SharedBufferDispatcherTest() override {}
embedder::PlatformSupport* platform_support() { return &platform_support_; }
diff --git a/mojo/edk/system/simple_dispatcher.h b/mojo/edk/system/simple_dispatcher.h
index 400e302..b1260ef 100644
--- a/mojo/edk/system/simple_dispatcher.h
+++ b/mojo/edk/system/simple_dispatcher.h
@@ -22,7 +22,7 @@
class MOJO_SYSTEM_IMPL_EXPORT SimpleDispatcher : public Dispatcher {
protected:
SimpleDispatcher();
- virtual ~SimpleDispatcher();
+ ~SimpleDispatcher() override;
// To be called by subclasses when the state changes (so
// |GetHandleSignalsStateImplNoLock()| should be checked again). Must be
@@ -30,15 +30,13 @@
void HandleSignalsStateChangedNoLock();
// |Dispatcher| protected methods:
- virtual void CancelAllWaitersNoLock() override;
- virtual MojoResult AddWaiterImplNoLock(
- Waiter* waiter,
- MojoHandleSignals signals,
- uint32_t context,
- HandleSignalsState* signals_state) override;
- virtual void RemoveWaiterImplNoLock(
- Waiter* waiter,
- HandleSignalsState* signals_state) override;
+ void CancelAllWaitersNoLock() override;
+ MojoResult AddWaiterImplNoLock(Waiter* waiter,
+ MojoHandleSignals signals,
+ uint32_t context,
+ HandleSignalsState* signals_state) override;
+ void RemoveWaiterImplNoLock(Waiter* waiter,
+ HandleSignalsState* signals_state) override;
private:
// Protected by |lock()|:
diff --git a/mojo/edk/system/simple_dispatcher_unittest.cc b/mojo/edk/system/simple_dispatcher_unittest.cc
index d2b7eaa..502e34b 100644
--- a/mojo/edk/system/simple_dispatcher_unittest.cc
+++ b/mojo/edk/system/simple_dispatcher_unittest.cc
@@ -60,21 +60,21 @@
HandleSignalsStateChangedNoLock();
}
- virtual Type GetType() const override { return kTypeUnknown; }
+ Type GetType() const override { return kTypeUnknown; }
private:
friend class base::RefCountedThreadSafe<MockSimpleDispatcher>;
- virtual ~MockSimpleDispatcher() {}
+ ~MockSimpleDispatcher() override {}
- virtual scoped_refptr<Dispatcher>
- CreateEquivalentDispatcherAndCloseImplNoLock() override {
+ scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
+ override {
scoped_refptr<MockSimpleDispatcher> rv(new MockSimpleDispatcher());
rv->state_ = state_;
return scoped_refptr<Dispatcher>(rv.get());
}
// |Dispatcher| override:
- virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const override {
+ HandleSignalsState GetHandleSignalsStateImplNoLock() const override {
lock().AssertAcquired();
return state_;
}
diff --git a/mojo/edk/system/waiter_test_utils.h b/mojo/edk/system/waiter_test_utils.h
index 25e5344..cec0f3e 100644
--- a/mojo/edk/system/waiter_test_utils.h
+++ b/mojo/edk/system/waiter_test_utils.h
@@ -49,12 +49,12 @@
// For the duration of the lifetime of this object, |*result| belongs to it
// (in the sense that it will write to it whenever it wants).
SimpleWaiterThread(MojoResult* result, uint32_t* context);
- virtual ~SimpleWaiterThread(); // Joins the thread.
+ ~SimpleWaiterThread() override; // Joins the thread.
Waiter* waiter() { return &waiter_; }
private:
- virtual void Run() override;
+ void Run() override;
MojoResult* const result_;
uint32_t* const context_;
@@ -79,10 +79,10 @@
MojoResult* result_out,
uint32_t* context_out,
HandleSignalsState* signals_state_out);
- virtual ~WaiterThread();
+ ~WaiterThread() override;
private:
- virtual void Run() override;
+ void Run() override;
const scoped_refptr<Dispatcher> dispatcher_;
const MojoHandleSignals handle_signals_;
diff --git a/mojo/edk/system/waiter_unittest.cc b/mojo/edk/system/waiter_unittest.cc
index bbbc5b8..859ff0d 100644
--- a/mojo/edk/system/waiter_unittest.cc
+++ b/mojo/edk/system/waiter_unittest.cc
@@ -37,7 +37,7 @@
waiter_.Init();
}
- virtual ~WaitingThread() { Join(); }
+ ~WaitingThread() override { Join(); }
void WaitUntilDone(MojoResult* result,
uint32_t* context,
@@ -61,7 +61,7 @@
Waiter* waiter() { return &waiter_; }
private:
- virtual void Run() override {
+ void Run() override {
test::Stopwatch stopwatch;
MojoResult result;
uint32_t context = static_cast<uint32_t>(-1);
diff --git a/mojo/edk/test/test_support_impl.h b/mojo/edk/test/test_support_impl.h
index 8cc9de6..793856f 100644
--- a/mojo/edk/test/test_support_impl.h
+++ b/mojo/edk/test/test_support_impl.h
@@ -14,13 +14,13 @@
class TestSupportImpl : public TestSupport {
public:
TestSupportImpl();
- virtual ~TestSupportImpl();
+ ~TestSupportImpl() override;
- virtual void LogPerfResult(const char* test_name,
- double value,
- const char* units) override;
- virtual FILE* OpenSourceRootRelativeFile(const char* relative_path) override;
- virtual char** EnumerateSourceRootRelativeDirectory(
+ void LogPerfResult(const char* test_name,
+ double value,
+ const char* units) override;
+ FILE* OpenSourceRootRelativeFile(const char* relative_path) override;
+ char** EnumerateSourceRootRelativeDirectory(
const char* relative_path) override;
private:
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index a379020..8ad03d9 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -64,10 +64,10 @@
private:
// CommandBufferSyncClient methods:
- virtual void DidInitialize(bool success) override {
+ void DidInitialize(bool success) override {
initialized_successfully_ = success;
}
- virtual void DidMakeProgress(CommandBufferStatePtr state) override {
+ void DidMakeProgress(CommandBufferStatePtr state) override {
command_buffer_state_ = state.Pass();
}
diff --git a/mojo/gles2/command_buffer_client_impl.h b/mojo/gles2/command_buffer_client_impl.h
index 5e6ffe1..297cb42 100644
--- a/mojo/gles2/command_buffer_client_impl.h
+++ b/mojo/gles2/command_buffer_client_impl.h
@@ -38,50 +38,49 @@
CommandBufferDelegate* delegate,
const MojoAsyncWaiter* async_waiter,
ScopedMessagePipeHandle command_buffer_handle);
- virtual ~CommandBufferClientImpl();
+ ~CommandBufferClientImpl() override;
// CommandBuffer implementation:
- virtual bool Initialize() override;
- virtual State GetLastState() override;
- virtual int32 GetLastToken() override;
- virtual void Flush(int32 put_offset) override;
- virtual void WaitForTokenInRange(int32 start, int32 end) override;
- virtual void WaitForGetOffsetInRange(int32 start, int32 end) override;
- virtual void SetGetBuffer(int32 shm_id) override;
- virtual scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
- int32* id) override;
- virtual void DestroyTransferBuffer(int32 id) override;
+ bool Initialize() override;
+ State GetLastState() override;
+ int32 GetLastToken() override;
+ void Flush(int32 put_offset) override;
+ void WaitForTokenInRange(int32 start, int32 end) override;
+ void WaitForGetOffsetInRange(int32 start, int32 end) override;
+ void SetGetBuffer(int32 shm_id) override;
+ scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
+ int32* id) override;
+ void DestroyTransferBuffer(int32 id) override;
// gpu::GpuControl implementation:
- virtual gpu::Capabilities GetCapabilities() override;
- virtual int32_t CreateImage(ClientBuffer buffer,
- size_t width,
- size_t height,
- unsigned internalformat) override;
- virtual void DestroyImage(int32_t id) override;
- virtual int32_t CreateGpuMemoryBufferImage(size_t width,
- size_t height,
- unsigned internalformat,
- unsigned usage) override;
- virtual uint32 InsertSyncPoint() override;
- virtual uint32 InsertFutureSyncPoint() override;
- virtual void RetireSyncPoint(uint32 sync_point) override;
- virtual void SignalSyncPoint(uint32 sync_point,
- const base::Closure& callback) override;
- virtual void SignalQuery(uint32 query,
- const base::Closure& callback) override;
- virtual void SetSurfaceVisible(bool visible) override;
- virtual uint32 CreateStreamTexture(uint32 texture_id) override;
+ gpu::Capabilities GetCapabilities() override;
+ int32_t CreateImage(ClientBuffer buffer,
+ size_t width,
+ size_t height,
+ unsigned internalformat) override;
+ void DestroyImage(int32_t id) override;
+ int32_t CreateGpuMemoryBufferImage(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage) override;
+ uint32 InsertSyncPoint() override;
+ uint32 InsertFutureSyncPoint() override;
+ void RetireSyncPoint(uint32 sync_point) override;
+ void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) override;
+ void SignalQuery(uint32 query, const base::Closure& callback) override;
+ void SetSurfaceVisible(bool visible) override;
+ uint32 CreateStreamTexture(uint32 texture_id) override;
private:
class SyncClientImpl;
// CommandBufferClient implementation:
- virtual void DidDestroy() override;
- virtual void LostContext(int32_t lost_reason) override;
+ void DidDestroy() override;
+ void LostContext(int32_t lost_reason) override;
// ErrorHandler implementation:
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
void TryUpdateState();
void MakeProgressAndUpdateState();
diff --git a/mojo/gles2/gles2_context.h b/mojo/gles2/gles2_context.h
index 0bbb754..7dd1085 100644
--- a/mojo/gles2/gles2_context.h
+++ b/mojo/gles2/gles2_context.h
@@ -31,7 +31,7 @@
ScopedMessagePipeHandle command_buffer_handle,
MojoGLES2ContextLost lost_callback,
void* closure);
- virtual ~GLES2Context();
+ ~GLES2Context() override;
bool Initialize();
gpu::gles2::GLES2Interface* interface() const {
@@ -40,7 +40,7 @@
gpu::ContextSupport* context_support() const { return implementation_.get(); }
private:
- virtual void ContextLost() override;
+ void ContextLost() override;
CommandBufferClientImpl command_buffer_;
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
diff --git a/mojo/public/c/system/tests/core_perftest.cc b/mojo/public/c/system/tests/core_perftest.cc
index 188854a..fa90c86 100644
--- a/mojo/public/c/system/tests/core_perftest.cc
+++ b/mojo/public/c/system/tests/core_perftest.cc
@@ -29,9 +29,9 @@
public:
MessagePipeWriterThread(MojoHandle handle, uint32_t num_bytes)
: handle_(handle), num_bytes_(num_bytes), num_writes_(0) {}
- virtual ~MessagePipeWriterThread() {}
+ ~MessagePipeWriterThread() override {}
- virtual void Run() override {
+ void Run() override {
char buffer[10000];
assert(num_bytes_ <= sizeof(buffer));
@@ -67,9 +67,9 @@
public:
explicit MessagePipeReaderThread(MojoHandle handle)
: handle_(handle), num_reads_(0) {}
- virtual ~MessagePipeReaderThread() {}
+ ~MessagePipeReaderThread() override {}
- virtual void Run() override {
+ void Run() override {
char buffer[10000];
for (;;) {
diff --git a/mojo/public/cpp/application/DEPS b/mojo/public/cpp/application/DEPS
index dcd8e6f..a59df1d 100644
--- a/mojo/public/cpp/application/DEPS
+++ b/mojo/public/cpp/application/DEPS
@@ -4,14 +4,3 @@
"+mojo/public/interfaces/application",
"+mojo/public/interfaces/service_provider",
]
-
-specific_include_rules = {
- r"application_runner_chromium.*": [
- "+base",
- "+mojo/common",
- "+mojo/public/cpp"
- ],
- r"application_runner.*": [
- "+mojo/public/cpp"
- ],
-}
diff --git a/mojo/public/cpp/application/application_impl.h b/mojo/public/cpp/application/application_impl.h
index e5b27be..9e7cfd6 100644
--- a/mojo/public/cpp/application/application_impl.h
+++ b/mojo/public/cpp/application/application_impl.h
@@ -55,7 +55,7 @@
ApplicationImpl(ApplicationDelegate* delegate,
ScopedMessagePipeHandle shell_handle);
ApplicationImpl(ApplicationDelegate* delegate, MojoHandle shell_handle);
- virtual ~ApplicationImpl();
+ ~ApplicationImpl() override;
Shell* shell() const { return shell_.get(); }
@@ -80,7 +80,7 @@
ScopedMessagePipeHandle UnbindShell();
// Application implementation.
- virtual void Initialize(Array<String> args) override;
+ void Initialize(Array<String> args) override;
private:
class ShellPtrWatcher;
@@ -96,8 +96,8 @@
static void Terminate();
// Application implementation.
- virtual void AcceptConnection(const String& requestor_url,
- ServiceProviderPtr provider) override;
+ void AcceptConnection(const String& requestor_url,
+ ServiceProviderPtr provider) override;
typedef std::vector<internal::ServiceRegistry*> ServiceRegistryList;
diff --git a/mojo/public/cpp/application/lib/DEPS b/mojo/public/cpp/application/lib/DEPS
new file mode 100644
index 0000000..4ed133f
--- /dev/null
+++ b/mojo/public/cpp/application/lib/DEPS
@@ -0,0 +1,5 @@
+specific_include_rules = {
+ r"application_runner\.cc": [
+ "+mojo/public/cpp/utility"
+ ],
+}
diff --git a/mojo/public/cpp/application/lib/application_impl.cc b/mojo/public/cpp/application/lib/application_impl.cc
index 6a5560d..30b04e9 100644
--- a/mojo/public/cpp/application/lib/application_impl.cc
+++ b/mojo/public/cpp/application/lib/application_impl.cc
@@ -15,9 +15,9 @@
public:
ShellPtrWatcher(ApplicationImpl* impl) : impl_(impl) {}
- virtual ~ShellPtrWatcher() {}
+ ~ShellPtrWatcher() override {}
- virtual void OnConnectionError() override { impl_->OnShellError(); }
+ void OnConnectionError() override { impl_->OnShellError(); }
private:
ApplicationImpl* impl_;
diff --git a/mojo/public/cpp/application/lib/service_registry.h b/mojo/public/cpp/application/lib/service_registry.h
index 2ac8eb8..b02f63d 100644
--- a/mojo/public/cpp/application/lib/service_registry.h
+++ b/mojo/public/cpp/application/lib/service_registry.h
@@ -26,22 +26,20 @@
ServiceRegistry(ApplicationImpl* application_impl,
const std::string& url,
ServiceProviderPtr service_provider);
- virtual ~ServiceRegistry();
+ ~ServiceRegistry() override;
// ApplicationConnection overrides.
- virtual void AddServiceConnector(
- ServiceConnectorBase* service_connector) override;
- virtual const std::string& GetRemoteApplicationURL() override;
- virtual ApplicationConnection* ConnectToApplication(
- const std::string& url) override;
- virtual ServiceProvider* GetServiceProvider() override;
+ void AddServiceConnector(ServiceConnectorBase* service_connector) override;
+ const std::string& GetRemoteApplicationURL() override;
+ ApplicationConnection* ConnectToApplication(const std::string& url) override;
+ ServiceProvider* GetServiceProvider() override;
virtual void RemoveServiceConnector(ServiceConnectorBase* service_connector);
private:
// ServiceProvider method.
- virtual void ConnectToService(const mojo::String& service_name,
- ScopedMessagePipeHandle client_handle) override;
+ void ConnectToService(const mojo::String& service_name,
+ ScopedMessagePipeHandle client_handle) override;
ApplicationImpl* application_impl_;
const std::string url_;
diff --git a/mojo/public/cpp/application/lib/weak_service_provider.h b/mojo/public/cpp/application/lib/weak_service_provider.h
index 05ce939..3d959d1 100644
--- a/mojo/public/cpp/application/lib/weak_service_provider.h
+++ b/mojo/public/cpp/application/lib/weak_service_provider.h
@@ -20,14 +20,14 @@
public:
WeakServiceProvider(ServiceProviderImpl* creator,
ServiceProvider* service_provider);
- virtual ~WeakServiceProvider();
+ ~WeakServiceProvider() override;
void Clear();
private:
// Overridden from ServiceProvider:
- virtual void ConnectToService(const String& service_name,
- ScopedMessagePipeHandle client_handle) override;
+ void ConnectToService(const String& service_name,
+ ScopedMessagePipeHandle client_handle) override;
ServiceProviderImpl* creator_;
ServiceProvider* service_provider_;
diff --git a/mojo/public/cpp/application/service_provider_impl.h b/mojo/public/cpp/application/service_provider_impl.h
index 92f8f35..45ad7b8 100644
--- a/mojo/public/cpp/application/service_provider_impl.h
+++ b/mojo/public/cpp/application/service_provider_impl.h
@@ -18,7 +18,7 @@
class ServiceProviderImpl : public InterfaceImpl<ServiceProvider> {
public:
ServiceProviderImpl();
- virtual ~ServiceProviderImpl();
+ ~ServiceProviderImpl() override;
template <typename Interface>
void AddService(InterfaceFactory<Interface>* factory) {
@@ -42,11 +42,11 @@
friend class internal::WeakServiceProvider;
// Overridden from ServiceProvider:
- virtual void ConnectToService(const String& service_name,
- ScopedMessagePipeHandle client_handle) override;
+ void ConnectToService(const String& service_name,
+ ScopedMessagePipeHandle client_handle) override;
// Overridden from InterfaceImpl:
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
void AddServiceConnector(internal::ServiceConnectorBase* service_connector);
void RemoveServiceConnector(
diff --git a/mojo/public/cpp/application/tests/service_registry_unittest.cc b/mojo/public/cpp/application/tests/service_registry_unittest.cc
index a0511ff..283bf14 100644
--- a/mojo/public/cpp/application/tests/service_registry_unittest.cc
+++ b/mojo/public/cpp/application/tests/service_registry_unittest.cc
@@ -15,10 +15,9 @@
public:
TestConnector(const std::string& name, int* delete_count)
: ServiceConnectorBase(name), delete_count_(delete_count) {}
- virtual ~TestConnector() { (*delete_count_)++; }
- virtual void ConnectToService(
- const std::string& name,
- ScopedMessagePipeHandle client_handle) override {}
+ ~TestConnector() override { (*delete_count_)++; }
+ void ConnectToService(const std::string& name,
+ ScopedMessagePipeHandle client_handle) override {}
private:
int* delete_count_;
diff --git a/mojo/public/cpp/bindings/lib/connector.h b/mojo/public/cpp/bindings/lib/connector.h
index dc598a6..7c1d445 100644
--- a/mojo/public/cpp/bindings/lib/connector.h
+++ b/mojo/public/cpp/bindings/lib/connector.h
@@ -29,7 +29,7 @@
explicit Connector(
ScopedMessagePipeHandle message_pipe,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter());
- virtual ~Connector();
+ ~Connector() override;
// Sets the receiver to handle messages read from the message pipe. The
// Connector will read messages from the pipe regardless of whether or not an
@@ -69,7 +69,7 @@
bool WaitForIncomingMessage();
// MessageReceiver implementation:
- virtual bool Accept(Message* message) override;
+ bool Accept(Message* message) override;
private:
static void CallOnHandleReady(void* closure, MojoResult result);
diff --git a/mojo/public/cpp/bindings/lib/fixed_buffer.h b/mojo/public/cpp/bindings/lib/fixed_buffer.h
index d23f664..c6cf34e 100644
--- a/mojo/public/cpp/bindings/lib/fixed_buffer.h
+++ b/mojo/public/cpp/bindings/lib/fixed_buffer.h
@@ -38,12 +38,12 @@
class FixedBuffer : public Buffer {
public:
explicit FixedBuffer(size_t size);
- virtual ~FixedBuffer();
+ ~FixedBuffer() override;
// Grows the buffer by |num_bytes| and returns a pointer to the start of the
// addition. The resulting address is 8-byte aligned, and the content of the
// memory is zero-filled.
- virtual void* Allocate(size_t num_bytes) override;
+ void* Allocate(size_t num_bytes) override;
size_t size() const { return size_; }
diff --git a/mojo/public/cpp/bindings/lib/message_header_validator.h b/mojo/public/cpp/bindings/lib/message_header_validator.h
index 790aa9b..bccef1f 100644
--- a/mojo/public/cpp/bindings/lib/message_header_validator.h
+++ b/mojo/public/cpp/bindings/lib/message_header_validator.h
@@ -15,7 +15,7 @@
public:
explicit MessageHeaderValidator(MessageReceiver* sink = nullptr);
- virtual bool Accept(Message* message) override;
+ bool Accept(Message* message) override;
};
} // namespace internal
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index 91a5d31..bb29e47 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -15,10 +15,10 @@
public:
explicit ResponderThunk(const SharedData<Router*>& router)
: router_(router) {}
- virtual ~ResponderThunk() {}
+ ~ResponderThunk() override {}
// MessageReceiver implementation:
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
MOJO_DCHECK(message->has_flag(kMessageIsResponse));
bool result = false;
diff --git a/mojo/public/cpp/bindings/lib/router.h b/mojo/public/cpp/bindings/lib/router.h
index 0972c1c..8254bab 100644
--- a/mojo/public/cpp/bindings/lib/router.h
+++ b/mojo/public/cpp/bindings/lib/router.h
@@ -20,7 +20,7 @@
Router(ScopedMessagePipeHandle message_pipe,
FilterChain filters,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter());
- virtual ~Router();
+ ~Router() override;
// Sets the receiver to handle messages read from the message pipe that do
// not have the kMessageIsResponse flag set.
@@ -45,9 +45,9 @@
}
// MessageReceiver implementation:
- virtual bool Accept(Message* message) override;
- virtual bool AcceptWithResponder(Message* message,
- MessageReceiver* responder) override;
+ bool Accept(Message* message) override;
+ bool AcceptWithResponder(Message* message,
+ MessageReceiver* responder) override;
// Blocks the current thread for the first incoming method call, i.e., either
// a call to a client method or a callback method.
@@ -66,10 +66,10 @@
class HandleIncomingMessageThunk : public MessageReceiver {
public:
HandleIncomingMessageThunk(Router* router);
- virtual ~HandleIncomingMessageThunk();
+ ~HandleIncomingMessageThunk() override;
// MessageReceiver implementation:
- virtual bool Accept(Message* message) override;
+ bool Accept(Message* message) override;
private:
Router* router_;
diff --git a/mojo/public/cpp/bindings/message.h b/mojo/public/cpp/bindings/message.h
index 72201f4..5cab4ea 100644
--- a/mojo/public/cpp/bindings/message.h
+++ b/mojo/public/cpp/bindings/message.h
@@ -91,7 +91,7 @@
class MessageReceiverWithResponder : public MessageReceiver {
public:
- virtual ~MessageReceiverWithResponder() {}
+ ~MessageReceiverWithResponder() override {}
// A variant on Accept that registers a MessageReceiver (known as the
// responder) to handle the response message generated from the given
diff --git a/mojo/public/cpp/bindings/message_filter.h b/mojo/public/cpp/bindings/message_filter.h
index f4faafb..12885b0 100644
--- a/mojo/public/cpp/bindings/message_filter.h
+++ b/mojo/public/cpp/bindings/message_filter.h
@@ -18,7 +18,7 @@
// Doesn't take ownership of |sink|. Therefore |sink| has to stay alive while
// this object is alive.
explicit MessageFilter(MessageReceiver* sink = nullptr);
- virtual ~MessageFilter();
+ ~MessageFilter() override;
void set_sink(MessageReceiver* sink) { sink_ = sink; }
@@ -31,7 +31,7 @@
public:
explicit PassThroughFilter(MessageReceiver* sink = nullptr);
- virtual bool Accept(Message* message) override;
+ bool Accept(Message* message) override;
};
} // namespace mojo
diff --git a/mojo/public/cpp/bindings/no_interface.h b/mojo/public/cpp/bindings/no_interface.h
index d8143bd..4c35789 100644
--- a/mojo/public/cpp/bindings/no_interface.h
+++ b/mojo/public/cpp/bindings/no_interface.h
@@ -38,9 +38,9 @@
NoInterfaceStub() {}
void set_sink(NoInterface* sink) {}
NoInterface* sink() { return nullptr; }
- virtual bool Accept(Message* message) override;
- virtual bool AcceptWithResponder(Message* message,
- MessageReceiver* responder) override;
+ bool Accept(Message* message) override;
+ bool AcceptWithResponder(Message* message,
+ MessageReceiver* responder) override;
};
// AnyInterface is for use in cases where any interface would do (e.g., see the
diff --git a/mojo/public/cpp/bindings/tests/connector_unittest.cc b/mojo/public/cpp/bindings/tests/connector_unittest.cc
index b90faf6..1e1c6ef 100644
--- a/mojo/public/cpp/bindings/tests/connector_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/connector_unittest.cc
@@ -21,7 +21,7 @@
public:
MessageAccumulator() {}
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
queue_.Push(message);
return true;
}
@@ -39,7 +39,7 @@
ConnectorDeletingMessageAccumulator(internal::Connector** connector)
: connector_(connector) {}
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
delete *connector_;
*connector_ = 0;
return MessageAccumulator::Accept(message);
@@ -54,7 +54,7 @@
ReentrantMessageAccumulator(internal::Connector* connector)
: connector_(connector), number_of_calls_(0) {}
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
if (!MessageAccumulator::Accept(message))
return false;
number_of_calls_++;
diff --git a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
index ac02f5f..53652cf 100644
--- a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
@@ -27,7 +27,7 @@
class ImportedInterfaceImpl
: public InterfaceImpl<imported::ImportedInterface> {
public:
- virtual void DoSomething() override { do_something_count_++; }
+ void DoSomething() override { do_something_count_++; }
static int do_something_count() { return do_something_count_; }
@@ -38,10 +38,9 @@
class SampleNamedObjectImpl : public InterfaceImpl<sample::NamedObject> {
public:
- virtual void SetName(const mojo::String& name) override { name_ = name; }
+ void SetName(const mojo::String& name) override { name_ = name; }
- virtual void GetName(
- const mojo::Callback<void(mojo::String)>& callback) override {
+ void GetName(const mojo::Callback<void(mojo::String)>& callback) override {
callback.Run(name_);
}
@@ -51,8 +50,8 @@
class SampleFactoryImpl : public InterfaceImpl<sample::Factory> {
public:
- virtual void DoStuff(sample::RequestPtr request,
- ScopedMessagePipeHandle pipe) override {
+ void DoStuff(sample::RequestPtr request,
+ ScopedMessagePipeHandle pipe) override {
std::string text1;
if (pipe.is_valid())
EXPECT_TRUE(ReadTextMessage(pipe.get(), &text1));
@@ -80,7 +79,7 @@
request->obj->DoSomething();
}
- virtual void DoStuff2(ScopedDataPipeConsumerHandle pipe) override {
+ void DoStuff2(ScopedDataPipeConsumerHandle pipe) override {
// Read the data from the pipe, writing the response (as a string) to
// DidStuff2().
ASSERT_TRUE(pipe.is_valid());
@@ -99,7 +98,7 @@
client()->DidStuff2(data);
}
- virtual void CreateNamedObject(
+ void CreateNamedObject(
InterfaceRequest<sample::NamedObject> object_request) override {
EXPECT_TRUE(object_request.is_pending());
BindToRequest(new SampleNamedObjectImpl(), &object_request);
@@ -108,11 +107,11 @@
// These aren't called or implemented, but exist here to test that the
// methods are generated with the correct argument types for imported
// interfaces.
- virtual void RequestImportedInterface(
+ void RequestImportedInterface(
InterfaceRequest<imported::ImportedInterface> imported,
const mojo::Callback<void(InterfaceRequest<imported::ImportedInterface>)>&
callback) override {}
- virtual void TakeImportedInterface(
+ void TakeImportedInterface(
imported::ImportedInterfacePtr imported,
const mojo::Callback<void(imported::ImportedInterfacePtr)>& callback)
override {}
@@ -131,8 +130,8 @@
bool got_response() const { return got_response_; }
- virtual void DidStuff(sample::ResponsePtr response,
- const String& text_reply) override {
+ void DidStuff(sample::ResponsePtr response,
+ const String& text_reply) override {
EXPECT_EQ(expected_text_reply_, text_reply);
if (response->pipe.is_valid()) {
@@ -153,7 +152,7 @@
got_response_ = true;
}
- virtual void DidStuff2(const String& text_reply) override {
+ void DidStuff2(const String& text_reply) override {
got_response_ = true;
EXPECT_EQ(expected_text_reply_, text_reply);
}
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index 058667f..57ec78a 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -19,7 +19,7 @@
bool encountered_error() const { return encountered_error_; }
- virtual void OnConnectionError() override { encountered_error_ = true; }
+ void OnConnectionError() override { encountered_error_ = true; }
private:
bool encountered_error_;
@@ -27,20 +27,20 @@
class MathCalculatorImpl : public InterfaceImpl<math::Calculator> {
public:
- virtual ~MathCalculatorImpl() {}
+ ~MathCalculatorImpl() override {}
MathCalculatorImpl() : total_(0.0), got_connection_(false) {}
- virtual void OnConnectionEstablished() override { got_connection_ = true; }
+ void OnConnectionEstablished() override { got_connection_ = true; }
- virtual void Clear() override { client()->Output(total_); }
+ void Clear() override { client()->Output(total_); }
- virtual void Add(double value) override {
+ void Add(double value) override {
total_ += value;
client()->Output(total_);
}
- virtual void Multiply(double value) override {
+ void Multiply(double value) override {
total_ *= value;
client()->Output(total_);
}
@@ -77,7 +77,7 @@
private:
// math::CalculatorUI implementation:
- virtual void Output(double value) override { output_ = value; }
+ void Output(double value) override { output_ = value; }
math::CalculatorPtr calculator_;
double output_;
@@ -99,9 +99,9 @@
static int num_instances() { return num_instances_; }
private:
- virtual ~SelfDestructingMathCalculatorUIImpl() { --num_instances_; }
+ ~SelfDestructingMathCalculatorUIImpl() override { --num_instances_; }
- virtual void Output(double value) override {
+ void Output(double value) override {
if (--nesting_level_ > 0) {
// Add some more and wait for re-entrant call to Output!
calculator_->Add(1.0);
@@ -121,20 +121,20 @@
class ReentrantServiceImpl : public InterfaceImpl<sample::Service> {
public:
- virtual ~ReentrantServiceImpl() {}
+ ~ReentrantServiceImpl() override {}
ReentrantServiceImpl()
: got_connection_(false), call_depth_(0), max_call_depth_(0) {}
- virtual void OnConnectionEstablished() override { got_connection_ = true; }
+ void OnConnectionEstablished() override { got_connection_ = true; }
bool got_connection() const { return got_connection_; }
int max_call_depth() { return max_call_depth_; }
- virtual void Frobinate(sample::FooPtr foo,
- sample::Service::BazOptions baz,
- sample::PortPtr port) override {
+ void Frobinate(sample::FooPtr foo,
+ sample::Service::BazOptions baz,
+ sample::PortPtr port) override {
max_call_depth_ = std::max(++call_depth_, max_call_depth_);
if (call_depth_ == 1) {
EXPECT_TRUE(WaitForIncomingMethodCall());
@@ -142,7 +142,7 @@
call_depth_--;
}
- virtual void GetPort(mojo::InterfaceRequest<sample::Port> port) override {}
+ void GetPort(mojo::InterfaceRequest<sample::Port> port) override {}
private:
bool got_connection_;
diff --git a/mojo/public/cpp/bindings/tests/request_response_unittest.cc b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
index a5d562d..56d7244 100644
--- a/mojo/public/cpp/bindings/tests/request_response_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
@@ -15,29 +15,28 @@
class ProviderImpl : public InterfaceImpl<sample::Provider> {
public:
- virtual void EchoString(const String& a,
- const Callback<void(String)>& callback) override {
+ void EchoString(const String& a,
+ const Callback<void(String)>& callback) override {
Callback<void(String)> callback_copy;
// Make sure operator= is used.
callback_copy = callback;
callback_copy.Run(a);
}
- virtual void EchoStrings(
- const String& a,
- const String& b,
- const Callback<void(String, String)>& callback) override {
+ void EchoStrings(const String& a,
+ const String& b,
+ const Callback<void(String, String)>& callback) override {
callback.Run(a, b);
}
- virtual void EchoMessagePipeHandle(
+ void EchoMessagePipeHandle(
ScopedMessagePipeHandle a,
const Callback<void(ScopedMessagePipeHandle)>& callback) override {
callback.Run(a.Pass());
}
- virtual void EchoEnum(sample::Enum a,
- const Callback<void(sample::Enum)>& callback) override {
+ void EchoEnum(sample::Enum a,
+ const Callback<void(sample::Enum)>& callback) override {
callback.Run(a);
}
};
diff --git a/mojo/public/cpp/bindings/tests/router_unittest.cc b/mojo/public/cpp/bindings/tests/router_unittest.cc
index e48b91f..e680112 100644
--- a/mojo/public/cpp/bindings/tests/router_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/router_unittest.cc
@@ -38,7 +38,7 @@
public:
explicit MessageAccumulator(internal::MessageQueue* queue) : queue_(queue) {}
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
queue_->Push(message);
return true;
}
@@ -51,10 +51,10 @@
public:
ResponseGenerator() {}
- virtual bool Accept(Message* message) override { return false; }
+ bool Accept(Message* message) override { return false; }
- virtual bool AcceptWithResponder(Message* message,
- MessageReceiver* responder) override {
+ bool AcceptWithResponder(Message* message,
+ MessageReceiver* responder) override {
EXPECT_TRUE(message->has_flag(internal::kMessageExpectsResponse));
return SendResponse(message->name(), message->request_id(), responder);
@@ -76,10 +76,10 @@
public:
LazyResponseGenerator() : responder_(nullptr), name_(0), request_id_(0) {}
- virtual ~LazyResponseGenerator() { delete responder_; }
+ ~LazyResponseGenerator() override { delete responder_; }
- virtual bool AcceptWithResponder(Message* message,
- MessageReceiver* responder) override {
+ bool AcceptWithResponder(Message* message,
+ MessageReceiver* responder) override {
name_ = message->name();
request_id_ = message->request_id();
responder_ = responder;
diff --git a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
index a8ea60d..0bed540 100644
--- a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
@@ -256,7 +256,7 @@
class ServiceImpl : public Service {
public:
- virtual void Frobinate(FooPtr foo, BazOptions baz, PortPtr port) override {
+ void Frobinate(FooPtr foo, BazOptions baz, PortPtr port) override {
// Users code goes here to handle the incoming Frobinate message.
// We mainly check that we're given the expected arguments.
@@ -275,7 +275,7 @@
}
}
- virtual void GetPort(mojo::InterfaceRequest<Port> port_request) override {}
+ void GetPort(mojo::InterfaceRequest<Port> port_request) override {}
};
class ServiceProxyImpl : public ServiceProxy {
@@ -286,7 +286,7 @@
class SimpleMessageReceiver : public mojo::MessageReceiverWithResponder {
public:
- virtual bool Accept(mojo::Message* message) override {
+ bool Accept(mojo::Message* message) override {
// Imagine some IPC happened here.
if (g_dump_message_as_hex) {
@@ -303,8 +303,8 @@
return stub.Accept(message);
}
- virtual bool AcceptWithResponder(mojo::Message* message,
- mojo::MessageReceiver* responder) override {
+ bool AcceptWithResponder(mojo::Message* message,
+ mojo::MessageReceiver* responder) override {
return false;
}
};
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index 8a3b19b..8f3adb8 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -180,7 +180,7 @@
class DummyMessageReceiver : public MessageReceiver {
public:
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
return true; // Any message is OK.
}
};
@@ -226,9 +226,9 @@
TestMessageReceiver(ValidationIntegrationTest* owner,
ScopedMessagePipeHandle handle)
: owner_(owner), connector_(handle.Pass()) {}
- virtual ~TestMessageReceiver() {}
+ ~TestMessageReceiver() override {}
- virtual bool Accept(Message* message) override {
+ bool Accept(Message* message) override {
bool rv = connector_.Accept(message);
owner_->PumpMessages();
return rv;
@@ -248,17 +248,17 @@
class IntegrationTestInterface1Client : public IntegrationTestInterface1 {
public:
- virtual ~IntegrationTestInterface1Client() {}
+ ~IntegrationTestInterface1Client() override {}
- virtual void Method0(BasicStructPtr param0) override {}
+ void Method0(BasicStructPtr param0) override {}
};
class IntegrationTestInterface1Impl
: public InterfaceImpl<IntegrationTestInterface1> {
public:
- virtual ~IntegrationTestInterface1Impl() {}
+ ~IntegrationTestInterface1Impl() override {}
- virtual void Method0(BasicStructPtr param0) override {}
+ void Method0(BasicStructPtr param0) override {}
};
TEST_F(ValidationTest, InputParser) {
diff --git a/mojo/public/cpp/environment/lib/default_async_waiter.cc b/mojo/public/cpp/environment/lib/default_async_waiter.cc
index 9211c0f..4a588a9 100644
--- a/mojo/public/cpp/environment/lib/default_async_waiter.cc
+++ b/mojo/public/cpp/environment/lib/default_async_waiter.cc
@@ -25,14 +25,14 @@
void* closure)
: handle_(handle), callback_(callback), closure_(closure) {}
- virtual ~RunLoopHandlerImpl() { RunLoop::current()->RemoveHandler(handle_); }
+ ~RunLoopHandlerImpl() override { RunLoop::current()->RemoveHandler(handle_); }
// RunLoopHandler:
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
NotifyCallback(MOJO_RESULT_OK);
}
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
NotifyCallback(result);
}
diff --git a/mojo/public/cpp/system/tests/macros_unittest.cc b/mojo/public/cpp/system/tests/macros_unittest.cc
index bca8af7..99b158d 100644
--- a/mojo/public/cpp/system/tests/macros_unittest.cc
+++ b/mojo/public/cpp/system/tests/macros_unittest.cc
@@ -30,9 +30,9 @@
};
struct TestOverrideSubclass : public TestOverrideBaseClass {
- virtual ~TestOverrideSubclass() {}
- virtual void ToBeOverridden() override {}
- virtual void AlsoToBeOverridden() override {}
+ ~TestOverrideSubclass() override {}
+ void ToBeOverridden() override {}
+ void AlsoToBeOverridden() override {}
};
TEST(MacrosCppTest, Override) {
diff --git a/mojo/public/cpp/utility/tests/mutex_unittest.cc b/mojo/public/cpp/utility/tests/mutex_unittest.cc
index a95495e..d6f75da 100644
--- a/mojo/public/cpp/utility/tests/mutex_unittest.cc
+++ b/mojo/public/cpp/utility/tests/mutex_unittest.cc
@@ -111,11 +111,9 @@
: fiddler_(fiddler) {
}
- virtual ~FiddlerThread() {
- delete fiddler_;
- }
+ ~FiddlerThread() override { delete fiddler_; }
- virtual void Run() override { fiddler_->Fiddle(); }
+ void Run() override { fiddler_->Fiddle(); }
private:
Fiddler* const fiddler_;
@@ -167,9 +165,9 @@
class TryThread : public Thread {
public:
explicit TryThread(Mutex* mutex) : mutex_(mutex), try_lock_succeeded_() {}
- virtual ~TryThread() {}
+ ~TryThread() override {}
- virtual void Run() override {
+ void Run() override {
try_lock_succeeded_ = mutex_->TryLock();
if (try_lock_succeeded_)
mutex_->Unlock();
diff --git a/mojo/public/cpp/utility/tests/run_loop_unittest.cc b/mojo/public/cpp/utility/tests/run_loop_unittest.cc
index c6199d7..870ff92 100644
--- a/mojo/public/cpp/utility/tests/run_loop_unittest.cc
+++ b/mojo/public/cpp/utility/tests/run_loop_unittest.cc
@@ -21,7 +21,7 @@
error_count_(0),
last_error_result_(MOJO_RESULT_OK) {
}
- virtual ~TestRunLoopHandler() {}
+ ~TestRunLoopHandler() override {}
void clear_ready_count() { ready_count_ = 0; }
int ready_count() const { return ready_count_; }
@@ -32,8 +32,8 @@
MojoResult last_error_result() const { return last_error_result_; }
// RunLoopHandler:
- virtual void OnHandleReady(const Handle& handle) override { ready_count_++; }
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleReady(const Handle& handle) override { ready_count_++; }
+ void OnHandleError(const Handle& handle, MojoResult result) override {
error_count_++;
last_error_result_ = result;
}
@@ -73,12 +73,12 @@
public:
RemoveOnReadyRunLoopHandler() : run_loop_(NULL) {
}
- virtual ~RemoveOnReadyRunLoopHandler() {}
+ ~RemoveOnReadyRunLoopHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
// RunLoopHandler:
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
run_loop_->RemoveHandler(handle);
TestRunLoopHandler::OnHandleReady(handle);
}
@@ -109,12 +109,12 @@
public:
QuitOnReadyRunLoopHandler() : run_loop_(NULL) {
}
- virtual ~QuitOnReadyRunLoopHandler() {}
+ ~QuitOnReadyRunLoopHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
// RunLoopHandler:
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
run_loop_->Quit();
TestRunLoopHandler::OnHandleReady(handle);
}
@@ -145,12 +145,12 @@
public:
QuitOnErrorRunLoopHandler() : run_loop_(NULL) {
}
- virtual ~QuitOnErrorRunLoopHandler() {}
+ ~QuitOnErrorRunLoopHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
// RunLoopHandler:
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
run_loop_->Quit();
TestRunLoopHandler::OnHandleError(handle, result);
}
@@ -196,13 +196,13 @@
public:
RemoveManyRunLoopHandler() : run_loop_(NULL) {
}
- virtual ~RemoveManyRunLoopHandler() {}
+ ~RemoveManyRunLoopHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
void add_handle(const Handle& handle) { handles_.push_back(handle); }
// RunLoopHandler:
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
for (size_t i = 0; i < handles_.size(); i++)
run_loop_->RemoveHandler(handles_[i]);
TestRunLoopHandler::OnHandleError(handle, result);
@@ -248,12 +248,12 @@
public:
AddHandlerOnErrorHandler() : run_loop_(NULL) {
}
- virtual ~AddHandlerOnErrorHandler() {}
+ ~AddHandlerOnErrorHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
// RunLoopHandler:
- virtual void OnHandleError(const Handle& handle, MojoResult result) override {
+ void OnHandleError(const Handle& handle, MojoResult result) override {
run_loop_->AddHandler(this, handle,
MOJO_HANDLE_SIGNAL_READABLE,
MOJO_DEADLINE_INDEFINITE);
@@ -301,14 +301,14 @@
depth_(0),
reached_depth_limit_(false) {}
- virtual ~NestingRunLoopHandler() {}
+ ~NestingRunLoopHandler() override {}
void set_run_loop(RunLoop* run_loop) { run_loop_ = run_loop; }
void set_pipe(MessagePipe* pipe) { pipe_ = pipe; }
bool reached_depth_limit() const { return reached_depth_limit_; }
// RunLoopHandler:
- virtual void OnHandleReady(const Handle& handle) override {
+ void OnHandleReady(const Handle& handle) override {
TestRunLoopHandler::OnHandleReady(handle);
EXPECT_EQ(handle.value(), pipe_->handle0.get().value());
diff --git a/mojo/public/cpp/utility/tests/thread_unittest.cc b/mojo/public/cpp/utility/tests/thread_unittest.cc
index 0d81ef8..57c4ad9 100644
--- a/mojo/public/cpp/utility/tests/thread_unittest.cc
+++ b/mojo/public/cpp/utility/tests/thread_unittest.cc
@@ -22,10 +22,9 @@
value_(value) {
}
- virtual ~SetIntThread() {
- }
+ ~SetIntThread() override {}
- virtual void Run() override { *int_to_set_ = value_; }
+ void Run() override { *int_to_set_ = value_; }
private:
int* const int_to_set_;
diff --git a/mojo/public/python/src/python_system_helper.cc b/mojo/public/python/src/python_system_helper.cc
index 50b5fb0..22b6bbb 100644
--- a/mojo/public/python/src/python_system_helper.cc
+++ b/mojo/public/python/src/python_system_helper.cc
@@ -57,7 +57,7 @@
MOJO_DCHECK(callable);
}
- virtual void Run() const override {
+ void Run() const override {
ScopedGIL acquire_gil;
ScopedPyRef empty_tuple(PyTuple_New(0));
if (!empty_tuple) {
@@ -101,7 +101,7 @@
void set_wait_id(int wait_id) { wait_id_ = wait_id; }
- virtual void Run(MojoResult mojo_result) const override {
+ void Run(MojoResult mojo_result) const override {
MOJO_DCHECK(wait_id_);
// Remove to reference to this object from PythonAsyncWaiter and ensure this
diff --git a/mojo/services/clipboard/clipboard_standalone_impl.h b/mojo/services/clipboard/clipboard_standalone_impl.h
index ccb8c54..1a62e7d 100644
--- a/mojo/services/clipboard/clipboard_standalone_impl.h
+++ b/mojo/services/clipboard/clipboard_standalone_impl.h
@@ -25,20 +25,20 @@
static const int kNumClipboards = 3;
ClipboardStandaloneImpl();
- virtual ~ClipboardStandaloneImpl();
+ ~ClipboardStandaloneImpl() override;
// InterfaceImpl<mojo::Clipboard> implementation.
- virtual void GetSequenceNumber(
+ void GetSequenceNumber(
Clipboard::Type clipboard_type,
const mojo::Callback<void(uint64_t)>& callback) override;
- virtual void GetAvailableMimeTypes(
+ void GetAvailableMimeTypes(
Clipboard::Type clipboard_types,
const mojo::Callback<void(mojo::Array<mojo::String>)>& callback) override;
- virtual void ReadMimeType(
+ void ReadMimeType(
Clipboard::Type clipboard_type,
const mojo::String& mime_type,
const mojo::Callback<void(mojo::Array<uint8_t>)>& callback) override;
- virtual void WriteClipboardData(
+ void WriteClipboardData(
Clipboard::Type clipboard_type,
mojo::Map<mojo::String, mojo::Array<uint8_t>> data) override;
diff --git a/mojo/services/clipboard/main.cc b/mojo/services/clipboard/main.cc
index fcc33d1..a7a2664 100644
--- a/mojo/services/clipboard/main.cc
+++ b/mojo/services/clipboard/main.cc
@@ -20,19 +20,18 @@
public mojo::InterfaceFactory<mojo::Clipboard> {
public:
Delegate() {}
- virtual ~Delegate() {}
+ ~Delegate() override {}
// mojo::ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
+ bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
connection->AddService(this);
return true;
}
// mojo::InterfaceFactory<mojo::Clipboard> implementation.
- virtual void Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::Clipboard> request) override {
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::Clipboard> request) override {
// TODO(erg): Write native implementations of the clipboard. For now, we
// just build a clipboard which doesn't interact with the system.
mojo::BindToRequest(new mojo::ClipboardStandaloneImpl(), &request);
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc
index d221750..f04acde 100644
--- a/mojo/services/gles2/command_buffer_impl.cc
+++ b/mojo/services/gles2/command_buffer_impl.cc
@@ -28,17 +28,15 @@
public:
MemoryTrackerStub() {}
- virtual void TrackMemoryAllocatedChange(size_t old_size,
- size_t new_size,
- gpu::gles2::MemoryTracker::Pool pool)
- override {}
+ void TrackMemoryAllocatedChange(
+ size_t old_size,
+ size_t new_size,
+ gpu::gles2::MemoryTracker::Pool pool) override {}
- virtual bool EnsureGPUMemoryAvailable(size_t size_needed) override {
- return true;
- };
+ bool EnsureGPUMemoryAvailable(size_t size_needed) override { return true; };
private:
- virtual ~MemoryTrackerStub() {}
+ ~MemoryTrackerStub() override {}
DISALLOW_COPY_AND_ASSIGN(MemoryTrackerStub);
};
diff --git a/mojo/services/gles2/command_buffer_impl.h b/mojo/services/gles2/command_buffer_impl.h
index a304e88..c67effa 100644
--- a/mojo/services/gles2/command_buffer_impl.h
+++ b/mojo/services/gles2/command_buffer_impl.h
@@ -41,19 +41,18 @@
const gfx::Size& size,
gfx::GLShareGroup* share_group,
gpu::gles2::MailboxManager* mailbox_manager);
- virtual ~CommandBufferImpl();
+ ~CommandBufferImpl() override;
- virtual void Initialize(CommandBufferSyncClientPtr sync_client,
- mojo::ScopedSharedBufferHandle shared_state) override;
- virtual void SetGetBuffer(int32_t buffer) override;
- virtual void Flush(int32_t put_offset) override;
- virtual void MakeProgress(int32_t last_get_offset) override;
- virtual void RegisterTransferBuffer(
- int32_t id,
- mojo::ScopedSharedBufferHandle transfer_buffer,
- uint32_t size) override;
- virtual void DestroyTransferBuffer(int32_t id) override;
- virtual void Echo(const Callback<void()>& callback) override;
+ void Initialize(CommandBufferSyncClientPtr sync_client,
+ mojo::ScopedSharedBufferHandle shared_state) override;
+ void SetGetBuffer(int32_t buffer) override;
+ void Flush(int32_t put_offset) override;
+ void MakeProgress(int32_t last_get_offset) override;
+ void RegisterTransferBuffer(int32_t id,
+ mojo::ScopedSharedBufferHandle transfer_buffer,
+ uint32_t size) override;
+ void DestroyTransferBuffer(int32_t id) override;
+ void Echo(const Callback<void()>& callback) override;
private:
bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state);
diff --git a/mojo/services/gles2/mojo_buffer_backing.h b/mojo/services/gles2/mojo_buffer_backing.h
index 9304df7..079e98e 100644
--- a/mojo/services/gles2/mojo_buffer_backing.h
+++ b/mojo/services/gles2/mojo_buffer_backing.h
@@ -18,14 +18,14 @@
MojoBufferBacking(mojo::ScopedSharedBufferHandle handle,
void* memory,
size_t size);
- virtual ~MojoBufferBacking();
+ ~MojoBufferBacking() override;
static scoped_ptr<gpu::BufferBacking> Create(
mojo::ScopedSharedBufferHandle handle,
size_t size);
- virtual void* GetMemory() const override;
- virtual size_t GetSize() const override;
+ void* GetMemory() const override;
+ size_t GetSize() const override;
private:
mojo::ScopedSharedBufferHandle handle_;
diff --git a/mojo/services/html_viewer/html_document_view.h b/mojo/services/html_viewer/html_document_view.h
index e2407bd..b43b374 100644
--- a/mojo/services/html_viewer/html_document_view.h
+++ b/mojo/services/html_viewer/html_document_view.h
@@ -86,19 +86,18 @@
blink::WebHistoryCommitType commit_type);
// ViewManagerDelegate methods:
- virtual void OnEmbed(
- ViewManager* view_manager,
- View* root,
- ServiceProviderImpl* embedee_service_provider_impl,
- scoped_ptr<ServiceProvider> embedder_service_provider) override;
- virtual void OnViewManagerDisconnected(ViewManager* view_manager) override;
+ void OnEmbed(ViewManager* view_manager,
+ View* root,
+ ServiceProviderImpl* embedee_service_provider_impl,
+ scoped_ptr<ServiceProvider> embedder_service_provider) override;
+ void OnViewManagerDisconnected(ViewManager* view_manager) override;
// ViewObserver methods:
- virtual void OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
- virtual void OnViewDestroyed(View* view) override;
- virtual void OnViewInputEvent(View* view, const EventPtr& event) override;
+ void OnViewBoundsChanged(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ void OnViewDestroyed(View* view) override;
+ void OnViewInputEvent(View* view, const EventPtr& event) override;
void Load(URLResponsePtr response);
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc
index a26651a..967a75a 100644
--- a/mojo/services/html_viewer/html_viewer.cc
+++ b/mojo/services/html_viewer/html_viewer.cc
@@ -36,11 +36,11 @@
: shell_(shell),
compositor_thread_(compositor_thread),
web_media_player_factory_(web_media_player_factory) {}
- virtual ~ContentHandlerImpl() {}
+ ~ContentHandlerImpl() override {}
private:
// Overridden from ContentHandler:
- virtual void OnConnect(
+ void OnConnect(
const mojo::String& requestor_url,
URLResponsePtr response,
InterfaceRequest<ServiceProvider> service_provider_request) override {
@@ -63,11 +63,11 @@
public:
HTMLViewer() : compositor_thread_("compositor thread") {}
- virtual ~HTMLViewer() { blink::shutdown(); }
+ ~HTMLViewer() override { blink::shutdown(); }
private:
// Overridden from ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* app) override {
+ void Initialize(ApplicationImpl* app) override {
shell_ = app->shell();
blink_platform_impl_.reset(new BlinkPlatformImpl(app));
blink::initialize(blink_platform_impl_.get());
@@ -86,15 +86,14 @@
compositor_thread_.message_loop_proxy()));
}
- virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService(this);
return true;
}
// Overridden from InterfaceFactory<ContentHandler>
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<ContentHandler> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<ContentHandler> request) override {
BindToRequest(
new ContentHandlerImpl(shell_, compositor_thread_.message_loop_proxy(),
web_media_player_factory_.get()),
diff --git a/mojo/services/html_viewer/weblayertreeview_impl.h b/mojo/services/html_viewer/weblayertreeview_impl.h
index 5221902..a567aaf 100644
--- a/mojo/services/html_viewer/weblayertreeview_impl.h
+++ b/mojo/services/html_viewer/weblayertreeview_impl.h
@@ -45,24 +45,24 @@
void set_view(View* view) { view_ = view; }
// cc::LayerTreeHostClient implementation.
- virtual void WillBeginMainFrame(int frame_id) override;
- virtual void DidBeginMainFrame() override;
- virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override;
- virtual void Layout() override;
- virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
- const gfx::Vector2d& outer_delta,
- float page_scale,
- float top_controls_delta) override;
- virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
- float page_scale,
- float top_controls_delta) override;
- virtual void RequestNewOutputSurface(bool fallback) override;
- virtual void DidInitializeOutputSurface() override;
- virtual void WillCommit() override;
- virtual void DidCommit() override;
- virtual void DidCommitAndDrawFrame() override;
- virtual void DidCompleteSwapBuffers() override;
- virtual void RateLimitSharedMainThreadContext() override {}
+ void WillBeginMainFrame(int frame_id) override;
+ void DidBeginMainFrame() override;
+ void BeginMainFrame(const cc::BeginFrameArgs& args) override;
+ void Layout() override;
+ void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
+ const gfx::Vector2d& outer_delta,
+ float page_scale,
+ float top_controls_delta) override;
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float page_scale,
+ float top_controls_delta) override;
+ void RequestNewOutputSurface(bool fallback) override;
+ void DidInitializeOutputSurface() override;
+ void WillCommit() override;
+ void DidCommit() override;
+ void DidCommitAndDrawFrame() override;
+ void DidCompleteSwapBuffers() override;
+ void RateLimitSharedMainThreadContext() override {}
// blink::WebLayerTreeView implementation.
virtual void setSurfaceReady() override;
@@ -110,7 +110,7 @@
virtual void setShowScrollBottleneckRects(bool) {}
// OutputSurfaceMojoClient implementation.
- virtual void DidCreateSurface(cc::SurfaceId id) override;
+ void DidCreateSurface(cc::SurfaceId id) override;
private:
void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
diff --git a/mojo/services/html_viewer/websockethandle_impl.cc b/mojo/services/html_viewer/websockethandle_impl.cc
index c7f55e3..027b89e 100644
--- a/mojo/services/html_viewer/websockethandle_impl.cc
+++ b/mojo/services/html_viewer/websockethandle_impl.cc
@@ -68,15 +68,14 @@
explicit WebSocketClientImpl(WebSocketHandleImpl* handle,
blink::WebSocketHandleClient* client)
: handle_(handle), client_(client) {}
- virtual ~WebSocketClientImpl() {}
+ ~WebSocketClientImpl() override {}
private:
// WebSocketClient methods:
- virtual void DidConnect(bool fail,
- const String& selected_subprotocol,
- const String& extensions,
- ScopedDataPipeConsumerHandle receive_stream)
- override {
+ void DidConnect(bool fail,
+ const String& selected_subprotocol,
+ const String& extensions,
+ ScopedDataPipeConsumerHandle receive_stream) override {
blink::WebSocketHandleClient* client = client_;
WebSocketHandleImpl* handle = handle_;
receive_stream_ = receive_stream.Pass();
@@ -90,21 +89,21 @@
// |handle| can be deleted here.
}
- virtual void DidReceiveData(bool fin,
- WebSocket::MessageType type,
- uint32_t num_bytes) override {
+ void DidReceiveData(bool fin,
+ WebSocket::MessageType type,
+ uint32_t num_bytes) override {
read_queue_->Read(num_bytes,
base::Bind(&WebSocketClientImpl::DidReadFromReceiveStream,
base::Unretained(this),
fin, type, num_bytes));
}
- virtual void DidReceiveFlowControl(int64_t quota) override {
+ void DidReceiveFlowControl(int64_t quota) override {
client_->didReceiveFlowControl(handle_, quota);
// |handle| can be deleted here.
}
- virtual void DidFail(const String& message) override {
+ void DidFail(const String& message) override {
blink::WebSocketHandleClient* client = client_;
WebSocketHandleImpl* handle = handle_;
handle->Disconnect(); // deletes |this|
@@ -112,9 +111,7 @@
// |handle| can be deleted here.
}
- virtual void DidClose(bool was_clean,
- uint16_t code,
- const String& reason) override {
+ void DidClose(bool was_clean, uint16_t code, const String& reason) override {
blink::WebSocketHandleClient* client = client_;
WebSocketHandleImpl* handle = handle_;
handle->Disconnect(); // deletes |this|
diff --git a/mojo/services/html_viewer/webthread_impl.cc b/mojo/services/html_viewer/webthread_impl.cc
index 678d22e..8c2425a 100644
--- a/mojo/services/html_viewer/webthread_impl.cc
+++ b/mojo/services/html_viewer/webthread_impl.cc
@@ -24,11 +24,11 @@
TaskObserverAdapter(WebThread::TaskObserver* observer)
: observer_(observer) {}
- virtual void WillProcessTask(const base::PendingTask& pending_task) override {
+ void WillProcessTask(const base::PendingTask& pending_task) override {
observer_->willProcessTask();
}
- virtual void DidProcessTask(const base::PendingTask& pending_task) override {
+ void DidProcessTask(const base::PendingTask& pending_task) override {
observer_->didProcessTask();
}
diff --git a/mojo/services/native_viewport/gpu_impl.h b/mojo/services/native_viewport/gpu_impl.h
index 4aeb53b..6b996c7 100644
--- a/mojo/services/native_viewport/gpu_impl.h
+++ b/mojo/services/native_viewport/gpu_impl.h
@@ -27,14 +27,14 @@
GpuImpl(const scoped_refptr<gfx::GLShareGroup>& share_group,
const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager);
- virtual ~GpuImpl();
+ ~GpuImpl() override;
- virtual void CreateOnscreenGLES2Context(
+ void CreateOnscreenGLES2Context(
uint64_t native_viewport_id,
SizePtr size,
InterfaceRequest<CommandBuffer> command_buffer_request) override;
- virtual void CreateOffscreenGLES2Context(
+ void CreateOffscreenGLES2Context(
InterfaceRequest<CommandBuffer> command_buffer_request) override;
private:
diff --git a/mojo/services/native_viewport/main.cc b/mojo/services/native_viewport/main.cc
index 3271cc4..1cd936f 100644
--- a/mojo/services/native_viewport/main.cc
+++ b/mojo/services/native_viewport/main.cc
@@ -28,7 +28,7 @@
: share_group_(new gfx::GLShareGroup),
mailbox_manager_(new gpu::gles2::MailboxManager),
is_headless_(false) {}
- virtual ~NativeViewportAppDelegate() {}
+ ~NativeViewportAppDelegate() override {}
private:
bool HasArg(const std::string& arg) {
@@ -37,7 +37,7 @@
}
// ApplicationDelegate implementation.
- virtual void Initialize(ApplicationImpl* application) override {
+ void Initialize(ApplicationImpl* application) override {
app_ = application;
#if !defined(COMPONENT_BUILD)
@@ -49,7 +49,7 @@
is_headless_ = HasArg(kUseHeadlessConfig);
}
- virtual bool ConfigureIncomingConnection(
+ bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
connection->AddService<NativeViewport>(this);
connection->AddService<Gpu>(this);
@@ -57,14 +57,14 @@
}
// InterfaceFactory<NativeViewport> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<NativeViewport> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<NativeViewport> request) override {
BindToRequest(new NativeViewportImpl(app_, is_headless_), &request);
}
// InterfaceFactory<Gpu> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<Gpu> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<Gpu> request) override {
BindToRequest(new GpuImpl(share_group_.get(), mailbox_manager_.get()),
&request);
}
diff --git a/mojo/services/native_viewport/native_viewport_impl.h b/mojo/services/native_viewport/native_viewport_impl.h
index 03918cb..d63b0f7 100644
--- a/mojo/services/native_viewport/native_viewport_impl.h
+++ b/mojo/services/native_viewport/native_viewport_impl.h
@@ -26,23 +26,21 @@
public PlatformViewport::Delegate {
public:
NativeViewportImpl(ApplicationImpl* app, bool is_headless);
- virtual ~NativeViewportImpl();
+ ~NativeViewportImpl() override;
// InterfaceImpl<NativeViewport> implementation.
- virtual void Create(SizePtr size,
- const Callback<void(uint64_t)>& callback) override;
- virtual void Show() override;
- virtual void Hide() override;
- virtual void Close() override;
- virtual void SetSize(SizePtr size) override;
- virtual void SubmittedFrame(SurfaceIdPtr surface_id) override;
+ void Create(SizePtr size, const Callback<void(uint64_t)>& callback) override;
+ void Show() override;
+ void Hide() override;
+ void Close() override;
+ void SetSize(SizePtr size) override;
+ void SubmittedFrame(SurfaceIdPtr surface_id) override;
// PlatformViewport::Delegate implementation.
- virtual void OnBoundsChanged(const gfx::Rect& bounds) override;
- virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) override;
- virtual bool OnEvent(ui::Event* ui_event) override;
- virtual void OnDestroyed() override;
+ void OnBoundsChanged(const gfx::Rect& bounds) override;
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
+ bool OnEvent(ui::Event* ui_event) override;
+ void OnDestroyed() override;
void AckEvent();
diff --git a/mojo/services/native_viewport/platform_viewport_headless.h b/mojo/services/native_viewport/platform_viewport_headless.h
index 9b9743f..ba2a5b1 100644
--- a/mojo/services/native_viewport/platform_viewport_headless.h
+++ b/mojo/services/native_viewport/platform_viewport_headless.h
@@ -10,7 +10,7 @@
class PlatformViewportHeadless : public PlatformViewport {
public:
- virtual ~PlatformViewportHeadless();
+ ~PlatformViewportHeadless() override;
static scoped_ptr<PlatformViewport> Create(Delegate* delegate);
@@ -18,14 +18,14 @@
explicit PlatformViewportHeadless(Delegate* delegate);
// Overridden from PlatformViewport:
- virtual void Init(const gfx::Rect& bounds) override;
- virtual void Show() override;
- virtual void Hide() override;
- virtual void Close() override;
- virtual gfx::Size GetSize() override;
- virtual void SetBounds(const gfx::Rect& bounds) override;
- virtual void SetCapture() override;
- virtual void ReleaseCapture() override;
+ void Init(const gfx::Rect& bounds) override;
+ void Show() override;
+ void Hide() override;
+ void Close() override;
+ gfx::Size GetSize() override;
+ void SetBounds(const gfx::Rect& bounds) override;
+ void SetCapture() override;
+ void ReleaseCapture() override;
Delegate* delegate_;
gfx::Rect bounds_;
diff --git a/mojo/services/native_viewport/platform_viewport_mac.mm b/mojo/services/native_viewport/platform_viewport_mac.mm
index 40bee95..a74b6ba 100644
--- a/mojo/services/native_viewport/platform_viewport_mac.mm
+++ b/mojo/services/native_viewport/platform_viewport_mac.mm
@@ -20,14 +20,14 @@
window_(nil) {
}
- virtual ~PlatformViewportMac() {
+ ~PlatformViewportMac() override {
[window_ orderOut:nil];
[window_ close];
}
private:
// Overridden from PlatformViewport:
- virtual void Init(const gfx::Rect& bounds) override {
+ void Init(const gfx::Rect& bounds) override {
[NSApplication sharedApplication];
rect_ = bounds;
@@ -40,34 +40,22 @@
delegate_->OnBoundsChanged(rect_);
}
- virtual void Show() override {
- [window_ orderFront:nil];
- }
+ void Show() override { [window_ orderFront:nil]; }
- virtual void Hide() override {
- [window_ orderOut:nil];
- }
+ void Hide() override { [window_ orderOut:nil]; }
- virtual void Close() override {
+ void Close() override {
// TODO(beng): perform this in response to NSWindow destruction.
delegate_->OnDestroyed();
}
- virtual gfx::Size GetSize() override {
- return rect_.size();
- }
+ gfx::Size GetSize() override { return rect_.size(); }
- virtual void SetBounds(const gfx::Rect& bounds) override {
- NOTIMPLEMENTED();
- }
+ void SetBounds(const gfx::Rect& bounds) override { NOTIMPLEMENTED(); }
- virtual void SetCapture() override {
- NOTIMPLEMENTED();
- }
+ void SetCapture() override { NOTIMPLEMENTED(); }
- virtual void ReleaseCapture() override {
- NOTIMPLEMENTED();
- }
+ void ReleaseCapture() override { NOTIMPLEMENTED(); }
Delegate* delegate_;
NSWindow* window_;
diff --git a/mojo/services/native_viewport/platform_viewport_x11.cc b/mojo/services/native_viewport/platform_viewport_x11.cc
index b34928e..099b31c 100644
--- a/mojo/services/native_viewport/platform_viewport_x11.cc
+++ b/mojo/services/native_viewport/platform_viewport_x11.cc
@@ -24,14 +24,14 @@
explicit PlatformViewportX11(Delegate* delegate) : delegate_(delegate) {
}
- virtual ~PlatformViewportX11() {
+ ~PlatformViewportX11() override {
// Destroy the platform-window while |this| is still alive.
platform_window_.reset();
}
private:
// Overridden from PlatformViewport:
- virtual void Init(const gfx::Rect& bounds) override {
+ void Init(const gfx::Rect& bounds) override {
CHECK(!event_source_);
CHECK(!platform_window_);
@@ -41,44 +41,31 @@
platform_window_->SetBounds(bounds);
}
- virtual void Show() override {
- platform_window_->Show();
- }
+ void Show() override { platform_window_->Show(); }
- virtual void Hide() override {
- platform_window_->Hide();
- }
+ void Hide() override { platform_window_->Hide(); }
- virtual void Close() override {
- platform_window_->Close();
- }
+ void Close() override { platform_window_->Close(); }
- virtual gfx::Size GetSize() override {
- return bounds_.size();
- }
+ gfx::Size GetSize() override { return bounds_.size(); }
- virtual void SetBounds(const gfx::Rect& bounds) override {
+ void SetBounds(const gfx::Rect& bounds) override {
platform_window_->SetBounds(bounds);
}
- virtual void SetCapture() override {
- platform_window_->SetCapture();
- }
+ void SetCapture() override { platform_window_->SetCapture(); }
- virtual void ReleaseCapture() override {
- platform_window_->ReleaseCapture();
- }
+ void ReleaseCapture() override { platform_window_->ReleaseCapture(); }
// ui::PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override {
+ void OnBoundsChanged(const gfx::Rect& new_bounds) override {
bounds_ = new_bounds;
delegate_->OnBoundsChanged(new_bounds);
}
- virtual void OnDamageRect(const gfx::Rect& damaged_region) override {
- }
+ void OnDamageRect(const gfx::Rect& damaged_region) override {}
- virtual void DispatchEvent(ui::Event* event) override {
+ void DispatchEvent(ui::Event* event) override {
delegate_->OnEvent(event);
// We want to emulate the WM_CHAR generation behaviour of Windows.
@@ -113,26 +100,19 @@
}
}
- virtual void OnCloseRequest() override {
- platform_window_->Close();
- }
+ void OnCloseRequest() override { platform_window_->Close(); }
- virtual void OnClosed() override {
- delegate_->OnDestroyed();
- }
+ void OnClosed() override { delegate_->OnDestroyed(); }
- virtual void OnWindowStateChanged(ui::PlatformWindowState state) override {
- }
+ void OnWindowStateChanged(ui::PlatformWindowState state) override {}
- virtual void OnLostCapture() override {
- }
+ void OnLostCapture() override {}
- virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) override {
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override {
delegate_->OnAcceleratedWidgetAvailable(widget);
}
- virtual void OnActivationChanged(bool active) override {}
+ void OnActivationChanged(bool active) override {}
scoped_ptr<ui::PlatformEventSource> event_source_;
scoped_ptr<ui::PlatformWindow> platform_window_;
diff --git a/mojo/services/native_viewport/viewport_surface.h b/mojo/services/native_viewport/viewport_surface.h
index 3e5ec59..9fc4260 100644
--- a/mojo/services/native_viewport/viewport_surface.h
+++ b/mojo/services/native_viewport/viewport_surface.h
@@ -27,7 +27,7 @@
Gpu* gpu_service,
const gfx::Size& size,
cc::SurfaceId child_id);
- virtual ~ViewportSurface();
+ ~ViewportSurface() override;
void SetWidgetId(uint64_t widget_id);
void SetSize(const gfx::Size& size);
@@ -39,7 +39,7 @@
void SubmitFrame();
// SurfaceClient implementation.
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override;
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override;
SurfacePtr surface_;
Gpu* gpu_service_;
diff --git a/mojo/services/network/cookie_store_impl.h b/mojo/services/network/cookie_store_impl.h
index 9ec5571..5bb4d2d 100644
--- a/mojo/services/network/cookie_store_impl.h
+++ b/mojo/services/network/cookie_store_impl.h
@@ -14,14 +14,14 @@
class CookieStoreImpl : public InterfaceImpl<CookieStore> {
public:
CookieStoreImpl(NetworkContext* context, const GURL& origin);
- virtual ~CookieStoreImpl();
+ ~CookieStoreImpl() override;
private:
// CookieStore methods:
- virtual void Get(const String& url,
- const Callback<void(String)>& callback) override;
- virtual void Set(const String& url, const String& cookie,
- const Callback<void(bool)>& callback) override;
+ void Get(const String& url, const Callback<void(String)>& callback) override;
+ void Set(const String& url,
+ const String& cookie,
+ const Callback<void(bool)>& callback) override;
NetworkContext* context_;
GURL origin_;
diff --git a/mojo/services/network/main.cc b/mojo/services/network/main.cc
index 27c0d85..182ddf5 100644
--- a/mojo/services/network/main.cc
+++ b/mojo/services/network/main.cc
@@ -22,7 +22,7 @@
public:
Delegate() {}
- virtual void Initialize(mojo::ApplicationImpl* app) override {
+ void Initialize(mojo::ApplicationImpl* app) override {
base::FilePath base_path;
CHECK(PathService::Get(base::DIR_TEMP, &base_path));
base_path = base_path.Append(FILE_PATH_LITERAL("network_service"));
@@ -30,7 +30,7 @@
}
// mojo::ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
+ bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
DCHECK(context_);
connection->AddService(this);
@@ -38,9 +38,8 @@
}
// mojo::InterfaceFactory<mojo::NetworkService> implementation.
- virtual void Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::NetworkService> request) override {
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::NetworkService> request) override {
mojo::BindToRequest(
new mojo::NetworkServiceImpl(connection, context_.get()), &request);
}
diff --git a/mojo/services/network/net_adapters.h b/mojo/services/network/net_adapters.h
index 89c6976..ea6317e 100644
--- a/mojo/services/network/net_adapters.h
+++ b/mojo/services/network/net_adapters.h
@@ -67,7 +67,7 @@
explicit NetToMojoIOBuffer(NetToMojoPendingBuffer* pending_buffer);
private:
- virtual ~NetToMojoIOBuffer();
+ ~NetToMojoIOBuffer() override;
scoped_refptr<NetToMojoPendingBuffer> pending_buffer_;
};
@@ -118,7 +118,7 @@
explicit MojoToNetIOBuffer(MojoToNetPendingBuffer* pending_buffer);
private:
- virtual ~MojoToNetIOBuffer();
+ ~MojoToNetIOBuffer() override;
scoped_refptr<MojoToNetPendingBuffer> pending_buffer_;
};
diff --git a/mojo/services/network/network_service_impl.h b/mojo/services/network/network_service_impl.h
index 5ae2cfd..5d3376a 100644
--- a/mojo/services/network/network_service_impl.h
+++ b/mojo/services/network/network_service_impl.h
@@ -18,23 +18,23 @@
public:
NetworkServiceImpl(ApplicationConnection* connection,
NetworkContext* context);
- virtual ~NetworkServiceImpl();
+ ~NetworkServiceImpl() override;
// NetworkService methods:
- virtual void CreateURLLoader(InterfaceRequest<URLLoader> loader) override;
- virtual void GetCookieStore(InterfaceRequest<CookieStore> store) override;
- virtual void CreateWebSocket(InterfaceRequest<WebSocket> socket) override;
- virtual void CreateTCPBoundSocket(
+ void CreateURLLoader(InterfaceRequest<URLLoader> loader) override;
+ void GetCookieStore(InterfaceRequest<CookieStore> store) override;
+ void CreateWebSocket(InterfaceRequest<WebSocket> socket) override;
+ void CreateTCPBoundSocket(
NetAddressPtr local_address,
InterfaceRequest<TCPBoundSocket> bound_socket,
const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) override;
- virtual void CreateTCPConnectedSocket(
+ void CreateTCPConnectedSocket(
NetAddressPtr remote_address,
ScopedDataPipeConsumerHandle send_stream,
ScopedDataPipeProducerHandle receive_stream,
InterfaceRequest<TCPConnectedSocket> client_socket,
const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) override;
- virtual void CreateUDPSocket(InterfaceRequest<UDPSocket> socket) override;
+ void CreateUDPSocket(InterfaceRequest<UDPSocket> socket) override;
private:
NetworkContext* context_;
diff --git a/mojo/services/network/tcp_bound_socket_impl.h b/mojo/services/network/tcp_bound_socket_impl.h
index 39a78f6..3dc4646 100644
--- a/mojo/services/network/tcp_bound_socket_impl.h
+++ b/mojo/services/network/tcp_bound_socket_impl.h
@@ -15,7 +15,7 @@
class TCPBoundSocketImpl : public InterfaceImpl<TCPBoundSocket> {
public:
TCPBoundSocketImpl();
- virtual ~TCPBoundSocketImpl();
+ ~TCPBoundSocketImpl() override;
// Does the actual binding. Returns a net error code. On net::OK, the bound
// socket will be ready to use and send back to the client. On failure, this
@@ -27,15 +27,13 @@
NetAddressPtr GetLocalAddress() const;
// TCPBoundSocket.
- virtual void StartListening(
- InterfaceRequest<TCPServerSocket> server,
- const Callback<void(NetworkErrorPtr)>& callback) override;
- virtual void Connect(
- NetAddressPtr remote_address,
- ScopedDataPipeConsumerHandle send_stream,
- ScopedDataPipeProducerHandle receive_stream,
- InterfaceRequest<TCPConnectedSocket> client_socket,
- const Callback<void(NetworkErrorPtr)>& callback) override;
+ void StartListening(InterfaceRequest<TCPServerSocket> server,
+ const Callback<void(NetworkErrorPtr)>& callback) override;
+ void Connect(NetAddressPtr remote_address,
+ ScopedDataPipeConsumerHandle send_stream,
+ ScopedDataPipeProducerHandle receive_stream,
+ InterfaceRequest<TCPConnectedSocket> client_socket,
+ const Callback<void(NetworkErrorPtr)>& callback) override;
private:
void OnConnected(int result);
diff --git a/mojo/services/network/tcp_connected_socket_impl.h b/mojo/services/network/tcp_connected_socket_impl.h
index e579b29..993802f 100644
--- a/mojo/services/network/tcp_connected_socket_impl.h
+++ b/mojo/services/network/tcp_connected_socket_impl.h
@@ -22,7 +22,7 @@
TCPConnectedSocketImpl(scoped_ptr<net::TCPSocket> socket,
ScopedDataPipeConsumerHandle send_stream,
ScopedDataPipeProducerHandle receive_stream);
- virtual ~TCPConnectedSocketImpl();
+ ~TCPConnectedSocketImpl() override;
private:
// "Receiving" in this context means reading from TCPSocket and writing to
diff --git a/mojo/services/network/tcp_server_socket_impl.h b/mojo/services/network/tcp_server_socket_impl.h
index c1f2e48..26d4942 100644
--- a/mojo/services/network/tcp_server_socket_impl.h
+++ b/mojo/services/network/tcp_server_socket_impl.h
@@ -19,14 +19,13 @@
// Passed ownership of a socket already in listening mode.
explicit TCPServerSocketImpl(scoped_ptr<net::TCPSocket> socket);
- virtual ~TCPServerSocketImpl();
+ ~TCPServerSocketImpl() override;
// TCPServerSocket.
- virtual void Accept(
- ScopedDataPipeConsumerHandle send_stream,
- ScopedDataPipeProducerHandle receive_stream,
- InterfaceRequest<TCPConnectedSocket> client_socket,
- const AcceptCallback& callback) override;
+ void Accept(ScopedDataPipeConsumerHandle send_stream,
+ ScopedDataPipeProducerHandle receive_stream,
+ InterfaceRequest<TCPConnectedSocket> client_socket,
+ const AcceptCallback& callback) override;
private:
void OnAcceptCompleted(int result);
diff --git a/mojo/services/network/udp_socket_impl.h b/mojo/services/network/udp_socket_impl.h
index e4c4d28..1235716 100644
--- a/mojo/services/network/udp_socket_impl.h
+++ b/mojo/services/network/udp_socket_impl.h
@@ -24,33 +24,33 @@
class UDPSocketImpl : public InterfaceImpl<UDPSocket> {
public:
UDPSocketImpl();
- virtual ~UDPSocketImpl();
+ ~UDPSocketImpl() override;
// UDPSocket implementation.
- virtual void AllowAddressReuse(
+ void AllowAddressReuse(
const Callback<void(NetworkErrorPtr)>& callback) override;
- virtual void Bind(
+ void Bind(
NetAddressPtr addr,
const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback) override;
- virtual void SetSendBufferSize(
+ void SetSendBufferSize(
uint32_t size,
const Callback<void(NetworkErrorPtr)>& callback) override;
- virtual void SetReceiveBufferSize(
+ void SetReceiveBufferSize(
uint32_t size,
const Callback<void(NetworkErrorPtr)>& callback) override;
- virtual void NegotiateMaxPendingSendRequests(
+ void NegotiateMaxPendingSendRequests(
uint32_t requested_size,
const Callback<void(uint32_t)>& callback) override;
- virtual void ReceiveMore(uint32_t datagram_number) override;
+ void ReceiveMore(uint32_t datagram_number) override;
- virtual void SendTo(NetAddressPtr dest_addr,
- Array<uint8_t> data,
- const Callback<void(NetworkErrorPtr)>& callback) override;
+ void SendTo(NetAddressPtr dest_addr,
+ Array<uint8_t> data,
+ const Callback<void(NetworkErrorPtr)>& callback) override;
private:
struct PendingSendRequest {
diff --git a/mojo/services/network/udp_socket_unittest.cc b/mojo/services/network/udp_socket_unittest.cc
index dd38cf1..42bf61a 100644
--- a/mojo/services/network/udp_socket_unittest.cc
+++ b/mojo/services/network/udp_socket_unittest.cc
@@ -131,9 +131,9 @@
private:
struct State: public StateBase {
- virtual ~State() {}
+ ~State() override {}
- virtual void Run(NetworkErrorPtr result) const override {
+ void Run(NetworkErrorPtr result) const override {
if (test_callback_) {
TestCallback* callback = static_cast<TestCallback*>(test_callback_);
callback->result_ = result.Pass();
@@ -158,10 +158,9 @@
private:
struct State : public StateBase {
- virtual ~State() {}
+ ~State() override {}
- virtual void Run(NetworkErrorPtr result,
- NetAddressPtr net_address) const override {
+ void Run(NetworkErrorPtr result, NetAddressPtr net_address) const override {
if (test_callback_) {
TestCallbackWithAddress* callback =
static_cast<TestCallbackWithAddress*>(test_callback_);
@@ -188,9 +187,9 @@
private:
struct State : public StateBase {
- virtual ~State() {}
+ ~State() override {}
- virtual void Run(uint32_t result) const override {
+ void Run(uint32_t result) const override {
if (test_callback_) {
TestCallbackWithUint32* callback =
static_cast<TestCallbackWithUint32*>(test_callback_);
@@ -230,16 +229,16 @@
UDPSocketClientImpl() : run_loop_(nullptr), expected_receive_count_(0) {}
- virtual ~UDPSocketClientImpl() {
+ ~UDPSocketClientImpl() override {
while (!results_.empty()) {
delete results_.front();
results_.pop();
}
}
- virtual void OnReceived(NetworkErrorPtr result,
- NetAddressPtr src_addr,
- Array<uint8_t> data) override {
+ void OnReceived(NetworkErrorPtr result,
+ NetAddressPtr src_addr,
+ Array<uint8_t> data) override {
ReceiveResult* entry = new ReceiveResult();
entry->result = result.Pass();
entry->addr = src_addr.Pass();
diff --git a/mojo/services/network/url_loader_impl.cc b/mojo/services/network/url_loader_impl.cc
index 5e67c27..3f26378 100644
--- a/mojo/services/network/url_loader_impl.cc
+++ b/mojo/services/network/url_loader_impl.cc
@@ -55,26 +55,20 @@
public:
UploadDataPipeElementReader(ScopedDataPipeConsumerHandle pipe)
: pipe_(pipe.Pass()), num_bytes_(0) {}
- virtual ~UploadDataPipeElementReader() {}
+ ~UploadDataPipeElementReader() override {}
// UploadElementReader overrides:
- virtual int Init(const net::CompletionCallback& callback) override {
+ int Init(const net::CompletionCallback& callback) override {
offset_ = 0;
ReadDataRaw(pipe_.get(), NULL, &num_bytes_, MOJO_READ_DATA_FLAG_QUERY);
return net::OK;
}
- virtual uint64 GetContentLength() const override {
- return num_bytes_;
- }
- virtual uint64 BytesRemaining() const override {
- return num_bytes_ - offset_;
- }
- virtual bool IsInMemory() const override {
- return false;
- }
- virtual int Read(net::IOBuffer* buf,
- int buf_length,
- const net::CompletionCallback& callback) override {
+ uint64 GetContentLength() const override { return num_bytes_; }
+ uint64 BytesRemaining() const override { return num_bytes_ - offset_; }
+ bool IsInMemory() const override { return false; }
+ int Read(net::IOBuffer* buf,
+ int buf_length,
+ const net::CompletionCallback& callback) override {
uint32_t bytes_read =
std::min(static_cast<uint32_t>(BytesRemaining()),
static_cast<uint32_t>(buf_length));
diff --git a/mojo/services/network/url_loader_impl.h b/mojo/services/network/url_loader_impl.h
index 76b4e52..dec48d5 100644
--- a/mojo/services/network/url_loader_impl.h
+++ b/mojo/services/network/url_loader_impl.h
@@ -22,25 +22,21 @@
public net::URLRequest::Delegate {
public:
explicit URLLoaderImpl(NetworkContext* context);
- virtual ~URLLoaderImpl();
+ ~URLLoaderImpl() override;
private:
// URLLoader methods:
- virtual void Start(
- URLRequestPtr request,
- const Callback<void(URLResponsePtr)>& callback) override;
- virtual void FollowRedirect(
- const Callback<void(URLResponsePtr)>& callback) override;
- virtual void QueryStatus(
- const Callback<void(URLLoaderStatusPtr)>& callback) override;
+ void Start(URLRequestPtr request,
+ const Callback<void(URLResponsePtr)>& callback) override;
+ void FollowRedirect(const Callback<void(URLResponsePtr)>& callback) override;
+ void QueryStatus(const Callback<void(URLLoaderStatusPtr)>& callback) override;
// net::URLRequest::Delegate methods:
- virtual void OnReceivedRedirect(net::URLRequest* url_request,
- const net::RedirectInfo& redirect_info,
- bool* defer_redirect) override;
- virtual void OnResponseStarted(net::URLRequest* url_request) override;
- virtual void OnReadCompleted(net::URLRequest* url_request, int bytes_read)
- override;
+ void OnReceivedRedirect(net::URLRequest* url_request,
+ const net::RedirectInfo& redirect_info,
+ bool* defer_redirect) override;
+ void OnResponseStarted(net::URLRequest* url_request) override;
+ void OnReadCompleted(net::URLRequest* url_request, int bytes_read) override;
void SendError(
int error,
diff --git a/mojo/services/network/web_socket_impl.cc b/mojo/services/network/web_socket_impl.cc
index 7617562..ea0928f 100644
--- a/mojo/services/network/web_socket_impl.cc
+++ b/mojo/services/network/web_socket_impl.cc
@@ -65,28 +65,27 @@
WebSocketEventHandler(WebSocketClientPtr client)
: client_(client.Pass()) {
}
- virtual ~WebSocketEventHandler() {}
+ ~WebSocketEventHandler() override {}
private:
// net::WebSocketEventInterface methods:
- virtual ChannelState OnAddChannelResponse(
- bool fail,
- const std::string& selected_subprotocol,
- const std::string& extensions) override;
- virtual ChannelState OnDataFrame(bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) override;
- virtual ChannelState OnClosingHandshake() override;
- virtual ChannelState OnFlowControl(int64 quota) override;
- virtual ChannelState OnDropChannel(bool was_clean,
- uint16 code,
- const std::string& reason) override;
- virtual ChannelState OnFailChannel(const std::string& message) override;
- virtual ChannelState OnStartOpeningHandshake(
+ ChannelState OnAddChannelResponse(bool fail,
+ const std::string& selected_subprotocol,
+ const std::string& extensions) override;
+ ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ const std::vector<char>& data) override;
+ ChannelState OnClosingHandshake() override;
+ ChannelState OnFlowControl(int64 quota) override;
+ ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason) override;
+ ChannelState OnFailChannel(const std::string& message) override;
+ ChannelState OnStartOpeningHandshake(
scoped_ptr<net::WebSocketHandshakeRequestInfo> request) override;
- virtual ChannelState OnFinishOpeningHandshake(
+ ChannelState OnFinishOpeningHandshake(
scoped_ptr<net::WebSocketHandshakeResponseInfo> response) override;
- virtual ChannelState OnSSLCertificateError(
+ ChannelState OnSSLCertificateError(
scoped_ptr<net::WebSocketEventInterface::SSLErrorCallbacks> callbacks,
const GURL& url,
const net::SSLInfo& ssl_info,
diff --git a/mojo/services/network/web_socket_impl.h b/mojo/services/network/web_socket_impl.h
index 31855df..a12ebf8 100644
--- a/mojo/services/network/web_socket_impl.h
+++ b/mojo/services/network/web_socket_impl.h
@@ -22,20 +22,18 @@
class WebSocketImpl : public InterfaceImpl<WebSocket> {
public:
explicit WebSocketImpl(NetworkContext* context);
- virtual ~WebSocketImpl();
+ ~WebSocketImpl() override;
private:
// WebSocket methods:
- virtual void Connect(const String& url,
- Array<String> protocols,
- const String& origin,
- ScopedDataPipeConsumerHandle send_stream,
- WebSocketClientPtr client) override;
- virtual void Send(bool fin,
- WebSocket::MessageType type,
- uint32_t num_bytes) override;
- virtual void FlowControl(int64_t quota) override;
- virtual void Close(uint16_t code, const String& reason) override;
+ void Connect(const String& url,
+ Array<String> protocols,
+ const String& origin,
+ ScopedDataPipeConsumerHandle send_stream,
+ WebSocketClientPtr client) override;
+ void Send(bool fin, WebSocket::MessageType type, uint32_t num_bytes) override;
+ void FlowControl(int64_t quota) override;
+ void Close(uint16_t code, const String& reason) override;
// Called with the data to send once it has been read from |send_stream_|.
void DidReadFromSendStream(bool fin,
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
index 330e07c..3818a36 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
@@ -72,11 +72,11 @@
class RootObserver : public ViewObserver {
public:
explicit RootObserver(View* root) : root_(root) {}
- virtual ~RootObserver() {}
+ ~RootObserver() override {}
private:
// Overridden from ViewObserver:
- virtual void OnViewDestroyed(View* view) override {
+ void OnViewDestroyed(View* view) override {
DCHECK_EQ(view, root_);
static_cast<ViewManagerClientImpl*>(
ViewPrivate(root_).view_manager())->RemoveRoot(root_);
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
index f2a2b8e..c9a4af4 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
@@ -28,7 +28,7 @@
public WindowManagerClient2 {
public:
ViewManagerClientImpl(ViewManagerDelegate* delegate, Shell* shell);
- virtual ~ViewManagerClientImpl();
+ ~ViewManagerClientImpl() override;
bool connected() const { return connected_; }
ConnectionSpecificId connection_id() const { return connection_id_; }
@@ -77,43 +77,42 @@
typedef std::map<Id, View*> IdToViewMap;
// Overridden from ViewManager:
- virtual const std::string& GetEmbedderURL() const override;
- virtual const std::vector<View*>& GetRoots() const override;
- virtual View* GetViewById(Id id) override;
+ const std::string& GetEmbedderURL() const override;
+ const std::vector<View*>& GetRoots() const override;
+ View* GetViewById(Id id) override;
// Overridden from InterfaceImpl:
- virtual void OnConnectionEstablished() override;
+ void OnConnectionEstablished() override;
// Overridden from ViewManagerClient:
- virtual void OnEmbed(ConnectionSpecificId connection_id,
- const String& creator_url,
- ViewDataPtr root,
- InterfaceRequest<ServiceProvider> services) override;
- virtual void OnViewBoundsChanged(Id view_id,
- RectPtr old_bounds,
- RectPtr new_bounds) override;
- virtual void OnViewHierarchyChanged(Id view_id,
- Id new_parent_id,
- Id old_parent_id,
- Array<ViewDataPtr> views) override;
- virtual void OnViewReordered(Id view_id,
- Id relative_view_id,
- OrderDirection direction) override;
- virtual void OnViewDeleted(Id view_id) override;
- virtual void OnViewVisibilityChanged(Id view_id, bool visible) override;
- virtual void OnViewDrawnStateChanged(Id view_id, bool drawn) override;
- virtual void OnViewInputEvent(Id view_id,
- EventPtr event,
- const Callback<void()>& callback) override;
+ void OnEmbed(ConnectionSpecificId connection_id,
+ const String& creator_url,
+ ViewDataPtr root,
+ InterfaceRequest<ServiceProvider> services) override;
+ void OnViewBoundsChanged(Id view_id,
+ RectPtr old_bounds,
+ RectPtr new_bounds) override;
+ void OnViewHierarchyChanged(Id view_id,
+ Id new_parent_id,
+ Id old_parent_id,
+ Array<ViewDataPtr> views) override;
+ void OnViewReordered(Id view_id,
+ Id relative_view_id,
+ OrderDirection direction) override;
+ void OnViewDeleted(Id view_id) override;
+ void OnViewVisibilityChanged(Id view_id, bool visible) override;
+ void OnViewDrawnStateChanged(Id view_id, bool drawn) override;
+ void OnViewInputEvent(Id view_id,
+ EventPtr event,
+ const Callback<void()>& callback) override;
// Overridden from WindowManagerClient2:
- virtual void OnWindowManagerReady() override;
- virtual void OnCaptureChanged(Id old_capture_view_id,
- Id new_capture_view_id) override;
- virtual void OnFocusChanged(Id old_focused_view_id,
- Id new_focused_view_id) override;
- virtual void OnActiveWindowChanged(Id old_focused_window,
- Id new_focused_window) override;
+ void OnWindowManagerReady() override;
+ void OnCaptureChanged(Id old_capture_view_id,
+ Id new_capture_view_id) override;
+ void OnFocusChanged(Id old_focused_view_id, Id new_focused_view_id) override;
+ void OnActiveWindowChanged(Id old_focused_window,
+ Id new_focused_window) override;
void RemoveRoot(View* root);
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
index 28d3c24..439fa1c 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
@@ -12,10 +12,10 @@
class ViewManagerTestSuite : public base::TestSuite {
public:
ViewManagerTestSuite(int argc, char** argv);
- virtual ~ViewManagerTestSuite();
+ ~ViewManagerTestSuite() override;
protected:
- virtual void Initialize() override;
+ void Initialize() override;
private:
DISALLOW_COPY_AND_ASSIGN(ViewManagerTestSuite);
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index d9609e2..3229b09 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -49,19 +49,19 @@
explicit ConnectApplicationLoader(const LoadedCallback& callback)
: callback_(callback) {}
- virtual ~ConnectApplicationLoader() {}
+ ~ConnectApplicationLoader() override {}
private:
// Overridden from ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* app) override {
+ void Initialize(ApplicationImpl* app) override {
view_manager_client_factory_.reset(
new ViewManagerClientFactory(app->shell(), this));
}
// Overridden from ApplicationLoader:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
if (!shell_handle.is_valid())
return;
@@ -70,23 +70,22 @@
apps_.push_back(app.release());
}
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override {}
- virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService(view_manager_client_factory_.get());
return true;
}
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager,
- View* root,
- ServiceProviderImpl* exported_services,
- scoped_ptr<ServiceProvider> imported_services) override {
+ void OnEmbed(ViewManager* view_manager,
+ View* root,
+ ServiceProviderImpl* exported_services,
+ scoped_ptr<ServiceProvider> imported_services) override {
callback_.Run(view_manager, root);
}
- virtual void OnViewManagerDisconnected(ViewManager* view_manager) override {}
+ void OnViewManagerDisconnected(ViewManager* view_manager) override {}
ScopedVector<ApplicationImpl> apps_;
LoadedCallback callback_;
@@ -98,13 +97,13 @@
class BoundsChangeObserver : public ViewObserver {
public:
explicit BoundsChangeObserver(View* view) : view_(view) {}
- virtual ~BoundsChangeObserver() {}
+ ~BoundsChangeObserver() override {}
private:
// Overridden from ViewObserver:
- virtual void OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override {
+ void OnViewBoundsChanged(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override {
DCHECK_EQ(view, view_);
QuitRunLoop();
}
@@ -129,7 +128,7 @@
TreeSizeMatchesObserver(View* tree, size_t tree_size)
: tree_(tree),
tree_size_(tree_size) {}
- virtual ~TreeSizeMatchesObserver() {}
+ ~TreeSizeMatchesObserver() override {}
bool IsTreeCorrectSize() {
return CountViews(tree_) == tree_size_;
@@ -137,7 +136,7 @@
private:
// Overridden from ViewObserver:
- virtual void OnTreeChanged(const TreeChangeParams& params) override {
+ void OnTreeChanged(const TreeChangeParams& params) override {
if (IsTreeCorrectSize())
QuitRunLoop();
}
@@ -174,7 +173,7 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewDestroyed(View* view) override {
+ void OnViewDestroyed(View* view) override {
std::set<Id>::iterator it = views_->find(view->id());
if (it != views_->end())
views_->erase(it);
@@ -208,15 +207,13 @@
OrderChangeObserver(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~OrderChangeObserver() {
- view_->RemoveObserver(this);
- }
+ ~OrderChangeObserver() override { view_->RemoveObserver(this); }
private:
// Overridden from ViewObserver:
- virtual void OnViewReordered(View* view,
- View* relative_view,
- OrderDirection direction) override {
+ void OnViewReordered(View* view,
+ View* relative_view,
+ OrderDirection direction) override {
DCHECK_EQ(view, view_);
QuitRunLoop();
}
@@ -237,7 +234,7 @@
explicit ViewTracker(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~ViewTracker() {
+ ~ViewTracker() override {
if (view_)
view_->RemoveObserver(this);
}
@@ -246,7 +243,7 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewDestroyed(View* view) override {
+ void OnViewDestroyed(View* view) override {
DCHECK_EQ(view, view_);
view_ = NULL;
}
@@ -535,11 +532,11 @@
explicit VisibilityChangeObserver(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~VisibilityChangeObserver() { view_->RemoveObserver(this); }
+ ~VisibilityChangeObserver() override { view_->RemoveObserver(this); }
private:
// Overridden from ViewObserver:
- virtual void OnViewVisibilityChanged(View* view) override {
+ void OnViewVisibilityChanged(View* view) override {
EXPECT_EQ(view, view_);
QuitRunLoop();
}
@@ -597,11 +594,11 @@
explicit DrawnChangeObserver(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~DrawnChangeObserver() { view_->RemoveObserver(this); }
+ ~DrawnChangeObserver() override { view_->RemoveObserver(this); }
private:
// Overridden from ViewObserver:
- virtual void OnViewDrawnChanged(View* view) override {
+ void OnViewDrawnChanged(View* view) override {
EXPECT_EQ(view, view_);
QuitRunLoop();
}
diff --git a/mojo/services/public/cpp/view_manager/tests/view_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_unittest.cc
index ab8ef88..2fb5bfc 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_unittest.cc
@@ -117,9 +117,7 @@
explicit TreeChangeObserver(View* observee) : observee_(observee) {
observee_->AddObserver(this);
}
- virtual ~TreeChangeObserver() {
- observee_->RemoveObserver(this);
- }
+ ~TreeChangeObserver() override { observee_->RemoveObserver(this); }
void Reset() {
received_params_.clear();
@@ -131,10 +129,10 @@
private:
// Overridden from ViewObserver:
- virtual void OnTreeChanging(const TreeChangeParams& params) override {
+ void OnTreeChanging(const TreeChangeParams& params) override {
received_params_.push_back(params);
}
- virtual void OnTreeChanged(const TreeChangeParams& params) override {
+ void OnTreeChanged(const TreeChangeParams& params) override {
received_params_.push_back(params);
}
@@ -353,9 +351,7 @@
explicit OrderChangeObserver(View* observee) : observee_(observee) {
observee_->AddObserver(this);
}
- virtual ~OrderChangeObserver() {
- observee_->RemoveObserver(this);
- }
+ ~OrderChangeObserver() override { observee_->RemoveObserver(this); }
Changes GetAndClearChanges() {
Changes changes;
@@ -365,15 +361,15 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewReordering(View* view,
- View* relative_view,
- OrderDirection direction) override {
+ void OnViewReordering(View* view,
+ View* relative_view,
+ OrderDirection direction) override {
OnViewReordered(view, relative_view, direction);
}
- virtual void OnViewReordered(View* view,
- View* relative_view,
- OrderDirection direction) override {
+ void OnViewReordered(View* view,
+ View* relative_view,
+ OrderDirection direction) override {
Change change;
change.view = view;
change.relative_view = relative_view;
@@ -500,9 +496,7 @@
explicit BoundsChangeObserver(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~BoundsChangeObserver() {
- view_->RemoveObserver(this);
- }
+ ~BoundsChangeObserver() override { view_->RemoveObserver(this); }
Changes GetAndClearChanges() {
Changes changes;
@@ -512,9 +506,9 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewBoundsChanging(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override {
+ void OnViewBoundsChanging(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override {
changes_.push_back(
base::StringPrintf(
"view=%s old_bounds=%s new_bounds=%s phase=changing",
@@ -522,9 +516,9 @@
RectToString(old_bounds).c_str(),
RectToString(new_bounds).c_str()));
}
- virtual void OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override {
+ void OnViewBoundsChanged(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override {
changes_.push_back(
base::StringPrintf(
"view=%s old_bounds=%s new_bounds=%s phase=changed",
@@ -565,7 +559,7 @@
explicit VisibilityChangeObserver(View* view) : view_(view) {
view_->AddObserver(this);
}
- virtual ~VisibilityChangeObserver() { view_->RemoveObserver(this); }
+ ~VisibilityChangeObserver() override { view_->RemoveObserver(this); }
Changes GetAndClearChanges() {
Changes changes;
@@ -575,13 +569,13 @@
private:
// Overridden from ViewObserver:
- virtual void OnViewVisibilityChanging(View* view) override {
+ void OnViewVisibilityChanging(View* view) override {
changes_.push_back(
base::StringPrintf("view=%s phase=changing visibility=%s",
ViewIdToString(view->id()).c_str(),
view->visible() ? "true" : "false"));
}
- virtual void OnViewVisibilityChanged(View* view) override {
+ void OnViewVisibilityChanged(View* view) override {
changes_.push_back(base::StringPrintf("view=%s phase=changed visibility=%s",
ViewIdToString(view->id()).c_str(),
view->visible() ? "true" : "false"));
diff --git a/mojo/services/public/cpp/view_manager/view_manager_client_factory.h b/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
index d2ed548..c828900 100644
--- a/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
+++ b/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
@@ -19,11 +19,11 @@
class ViewManagerClientFactory : public InterfaceFactory<ViewManagerClient> {
public:
ViewManagerClientFactory(Shell* shell, ViewManagerDelegate* delegate);
- virtual ~ViewManagerClientFactory();
+ ~ViewManagerClientFactory() override;
// InterfaceFactory<ViewManagerClient> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<ViewManagerClient> request) override;
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<ViewManagerClient> request) override;
private:
Shell* shell_;
diff --git a/mojo/services/surfaces/surfaces_impl.h b/mojo/services/surfaces/surfaces_impl.h
index c074834..20599b8 100644
--- a/mojo/services/surfaces/surfaces_impl.h
+++ b/mojo/services/surfaces/surfaces_impl.h
@@ -34,28 +34,27 @@
SurfacesImpl(cc::SurfaceManager* manager,
uint32_t id_namespace,
Client* client);
- virtual ~SurfacesImpl();
+ ~SurfacesImpl() override;
// Surface implementation.
- virtual void CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) override;
- virtual void SubmitFrame(SurfaceIdPtr id, FramePtr frame) override;
- virtual void DestroySurface(SurfaceIdPtr id) override;
- virtual void CreateGLES2BoundSurface(CommandBufferPtr gles2_client,
- SurfaceIdPtr id,
- mojo::SizePtr size) override;
+ void CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) override;
+ void SubmitFrame(SurfaceIdPtr id, FramePtr frame) override;
+ void DestroySurface(SurfaceIdPtr id) override;
+ void CreateGLES2BoundSurface(CommandBufferPtr gles2_client,
+ SurfaceIdPtr id,
+ mojo::SizePtr size) override;
// SurfaceFactoryClient implementation.
- virtual void ReturnResources(
- const cc::ReturnedResourceArray& resources) override;
+ void ReturnResources(const cc::ReturnedResourceArray& resources) override;
// DisplayClient implementation.
- virtual void DisplayDamaged() override;
- virtual void DidSwapBuffers() override;
- virtual void DidSwapBuffersComplete() override;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) override;
- virtual void OutputSurfaceLost() override;
- virtual void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
+ void DisplayDamaged() override;
+ void DidSwapBuffers() override;
+ void DidSwapBuffersComplete() override;
+ void CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override;
+ void OutputSurfaceLost() override;
+ void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
cc::SurfaceFactory* factory() { return &factory_; }
diff --git a/mojo/services/surfaces/surfaces_service_application.h b/mojo/services/surfaces/surfaces_service_application.h
index c2fc8db..3a6aa1c 100644
--- a/mojo/services/surfaces/surfaces_service_application.h
+++ b/mojo/services/surfaces/surfaces_service_application.h
@@ -21,19 +21,18 @@
public SurfacesImpl::Client {
public:
SurfacesServiceApplication();
- virtual ~SurfacesServiceApplication();
+ ~SurfacesServiceApplication() override;
// ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override;
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override;
// InterfaceFactory<SurfacsServicee> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<SurfacesService> request) override;
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<SurfacesService> request) override;
// SurfacesImpl::Client implementation.
- virtual void FrameSubmitted() override;
- virtual void SetDisplay(cc::Display*) override;
+ void FrameSubmitted() override;
+ void SetDisplay(cc::Display*) override;
private:
cc::SurfaceManager manager_;
diff --git a/mojo/services/surfaces/surfaces_service_impl.h b/mojo/services/surfaces/surfaces_service_impl.h
index a620872..37df510 100644
--- a/mojo/services/surfaces/surfaces_service_impl.h
+++ b/mojo/services/surfaces/surfaces_service_impl.h
@@ -22,11 +22,12 @@
SurfacesServiceImpl(cc::SurfaceManager* manager,
uint32_t* next_id_namespace,
SurfacesImpl::Client* client);
- virtual ~SurfacesServiceImpl();
+ ~SurfacesServiceImpl() override;
// InterfaceImpl<SurfacesService> implementation.
- virtual void CreateSurfaceConnection(const mojo::Callback<
- void(mojo::SurfacePtr, uint32_t)>& callback) override;
+ void CreateSurfaceConnection(
+ const mojo::Callback<void(mojo::SurfacePtr, uint32_t)>& callback)
+ override;
private:
cc::SurfaceManager* manager_;
diff --git a/mojo/services/test_service/test_request_tracker_application.h b/mojo/services/test_service/test_request_tracker_application.h
index b519a91..699eefd 100644
--- a/mojo/services/test_service/test_request_tracker_application.h
+++ b/mojo/services/test_service/test_request_tracker_application.h
@@ -19,15 +19,14 @@
public InterfaceFactory<TestTimeService> {
public:
TestRequestTrackerApplication();
- virtual ~TestRequestTrackerApplication();
+ ~TestRequestTrackerApplication() override;
// ApplicationDelegate methods:
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override;
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override;
// InterfaceFactory<TestTimeService> methods:
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestTimeService> request) override;
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestTimeService> request) override;
private:
TrackingContext context_;
diff --git a/mojo/services/test_service/test_request_tracker_client_impl.h b/mojo/services/test_service/test_request_tracker_client_impl.h
index 91340cb..16f5cba 100644
--- a/mojo/services/test_service/test_request_tracker_client_impl.h
+++ b/mojo/services/test_service/test_request_tracker_client_impl.h
@@ -17,13 +17,13 @@
TestRequestTrackerPtr tracker,
const std::string& service_name,
const mojo::Callback<void()>& tracking_connected_callback);
- virtual ~TestRequestTrackerClientImpl();
+ ~TestRequestTrackerClientImpl() override;
// Call whenever an event happens that you want to be recorded.
void RecordNewRequest();
// TestRequestTrackerClient impl.
- virtual void SetIdAndReturnName(
+ void SetIdAndReturnName(
uint64_t id,
const mojo::Callback<void(mojo::String)>& callback) override;
diff --git a/mojo/services/test_service/test_request_tracker_impl.h b/mojo/services/test_service/test_request_tracker_impl.h
index 736cc70..d2104dc 100644
--- a/mojo/services/test_service/test_request_tracker_impl.h
+++ b/mojo/services/test_service/test_request_tracker_impl.h
@@ -28,13 +28,13 @@
class TestRequestTrackerImpl : public InterfaceImpl<TestRequestTracker> {
public:
explicit TestRequestTrackerImpl(TrackingContext* context);
- virtual ~TestRequestTrackerImpl();
+ ~TestRequestTrackerImpl() override;
// TestRequestTracker.
- virtual void RecordStats(uint64_t client_id, ServiceStatsPtr stats) override;
+ void RecordStats(uint64_t client_id, ServiceStatsPtr stats) override;
// InterfaceImpl override.
- virtual void OnConnectionEstablished() override;
+ void OnConnectionEstablished() override;
private:
void UploaderNameCallback(uint64_t id, const mojo::String& name);
@@ -47,12 +47,11 @@
: public InterfaceImpl<TestTrackedRequestService> {
public:
explicit TestTrackedRequestServiceImpl(TrackingContext* context);
- virtual ~TestTrackedRequestServiceImpl();
+ ~TestTrackedRequestServiceImpl() override;
// |TestTrackedRequestService| implementation.
- virtual void GetReport(
- const mojo::Callback<void(mojo::Array<ServiceReportPtr>)>& callback)
- override;
+ void GetReport(const mojo::Callback<void(mojo::Array<ServiceReportPtr>)>&
+ callback) override;
private:
TrackingContext* context_;
diff --git a/mojo/services/test_service/test_service_application.h b/mojo/services/test_service/test_service_application.h
index 47743a1..49fcdda 100644
--- a/mojo/services/test_service/test_service_application.h
+++ b/mojo/services/test_service/test_service_application.h
@@ -21,19 +21,18 @@
public InterfaceFactory<TestTimeService> {
public:
TestServiceApplication();
- virtual ~TestServiceApplication();
+ ~TestServiceApplication() override;
// ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override;
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override;
// InterfaceFactory<TestService> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestService> request) override;
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestService> request) override;
// InterfaceFactory<TestTimeService> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<TestTimeService> request) override;
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestTimeService> request) override;
void AddRef();
void ReleaseRef();
diff --git a/mojo/services/test_service/test_service_impl.h b/mojo/services/test_service/test_service_impl.h
index 379f02e..904320b 100644
--- a/mojo/services/test_service/test_service_impl.h
+++ b/mojo/services/test_service/test_service_impl.h
@@ -20,17 +20,16 @@
public:
TestServiceImpl(ApplicationConnection* connection,
TestServiceApplication* application);
- virtual ~TestServiceImpl();
+ ~TestServiceImpl() override;
// |TestService| methods:
- virtual void OnConnectionEstablished() override;
- virtual void OnConnectionError() override;
- virtual void Ping(const mojo::Callback<void()>& callback) override;
- virtual void ConnectToAppAndGetTime(
+ void OnConnectionEstablished() override;
+ void OnConnectionError() override;
+ void Ping(const mojo::Callback<void()>& callback) override;
+ void ConnectToAppAndGetTime(
const mojo::String& app_url,
const mojo::Callback<void(int64_t)>& callback) override;
- virtual void StartTrackingRequests(
- const mojo::Callback<void()>& callback) override;
+ void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
private:
TestServiceApplication* const application_;
diff --git a/mojo/services/test_service/test_time_service_impl.h b/mojo/services/test_service/test_time_service_impl.h
index c9eaea2..212eb02 100644
--- a/mojo/services/test_service/test_time_service_impl.h
+++ b/mojo/services/test_service/test_time_service_impl.h
@@ -20,13 +20,12 @@
class TestTimeServiceImpl : public InterfaceImpl<TestTimeService> {
public:
explicit TestTimeServiceImpl(ApplicationConnection* application);
- virtual ~TestTimeServiceImpl();
+ ~TestTimeServiceImpl() override;
// |TestTimeService| methods:
- virtual void GetPartyTime(
+ void GetPartyTime(
const mojo::Callback<void(int64_t time_usec)>& callback) override;
- virtual void StartTrackingRequests(
- const mojo::Callback<void()>& callback) override;
+ void StartTrackingRequests(const mojo::Callback<void()>& callback) override;
private:
ApplicationConnection* application_;
diff --git a/mojo/services/view_manager/connection_manager.h b/mojo/services/view_manager/connection_manager.h
index 1917439..618460f 100644
--- a/mojo/services/view_manager/connection_manager.h
+++ b/mojo/services/view_manager/connection_manager.h
@@ -68,7 +68,7 @@
ConnectionManager(ApplicationConnection* app_connection,
const Callback<void()>& native_viewport_closed_callback);
- virtual ~ConnectionManager();
+ ~ConnectionManager() override;
// Returns the id for the next ViewManagerServiceImpl.
ConnectionSpecificId GetAndAdvanceNextConnectionId();
@@ -164,21 +164,21 @@
InterfaceRequest<ServiceProvider> service_provider);
// Overridden from ServerViewDelegate:
- virtual void OnViewDestroyed(const ServerView* view) override;
- virtual void OnWillChangeViewHierarchy(const ServerView* view,
- const ServerView* new_parent,
- const ServerView* old_parent) override;
- virtual void OnViewHierarchyChanged(const ServerView* view,
- const ServerView* new_parent,
- const ServerView* old_parent) override;
- virtual void OnViewBoundsChanged(const ServerView* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
- virtual void OnViewSurfaceIdChanged(const ServerView* view) override;
- virtual void OnViewReordered(const ServerView* view,
- const ServerView* relative,
- OrderDirection direction) override;
- virtual void OnWillChangeViewVisibility(const ServerView* view) override;
+ void OnViewDestroyed(const ServerView* view) override;
+ void OnWillChangeViewHierarchy(const ServerView* view,
+ const ServerView* new_parent,
+ const ServerView* old_parent) override;
+ void OnViewHierarchyChanged(const ServerView* view,
+ const ServerView* new_parent,
+ const ServerView* old_parent) override;
+ void OnViewBoundsChanged(const ServerView* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ void OnViewSurfaceIdChanged(const ServerView* view) override;
+ void OnViewReordered(const ServerView* view,
+ const ServerView* relative,
+ OrderDirection direction) override;
+ void OnWillChangeViewVisibility(const ServerView* view) override;
ApplicationConnection* app_connection_;
diff --git a/mojo/services/view_manager/default_access_policy.h b/mojo/services/view_manager/default_access_policy.h
index d8c0194..a57ecc2 100644
--- a/mojo/services/view_manager/default_access_policy.h
+++ b/mojo/services/view_manager/default_access_policy.h
@@ -18,24 +18,23 @@
public:
DefaultAccessPolicy(ConnectionSpecificId connection_id,
AccessPolicyDelegate* delegate);
- virtual ~DefaultAccessPolicy();
+ ~DefaultAccessPolicy() override;
// AccessPolicy:
- virtual bool CanRemoveViewFromParent(const ServerView* view) const override;
- virtual bool CanAddView(const ServerView* parent,
- const ServerView* child) const override;
- virtual bool CanReorderView(const ServerView* view,
- const ServerView* relative_view,
- OrderDirection direction) const override;
- virtual bool CanDeleteView(const ServerView* view) const override;
- virtual bool CanGetViewTree(const ServerView* view) const override;
- virtual bool CanDescendIntoViewForViewTree(
- const ServerView* view) const override;
- virtual bool CanEmbed(const ServerView* view) const override;
- virtual bool CanChangeViewVisibility(const ServerView* view) const override;
- virtual bool CanSetViewSurfaceId(const ServerView* view) const override;
- virtual bool CanSetViewBounds(const ServerView* view) const override;
- virtual bool ShouldNotifyOnHierarchyChange(
+ bool CanRemoveViewFromParent(const ServerView* view) const override;
+ bool CanAddView(const ServerView* parent,
+ const ServerView* child) const override;
+ bool CanReorderView(const ServerView* view,
+ const ServerView* relative_view,
+ OrderDirection direction) const override;
+ bool CanDeleteView(const ServerView* view) const override;
+ bool CanGetViewTree(const ServerView* view) const override;
+ bool CanDescendIntoViewForViewTree(const ServerView* view) const override;
+ bool CanEmbed(const ServerView* view) const override;
+ bool CanChangeViewVisibility(const ServerView* view) const override;
+ bool CanSetViewSurfaceId(const ServerView* view) const override;
+ bool CanSetViewBounds(const ServerView* view) const override;
+ bool ShouldNotifyOnHierarchyChange(
const ServerView* view,
const ServerView** new_parent,
const ServerView** old_parent) const override;
diff --git a/mojo/services/view_manager/display_manager.h b/mojo/services/view_manager/display_manager.h
index 8b95a57..1f5f930 100644
--- a/mojo/services/view_manager/display_manager.h
+++ b/mojo/services/view_manager/display_manager.h
@@ -40,7 +40,7 @@
DisplayManager(ApplicationConnection* app_connection,
ConnectionManager* connection_manager,
const Callback<void()>& native_viewport_closed_callback);
- virtual ~DisplayManager();
+ ~DisplayManager() override;
// Schedules a paint for the specified region of the specified view.
void SchedulePaint(const ServerView* view, const gfx::Rect& bounds);
@@ -54,13 +54,12 @@
void Draw();
// NativeViewportClient implementation.
- virtual void OnDestroyed() override;
- virtual void OnSizeChanged(SizePtr size) override;
- virtual void OnEvent(EventPtr event,
- const mojo::Callback<void()>& callback) override;
+ void OnDestroyed() override;
+ void OnSizeChanged(SizePtr size) override;
+ void OnEvent(EventPtr event, const mojo::Callback<void()>& callback) override;
// SurfaceClient implementation.
- virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override;
+ void ReturnResources(Array<ReturnedResourcePtr> resources) override;
ConnectionManager* connection_manager_;
diff --git a/mojo/services/view_manager/main.cc b/mojo/services/view_manager/main.cc
index cd14dc0..39c48d6 100644
--- a/mojo/services/view_manager/main.cc
+++ b/mojo/services/view_manager/main.cc
@@ -16,10 +16,9 @@
public InterfaceFactory<ViewManagerInitService> {
public:
ViewManagerApp() {}
- virtual ~ViewManagerApp() {}
+ ~ViewManagerApp() override {}
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
context_.ConfigureIncomingConnection(connection);
// TODO(sky): this needs some sort of authentication as well as making sure
// we only ever have one active at a time.
@@ -27,9 +26,8 @@
return true;
}
- virtual void Create(
- ApplicationConnection* connection,
- InterfaceRequest<ViewManagerInitService> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<ViewManagerInitService> request) override {
BindToRequest(new ViewManagerInitServiceImpl(connection, &context_),
&request);
}
diff --git a/mojo/services/view_manager/view_manager_init_service_impl.h b/mojo/services/view_manager/view_manager_init_service_impl.h
index 63fbc38..b36efbe 100644
--- a/mojo/services/view_manager/view_manager_init_service_impl.h
+++ b/mojo/services/view_manager/view_manager_init_service_impl.h
@@ -34,13 +34,13 @@
public:
ViewManagerInitServiceImpl(ApplicationConnection* connection,
ViewManagerInitServiceContext* context);
- virtual ~ViewManagerInitServiceImpl();
+ ~ViewManagerInitServiceImpl() override;
private:
// ViewManagerInitService overrides:
- virtual void Embed(const String& url,
- ServiceProviderPtr service_provider,
- const Callback<void(bool)>& callback) override;
+ void Embed(const String& url,
+ ServiceProviderPtr service_provider,
+ const Callback<void(bool)>& callback) override;
ViewManagerInitServiceContext* context_;
diff --git a/mojo/services/view_manager/view_manager_service_impl.h b/mojo/services/view_manager/view_manager_service_impl.h
index c77f285..bb15fcd 100644
--- a/mojo/services/view_manager/view_manager_service_impl.h
+++ b/mojo/services/view_manager/view_manager_service_impl.h
@@ -47,7 +47,7 @@
const std::string& url,
const ViewId& root_id,
InterfaceRequest<ServiceProvider> service_provider);
- virtual ~ViewManagerServiceImpl();
+ ~ViewManagerServiceImpl() override;
// Used to mark this connection as originating from a call to
// ViewManagerService::Connect(). When set OnConnectionError() deletes |this|.
@@ -96,7 +96,7 @@
// TODO(sky): move this to private section (currently can't because of
// bindings).
// InterfaceImp overrides:
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
private:
typedef std::map<ConnectionSpecificId, ServerView*> ViewMap;
@@ -147,45 +147,42 @@
void NotifyDrawnStateChanged(const ServerView* view, bool new_drawn_value);
// ViewManagerService:
- virtual void CreateView(Id transport_view_id,
- const Callback<void(ErrorCode)>& callback) override;
- virtual void DeleteView(Id transport_view_id,
- const Callback<void(bool)>& callback) override;
- virtual void AddView(Id parent_id,
- Id child_id,
- const Callback<void(bool)>& callback) override;
- virtual void RemoveViewFromParent(
- Id view_id,
- const Callback<void(bool)>& callback) override;
- virtual void ReorderView(Id view_id,
- Id relative_view_id,
- OrderDirection direction,
- const Callback<void(bool)>& callback) override;
- virtual void GetViewTree(
- Id view_id,
- const Callback<void(Array<ViewDataPtr>)>& callback) override;
- virtual void SetViewSurfaceId(Id view_id,
- SurfaceIdPtr surface_id,
- const Callback<void(bool)>& callback) override;
- virtual void SetViewBounds(Id view_id,
- RectPtr bounds,
- const Callback<void(bool)>& callback) override;
- virtual void SetViewVisibility(Id view_id,
- bool visible,
- const Callback<void(bool)>& callback) override;
- virtual void Embed(const String& url,
- Id view_id,
- ServiceProviderPtr service_provider,
+ void CreateView(Id transport_view_id,
+ const Callback<void(ErrorCode)>& callback) override;
+ void DeleteView(Id transport_view_id,
+ const Callback<void(bool)>& callback) override;
+ void AddView(Id parent_id,
+ Id child_id,
+ const Callback<void(bool)>& callback) override;
+ void RemoveViewFromParent(Id view_id,
+ const Callback<void(bool)>& callback) override;
+ void ReorderView(Id view_id,
+ Id relative_view_id,
+ OrderDirection direction,
+ const Callback<void(bool)>& callback) override;
+ void GetViewTree(Id view_id,
+ const Callback<void(Array<ViewDataPtr>)>& callback) override;
+ void SetViewSurfaceId(Id view_id,
+ SurfaceIdPtr surface_id,
+ const Callback<void(bool)>& callback) override;
+ void SetViewBounds(Id view_id,
+ RectPtr bounds,
const Callback<void(bool)>& callback) override;
+ void SetViewVisibility(Id view_id,
+ bool visible,
+ const Callback<void(bool)>& callback) override;
+ void Embed(const String& url,
+ Id view_id,
+ ServiceProviderPtr service_provider,
+ const Callback<void(bool)>& callback) override;
// InterfaceImpl:
- virtual void OnConnectionEstablished() override;
+ void OnConnectionEstablished() override;
// AccessPolicyDelegate:
- virtual const base::hash_set<Id>& GetRootsForAccessPolicy() const override;
- virtual bool IsViewKnownForAccessPolicy(
- const ServerView* view) const override;
- virtual bool IsViewRootOfAnotherConnectionForAccessPolicy(
+ const base::hash_set<Id>& GetRootsForAccessPolicy() const override;
+ bool IsViewKnownForAccessPolicy(const ServerView* view) const override;
+ bool IsViewRootOfAnotherConnectionForAccessPolicy(
const ServerView* view) const override;
ConnectionManager* connection_manager_;
diff --git a/mojo/services/view_manager/view_manager_unittest.cc b/mojo/services/view_manager/view_manager_unittest.cc
index abf874e..073ad4c 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -65,8 +65,7 @@
SetInstance(this);
}
- virtual ~ViewManagerProxy() {
- }
+ ~ViewManagerProxy() override {}
// Returns true if in an initial state. If this returns false it means the
// last test didn't clean up properly, or most likely didn't invoke
@@ -288,7 +287,7 @@
}
// TestChangeTracker::Delegate:
- virtual void OnChangeAdded() override {
+ void OnChangeAdded() override {
if (quit_count_ > 0 && --quit_count_ == 0)
QuitCountReached();
}
@@ -336,45 +335,44 @@
ViewManagerProxy* proxy() { return &proxy_; }
// InterfaceImpl:
- virtual void OnConnectionEstablished() override {
+ void OnConnectionEstablished() override {
proxy_.set_router(internal_state()->router());
proxy_.set_view_manager(client());
}
// ViewManagerClient:
- virtual void OnEmbed(
- ConnectionSpecificId connection_id,
- const String& creator_url,
- ViewDataPtr root,
- InterfaceRequest<ServiceProvider> services) override {
+ void OnEmbed(ConnectionSpecificId connection_id,
+ const String& creator_url,
+ ViewDataPtr root,
+ InterfaceRequest<ServiceProvider> services) override {
tracker_.OnEmbed(connection_id, creator_url, root.Pass());
}
- virtual void OnViewBoundsChanged(Id view_id,
- RectPtr old_bounds,
- RectPtr new_bounds) override {
+ void OnViewBoundsChanged(Id view_id,
+ RectPtr old_bounds,
+ RectPtr new_bounds) override {
tracker_.OnViewBoundsChanged(view_id, old_bounds.Pass(), new_bounds.Pass());
}
- virtual void OnViewHierarchyChanged(Id view,
- Id new_parent,
- Id old_parent,
- Array<ViewDataPtr> views) override {
+ void OnViewHierarchyChanged(Id view,
+ Id new_parent,
+ Id old_parent,
+ Array<ViewDataPtr> views) override {
tracker_.OnViewHierarchyChanged(view, new_parent, old_parent, views.Pass());
}
- virtual void OnViewReordered(Id view_id,
- Id relative_view_id,
- OrderDirection direction) override {
+ void OnViewReordered(Id view_id,
+ Id relative_view_id,
+ OrderDirection direction) override {
tracker_.OnViewReordered(view_id, relative_view_id, direction);
}
- virtual void OnViewDeleted(Id view) override { tracker_.OnViewDeleted(view); }
- virtual void OnViewVisibilityChanged(uint32_t view, bool visible) override {
+ void OnViewDeleted(Id view) override { tracker_.OnViewDeleted(view); }
+ void OnViewVisibilityChanged(uint32_t view, bool visible) override {
tracker_.OnViewVisibilityChanged(view, visible);
}
- virtual void OnViewDrawnStateChanged(uint32_t view, bool drawn) override {
+ void OnViewDrawnStateChanged(uint32_t view, bool drawn) override {
tracker_.OnViewDrawnStateChanged(view, drawn);
}
- virtual void OnViewInputEvent(Id view_id,
- EventPtr event,
- const Callback<void()>& callback) override {
+ void OnViewInputEvent(Id view_id,
+ EventPtr event,
+ const Callback<void()>& callback) override {
tracker_.OnViewInputEvent(view_id, event.Pass());
}
@@ -389,20 +387,19 @@
public:
explicit WindowManagerServiceImpl(TestViewManagerClientConnection* connection)
: connection_(connection) {}
- virtual ~WindowManagerServiceImpl() {}
+ ~WindowManagerServiceImpl() override {}
// InterfaceImpl:
- virtual void OnConnectionEstablished() override {
+ void OnConnectionEstablished() override {
connection_->proxy()->set_window_manager_client(client());
}
// WindowManagerService:
- virtual void Embed(
- const String& url,
- InterfaceRequest<ServiceProvider> service_provider) override {
+ void Embed(const String& url,
+ InterfaceRequest<ServiceProvider> service_provider) override {
connection_->tracker()->DelegateEmbed(url);
}
- virtual void OnViewInputEvent(mojo::EventPtr event) override {}
+ void OnViewInputEvent(mojo::EventPtr event) override {}
private:
TestViewManagerClientConnection* connection_;
@@ -418,12 +415,12 @@
public InterfaceFactory<WindowManagerService> {
public:
EmbedApplicationLoader() : last_view_manager_client_(nullptr) {}
- virtual ~EmbedApplicationLoader() {}
+ ~EmbedApplicationLoader() override {}
// ApplicationLoader implementation:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
if (!shell_handle.is_valid())
return;
@@ -431,25 +428,24 @@
shell_handle.Pass()));
apps_.push_back(app.release());
}
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override {}
// ApplicationDelegate implementation:
- virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService<ViewManagerClient>(this);
connection->AddService<WindowManagerService>(this);
return true;
}
// InterfaceFactory<ViewManagerClient> implementation:
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<ViewManagerClient> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<ViewManagerClient> request) override {
last_view_manager_client_ = new TestViewManagerClientConnection;
BindToRequest(last_view_manager_client_, &request);
}
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<WindowManagerService> request) override {
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<WindowManagerService> request) override {
BindToRequest(new WindowManagerServiceImpl(last_view_manager_client_),
&request);
}
diff --git a/mojo/services/view_manager/window_manager_access_policy.h b/mojo/services/view_manager/window_manager_access_policy.h
index aa44fd6..7b8e7a9 100644
--- a/mojo/services/view_manager/window_manager_access_policy.h
+++ b/mojo/services/view_manager/window_manager_access_policy.h
@@ -17,24 +17,23 @@
public:
WindowManagerAccessPolicy(ConnectionSpecificId connection_id,
AccessPolicyDelegate* delegate);
- virtual ~WindowManagerAccessPolicy();
+ ~WindowManagerAccessPolicy() override;
// AccessPolicy:
- virtual bool CanRemoveViewFromParent(const ServerView* view) const override;
- virtual bool CanAddView(const ServerView* parent,
- const ServerView* child) const override;
- virtual bool CanReorderView(const ServerView* view,
- const ServerView* relative_view,
- OrderDirection direction) const override;
- virtual bool CanDeleteView(const ServerView* view) const override;
- virtual bool CanGetViewTree(const ServerView* view) const override;
- virtual bool CanDescendIntoViewForViewTree(
- const ServerView* view) const override;
- virtual bool CanEmbed(const ServerView* view) const override;
- virtual bool CanChangeViewVisibility(const ServerView* view) const override;
- virtual bool CanSetViewSurfaceId(const ServerView* view) const override;
- virtual bool CanSetViewBounds(const ServerView* view) const override;
- virtual bool ShouldNotifyOnHierarchyChange(
+ bool CanRemoveViewFromParent(const ServerView* view) const override;
+ bool CanAddView(const ServerView* parent,
+ const ServerView* child) const override;
+ bool CanReorderView(const ServerView* view,
+ const ServerView* relative_view,
+ OrderDirection direction) const override;
+ bool CanDeleteView(const ServerView* view) const override;
+ bool CanGetViewTree(const ServerView* view) const override;
+ bool CanDescendIntoViewForViewTree(const ServerView* view) const override;
+ bool CanEmbed(const ServerView* view) const override;
+ bool CanChangeViewVisibility(const ServerView* view) const override;
+ bool CanSetViewSurfaceId(const ServerView* view) const override;
+ bool CanSetViewBounds(const ServerView* view) const override;
+ bool ShouldNotifyOnHierarchyChange(
const ServerView* view,
const ServerView** new_parent,
const ServerView** old_parent) const override;
diff --git a/mojo/services/view_manager/window_manager_client_impl.h b/mojo/services/view_manager/window_manager_client_impl.h
index b25aafe..704489d 100644
--- a/mojo/services/view_manager/window_manager_client_impl.h
+++ b/mojo/services/view_manager/window_manager_client_impl.h
@@ -30,14 +30,13 @@
: public InterfaceImpl<WindowManagerClient> {
public:
explicit WindowManagerClientImpl(ConnectionManager* connection_manager);
- virtual ~WindowManagerClientImpl();
+ ~WindowManagerClientImpl() override;
// WindowManagerClient:
- virtual void DispatchInputEventToView(Id transport_view_id,
- EventPtr event) override;
+ void DispatchInputEventToView(Id transport_view_id, EventPtr event) override;
// InterfaceImp overrides:
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
private:
ConnectionManager* connection_manager_;
diff --git a/mojo/services/window_manager/main.cc b/mojo/services/window_manager/main.cc
index 3e2d37c..028795b 100644
--- a/mojo/services/window_manager/main.cc
+++ b/mojo/services/window_manager/main.cc
@@ -26,33 +26,31 @@
: window_manager_app_(new WindowManagerApp(this, this)),
view_manager_(NULL),
root_(NULL) {}
- virtual ~DefaultWindowManager() {}
+ ~DefaultWindowManager() override {}
private:
// Overridden from ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* impl) override {
+ void Initialize(ApplicationImpl* impl) override {
window_manager_app_->Initialize(impl);
}
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
window_manager_app_->ConfigureIncomingConnection(connection);
return true;
}
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager,
- View* root,
- ServiceProviderImpl* exported_services,
- scoped_ptr<ServiceProvider> imported_services) override {
+ void OnEmbed(ViewManager* view_manager,
+ View* root,
+ ServiceProviderImpl* exported_services,
+ scoped_ptr<ServiceProvider> imported_services) override {
view_manager_ = view_manager;
root_ = root;
}
- virtual void OnViewManagerDisconnected(ViewManager* view_manager) override {}
+ void OnViewManagerDisconnected(ViewManager* view_manager) override {}
// Overridden from WindowManagerDelegate:
- virtual void Embed(
- const String& url,
- InterfaceRequest<ServiceProvider> service_provider) override {
+ void Embed(const String& url,
+ InterfaceRequest<ServiceProvider> service_provider) override {
View* view = View::Create(view_manager_);
root_->AddChild(view);
view->Embed(url, scoped_ptr<mojo::ServiceProviderImpl>(
diff --git a/mojo/services/window_manager/window_manager_api_unittest.cc b/mojo/services/window_manager/window_manager_api_unittest.cc
index 7f89283..d5cad73 100644
--- a/mojo/services/window_manager/window_manager_api_unittest.cc
+++ b/mojo/services/window_manager/window_manager_api_unittest.cc
@@ -54,7 +54,7 @@
explicit TestWindowManagerClient(base::RunLoop* run_loop)
: run_loop_(run_loop) {}
- virtual ~TestWindowManagerClient() {}
+ ~TestWindowManagerClient() override {}
void set_focus_changed_callback(const TwoNodeCallback& callback) {
focus_changed_callback_ = callback;
@@ -65,16 +65,15 @@
private:
// Overridden from WindowManagerClient:
- virtual void OnWindowManagerReady() override { run_loop_->Quit(); }
- virtual void OnCaptureChanged(Id old_capture_node_id,
- Id new_capture_node_id) override {}
- virtual void OnFocusChanged(Id old_focused_node_id,
- Id new_focused_node_id) override {
+ void OnWindowManagerReady() override { run_loop_->Quit(); }
+ void OnCaptureChanged(Id old_capture_node_id,
+ Id new_capture_node_id) override {}
+ void OnFocusChanged(Id old_focused_node_id, Id new_focused_node_id) override {
if (!focus_changed_callback_.is_null())
focus_changed_callback_.Run(old_focused_node_id, new_focused_node_id);
}
- virtual void OnActiveWindowChanged(Id old_active_window,
- Id new_active_window) override {
+ void OnActiveWindowChanged(Id old_active_window,
+ Id new_active_window) override {
if (!active_window_changed_callback_.is_null())
active_window_changed_callback_.Run(old_active_window, new_active_window);
}
@@ -94,13 +93,13 @@
explicit TestApplicationLoader(const RootAddedCallback& root_added_callback)
: root_added_callback_(root_added_callback) {}
- virtual ~TestApplicationLoader() {}
+ ~TestApplicationLoader() override {}
private:
// Overridden from ApplicationLoader:
- virtual void Load(ApplicationManager* application_manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override {
+ void Load(ApplicationManager* application_manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override {
ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
if (!shell_handle.is_valid())
return;
@@ -108,29 +107,28 @@
new ApplicationImpl(this, shell_handle.Pass()));
apps_.push_back(app.release());
}
- virtual void OnApplicationError(ApplicationManager* application_manager,
- const GURL& url) override {}
+ void OnApplicationError(ApplicationManager* application_manager,
+ const GURL& url) override {}
// Overridden from ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* app) override {
+ void Initialize(ApplicationImpl* app) override {
view_manager_client_factory_.reset(
new ViewManagerClientFactory(app->shell(), this));
}
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
connection->AddService(view_manager_client_factory_.get());
return true;
}
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager,
- View* root,
- ServiceProviderImpl* exported_services,
- scoped_ptr<ServiceProvider> imported_services) override {
+ void OnEmbed(ViewManager* view_manager,
+ View* root,
+ ServiceProviderImpl* exported_services,
+ scoped_ptr<ServiceProvider> imported_services) override {
root_added_callback_.Run(root);
}
- virtual void OnViewManagerDisconnected(ViewManager* view_manager) override {}
+ void OnViewManagerDisconnected(ViewManager* view_manager) override {}
RootAddedCallback root_added_callback_;
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index ffd80a8..2852bd2 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -34,32 +34,34 @@
class DummyDelegate : public aura::WindowDelegate {
public:
DummyDelegate() {}
- virtual ~DummyDelegate() {}
+ ~DummyDelegate() override {}
private:
// WindowDelegate overrides:
- virtual gfx::Size GetMinimumSize() const override { return gfx::Size(); }
- virtual gfx::Size GetMaximumSize() const override { return gfx::Size(); }
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override {}
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override {
+ gfx::Size GetMinimumSize() const override { return gfx::Size(); }
+ gfx::Size GetMaximumSize() const override { return gfx::Size(); }
+ void OnBoundsChanged(const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override {}
+ gfx::NativeCursor GetCursor(const gfx::Point& point) override {
return gfx::kNullCursor;
}
- virtual int GetNonClientComponent(const gfx::Point& point) const override {
+ int GetNonClientComponent(const gfx::Point& point) const override {
return HTCAPTION;
}
- virtual bool ShouldDescendIntoChildForEventHandling(
+ bool ShouldDescendIntoChildForEventHandling(
aura::Window* child,
- const gfx::Point& location) override { return true; }
- virtual bool CanFocus() override { return true; }
- virtual void OnCaptureLost() override {}
- virtual void OnPaint(gfx::Canvas* canvas) override {}
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
- virtual void OnWindowDestroying(aura::Window* window) override {}
- virtual void OnWindowDestroyed(aura::Window* window) override {}
- virtual void OnWindowTargetVisibilityChanged(bool visible) override {}
- virtual bool HasHitTestMask() const override { return false; }
- virtual void GetHitTestMask(gfx::Path* mask) const override {}
+ const gfx::Point& location) override {
+ return true;
+ }
+ bool CanFocus() override { return true; }
+ void OnCaptureLost() override {}
+ void OnPaint(gfx::Canvas* canvas) override {}
+ void OnDeviceScaleFactorChanged(float device_scale_factor) override {}
+ void OnWindowDestroying(aura::Window* window) override {}
+ void OnWindowDestroyed(aura::Window* window) override {}
+ void OnWindowTargetVisibilityChanged(bool visible) override {}
+ bool HasHitTestMask() const override { return false; }
+ void GetHitTestMask(gfx::Path* mask) const override {}
DISALLOW_COPY_AND_ASSIGN(DummyDelegate);
};
diff --git a/mojo/services/window_manager/window_manager_app.h b/mojo/services/window_manager/window_manager_app.h
index 8c9c244..c7d2dc3 100644
--- a/mojo/services/window_manager/window_manager_app.h
+++ b/mojo/services/window_manager/window_manager_app.h
@@ -64,7 +64,7 @@
public:
WindowManagerApp(ViewManagerDelegate* view_manager_delegate,
WindowManagerDelegate* window_manager_delegate);
- virtual ~WindowManagerApp();
+ ~WindowManagerApp() override;
static View* GetViewForWindow(aura::Window* window);
aura::Window* GetWindowForViewId(Id view);
@@ -95,39 +95,37 @@
}
// Overridden from ApplicationDelegate:
- virtual void Initialize(ApplicationImpl* impl) override;
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override;
+ void Initialize(ApplicationImpl* impl) override;
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override;
private:
typedef std::set<WindowManagerService2Impl*> Connections;
typedef std::map<Id, aura::Window*> ViewIdToWindowMap;
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager,
- View* root,
- ServiceProviderImpl* exported_services,
- scoped_ptr<ServiceProvider> imported_services) override;
- virtual void OnViewManagerDisconnected(ViewManager* view_manager) override;
+ void OnEmbed(ViewManager* view_manager,
+ View* root,
+ ServiceProviderImpl* exported_services,
+ scoped_ptr<ServiceProvider> imported_services) override;
+ void OnViewManagerDisconnected(ViewManager* view_manager) override;
// Overridden from ViewObserver:
- virtual void OnTreeChanged(
- const ViewObserver::TreeChangeParams& params) override;
- virtual void OnViewDestroying(View* view) override;
- virtual void OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
+ void OnTreeChanged(const ViewObserver::TreeChangeParams& params) override;
+ void OnViewDestroying(View* view) override;
+ void OnViewBoundsChanged(View* view,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
// Overridden from ui::EventHandler:
- virtual void OnEvent(ui::Event* event) override;
+ void OnEvent(ui::Event* event) override;
// Overridden from aura::client::FocusChangeObserver:
- virtual void OnWindowFocused(aura::Window* gained_focus,
- aura::Window* lost_focus) override;
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override;
// Overridden from aura::client::ActivationChangeObserver:
- virtual void OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) override;
+ void OnWindowActivated(aura::Window* gained_active,
+ aura::Window* lost_active) override;
// Creates an aura::Window for every view in the hierarchy beneath |view|,
// and adds to the registry so that it can be retrieved later via
diff --git a/mojo/services/window_manager/window_manager_service2_impl.h b/mojo/services/window_manager/window_manager_service2_impl.h
index be129b4..a09db91 100644
--- a/mojo/services/window_manager/window_manager_service2_impl.h
+++ b/mojo/services/window_manager/window_manager_service2_impl.h
@@ -16,7 +16,7 @@
class WindowManagerService2Impl : public InterfaceImpl<WindowManagerService2> {
public:
explicit WindowManagerService2Impl(WindowManagerApp* manager);
- virtual ~WindowManagerService2Impl();
+ ~WindowManagerService2Impl() override;
void NotifyReady();
void NotifyViewFocused(Id new_focused_id, Id old_focused_id);
@@ -24,15 +24,12 @@
private:
// Overridden from WindowManagerService:
- virtual void SetCapture(Id view,
- const Callback<void(bool)>& callback) override;
- virtual void FocusWindow(Id view,
- const Callback<void(bool)>& callback) override;
- virtual void ActivateWindow(Id view,
- const Callback<void(bool)>& callback) override;
+ void SetCapture(Id view, const Callback<void(bool)>& callback) override;
+ void FocusWindow(Id view, const Callback<void(bool)>& callback) override;
+ void ActivateWindow(Id view, const Callback<void(bool)>& callback) override;
// Overridden from InterfaceImpl:
- virtual void OnConnectionEstablished() override;
+ void OnConnectionEstablished() override;
WindowManagerApp* window_manager_;
diff --git a/mojo/services/window_manager/window_manager_service_impl.h b/mojo/services/window_manager/window_manager_service_impl.h
index ba2d29e..39349c2 100644
--- a/mojo/services/window_manager/window_manager_service_impl.h
+++ b/mojo/services/window_manager/window_manager_service_impl.h
@@ -15,17 +15,16 @@
class WindowManagerServiceImpl : public InterfaceImpl<WindowManagerService> {
public:
explicit WindowManagerServiceImpl(WindowManagerApp* app);
- virtual ~WindowManagerServiceImpl();
+ ~WindowManagerServiceImpl() override;
private:
// WindowManagerServiceImpl:
- virtual void Embed(
- const String& url,
- InterfaceRequest<ServiceProvider> service_provider) override;
- virtual void OnViewInputEvent(mojo::EventPtr event) override;
+ void Embed(const String& url,
+ InterfaceRequest<ServiceProvider> service_provider) override;
+ void OnViewInputEvent(mojo::EventPtr event) override;
// InterfaceImpl:
- virtual void OnConnectionEstablished() override;
+ void OnConnectionEstablished() override;
WindowManagerApp* app_;
diff --git a/mojo/services/window_manager/window_manager_unittests.cc b/mojo/services/window_manager/window_manager_unittests.cc
index dbd9a48..dd05b45 100644
--- a/mojo/services/window_manager/window_manager_unittests.cc
+++ b/mojo/services/window_manager/window_manager_unittests.cc
@@ -16,10 +16,10 @@
class WindowManagerTestSuite : public base::TestSuite {
public:
WindowManagerTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
- virtual ~WindowManagerTestSuite() {}
+ ~WindowManagerTestSuite() override {}
protected:
- virtual void Initialize() override {
+ void Initialize() override {
#if defined(USE_X11)
// Each test ends up creating a new thread for the native viewport service.
// In other words we'll use X on different threads, so tell it that.
diff --git a/mojo/shell/android/apk/AndroidManifest.xml b/mojo/shell/android/apk/AndroidManifest.xml
index 32b48e9..3c4c3ae 100644
--- a/mojo/shell/android/apk/AndroidManifest.xml
+++ b/mojo/shell/android/apk/AndroidManifest.xml
@@ -23,6 +23,6 @@
</activity>
</application>
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="20" />
+ <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
diff --git a/mojo/shell/app_child_process.cc b/mojo/shell/app_child_process.cc
index 7bf5420..79aaa49 100644
--- a/mojo/shell/app_child_process.cc
+++ b/mojo/shell/app_child_process.cc
@@ -157,7 +157,7 @@
class AppChildControllerImpl : public InterfaceImpl<AppChildController> {
public:
- virtual ~AppChildControllerImpl() {
+ ~AppChildControllerImpl() override {
DCHECK(thread_checker_.CalledOnValidThread());
// TODO(vtl): Pass in the result from |MainMain()|.
@@ -190,13 +190,13 @@
app_context->set_controller(impl.Pass());
}
- virtual void OnConnectionError() override {
+ void OnConnectionError() override {
// TODO(darin): How should we handle a connection error here?
}
// |AppChildController| methods:
- virtual void StartApp(const String& app_path,
- ScopedMessagePipeHandle service) override {
+ void StartApp(const String& app_path,
+ ScopedMessagePipeHandle service) override {
DVLOG(2) << "AppChildControllerImpl::StartApp(" << app_path << ", ...)";
DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/mojo/shell/app_child_process.h b/mojo/shell/app_child_process.h
index 9b3b8cf..5469eda 100644
--- a/mojo/shell/app_child_process.h
+++ b/mojo/shell/app_child_process.h
@@ -16,9 +16,9 @@
class AppChildProcess : public ChildProcess {
public:
AppChildProcess();
- virtual ~AppChildProcess();
+ ~AppChildProcess() override;
- virtual void Main() override;
+ void Main() override;
private:
DISALLOW_COPY_AND_ASSIGN(AppChildProcess);
diff --git a/mojo/shell/app_child_process_host.h b/mojo/shell/app_child_process_host.h
index f65e2a4..65fb154 100644
--- a/mojo/shell/app_child_process_host.h
+++ b/mojo/shell/app_child_process_host.h
@@ -27,7 +27,7 @@
public:
AppChildProcessHost(Context* context,
AppChildControllerClient* controller_client);
- virtual ~AppChildProcessHost();
+ ~AppChildProcessHost() override;
AppChildController* controller() {
return controller_.get();
@@ -35,8 +35,8 @@
private:
// |ChildProcessHost::Delegate| methods:
- virtual void WillStart() override;
- virtual void DidStart(bool success) override;
+ void WillStart() override;
+ void DidStart(bool success) override;
// Callback for |embedder::CreateChannel()|.
void DidCreateChannel(embedder::ChannelInfo* channel_info);
diff --git a/mojo/shell/child_process_host_unittest.cc b/mojo/shell/child_process_host_unittest.cc
index 5223018..2cd24db 100644
--- a/mojo/shell/child_process_host_unittest.cc
+++ b/mojo/shell/child_process_host_unittest.cc
@@ -22,10 +22,10 @@
public:
TestChildProcessHostDelegate() {}
virtual ~TestChildProcessHostDelegate() {}
- virtual void WillStart() override {
+ void WillStart() override {
VLOG(2) << "TestChildProcessHostDelegate::WillStart()";
}
- virtual void DidStart(bool success) override {
+ void DidStart(bool success) override {
VLOG(2) << "TestChildProcessHostDelegate::DidStart(" << success << ")";
base::MessageLoop::current()->QuitWhenIdle();
}
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index b268ffb..3c21980 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -99,9 +99,8 @@
class EmptyServiceProvider : public InterfaceImpl<ServiceProvider> {
private:
- virtual void ConnectToService(
- const mojo::String& service_name,
- ScopedMessagePipeHandle client_handle) override {}
+ void ConnectToService(const mojo::String& service_name,
+ ScopedMessagePipeHandle client_handle) override {}
};
} // namespace
diff --git a/mojo/shell/context.h b/mojo/shell/context.h
index 1f098c7..5b55910 100644
--- a/mojo/shell/context.h
+++ b/mojo/shell/context.h
@@ -29,12 +29,12 @@
class Context : ApplicationManager::Delegate {
public:
Context();
- virtual ~Context();
+ ~Context() override;
void Init();
// ApplicationManager::Delegate override.
- virtual void OnApplicationError(const GURL& gurl) override;
+ void OnApplicationError(const GURL& gurl) override;
void Run(const GURL& url);
ScopedMessagePipeHandle ConnectToServiceByName(
diff --git a/mojo/shell/dynamic_application_loader.cc b/mojo/shell/dynamic_application_loader.cc
index eae422d..1627aa9 100644
--- a/mojo/shell/dynamic_application_loader.cc
+++ b/mojo/shell/dynamic_application_loader.cc
@@ -115,7 +115,7 @@
base::PathExists(path)));
}
- virtual ~LocalLoader() {}
+ ~LocalLoader() override {}
private:
base::WeakPtrFactory<LocalLoader> weak_ptr_factory_;
@@ -152,7 +152,7 @@
weak_ptr_factory_.GetWeakPtr()));
}
- virtual ~NetworkLoader() {
+ ~NetworkLoader() override {
if (!file_.empty())
base::DeleteFile(file_, false);
}
diff --git a/mojo/shell/dynamic_application_loader.h b/mojo/shell/dynamic_application_loader.h
index 6d8df9f..5644100 100644
--- a/mojo/shell/dynamic_application_loader.h
+++ b/mojo/shell/dynamic_application_loader.h
@@ -32,17 +32,17 @@
DynamicApplicationLoader(
Context* context,
scoped_ptr<DynamicServiceRunnerFactory> runner_factory);
- virtual ~DynamicApplicationLoader();
+ ~DynamicApplicationLoader() override;
void RegisterContentHandler(const std::string& mime_type,
const GURL& content_handler_url);
// ApplicationLoader methods:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override;
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override;
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override;
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override;
private:
class Loader;
diff --git a/mojo/shell/dynamic_application_loader_unittest.cc b/mojo/shell/dynamic_application_loader_unittest.cc
index eb2a6ee..693cab1 100644
--- a/mojo/shell/dynamic_application_loader_unittest.cc
+++ b/mojo/shell/dynamic_application_loader_unittest.cc
@@ -30,13 +30,13 @@
explicit TestDynamicServiceRunner(TestState* state) : state_(state) {
state_->runner_was_created = true;
}
- virtual ~TestDynamicServiceRunner() {
+ ~TestDynamicServiceRunner() override {
state_->runner_was_destroyed = true;
base::MessageLoop::current()->Quit();
}
- virtual void Start(const base::FilePath& app_path,
- ScopedMessagePipeHandle service_handle,
- const base::Closure& app_completed_callback) override {
+ void Start(const base::FilePath& app_path,
+ ScopedMessagePipeHandle service_handle,
+ const base::Closure& app_completed_callback) override {
state_->runner_was_started = true;
}
@@ -47,8 +47,8 @@
class TestDynamicServiceRunnerFactory : public DynamicServiceRunnerFactory {
public:
explicit TestDynamicServiceRunnerFactory(TestState* state) : state_(state) {}
- virtual ~TestDynamicServiceRunnerFactory() {}
- virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) override {
+ ~TestDynamicServiceRunnerFactory() override {}
+ scoped_ptr<DynamicServiceRunner> Create(Context* context) override {
return scoped_ptr<DynamicServiceRunner>(
new TestDynamicServiceRunner(state_));
}
diff --git a/mojo/shell/external_application_listener_posix.cc b/mojo/shell/external_application_listener_posix.cc
index 42afa25..8cf4fb8 100644
--- a/mojo/shell/external_application_listener_posix.cc
+++ b/mojo/shell/external_application_listener_posix.cc
@@ -48,16 +48,16 @@
: public InterfaceImpl<ExternalApplicationRegistrar> {
public:
explicit RegistrarImpl(const RegisterCallback& callback);
- virtual ~RegistrarImpl() override;
+ ~RegistrarImpl() override;
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
embedder::ChannelInit channel_init;
private:
- virtual void Register(const String& app_url,
- InterfaceRequest<Shell> shell,
- const mojo::Closure& callback) override;
+ void Register(const String& app_url,
+ InterfaceRequest<Shell> shell,
+ const mojo::Closure& callback) override;
const RegisterCallback register_callback_;
};
diff --git a/mojo/shell/external_application_listener_posix.h b/mojo/shell/external_application_listener_posix.h
index 788a4ff..fee212e 100644
--- a/mojo/shell/external_application_listener_posix.h
+++ b/mojo/shell/external_application_listener_posix.h
@@ -56,26 +56,25 @@
// Some of this class' internal state needs to be destroyed on io_runner_,
// so the destructor will post a task to that thread to call StopListening()
// and then wait for it to complete.
- virtual ~ExternalApplicationListenerPosix();
+ ~ExternalApplicationListenerPosix() override;
// Begin listening (on io_runner) to a socket at listen_socket_path.
// Incoming registration requests will be forwarded to register_callback.
// Errors are ignored.
- virtual void ListenInBackground(
- const base::FilePath& listen_socket_path,
- const RegisterCallback& register_callback) override;
+ void ListenInBackground(const base::FilePath& listen_socket_path,
+ const RegisterCallback& register_callback) override;
// Begin listening (on io_runner) to a socket at listen_socket_path.
// Incoming registration requests will be forwarded to register_callback.
// Errors are reported via error_callback.
- virtual void ListenInBackgroundWithErrorCallback(
+ void ListenInBackgroundWithErrorCallback(
const base::FilePath& listen_socket_path,
const RegisterCallback& register_callback,
const ErrorCallback& error_callback) override;
// Block the current thread until listening has started on io_runner.
// If listening has already started, returns immediately.
- virtual void WaitForListening() override;
+ void WaitForListening() override;
private:
class RegistrarImpl;
@@ -90,8 +89,8 @@
void StopListening(base::WaitableEvent* event);
// Implementation of IncomingConnectionListener::Delegate
- virtual void OnListening(int rv) override;
- virtual void OnConnection(net::SocketDescriptor incoming) override;
+ void OnListening(int rv) override;
+ void OnConnection(net::SocketDescriptor incoming) override;
// If listener_ fails to start listening, this method is run on shell_runner_
// to report the error.
diff --git a/mojo/shell/external_application_listener_unittest.cc b/mojo/shell/external_application_listener_unittest.cc
index 7f675ae..2fc5511 100644
--- a/mojo/shell/external_application_listener_unittest.cc
+++ b/mojo/shell/external_application_listener_unittest.cc
@@ -56,7 +56,7 @@
class StubShellImpl : public InterfaceImpl<Shell> {
private:
- virtual void ConnectToApplication(
+ void ConnectToApplication(
const String& requestor_url,
InterfaceRequest<ServiceProvider> in_service_provider) override {
ServiceProviderPtr out_service_provider;
@@ -106,10 +106,10 @@
: url_(url), to_quit_(loop), quit_callback_(quit_callback) {}
private:
- virtual void Initialize(Array<String> args) override {}
+ void Initialize(Array<String> args) override {}
- virtual void AcceptConnection(const String& requestor_url,
- ServiceProviderPtr p) override {
+ void AcceptConnection(const String& requestor_url,
+ ServiceProviderPtr p) override {
DVLOG(1) << url_ << " accepting connection from " << requestor_url;
to_quit_->PostTask(FROM_HERE, quit_callback_);
}
diff --git a/mojo/shell/external_application_registrar_connection.h b/mojo/shell/external_application_registrar_connection.h
index 327d19b..dbe02e6 100644
--- a/mojo/shell/external_application_registrar_connection.h
+++ b/mojo/shell/external_application_registrar_connection.h
@@ -29,10 +29,10 @@
// Configures client_socket_ to point at socket_path.
explicit ExternalApplicationRegistrarConnection(
const base::FilePath& socket_path);
- virtual ~ExternalApplicationRegistrarConnection();
+ ~ExternalApplicationRegistrarConnection() override;
// Implementation of ErrorHandler
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
// Connects client_socket_ and binds it to registrar_.
// Status code is passed to callback upon success or failure.
diff --git a/mojo/shell/in_process_dynamic_service_runner.h b/mojo/shell/in_process_dynamic_service_runner.h
index 0e0cade..9b93ded 100644
--- a/mojo/shell/in_process_dynamic_service_runner.h
+++ b/mojo/shell/in_process_dynamic_service_runner.h
@@ -22,16 +22,16 @@
public base::DelegateSimpleThread::Delegate {
public:
explicit InProcessDynamicServiceRunner(Context* context);
- virtual ~InProcessDynamicServiceRunner();
+ ~InProcessDynamicServiceRunner() override;
// |DynamicServiceRunner| method:
- virtual void Start(const base::FilePath& app_path,
- ScopedMessagePipeHandle service_handle,
- const base::Closure& app_completed_callback) override;
+ void Start(const base::FilePath& app_path,
+ ScopedMessagePipeHandle service_handle,
+ const base::Closure& app_completed_callback) override;
private:
// |base::DelegateSimpleThread::Delegate| method:
- virtual void Run() override;
+ void Run() override;
base::FilePath app_path_;
ScopedMessagePipeHandle service_handle_;
diff --git a/mojo/shell/incoming_connection_listener_unittest.cc b/mojo/shell/incoming_connection_listener_unittest.cc
index 5488c98..61b0a5e 100644
--- a/mojo/shell/incoming_connection_listener_unittest.cc
+++ b/mojo/shell/incoming_connection_listener_unittest.cc
@@ -25,10 +25,10 @@
class TestDelegate : public IncomingConnectionListenerPosix::Delegate {
public:
TestDelegate() {}
- virtual ~TestDelegate() {}
+ ~TestDelegate() override {}
- virtual void OnListening(int rv) override { EXPECT_EQ(net::OK, rv); }
- virtual void OnConnection(net::SocketDescriptor incoming) override {
+ void OnListening(int rv) override { EXPECT_EQ(net::OK, rv); }
+ void OnConnection(net::SocketDescriptor incoming) override {
EXPECT_NE(net::kInvalidSocket, incoming);
}
};
@@ -38,10 +38,10 @@
: public IncomingConnectionListenerPosix::Delegate {
public:
explicit ListeningFailsDelegate(int expected) : expected_error_(expected) {}
- virtual ~ListeningFailsDelegate() {}
+ ~ListeningFailsDelegate() override {}
- virtual void OnListening(int rv) override { EXPECT_EQ(expected_error_, rv); }
- virtual void OnConnection(net::SocketDescriptor incoming) override {
+ void OnListening(int rv) override { EXPECT_EQ(expected_error_, rv); }
+ void OnConnection(net::SocketDescriptor incoming) override {
FAIL() << "No connection should be attempted.";
}
diff --git a/mojo/shell/out_of_process_dynamic_service_runner.h b/mojo/shell/out_of_process_dynamic_service_runner.h
index 71272e7..94fcd10 100644
--- a/mojo/shell/out_of_process_dynamic_service_runner.h
+++ b/mojo/shell/out_of_process_dynamic_service_runner.h
@@ -22,16 +22,16 @@
public AppChildControllerClient {
public:
explicit OutOfProcessDynamicServiceRunner(Context* context);
- virtual ~OutOfProcessDynamicServiceRunner();
+ ~OutOfProcessDynamicServiceRunner() override;
// |DynamicServiceRunner| method:
- virtual void Start(const base::FilePath& app_path,
- ScopedMessagePipeHandle service_handle,
- const base::Closure& app_completed_callback) override;
+ void Start(const base::FilePath& app_path,
+ ScopedMessagePipeHandle service_handle,
+ const base::Closure& app_completed_callback) override;
private:
// |AppChildControllerClient| method:
- virtual void AppCompleted(int32_t result) override;
+ void AppCompleted(int32_t result) override;
Context* const context_;
diff --git a/mojo/shell/shell_test_base_unittest.cc b/mojo/shell/shell_test_base_unittest.cc
index 9b1a6c1..6c65ba8 100644
--- a/mojo/shell/shell_test_base_unittest.cc
+++ b/mojo/shell/shell_test_base_unittest.cc
@@ -74,10 +74,10 @@
class QuitMessageLoopErrorHandler : public ErrorHandler {
public:
QuitMessageLoopErrorHandler() {}
- virtual ~QuitMessageLoopErrorHandler() {}
+ ~QuitMessageLoopErrorHandler() override {}
// |ErrorHandler| implementation:
- virtual void OnConnectionError() override {
+ void OnConnectionError() override {
base::MessageLoop::current()->QuitWhenIdle();
}
diff --git a/mojo/shell/test_child_process.h b/mojo/shell/test_child_process.h
index c3acb9b..5b3c9dd 100644
--- a/mojo/shell/test_child_process.h
+++ b/mojo/shell/test_child_process.h
@@ -14,9 +14,9 @@
class TestChildProcess : public ChildProcess {
public:
TestChildProcess();
- virtual ~TestChildProcess();
+ ~TestChildProcess() override;
- virtual void Main() override;
+ void Main() override;
private:
DISALLOW_COPY_AND_ASSIGN(TestChildProcess);
diff --git a/mojo/shell/ui_application_loader_android.h b/mojo/shell/ui_application_loader_android.h
index bed36ca..9b88410 100644
--- a/mojo/shell/ui_application_loader_android.h
+++ b/mojo/shell/ui_application_loader_android.h
@@ -24,14 +24,14 @@
public:
UIApplicationLoader(scoped_ptr<ApplicationLoader> real_loader,
shell::Context* context);
- virtual ~UIApplicationLoader();
+ ~UIApplicationLoader() override;
// ApplicationLoader overrides:
- virtual void Load(ApplicationManager* manager,
- const GURL& url,
- scoped_refptr<LoadCallbacks> callbacks) override;
- virtual void OnApplicationError(ApplicationManager* manager,
- const GURL& url) override;
+ void Load(ApplicationManager* manager,
+ const GURL& url,
+ scoped_refptr<LoadCallbacks> callbacks) override;
+ void OnApplicationError(ApplicationManager* manager,
+ const GURL& url) override;
private:
class UILoader;
diff --git a/mojo/spy/spy.cc b/mojo/spy/spy.cc
index 4049fd6..694500a 100644
--- a/mojo/spy/spy.cc
+++ b/mojo/spy/spy.cc
@@ -239,8 +239,9 @@
websocket_delegate_(websocket_delegate) {}
private:
- virtual mojo::ServiceProviderPtr OnConnectToClient(
- const GURL& url, mojo::ServiceProviderPtr real_client) override {
+ mojo::ServiceProviderPtr OnConnectToClient(
+ const GURL& url,
+ mojo::ServiceProviderPtr real_client) override {
if (!MustIntercept(url))
return real_client.Pass();
diff --git a/mojo/spy/spy_server_impl.h b/mojo/spy/spy_server_impl.h
index 20d355e..9c1f1ce 100644
--- a/mojo/spy/spy_server_impl.h
+++ b/mojo/spy/spy_server_impl.h
@@ -21,20 +21,19 @@
SpyServerImpl();
// spy_api::SpyServer implementation.
- virtual void StartSession(
- spy_api::VersionPtr version,
- const mojo::Callback<void(spy_api::Result,
- mojo::String)>& callback) override;
+ void StartSession(spy_api::VersionPtr version,
+ const mojo::Callback<void(spy_api::Result, mojo::String)>&
+ callback) override;
- virtual void StopSession(
+ void StopSession(
const mojo::Callback<void(spy_api::Result)>& callback) override;
- virtual void TrackConnection(
+ void TrackConnection(
uint32_t id,
spy_api::ConnectionOptions options,
const mojo::Callback<void(spy_api::Result)>& callback) override;
- virtual void OnConnectionError() override;
+ void OnConnectionError() override;
// SpyServerImpl own methods.
void OnIntercept(const GURL& url);
@@ -43,7 +42,7 @@
private:
friend class base::RefCounted<SpyServerImpl>;
- virtual ~SpyServerImpl();
+ ~SpyServerImpl() override;
// Item models the entities that we track by IDs.
struct Item;
diff --git a/mojo/spy/websocket_server.h b/mojo/spy/websocket_server.h
index c6dc076..879682d 100644
--- a/mojo/spy/websocket_server.h
+++ b/mojo/spy/websocket_server.h
@@ -25,7 +25,7 @@
public:
// Pass 0 in |port| to listen in one available port.
explicit WebSocketServer(int port, ScopedMessagePipeHandle server_pipe);
- virtual ~WebSocketServer();
+ ~WebSocketServer() override;
// Begin accepting HTTP requests. Must be called from an IO MessageLoop.
bool Start();
// Returns the listening port, useful if 0 was passed to the contructor.
@@ -39,26 +39,21 @@
protected:
// Overridden from net::HttpServer::Delegate.
- virtual void OnConnect(int connection_id) override {}
- virtual void OnHttpRequest(
- int connection_id,
- const net::HttpServerRequestInfo& info) override;
- virtual void OnWebSocketRequest(
- int connection_id,
- const net::HttpServerRequestInfo& info) override;
- virtual void OnWebSocketMessage(
- int connection_id,
- const std::string& data) override;
- virtual void OnClose(int connection_id) override;
+ void OnConnect(int connection_id) override {}
+ void OnHttpRequest(int connection_id,
+ const net::HttpServerRequestInfo& info) override;
+ void OnWebSocketRequest(int connection_id,
+ const net::HttpServerRequestInfo& info) override;
+ void OnWebSocketMessage(int connection_id, const std::string& data) override;
+ void OnClose(int connection_id) override;
// Overriden form spy_api::SpyClient.
- virtual void OnFatalError(spy_api::Result result) override;
- virtual void OnSessionEnd(spy_api::Result result) override;
- virtual void OnClientConnection(
- const mojo::String& name,
- uint32_t id,
- spy_api::ConnectionOptions options) override;
- virtual void OnMessage(spy_api::MessagePtr message) override;
+ void OnFatalError(spy_api::Result result) override;
+ void OnSessionEnd(spy_api::Result result) override;
+ void OnClientConnection(const mojo::String& name,
+ uint32_t id,
+ spy_api::ConnectionOptions options) override;
+ void OnMessage(spy_api::MessagePtr message) override;
// Callbacks from calling spy_api::SpyServer.
void OnStartSession(spy_api::Result, mojo::String);
diff --git a/mojo/tools/mojob.sh b/mojo/tools/mojob.sh
index 7092c79..f1c5d6e 100755
--- a/mojo/tools/mojob.sh
+++ b/mojo/tools/mojob.sh
@@ -101,9 +101,20 @@
GOMA=auto
make_gn_args() {
local args=()
+ # TODO(vtl): It's a bit of a hack to infer the build type from the output
+ # directory name, but it's what we have right now (since we support "debug and
+ # release" mode).
+ case "$1" in
+ Debug)
+ # (Default.)
+ ;;
+ Release)
+ args+=("is_debug=false")
+ ;;
+ esac
case "$COMPILER" in
clang)
- args+=("is_clang=true")
+ # (Default.)
;;
gcc)
args+=("is_clang=false")
@@ -116,11 +127,11 @@
elif [ -d "${HOME}/goma" ]; then
args+=("use_goma=true" "goma_dir=\"${HOME}/goma\"")
else
- args+=("use_goma=false")
+ : # (Default.)
fi
;;
disabled)
- args+=("use_goma=false")
+ # (Default.)
;;
esac
echo "${args[*]}"
diff --git a/net/base/backoff_entry_unittest.cc b/net/base/backoff_entry_unittest.cc
index f5393e8..89ec2c4 100644
--- a/net/base/backoff_entry_unittest.cc
+++ b/net/base/backoff_entry_unittest.cc
@@ -23,11 +23,9 @@
SetCustomReleaseTime(TimeTicks());
}
- virtual ~TestBackoffEntry() {}
+ ~TestBackoffEntry() override {}
- virtual TimeTicks ImplGetTimeNow() const override {
- return now_;
- }
+ TimeTicks ImplGetTimeNow() const override { return now_; }
void set_now(const TimeTicks& now) {
now_ = now;
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index a58b6ff..5977533 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -72,7 +72,7 @@
typedef std::vector<CapturedEntry> CapturedEntryList;
CapturingNetLog();
- virtual ~CapturingNetLog();
+ ~CapturingNetLog() override;
void SetLogLevel(LogLevel log_level);
@@ -89,7 +89,7 @@
class Observer : public NetLog::ThreadSafeObserver {
public:
Observer();
- virtual ~Observer();
+ ~Observer() override;
// Returns the list of all entries in the log.
void GetEntries(CapturedEntryList* entry_list) const;
@@ -105,7 +105,7 @@
private:
// ThreadSafeObserver implementation:
- virtual void OnAddEntry(const Entry& entry) override;
+ void OnAddEntry(const Entry& entry) override;
// Needs to be "mutable" so can use it in GetEntries().
mutable base::Lock lock_;
diff --git a/net/base/chunked_upload_data_stream.h b/net/base/chunked_upload_data_stream.h
index 71b1e5c..d17c8da 100644
--- a/net/base/chunked_upload_data_stream.h
+++ b/net/base/chunked_upload_data_stream.h
@@ -25,7 +25,7 @@
public:
ChunkedUploadDataStream(int64 identifier);
- virtual ~ChunkedUploadDataStream();
+ ~ChunkedUploadDataStream() override;
// Adds data to the stream. |is_done| should be true if this is the last
// data to be appended. |data_len| must not be 0 unless |is_done| is true.
@@ -35,9 +35,9 @@
private:
// UploadDataStream implementation.
- virtual int InitInternal() override;
- virtual int ReadInternal(IOBuffer* buf, int buf_len) override;
- virtual void ResetInternal() override;
+ int InitInternal() override;
+ int ReadInternal(IOBuffer* buf, int buf_len) override;
+ void ResetInternal() override;
int ReadChunk(IOBuffer* buf, int buf_len);
diff --git a/net/base/directory_lister_unittest.cc b/net/base/directory_lister_unittest.cc
index f52e23e..98ecbbd 100644
--- a/net/base/directory_lister_unittest.cc
+++ b/net/base/directory_lister_unittest.cc
@@ -27,15 +27,14 @@
quit_loop_after_each_file_(quit_loop_after_each_file) {
}
- virtual void OnListFile(
- const DirectoryLister::DirectoryListerData& data) override {
+ void OnListFile(const DirectoryLister::DirectoryListerData& data) override {
file_list_.push_back(data.info);
paths_.push_back(data.path);
if (quit_loop_after_each_file_)
base::MessageLoop::current()->Quit();
}
- virtual void OnListDone(int error) override {
+ void OnListDone(int error) override {
error_ = error;
base::MessageLoop::current()->Quit();
if (recursive_)
diff --git a/net/base/elements_upload_data_stream.h b/net/base/elements_upload_data_stream.h
index 1a008fc..5101114 100644
--- a/net/base/elements_upload_data_stream.h
+++ b/net/base/elements_upload_data_stream.h
@@ -26,7 +26,7 @@
ElementsUploadDataStream(ScopedVector<UploadElementReader> element_readers,
int64 identifier);
- virtual ~ElementsUploadDataStream();
+ ~ElementsUploadDataStream() override;
// Creates an ElementsUploadDataStream with a single reader. Returns a
// scoped_ptr<UploadDataStream> for ease of use.
@@ -36,12 +36,11 @@
private:
// UploadDataStream implementation.
- virtual bool IsInMemory() const override;
- virtual const ScopedVector<UploadElementReader>*
- GetElementReaders() const override;
- virtual int InitInternal() override;
- virtual int ReadInternal(IOBuffer* buf, int buf_len) override;
- virtual void ResetInternal() override;
+ bool IsInMemory() const override;
+ const ScopedVector<UploadElementReader>* GetElementReaders() const override;
+ int InitInternal() override;
+ int ReadInternal(IOBuffer* buf, int buf_len) override;
+ void ResetInternal() override;
// Runs Init() for all element readers.
// This method is used to implement InitInternal().
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index 2d87058..04bbc88 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -104,7 +104,7 @@
// constructor IOBuffer(char*) thus allowing subclass to use underlying
// memory it does not own.
IOBufferWithSize(char* data, int size);
- virtual ~IOBufferWithSize();
+ ~IOBufferWithSize() override;
int size_;
};
@@ -119,7 +119,7 @@
int size() const { return static_cast<int>(string_data_.size()); }
private:
- virtual ~StringIOBuffer();
+ ~StringIOBuffer() override;
std::string string_data_;
};
@@ -162,7 +162,7 @@
int size() const { return size_; }
private:
- virtual ~DrainableIOBuffer();
+ ~DrainableIOBuffer() override;
scoped_refptr<IOBuffer> base_;
int size_;
@@ -202,7 +202,7 @@
char* StartOfBuffer();
private:
- virtual ~GrowableIOBuffer();
+ ~GrowableIOBuffer() override;
scoped_ptr<char, base::FreeDeleter> real_data_;
int capacity_;
@@ -222,7 +222,7 @@
void Done();
private:
- virtual ~PickledIOBuffer();
+ ~PickledIOBuffer() override;
Pickle pickle_;
};
@@ -237,7 +237,7 @@
explicit WrappedIOBuffer(const char* data);
protected:
- virtual ~WrappedIOBuffer();
+ ~WrappedIOBuffer() override;
};
} // namespace net
diff --git a/net/base/mock_file_stream.h b/net/base/mock_file_stream.h
index abceb1b..7b7dea8 100644
--- a/net/base/mock_file_stream.h
+++ b/net/base/mock_file_stream.h
@@ -25,18 +25,19 @@
explicit MockFileStream(const scoped_refptr<base::TaskRunner>& task_runner);
MockFileStream(base::File file,
const scoped_refptr<base::TaskRunner>& task_runner);
- virtual ~MockFileStream();
+ ~MockFileStream() override;
// FileStream methods.
- virtual int Seek(base::File::Whence whence, int64 offset,
- const Int64CompletionCallback& callback) override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Flush(const CompletionCallback& callback) override;
+ int Seek(base::File::Whence whence,
+ int64 offset,
+ const Int64CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Flush(const CompletionCallback& callback) override;
void set_forced_error_async(int error) {
forced_error_ = error;
diff --git a/net/base/net_log_logger.h b/net/base/net_log_logger.h
index 6604b82..406841e 100644
--- a/net/base/net_log_logger.h
+++ b/net/base/net_log_logger.h
@@ -28,7 +28,7 @@
// starts. |file| must be non-NULL handle and be open for writing.
// |constants| is a legend for decoding constant values used in the log.
NetLogLogger(FILE* file, const base::Value& constants);
- virtual ~NetLogLogger();
+ ~NetLogLogger() override;
// Sets the log level to log at. Must be called before StartObserving.
void set_log_level(NetLog::LogLevel log_level);
@@ -41,7 +41,7 @@
void StopObserving();
// net::NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const NetLog::Entry& entry) override;
+ void OnAddEntry(const NetLog::Entry& entry) override;
// Create a dictionary containing legend for net/ constants. Caller takes
// ownership of returned value.
diff --git a/net/base/net_log_unittest.cc b/net/base/net_log_unittest.cc
index d1e7dde..0f5b0eb 100644
--- a/net/base/net_log_unittest.cc
+++ b/net/base/net_log_unittest.cc
@@ -75,14 +75,12 @@
public:
CountingObserver() : count_(0) {}
- virtual ~CountingObserver() {
+ ~CountingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
- ++count_;
- }
+ void OnAddEntry(const NetLog::Entry& entry) override { ++count_; }
int count() const { return count_; }
@@ -94,12 +92,12 @@
public:
LoggingObserver() {}
- virtual ~LoggingObserver() {
+ ~LoggingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
+ void OnAddEntry(const NetLog::Entry& entry) override {
base::Value* value = entry.ToValue();
base::DictionaryValue* dict = NULL;
ASSERT_TRUE(value->GetAsDictionary(&dict));
@@ -138,7 +136,7 @@
net_log_ = net_log;
}
- virtual void Run() override {
+ void Run() override {
start_event_->Wait();
RunTestThread();
}
@@ -162,10 +160,10 @@
class AddEventsTestThread : public NetLogTestThread {
public:
AddEventsTestThread() {}
- virtual ~AddEventsTestThread() {}
+ ~AddEventsTestThread() override {}
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i)
AddEvent(net_log_);
}
@@ -178,12 +176,10 @@
public:
AddRemoveObserverTestThread() {}
- virtual ~AddRemoveObserverTestThread() {
- EXPECT_TRUE(!observer_.net_log());
- }
+ ~AddRemoveObserverTestThread() override { EXPECT_TRUE(!observer_.net_log()); }
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i) {
ASSERT_FALSE(observer_.net_log());
diff --git a/net/base/net_util_icu.cc b/net/base/net_util_icu.cc
index bd5625b..8526eda 100644
--- a/net/base/net_util_icu.cc
+++ b/net/base/net_util_icu.cc
@@ -491,7 +491,7 @@
}
private:
- virtual base::string16 Execute(
+ base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const override {
return IDNToUnicodeWithAdjustments(component_text, languages_,
@@ -508,7 +508,7 @@
}
private:
- virtual base::string16 Execute(
+ base::string16 Execute(
const std::string& component_text,
base::OffsetAdjuster::Adjustments* adjustments) const override {
return (unescape_rules_ == UnescapeRule::NONE) ?
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index bea6759..afd6b23 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -45,7 +45,7 @@
class MockNetworkChangeNotifier : public NetworkChangeNotifier {
public:
- virtual ConnectionType GetCurrentConnectionType() const override {
+ ConnectionType GetCurrentConnectionType() const override {
return CONNECTION_UNKNOWN;
}
};
@@ -83,7 +83,7 @@
NetworkChangeNotifier::AddNetworkChangeObserver(this);
}
- virtual ~HistogramWatcher() {
+ ~HistogramWatcher() override {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(g_network_change_notifier);
NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
@@ -93,7 +93,7 @@
}
// NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
+ void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.IPAddressChange",
SinceLast(&last_ip_address_change_));
@@ -103,7 +103,7 @@
}
// NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeTicks now = base::TimeTicks::Now();
@@ -264,15 +264,14 @@
}
// NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged() override {
+ void OnDNSChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.DNSConfigChange",
SinceLast(&last_dns_change_));
}
// NetworkChangeNotifier::NetworkChangeObserver implementation.
- virtual void OnNetworkChanged(
- NetworkChangeNotifier::ConnectionType type) override {
+ void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
if (type != NetworkChangeNotifier::CONNECTION_NONE) {
UMA_HISTOGRAM_MEDIUM_TIMES("NCN.NetworkOnlineChange",
@@ -424,7 +423,7 @@
AddIPAddressObserver(this);
}
- virtual ~NetworkChangeCalculator() {
+ ~NetworkChangeCalculator() override {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(g_network_change_notifier);
RemoveConnectionTypeObserver(this);
@@ -432,7 +431,7 @@
}
// NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
+ void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
? params_.ip_address_offline_delay_ : params_.ip_address_online_delay_;
@@ -441,7 +440,7 @@
}
// NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(ConnectionType type) override {
+ void OnConnectionTypeChanged(ConnectionType type) override {
DCHECK(thread_checker_.CalledOnValidThread());
pending_connection_type_ = type;
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc
index e378418..14ec554 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -43,18 +43,14 @@
public:
DnsConfigServiceThread() : base::Thread("DnsConfigService") {}
- virtual ~DnsConfigServiceThread() {
- Stop();
- }
+ ~DnsConfigServiceThread() override { Stop(); }
- virtual void Init() override {
+ void Init() override {
service_ = DnsConfigService::CreateSystemService();
service_->WatchConfig(base::Bind(&NetworkChangeNotifier::SetDnsConfig));
}
- virtual void CleanUp() override {
- service_.reset();
- }
+ void CleanUp() override { service_.reset(); }
private:
scoped_ptr<DnsConfigService> service_;
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 1598c4c..6f34087 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -21,10 +21,10 @@
class NetworkChangeNotifierMac: public NetworkChangeNotifier {
public:
NetworkChangeNotifierMac();
- virtual ~NetworkChangeNotifierMac();
+ ~NetworkChangeNotifierMac() override;
// NetworkChangeNotifier implementation:
- virtual ConnectionType GetCurrentConnectionType() const override;
+ ConnectionType GetCurrentConnectionType() const override;
// Forwarder just exists to keep the NetworkConfigWatcherMac API out of
// NetworkChangeNotifierMac's public API.
@@ -34,11 +34,10 @@
: net_config_watcher_(net_config_watcher) {}
// NetworkConfigWatcherMac::Delegate implementation:
- virtual void Init() override;
- virtual void StartReachabilityNotifications() override;
- virtual void SetDynamicStoreNotificationKeys(
- SCDynamicStoreRef store) override;
- virtual void OnNetworkConfigChange(CFArrayRef changed_keys) override;
+ void Init() override;
+ void StartReachabilityNotifications() override;
+ void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) override;
+ void OnNetworkConfigChange(CFArrayRef changed_keys) override;
private:
NetworkChangeNotifierMac* const net_config_watcher_;
diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc
index 7d2377c..bdf75c3 100644
--- a/net/base/network_config_watcher_mac.cc
+++ b/net/base/network_config_watcher_mac.cc
@@ -31,12 +31,12 @@
class NetworkConfigWatcherMacThread : public base::Thread {
public:
NetworkConfigWatcherMacThread(NetworkConfigWatcherMac::Delegate* delegate);
- virtual ~NetworkConfigWatcherMacThread();
+ ~NetworkConfigWatcherMacThread() override;
protected:
// base::Thread
- virtual void Init() override;
- virtual void CleanUp() override;
+ void Init() override;
+ void CleanUp() override;
private:
// The SystemConfiguration calls in this function can lead to contention early
diff --git a/net/base/prioritized_dispatcher_unittest.cc b/net/base/prioritized_dispatcher_unittest.cc
index 4cdf53b..40c7425 100644
--- a/net/base/prioritized_dispatcher_unittest.cc
+++ b/net/base/prioritized_dispatcher_unittest.cc
@@ -117,7 +117,7 @@
}
// PriorityDispatch::Job interface
- virtual void Start() override {
+ void Start() override {
EXPECT_FALSE(running_);
handle_ = PrioritizedDispatcher::Handle();
running_ = true;
diff --git a/net/base/sdch_dictionary_fetcher.h b/net/base/sdch_dictionary_fetcher.h
index 86aaf48..d74f643 100644
--- a/net/base/sdch_dictionary_fetcher.h
+++ b/net/base/sdch_dictionary_fetcher.h
@@ -41,15 +41,15 @@
// this object.
SdchDictionaryFetcher(SdchFetcher::Delegate* consumer,
URLRequestContext* context);
- virtual ~SdchDictionaryFetcher();
+ ~SdchDictionaryFetcher() override;
// Implementation of SdchFetcher methods.
- virtual void Schedule(const GURL& dictionary_url) override;
- virtual void Cancel() override;
+ void Schedule(const GURL& dictionary_url) override;
+ void Cancel() override;
// Implementation of URLRequest::Delegate methods.
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
enum State {
diff --git a/net/base/sdch_dictionary_fetcher_unittest.cc b/net/base/sdch_dictionary_fetcher_unittest.cc
index a8b3040..af66681 100644
--- a/net/base/sdch_dictionary_fetcher_unittest.cc
+++ b/net/base/sdch_dictionary_fetcher_unittest.cc
@@ -58,11 +58,11 @@
static int jobs_requested() { return jobs_requested_; }
private:
- virtual ~URLRequestSpecifiedResponseJob() {};
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override {
+ ~URLRequestSpecifiedResponseJob() override{};
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override {
GURL url(request_->url());
*data = ExpectedResponseForURL(url);
return OK;
@@ -86,8 +86,8 @@
GURL dictionary_url;
};
- virtual void AddSdchDictionary(const std::string& dictionary_text,
- const GURL& dictionary_url) override {
+ void AddSdchDictionary(const std::string& dictionary_text,
+ const GURL& dictionary_url) override {
dictionary_additions.push_back(
DictionaryAdditions(dictionary_text, dictionary_url));
}
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 18f6749..b5f901b 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -252,7 +252,7 @@
};
SdchManager();
- virtual ~SdchManager();
+ ~SdchManager() override;
// Clear data (for browser data removal).
void ClearData();
@@ -355,8 +355,8 @@
// dictionaries. This addition will fail if addition is illegal
// (data in the dictionary is not acceptable from the
// dictionary_url; dictionary already added, etc.).
- virtual void AddSdchDictionary(const std::string& dictionary_text,
- const GURL& dictionary_url) override;
+ void AddSdchDictionary(const std::string& dictionary_text,
+ const GURL& dictionary_url) override;
private:
struct BlacklistInfo {
diff --git a/net/base/test_completion_callback.h b/net/base/test_completion_callback.h
index 469d12f..f5a9f8d 100644
--- a/net/base/test_completion_callback.h
+++ b/net/base/test_completion_callback.h
@@ -87,7 +87,7 @@
class TestCompletionCallback : public TestCompletionCallbackBase {
public:
TestCompletionCallback();
- virtual ~TestCompletionCallback();
+ ~TestCompletionCallback() override;
const CompletionCallback& callback() const { return callback_; }
@@ -100,7 +100,7 @@
class TestInt64CompletionCallback : public TestInt64CompletionCallbackBase {
public:
TestInt64CompletionCallback();
- virtual ~TestInt64CompletionCallback();
+ ~TestInt64CompletionCallback() override;
const Int64CompletionCallback& callback() const { return callback_; }
@@ -114,10 +114,10 @@
class ReleaseBufferCompletionCallback: public TestCompletionCallback {
public:
explicit ReleaseBufferCompletionCallback(IOBuffer* buffer);
- virtual ~ReleaseBufferCompletionCallback();
+ ~ReleaseBufferCompletionCallback() override;
private:
- virtual void SetResult(int result) override;
+ void SetResult(int result) override;
IOBuffer* buffer_;
DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback);
diff --git a/net/base/trace_net_log_observer.cc b/net/base/trace_net_log_observer.cc
index 77945fb..15960c3 100644
--- a/net/base/trace_net_log_observer.cc
+++ b/net/base/trace_net_log_observer.cc
@@ -24,9 +24,9 @@
explicit TracedValue(scoped_ptr<base::Value> value) : value_(value.Pass()) {}
private:
- virtual ~TracedValue() {}
+ ~TracedValue() override {}
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
if (value_) {
std::string tmp;
base::JSONWriter::Write(value_.get(), &tmp);
diff --git a/net/base/trace_net_log_observer.h b/net/base/trace_net_log_observer.h
index 567ba3f..9fc062b 100644
--- a/net/base/trace_net_log_observer.h
+++ b/net/base/trace_net_log_observer.h
@@ -19,10 +19,10 @@
public base::debug::TraceLog::EnabledStateObserver {
public:
TraceNetLogObserver();
- virtual ~TraceNetLogObserver();
+ ~TraceNetLogObserver() override;
// net::NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const NetLog::Entry& entry) override;
+ void OnAddEntry(const NetLog::Entry& entry) override;
// Start to watch for TraceLog enable and disable events.
// This can't be called if already watching for events.
@@ -35,8 +35,8 @@
void StopWatchForTraceStart();
// base::debug::TraceLog::EnabledStateChangedObserver implementation:
- virtual void OnTraceLogEnabled() override;
- virtual void OnTraceLogDisabled() override;
+ void OnTraceLogEnabled() override;
+ void OnTraceLogDisabled() override;
private:
NetLog* net_log_to_watch_;
diff --git a/net/base/upload_bytes_element_reader.h b/net/base/upload_bytes_element_reader.h
index 589e287..3246d12 100644
--- a/net/base/upload_bytes_element_reader.h
+++ b/net/base/upload_bytes_element_reader.h
@@ -20,20 +20,20 @@
class NET_EXPORT UploadBytesElementReader : public UploadElementReader {
public:
UploadBytesElementReader(const char* bytes, uint64 length);
- virtual ~UploadBytesElementReader();
+ ~UploadBytesElementReader() override;
const char* bytes() const { return bytes_; }
uint64 length() const { return length_; }
// UploadElementReader overrides:
- virtual const UploadBytesElementReader* AsBytesReader() const override;
- virtual int Init(const CompletionCallback& callback) override;
- virtual uint64 GetContentLength() const override;
- virtual uint64 BytesRemaining() const override;
- virtual bool IsInMemory() const override;
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override;
+ const UploadBytesElementReader* AsBytesReader() const override;
+ int Init(const CompletionCallback& callback) override;
+ uint64 GetContentLength() const override;
+ uint64 BytesRemaining() const override;
+ bool IsInMemory() const override;
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override;
private:
const char* const bytes_;
@@ -49,7 +49,7 @@
public:
// |data| is cleared by this ctor.
explicit UploadOwnedBytesElementReader(std::vector<char>* data);
- virtual ~UploadOwnedBytesElementReader();
+ ~UploadOwnedBytesElementReader() override;
// Creates UploadOwnedBytesElementReader with a string.
static UploadOwnedBytesElementReader* CreateWithString(
diff --git a/net/base/upload_file_element_reader.h b/net/base/upload_file_element_reader.h
index dc27585..fc3f334 100644
--- a/net/base/upload_file_element_reader.h
+++ b/net/base/upload_file_element_reader.h
@@ -32,7 +32,7 @@
uint64 range_offset,
uint64 range_length,
const base::Time& expected_modification_time);
- virtual ~UploadFileElementReader();
+ ~UploadFileElementReader() override;
const base::FilePath& path() const { return path_; }
uint64 range_offset() const { return range_offset_; }
@@ -42,13 +42,13 @@
}
// UploadElementReader overrides:
- virtual const UploadFileElementReader* AsFileReader() const override;
- virtual int Init(const CompletionCallback& callback) override;
- virtual uint64 GetContentLength() const override;
- virtual uint64 BytesRemaining() const override;
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override;
+ const UploadFileElementReader* AsFileReader() const override;
+ int Init(const CompletionCallback& callback) override;
+ uint64 GetContentLength() const override;
+ uint64 BytesRemaining() const override;
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override;
private:
FRIEND_TEST_ALL_PREFIXES(ElementsUploadDataStreamTest, FileSmallerThanLength);
diff --git a/net/cert/cert_verify_proc_mac.h b/net/cert/cert_verify_proc_mac.h
index f26768f..5cd7f4c 100644
--- a/net/cert/cert_verify_proc_mac.h
+++ b/net/cert/cert_verify_proc_mac.h
@@ -15,18 +15,18 @@
public:
CertVerifyProcMac();
- virtual bool SupportsAdditionalTrustAnchors() const override;
+ bool SupportsAdditionalTrustAnchors() const override;
protected:
- virtual ~CertVerifyProcMac();
+ ~CertVerifyProcMac() override;
private:
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override;
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override;
};
} // namespace net
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc
index a71aa9a..4031eac 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -58,18 +58,18 @@
: is_well_known_(is_well_known) {}
// CertVerifyProc implementation:
- virtual bool SupportsAdditionalTrustAnchors() const override { return false; }
+ bool SupportsAdditionalTrustAnchors() const override { return false; }
protected:
- virtual ~WellKnownCaCertVerifyProc() {}
+ ~WellKnownCaCertVerifyProc() override {}
private:
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override;
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override;
const bool is_well_known_;
diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h
index e76f78f..000da11 100644
--- a/net/cert/mock_cert_verifier.h
+++ b/net/cert/mock_cert_verifier.h
@@ -22,18 +22,18 @@
// handle a certificate or certificate and host.
MockCertVerifier();
- virtual ~MockCertVerifier();
+ ~MockCertVerifier() override;
// CertVerifier implementation
- virtual int Verify(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- CertVerifyResult* verify_result,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
+ int Verify(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ CertVerifyResult* verify_result,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
// Sets the default return value for Verify() for certificates/hosts that do
// not have explicit results added via the AddResult*() methods.
diff --git a/net/cert/multi_log_ct_verifier.h b/net/cert/multi_log_ct_verifier.h
index 70adf52..85bfa63 100644
--- a/net/cert/multi_log_ct_verifier.h
+++ b/net/cert/multi_log_ct_verifier.h
@@ -31,17 +31,17 @@
class NET_EXPORT MultiLogCTVerifier : public CTVerifier {
public:
MultiLogCTVerifier();
- virtual ~MultiLogCTVerifier();
+ ~MultiLogCTVerifier() override;
void AddLog(scoped_ptr<CTLogVerifier> log_verifier);
void AddLogs(ScopedVector<CTLogVerifier> log_verifiers);
// CTVerifier implementation:
- virtual int Verify(X509Certificate* cert,
- const std::string& stapled_ocsp_response,
- const std::string& sct_list_from_tls_extension,
- ct::CTVerifyResult* result,
- const BoundNetLog& net_log) override;
+ int Verify(X509Certificate* cert,
+ const std::string& stapled_ocsp_response,
+ const std::string& sct_list_from_tls_extension,
+ ct::CTVerifyResult* result,
+ const BoundNetLog& net_log) override;
private:
// Mapping from a log's ID to the verifier for this log.
diff --git a/net/cert/multi_threaded_cert_verifier.h b/net/cert/multi_threaded_cert_verifier.h
index 2ca10f1..6880960 100644
--- a/net/cert/multi_threaded_cert_verifier.h
+++ b/net/cert/multi_threaded_cert_verifier.h
@@ -41,7 +41,7 @@
// When the verifier is destroyed, all certificate verifications requests are
// canceled, and their completion callbacks will not be called.
- virtual ~MultiThreadedCertVerifier();
+ ~MultiThreadedCertVerifier() override;
// Configures a source of additional certificates that should be treated as
// trust anchors during verification, provided that the underlying
@@ -54,16 +54,16 @@
CertTrustAnchorProvider* trust_anchor_provider);
// CertVerifier implementation
- virtual int Verify(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- CertVerifyResult* verify_result,
- const CompletionCallback& callback,
- CertVerifier::RequestHandle* out_req,
- const BoundNetLog& net_log) override;
+ int Verify(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ CertVerifyResult* verify_result,
+ const CompletionCallback& callback,
+ CertVerifier::RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(CertVerifier::RequestHandle req) override;
+ void CancelRequest(CertVerifier::RequestHandle req) override;
private:
friend class CertVerifierWorker; // Calls HandleResult.
@@ -137,7 +137,7 @@
const CertVerifyResult& verify_result);
// CertDatabase::Observer methods:
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
// For unit testing.
void ClearCache() { cache_.Clear(); }
diff --git a/net/cert/multi_threaded_cert_verifier_unittest.cc b/net/cert/multi_threaded_cert_verifier_unittest.cc
index cdf9b1d..bac47b0 100644
--- a/net/cert/multi_threaded_cert_verifier_unittest.cc
+++ b/net/cert/multi_threaded_cert_verifier_unittest.cc
@@ -36,19 +36,17 @@
MockCertVerifyProc() {}
private:
- virtual ~MockCertVerifyProc() {}
+ ~MockCertVerifyProc() override {}
// CertVerifyProc implementation
- virtual bool SupportsAdditionalTrustAnchors() const override {
- return false;
- }
+ bool SupportsAdditionalTrustAnchors() const override { return false; }
- virtual int VerifyInternal(X509Certificate* cert,
- const std::string& hostname,
- int flags,
- CRLSet* crl_set,
- const CertificateList& additional_trust_anchors,
- CertVerifyResult* verify_result) override {
+ int VerifyInternal(X509Certificate* cert,
+ const std::string& hostname,
+ int flags,
+ CRLSet* crl_set,
+ const CertificateList& additional_trust_anchors,
+ CertVerifyResult* verify_result) override {
verify_result->Reset();
verify_result->verified_cert = cert;
verify_result->cert_status = CERT_STATUS_COMMON_NAME_INVALID;
diff --git a/net/cert/x509_certificate.h b/net/cert/x509_certificate.h
index 97906ed..008de71 100644
--- a/net/cert/x509_certificate.h
+++ b/net/cert/x509_certificate.h
@@ -395,6 +395,10 @@
// the same.
static SHA1HashValue CalculateFingerprint(OSCertHandle cert_handle);
+ // Calculates the SHA-256 fingerprint of the certificate. Returns an empty
+ // (all zero) fingerprint on failure.
+ static SHA256HashValue CalculateFingerprint256(OSCertHandle cert_handle);
+
// Calculates the SHA-1 fingerprint of the intermediate CA certificates.
// Returns an empty (all zero) fingerprint on failure.
//
diff --git a/net/cert/x509_certificate_ios.cc b/net/cert/x509_certificate_ios.cc
index f59cb65..b0908b7 100644
--- a/net/cert/x509_certificate_ios.cc
+++ b/net/cert/x509_certificate_ios.cc
@@ -186,6 +186,22 @@
}
// static
+SHA256HashValue X509Certificate::CalculateFingerprint256(OSCertHandle cert) {
+ SHA256HashValue sha256;
+ memset(sha256.data, 0, sizeof(sha256.data));
+
+ ScopedCFTypeRef<CFDataRef> cert_data(SecCertificateCopyData(cert));
+ if (!cert_data)
+ return sha256;
+ DCHECK(CFDataGetBytePtr(cert_data));
+ DCHECK_NE(0, CFDataGetLength(cert_data));
+ CC_SHA256(
+ CFDataGetBytePtr(cert_data), CFDataGetLength(cert_data), sha256.data);
+
+ return sha256;
+}
+
+// static
SHA1HashValue X509Certificate::CalculateCAFingerprint(
const OSCertHandles& intermediates) {
SHA1HashValue sha1;
diff --git a/net/cert/x509_certificate_mac.cc b/net/cert/x509_certificate_mac.cc
index 716bdd5..ecdf137 100644
--- a/net/cert/x509_certificate_mac.cc
+++ b/net/cert/x509_certificate_mac.cc
@@ -374,6 +374,24 @@
}
// static
+SHA256HashValue X509Certificate::CalculateFingerprint256(OSCertHandle cert) {
+ SHA256HashValue sha256;
+ memset(sha256.data, 0, sizeof(sha256.data));
+
+ CSSM_DATA cert_data;
+ OSStatus status = SecCertificateGetData(cert, &cert_data);
+ if (status)
+ return sha256;
+
+ DCHECK(cert_data.Data);
+ DCHECK_NE(cert_data.Length, 0U);
+
+ CC_SHA256(cert_data.Data, cert_data.Length, sha256.data);
+
+ return sha256;
+}
+
+// static
SHA1HashValue X509Certificate::CalculateCAFingerprint(
const OSCertHandles& intermediates) {
SHA1HashValue sha1;
diff --git a/net/cert/x509_certificate_nss.cc b/net/cert/x509_certificate_nss.cc
index 9019625..a57f9ce 100644
--- a/net/cert/x509_certificate_nss.cc
+++ b/net/cert/x509_certificate_nss.cc
@@ -225,6 +225,21 @@
}
// static
+SHA256HashValue X509Certificate::CalculateFingerprint256(OSCertHandle cert) {
+ SHA256HashValue sha256;
+ memset(sha256.data, 0, sizeof(sha256.data));
+
+ DCHECK(NULL != cert->derCert.data);
+ DCHECK_NE(0U, cert->derCert.len);
+
+ SECStatus rv = HASH_HashBuf(
+ HASH_AlgSHA256, sha256.data, cert->derCert.data, cert->derCert.len);
+ DCHECK_EQ(SECSuccess, rv);
+
+ return sha256;
+}
+
+// static
SHA1HashValue X509Certificate::CalculateCAFingerprint(
const OSCertHandles& intermediates) {
SHA1HashValue sha1;
diff --git a/net/cert/x509_certificate_openssl.cc b/net/cert/x509_certificate_openssl.cc
index 9cb0670..91501f8 100644
--- a/net/cert/x509_certificate_openssl.cc
+++ b/net/cert/x509_certificate_openssl.cc
@@ -230,6 +230,16 @@
}
// static
+SHA256HashValue X509Certificate::CalculateFingerprint256(OSCertHandle cert) {
+ SHA256HashValue sha256;
+ unsigned int sha256_size = static_cast<unsigned int>(sizeof(sha256.data));
+ int ret = X509_digest(cert, EVP_sha256(), sha256.data, &sha256_size);
+ CHECK(ret);
+ CHECK_EQ(sha256_size, sizeof(sha256.data));
+ return sha256;
+}
+
+// static
SHA1HashValue X509Certificate::CalculateCAFingerprint(
const OSCertHandles& intermediates) {
SHA1HashValue sha1;
diff --git a/net/cert/x509_certificate_unittest.cc b/net/cert/x509_certificate_unittest.cc
index 158806e..3398510 100644
--- a/net/cert/x509_certificate_unittest.cc
+++ b/net/cert/x509_certificate_unittest.cc
@@ -11,6 +11,7 @@
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
#include "crypto/rsa_private_key.h"
#include "net/base/net_errors.h"
#include "net/base/test_data_directory.h"
@@ -323,6 +324,22 @@
paypal_null_serial, sizeof(paypal_null_serial)) == 0);
}
+TEST(X509CertificateTest, SHA256FingerprintsCorrectly) {
+ scoped_refptr<X509Certificate> google_cert(X509Certificate::CreateFromBytes(
+ reinterpret_cast<const char*>(google_der), sizeof(google_der)));
+
+ static const uint8 google_sha256_fingerprint[32] = {
+ 0x21, 0xaf, 0x58, 0x74, 0xea, 0x6b, 0xad, 0xbd, 0xe4, 0xb3, 0xb1,
+ 0xaa, 0x53, 0x32, 0x80, 0x8f, 0xbf, 0x8a, 0x24, 0x7d, 0x98, 0xec,
+ 0x7f, 0x77, 0x49, 0x38, 0x42, 0x81, 0x26, 0x7f, 0xed, 0x38};
+
+ SHA256HashValue fingerprint =
+ X509Certificate::CalculateFingerprint256(google_cert->os_cert_handle());
+
+ for (size_t i = 0; i < 32; ++i)
+ EXPECT_EQ(google_sha256_fingerprint[i], fingerprint.data[i]);
+}
+
TEST(X509CertificateTest, CAFingerprints) {
base::FilePath certs_dir = GetTestCertsDirectory();
diff --git a/net/cert/x509_certificate_win.cc b/net/cert/x509_certificate_win.cc
index ab92b6f..df263d8 100644
--- a/net/cert/x509_certificate_win.cc
+++ b/net/cert/x509_certificate_win.cc
@@ -14,6 +14,7 @@
#include "base/strings/utf_string_conversions.h"
#include "crypto/capi_util.h"
#include "crypto/scoped_capi_types.h"
+#include "crypto/sha2.h"
#include "net/base/net_errors.h"
#pragma comment(lib, "crypt32.lib")
@@ -315,6 +316,24 @@
return sha1;
}
+// static
+SHA256HashValue X509Certificate::CalculateFingerprint256(OSCertHandle cert) {
+ DCHECK(NULL != cert->pbCertEncoded);
+ DCHECK_NE(0u, cert->cbCertEncoded);
+
+ SHA256HashValue sha256;
+ size_t sha256_size = sizeof(sha256.data);
+
+ // Use crypto::SHA256HashString for two reasons:
+ // * < Windows Vista does not have universal SHA-256 support.
+ // * More efficient on Windows > Vista (less overhead since non-default CSP
+ // is not needed).
+ base::StringPiece der_cert(reinterpret_cast<const char*>(cert->pbCertEncoded),
+ cert->cbCertEncoded);
+ crypto::SHA256HashString(der_cert, sha256.data, sha256_size);
+ return sha256;
+}
+
// TODO(wtc): This function is implemented with NSS low-level hash
// functions to ensure it is fast. Reimplement this function with
// CryptoAPI. May need to cache the HCRYPTPROV to reduce the overhead.
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 10a6f6b..dd64cce 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -428,10 +428,10 @@
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~SetCookieWithDetailsTask() {}
+ ~SetCookieWithDetailsTask() override {}
private:
GURL url_;
@@ -468,10 +468,10 @@
}
// CookieMonsterTask
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetAllCookiesTask() {}
+ ~GetAllCookiesTask() override {}
private:
GetCookieListCallback callback_;
@@ -503,10 +503,10 @@
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetAllCookiesForURLWithOptionsTask() {}
+ ~GetAllCookiesForURLWithOptionsTask() override {}
private:
GURL url_;
@@ -596,10 +596,10 @@
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllTask() {}
+ ~DeleteAllTask() override {}
private:
DISALLOW_COPY_AND_ASSIGN(DeleteAllTask);
@@ -622,10 +622,10 @@
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllCreatedBetweenTask() {}
+ ~DeleteAllCreatedBetweenTask() override {}
private:
Time delete_begin_;
@@ -650,10 +650,10 @@
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllForHostTask() {}
+ ~DeleteAllForHostTask() override {}
private:
GURL url_;
@@ -682,10 +682,10 @@
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteAllCreatedBetweenForHostTask() {}
+ ~DeleteAllCreatedBetweenForHostTask() override {}
private:
Time delete_begin_;
@@ -711,10 +711,10 @@
}
// DeleteTask:
- virtual bool RunDeleteTask() override;
+ bool RunDeleteTask() override;
protected:
- virtual ~DeleteCanonicalCookieTask() {}
+ ~DeleteCanonicalCookieTask() override {}
private:
CanonicalCookie cookie_;
@@ -742,10 +742,10 @@
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~SetCookieWithOptionsTask() {}
+ ~SetCookieWithOptionsTask() override {}
private:
GURL url_;
@@ -779,10 +779,10 @@
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~GetCookiesWithOptionsTask() {}
+ ~GetCookiesWithOptionsTask() override {}
private:
GURL url_;
@@ -814,10 +814,10 @@
}
// DeleteTask:
- virtual void RunDeleteTask() override;
+ void RunDeleteTask() override;
protected:
- virtual ~DeleteCookieTask() {}
+ ~DeleteCookieTask() override {}
private:
GURL url_;
@@ -839,10 +839,10 @@
}
// DeleteTask:
- virtual int RunDeleteTask() override;
+ int RunDeleteTask() override;
protected:
- virtual ~DeleteSessionCookiesTask() {}
+ ~DeleteSessionCookiesTask() override {}
private:
DISALLOW_COPY_AND_ASSIGN(DeleteSessionCookiesTask);
@@ -865,10 +865,10 @@
}
// CookieMonsterTask:
- virtual void Run() override;
+ void Run() override;
protected:
- virtual ~HasCookiesForETLDP1Task() {}
+ ~HasCookiesForETLDP1Task() override {}
private:
std::string etldp1_;
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 746f2a4..741c22e 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -239,38 +239,34 @@
// Sets the cookies specified by |cookie_list| returned from |url|
// with options |options| in effect.
- virtual void SetCookieWithOptionsAsync(
- const GURL& url,
- const std::string& cookie_line,
- const CookieOptions& options,
- const SetCookiesCallback& callback) override;
+ void SetCookieWithOptionsAsync(const GURL& url,
+ const std::string& cookie_line,
+ const CookieOptions& options,
+ const SetCookiesCallback& callback) override;
// Gets all cookies that apply to |url| given |options|.
// The returned cookies are ordered by longest path, then earliest
// creation date.
- virtual void GetCookiesWithOptionsAsync(
- const GURL& url,
- const CookieOptions& options,
- const GetCookiesCallback& callback) override;
+ void GetCookiesWithOptionsAsync(const GURL& url,
+ const CookieOptions& options,
+ const GetCookiesCallback& callback) override;
// Invokes GetAllCookiesForURLWithOptions with options set to include HTTP
// only cookies.
- virtual void GetAllCookiesForURLAsync(
- const GURL& url,
- const GetCookieListCallback& callback) override;
+ void GetAllCookiesForURLAsync(const GURL& url,
+ const GetCookieListCallback& callback) override;
// Deletes all cookies with that might apply to |url| that has |cookie_name|.
- virtual void DeleteCookieAsync(
- const GURL& url, const std::string& cookie_name,
- const base::Closure& callback) override;
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override;
// Deletes all of the cookies that have a creation_date greater than or equal
// to |delete_begin| and less than |delete_end|.
// Returns the number of cookies that have been deleted.
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override;
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override;
// Deletes all of the cookies that match the host of the given URL
// regardless of path and that have a creation_date greater than or
@@ -278,15 +274,15 @@
// all http_only and secure cookies, but does not include any domain
// cookies that may apply to this host.
// Returns the number of cookies deleted.
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
const DeleteCallback& callback) override;
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override;
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override;
- virtual CookieMonster* GetCookieMonster() override;
+ CookieMonster* GetCookieMonster() override;
// Enables writing session cookies into the cookie database. If this this
// method is called, it must be called before first use of the instance
@@ -408,7 +404,7 @@
// Record statistics every kRecordStatisticsIntervalSeconds of uptime.
static const int kRecordStatisticsIntervalSeconds = 10 * 60;
- virtual ~CookieMonster();
+ ~CookieMonster() override;
// The following are synchronous calls to which the asynchronous methods
// delegate either immediately (if the store is loaded) or through a deferred
diff --git a/net/cookies/cookie_monster_store_test.h b/net/cookies/cookie_monster_store_test.h
index c3a2827..4a3f9a9 100644
--- a/net/cookies/cookie_monster_store_test.h
+++ b/net/cookies/cookie_monster_store_test.h
@@ -82,25 +82,23 @@
return commands_;
}
- virtual void Load(const LoadedCallback& loaded_callback) override;
+ void Load(const LoadedCallback& loaded_callback) override;
- virtual void LoadCookiesForKey(const std::string& key,
- const LoadedCallback& loaded_callback) override;
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override;
- virtual void AddCookie(const CanonicalCookie& cookie) override;
+ void AddCookie(const CanonicalCookie& cookie) override;
- virtual void UpdateCookieAccessTime(
- const CanonicalCookie& cookie) override;
+ void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
- virtual void DeleteCookie(
- const CanonicalCookie& cookie) override;
+ void DeleteCookie(const CanonicalCookie& cookie) override;
- virtual void Flush(const base::Closure& callback) override;
+ void Flush(const base::Closure& callback) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockPersistentCookieStore();
+ ~MockPersistentCookieStore() override;
private:
CommandList commands_;
@@ -127,15 +125,14 @@
void reset() { changes_.clear(); }
- virtual void OnCookieChanged(
- const CanonicalCookie& cookie,
- bool removed,
- CookieMonsterDelegate::ChangeCause cause) override;
+ void OnCookieChanged(const CanonicalCookie& cookie,
+ bool removed,
+ CookieMonsterDelegate::ChangeCause cause) override;
- virtual void OnLoaded() override;
+ void OnLoaded() override;
private:
- virtual ~MockCookieMonsterDelegate();
+ ~MockCookieMonsterDelegate() override;
std::vector<CookieNotification> changes_;
@@ -161,23 +158,23 @@
public:
MockSimplePersistentCookieStore();
- virtual void Load(const LoadedCallback& loaded_callback) override;
+ void Load(const LoadedCallback& loaded_callback) override;
- virtual void LoadCookiesForKey(const std::string& key,
- const LoadedCallback& loaded_callback) override;
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override;
- virtual void AddCookie(const CanonicalCookie& cookie) override;
+ void AddCookie(const CanonicalCookie& cookie) override;
- virtual void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
+ void UpdateCookieAccessTime(const CanonicalCookie& cookie) override;
- virtual void DeleteCookie(const CanonicalCookie& cookie) override;
+ void DeleteCookie(const CanonicalCookie& cookie) override;
- virtual void Flush(const base::Closure& callback) override;
+ void Flush(const base::Closure& callback) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockSimplePersistentCookieStore();
+ ~MockSimplePersistentCookieStore() override;
private:
typedef std::map<int64, CanonicalCookie> CanonicalCookieMap;
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 34a50bb..5c76e8a 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -2165,7 +2165,7 @@
public:
FlushablePersistentStore() : flush_count_(0) {}
- virtual void Load(const LoadedCallback& loaded_callback) override {
+ void Load(const LoadedCallback& loaded_callback) override {
std::vector<CanonicalCookie*> out_cookies;
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -2173,18 +2173,17 @@
new net::LoadedCallbackTask(loaded_callback, out_cookies)));
}
- virtual void LoadCookiesForKey(
- const std::string& key,
- const LoadedCallback& loaded_callback) override {
+ void LoadCookiesForKey(const std::string& key,
+ const LoadedCallback& loaded_callback) override {
Load(loaded_callback);
}
- virtual void AddCookie(const CanonicalCookie&) override {}
- virtual void UpdateCookieAccessTime(const CanonicalCookie&) override {}
- virtual void DeleteCookie(const CanonicalCookie&) override {}
- virtual void SetForceKeepSessionState() override {}
+ void AddCookie(const CanonicalCookie&) override {}
+ void UpdateCookieAccessTime(const CanonicalCookie&) override {}
+ void DeleteCookie(const CanonicalCookie&) override {}
+ void SetForceKeepSessionState() override {}
- virtual void Flush(const base::Closure& callback) override {
+ void Flush(const base::Closure& callback) override {
++flush_count_;
if (!callback.is_null())
callback.Run();
@@ -2195,7 +2194,7 @@
}
private:
- virtual ~FlushablePersistentStore() {}
+ ~FlushablePersistentStore() override {}
volatile int flush_count_;
};
diff --git a/net/cookies/cookie_store_test_helpers.h b/net/cookies/cookie_store_test_helpers.h
index e4e7156..2b8b245 100644
--- a/net/cookies/cookie_store_test_helpers.h
+++ b/net/cookies/cookie_store_test_helpers.h
@@ -23,20 +23,19 @@
// invoke the internal callback.
// Post a delayed task to invoke the original callback with the results.
- virtual void SetCookieWithOptionsAsync(
+ void SetCookieWithOptionsAsync(
const GURL& url,
const std::string& cookie_line,
const CookieOptions& options,
const CookieMonster::SetCookiesCallback& callback) override;
- virtual void GetCookiesWithOptionsAsync(
+ void GetCookiesWithOptionsAsync(
const GURL& url,
const CookieOptions& options,
const CookieMonster::GetCookiesCallback& callback) override;
- virtual void GetAllCookiesForURLAsync(
- const GURL& url,
- const GetCookieListCallback& callback) override;
+ void GetAllCookiesForURLAsync(const GURL& url,
+ const GetCookieListCallback& callback) override;
virtual bool SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
@@ -48,24 +47,23 @@
virtual void DeleteCookie(const GURL& url,
const std::string& cookie_name);
- virtual void DeleteCookieAsync(const GURL& url,
- const std::string& cookie_name,
- const base::Closure& callback) override;
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override;
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override;
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override;
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
const DeleteCallback& callback) override;
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override;
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override;
- virtual CookieMonster* GetCookieMonster() override;
+ CookieMonster* GetCookieMonster() override;
private:
@@ -84,7 +82,7 @@
const CookieMonster::GetCookiesCallback& callback);
friend class base::RefCountedThreadSafe<DelayedCookieMonster>;
- virtual ~DelayedCookieMonster();
+ ~DelayedCookieMonster() override;
scoped_refptr<CookieMonster> cookie_monster_;
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index b3b80b4..e06efd9 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -1840,10 +1840,10 @@
class BadEntropyProvider : public base::FieldTrial::EntropyProvider {
public:
- virtual ~BadEntropyProvider() {}
+ ~BadEntropyProvider() override {}
- virtual double GetEntropyForTrial(const std::string& trial_name,
- uint32 randomization_seed) const override {
+ double GetEntropyForTrial(const std::string& trial_name,
+ uint32 randomization_seed) const override {
return 0.5;
}
};
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index bcac374..20995b7 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -1254,13 +1254,13 @@
iterator_(new Rankings::Iterator()) {
}
- virtual ~IteratorImpl() {
+ ~IteratorImpl() override {
if (background_queue_)
background_queue_->EndEnumeration(iterator_.Pass());
}
- virtual int OpenNextEntry(Entry** next_entry,
- const net::CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const net::CompletionCallback& callback) override {
if (!background_queue_)
return net::ERR_FAILED;
background_queue_->OpenNextEntry(iterator_.get(), next_entry, callback);
diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h
index e81b928..d3a81ac 100644
--- a/net/disk_cache/blockfile/backend_impl.h
+++ b/net/disk_cache/blockfile/backend_impl.h
@@ -57,7 +57,7 @@
uint32 mask,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~BackendImpl();
+ ~BackendImpl() override;
// Performs general initialization for this current instance of the cache.
int Init(const CompletionCallback& callback);
@@ -259,20 +259,22 @@
void FlushIndex();
// Backend implementation.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
// NOTE: The blockfile Backend::Iterator::OpenNextEntry method does not modify
// the last_used field of the entry, and therefore it does not impact the
// eviction ranking of the entry. However, an enumeration will go through all
@@ -281,9 +283,9 @@
// the iterator (for example, deleting the entry) will invalidate the
// iterator. Performing operations on an entry that modify the entry may
// result in loops in the iteration, skipped entries or similar.
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(StatsItems* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(StatsItems* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
private:
typedef base::hash_map<CacheAddr, EntryImpl*> EntriesMap;
diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index 09794d3..a1024b4 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -1510,8 +1510,8 @@
class BackendImplV3::NotImplementedIterator : public Backend::Iterator {
public:
- virtual int OpenNextEntry(disk_cache::Entry** next_entry,
- const net::CompletionCallback& callback) override {
+ int OpenNextEntry(disk_cache::Entry** next_entry,
+ const net::CompletionCallback& callback) override {
return net::ERR_NOT_IMPLEMENTED;
}
};
diff --git a/net/disk_cache/blockfile/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h
index 6f4f882..45ce6ac 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.h
+++ b/net/disk_cache/blockfile/backend_impl_v3.h
@@ -50,7 +50,7 @@
BackendImplV3(const base::FilePath& path,
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~BackendImplV3();
+ ~BackendImplV3() override;
// Performs general initialization for this current instance of the cache.
int Init(const CompletionCallback& callback);
@@ -172,23 +172,25 @@
int SelfCheck();
// Backend implementation.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(StatsItems* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(StatsItems* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
private:
friend class EvictionV3;
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index 2b98470..0a882de 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -44,9 +44,9 @@
entry->AddRef();
entry->IncrementIoCount();
}
- virtual ~SyncCallback() {}
+ ~SyncCallback() override {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
void Discard();
private:
diff --git a/net/disk_cache/blockfile/entry_impl.h b/net/disk_cache/blockfile/entry_impl.h
index fea815d..1dc7ed5 100644
--- a/net/disk_cache/blockfile/entry_impl.h
+++ b/net/disk_cache/blockfile/entry_impl.h
@@ -147,26 +147,38 @@
static int NumBlocksForEntry(int key_size);
// Entry interface.
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
enum {
@@ -174,7 +186,7 @@
};
class UserBuffer;
- virtual ~EntryImpl();
+ ~EntryImpl() override;
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/blockfile/entry_impl_v3.h b/net/disk_cache/blockfile/entry_impl_v3.h
index 4215000..c693c2a 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.h
+++ b/net/disk_cache/blockfile/entry_impl_v3.h
@@ -77,26 +77,38 @@
const net::BoundNetLog& net_log() const;
// Entry interface.
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
enum {
@@ -104,7 +116,7 @@
};
class UserBuffer;
- virtual ~EntryImplV3();
+ ~EntryImplV3() override;
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/blockfile/file_posix.cc b/net/disk_cache/blockfile/file_posix.cc
index c451aa3..828673f 100644
--- a/net/disk_cache/blockfile/file_posix.cc
+++ b/net/disk_cache/blockfile/file_posix.cc
@@ -24,7 +24,7 @@
FileWorkerPool() : base::SequencedWorkerPool(kMaxThreads, "CachePool") {}
protected:
- virtual ~FileWorkerPool() {}
+ ~FileWorkerPool() override {}
};
base::LazyInstance<FileWorkerPool>::Leaky s_worker_pool =
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.h b/net/disk_cache/blockfile/in_flight_backend_io.h
index 4b10405..e2fa4e7 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.h
+++ b/net/disk_cache/blockfile/in_flight_backend_io.h
@@ -107,7 +107,7 @@
OP_IS_READY
};
- virtual ~BackendIO();
+ ~BackendIO() override;
// Returns true if this operation returns an entry.
bool ReturnsEntry();
@@ -149,7 +149,7 @@
InFlightBackendIO(
BackendImpl* backend,
const scoped_refptr<base::SingleThreadTaskRunner>& background_thread);
- virtual ~InFlightBackendIO();
+ ~InFlightBackendIO() override;
// Proxied operations.
void Init(const net::CompletionCallback& callback);
@@ -204,8 +204,7 @@
base::WeakPtr<InFlightBackendIO> GetWeakPtr();
protected:
- virtual void OnOperationComplete(BackgroundIO* operation,
- bool cancel) override;
+ void OnOperationComplete(BackgroundIO* operation, bool cancel) override;
private:
void PostOperation(BackendIO* operation);
diff --git a/net/disk_cache/blockfile/index_table_v3_unittest.cc b/net/disk_cache/blockfile/index_table_v3_unittest.cc
index 7f68ee3..ee48951 100644
--- a/net/disk_cache/blockfile/index_table_v3_unittest.cc
+++ b/net/disk_cache/blockfile/index_table_v3_unittest.cc
@@ -30,17 +30,17 @@
class MockIndexBackend : public disk_cache::IndexTableBackend {
public:
MockIndexBackend() : grow_called_(false), buffer_len_(-1) {}
- virtual ~MockIndexBackend() {}
+ ~MockIndexBackend() override {}
bool grow_called() const { return grow_called_; }
int buffer_len() const { return buffer_len_; }
- virtual void GrowIndex() override { grow_called_ = true; }
- virtual void SaveIndex(net::IOBuffer* buffer, int buffer_len) override {
+ void GrowIndex() override { grow_called_ = true; }
+ void SaveIndex(net::IOBuffer* buffer, int buffer_len) override {
buffer_len_ = buffer_len;
}
- virtual void DeleteCell(EntryCell cell) override {}
- virtual void FixCell(EntryCell cell) override {}
+ void DeleteCell(EntryCell cell) override {}
+ void FixCell(EntryCell cell) override {}
private:
bool grow_called_;
diff --git a/net/disk_cache/blockfile/mapped_file.h b/net/disk_cache/blockfile/mapped_file.h
index f0efa41..7634cb7 100644
--- a/net/disk_cache/blockfile/mapped_file.h
+++ b/net/disk_cache/blockfile/mapped_file.h
@@ -51,7 +51,7 @@
bool Preload();
private:
- virtual ~MappedFile();
+ ~MappedFile() override;
bool init_;
#if defined(OS_WIN)
diff --git a/net/disk_cache/blockfile/mapped_file_unittest.cc b/net/disk_cache/blockfile/mapped_file_unittest.cc
index 8093e9a..9b31d6d 100644
--- a/net/disk_cache/blockfile/mapped_file_unittest.cc
+++ b/net/disk_cache/blockfile/mapped_file_unittest.cc
@@ -21,9 +21,9 @@
helper_(helper),
max_id_(max_id) {
}
- virtual ~FileCallbackTest() {}
+ ~FileCallbackTest() override {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
private:
int id_;
@@ -45,12 +45,12 @@
TestFileBlock() {
CacheTestFillBuffer(buffer_, sizeof(buffer_), false);
}
- virtual ~TestFileBlock() {}
+ ~TestFileBlock() override {}
// FileBlock interface.
- virtual void* buffer() const override { return const_cast<char*>(buffer_); }
- virtual size_t size() const override { return sizeof(buffer_); }
- virtual int offset() const override { return 1024; }
+ void* buffer() const override { return const_cast<char*>(buffer_); }
+ size_t size() const override { return sizeof(buffer_); }
+ int offset() const override { return 1024; }
private:
char buffer_[20];
diff --git a/net/disk_cache/blockfile/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc
index ddb57b6..30ea836 100644
--- a/net/disk_cache/blockfile/sparse_control.cc
+++ b/net/disk_cache/blockfile/sparse_control.cc
@@ -56,7 +56,7 @@
ChildrenDeleter(disk_cache::BackendImpl* backend, const std::string& name)
: backend_(backend->GetWeakPtr()), name_(name), signature_(0) {}
- virtual void OnFileIOComplete(int bytes_copied) override;
+ void OnFileIOComplete(int bytes_copied) override;
// Two ways of deleting the children: if we have the children map, use Start()
// directly, otherwise pass the data address to ReadData().
@@ -65,7 +65,7 @@
private:
friend class base::RefCounted<ChildrenDeleter>;
- virtual ~ChildrenDeleter() {}
+ ~ChildrenDeleter() override {}
void DeleteChildren();
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index a3a7747..6081137 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2063,7 +2063,7 @@
}
private:
- virtual void SetResult(int result) override {
+ void SetResult(int result) override {
cache_.reset();
TestCompletionCallback::SetResult(result);
}
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 046623f..cc33a00 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -187,8 +187,8 @@
: backend_(backend), current_(NULL) {
}
- virtual int OpenNextEntry(Entry** next_entry,
- const CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const CompletionCallback& callback) override {
if (!backend_)
return net::ERR_FAILED;
diff --git a/net/disk_cache/memory/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h
index 46505ea..7b18ca0 100644
--- a/net/disk_cache/memory/mem_backend_impl.h
+++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -26,7 +26,7 @@
class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
public:
explicit MemBackendImpl(net::NetLog* net_log);
- virtual ~MemBackendImpl();
+ ~MemBackendImpl() override;
// Returns an instance of a Backend implemented only in memory. The returned
// object should be deleted when not needed anymore. max_bytes is the maximum
@@ -63,24 +63,26 @@
void RemoveFromRankingList(MemEntryImpl* entry);
// Backend interface.
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(
- std::vector<std::pair<std::string, std::string> >* stats) override {}
- virtual void OnExternalCacheHit(const std::string& key) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(
+ std::vector<std::pair<std::string, std::string>>* stats) override {}
+ void OnExternalCacheHit(const std::string& key) override;
private:
class MemIterator;
diff --git a/net/disk_cache/memory/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
index d31e14a..0d9acbe 100644
--- a/net/disk_cache/memory/mem_entry_impl.h
+++ b/net/disk_cache/memory/mem_entry_impl.h
@@ -87,26 +87,38 @@
}
// Entry interface.
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override {}
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override {}
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
typedef base::hash_map<int, MemEntryImpl*> EntryMap;
@@ -115,7 +127,7 @@
NUM_STREAMS = 3
};
- virtual ~MemEntryImpl();
+ ~MemEntryImpl() override;
// Do all the work for corresponding public functions. Implemented as
// separate functions to make logging of results simpler.
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 32b074a..6385a37 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -198,7 +198,7 @@
class SimpleBackendImpl::ActiveEntryProxy
: public SimpleEntryImpl::ActiveEntryProxy {
public:
- virtual ~ActiveEntryProxy() {
+ ~ActiveEntryProxy() override {
if (backend_) {
DCHECK_EQ(1U, backend_->active_entries_.count(entry_hash_));
backend_->active_entries_.erase(entry_hash_);
@@ -475,8 +475,8 @@
}
// From Backend::Iterator:
- virtual int OpenNextEntry(Entry** next_entry,
- const CompletionCallback& callback) override {
+ int OpenNextEntry(Entry** next_entry,
+ const CompletionCallback& callback) override {
CompletionCallback open_next_entry_impl =
base::Bind(&SimpleIterator::OpenNextEntryImpl,
weak_factory_.GetWeakPtr(), next_entry, callback);
diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h
index e5a50da..503fc49 100644
--- a/net/disk_cache/simple/simple_backend_impl.h
+++ b/net/disk_cache/simple/simple_backend_impl.h
@@ -56,7 +56,7 @@
const scoped_refptr<base::SingleThreadTaskRunner>& cache_thread,
net::NetLog* net_log);
- virtual ~SimpleBackendImpl();
+ ~SimpleBackendImpl() override;
net::CacheType cache_type() const { return cache_type_; }
SimpleIndex* index() { return index_.get(); }
@@ -84,28 +84,30 @@
void OnDoomComplete(uint64 entry_hash);
// SimpleIndexDelegate:
- virtual void DoomEntries(std::vector<uint64>* entry_hashes,
- const CompletionCallback& callback) override;
+ void DoomEntries(std::vector<uint64>* entry_hashes,
+ const CompletionCallback& callback) override;
// Backend:
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) override;
- virtual int DoomAllEntries(const CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) override;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(
- std::vector<std::pair<std::string, std::string> >* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ Entry** entry,
+ const CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const CompletionCallback& callback) override;
+ int DoomAllEntries(const CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(
+ std::vector<std::pair<std::string, std::string>>* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
private:
class SimpleIterator;
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 7c11b96..ebc6bf1 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -80,38 +80,38 @@
void SetKey(const std::string& key);
// From Entry:
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int stream_index,
- int offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteData(int stream_index,
- int offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int WriteSparseData(int64 offset,
- net::IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int GetAvailableRange(int64 offset,
- int len,
- int64* start,
- const CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(const CompletionCallback& callback) override;
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int stream_index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteData(int stream_index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(const CompletionCallback& callback) override;
private:
class ScopedOperationRunner;
@@ -144,7 +144,7 @@
CRC_CHECK_MAX = 4,
};
- virtual ~SimpleEntryImpl();
+ ~SimpleEntryImpl() override;
// Must be used to invoke a client-provided completion callback for an
// operation initiated through the backend (e.g. create, open) so that clients
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 19ea0f8..49eb8fb 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -79,8 +79,7 @@
base::ThreadTaskRunnerHandle::Get(),
net::DISK_CACHE,
index_file_directory) {}
- virtual ~WrappedSimpleIndexFile() {
- }
+ ~WrappedSimpleIndexFile() override {}
const base::FilePath& GetIndexFilePath() const {
return index_file_;
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index 43e99ad..dc63989 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -57,19 +57,18 @@
load_index_entries_calls_(0),
disk_writes_(0) {}
- virtual void LoadIndexEntries(
- base::Time cache_last_modified,
- const base::Closure& callback,
- SimpleIndexLoadResult* out_load_result) override {
+ void LoadIndexEntries(base::Time cache_last_modified,
+ const base::Closure& callback,
+ SimpleIndexLoadResult* out_load_result) override {
load_callback_ = callback;
load_result_ = out_load_result;
++load_index_entries_calls_;
}
- virtual void WriteToDisk(const SimpleIndex::EntrySet& entry_set,
- uint64 cache_size,
- const base::TimeTicks& start,
- bool app_on_background) override {
+ void WriteToDisk(const SimpleIndex::EntrySet& entry_set,
+ uint64 cache_size,
+ const base::TimeTicks& start,
+ bool app_on_background) override {
disk_writes_++;
disk_write_entry_set_ = entry_set;
}
@@ -120,8 +119,8 @@
}
// From SimpleIndexDelegate:
- virtual void DoomEntries(std::vector<uint64>* entry_hashes,
- const net::CompletionCallback& callback) override {
+ void DoomEntries(std::vector<uint64>* entry_hashes,
+ const net::CompletionCallback& callback) override {
std::for_each(entry_hashes->begin(), entry_hashes->end(),
std::bind1st(std::mem_fun(&SimpleIndex::Remove),
index_.get()));
diff --git a/net/dns/address_sorter_posix.h b/net/dns/address_sorter_posix.h
index ce3ffdb..cae787f 100644
--- a/net/dns/address_sorter_posix.h
+++ b/net/dns/address_sorter_posix.h
@@ -61,17 +61,17 @@
typedef std::map<IPAddressNumber, SourceAddressInfo> SourceAddressMap;
explicit AddressSorterPosix(ClientSocketFactory* socket_factory);
- virtual ~AddressSorterPosix();
+ ~AddressSorterPosix() override;
// AddressSorter:
- virtual void Sort(const AddressList& list,
- const CallbackType& callback) const override;
+ void Sort(const AddressList& list,
+ const CallbackType& callback) const override;
private:
friend class AddressSorterPosixTest;
// NetworkChangeNotifier::IPAddressObserver:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// Fills |info| with values for |address| from policy tables.
void FillPolicy(const IPAddressNumber& address,
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc
index 9039850..5dcfe70 100644
--- a/net/dns/address_sorter_posix_unittest.cc
+++ b/net/dns/address_sorter_posix_unittest.cc
@@ -33,36 +33,32 @@
explicit TestUDPClientSocket(const AddressMapping* mapping)
: mapping_(mapping), connected_(false) {}
- virtual ~TestUDPClientSocket() {}
+ ~TestUDPClientSocket() override {}
- virtual int Read(IOBuffer*, int, const CompletionCallback&) override {
+ int Read(IOBuffer*, int, const CompletionCallback&) override {
NOTIMPLEMENTED();
return OK;
}
- virtual int Write(IOBuffer*, int, const CompletionCallback&) override {
+ int Write(IOBuffer*, int, const CompletionCallback&) override {
NOTIMPLEMENTED();
return OK;
}
- virtual int SetReceiveBufferSize(int32) override {
- return OK;
- }
- virtual int SetSendBufferSize(int32) override {
- return OK;
- }
+ int SetReceiveBufferSize(int32) override { return OK; }
+ int SetSendBufferSize(int32) override { return OK; }
- virtual void Close() override {}
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ void Close() override {}
+ int GetPeerAddress(IPEndPoint* address) const override {
NOTIMPLEMENTED();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!connected_)
return ERR_UNEXPECTED;
*address = local_endpoint_;
return OK;
}
- virtual int Connect(const IPEndPoint& remote) override {
+ int Connect(const IPEndPoint& remote) override {
if (connected_)
return ERR_UNEXPECTED;
AddressMapping::const_iterator it = mapping_->find(remote.address());
@@ -73,9 +69,7 @@
return OK;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
+ const BoundNetLog& NetLog() const override { return net_log_; }
private:
BoundNetLog net_log_;
@@ -90,23 +84,23 @@
class TestSocketFactory : public ClientSocketFactory {
public:
TestSocketFactory() {}
- virtual ~TestSocketFactory() {}
+ ~TestSocketFactory() override {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType,
const RandIntCallback&,
NetLog*,
const NetLog::Source&) override {
return scoped_ptr<DatagramClientSocket>(new TestUDPClientSocket(&mapping_));
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList&,
NetLog*,
const NetLog::Source&) override {
NOTIMPLEMENTED();
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle>,
const HostPortPair&,
const SSLConfig&,
@@ -114,9 +108,7 @@
NOTIMPLEMENTED();
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
void AddMapping(const IPAddressNumber& dst, const IPAddressNumber& src) {
mapping_[dst] = src;
diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc
index de96c02..f3980df 100644
--- a/net/dns/dns_client.cc
+++ b/net/dns/dns_client.cc
@@ -24,7 +24,7 @@
: address_sorter_(AddressSorter::CreateAddressSorter()),
net_log_(net_log) {}
- virtual void SetConfig(const DnsConfig& config) override {
+ void SetConfig(const DnsConfig& config) override {
factory_.reset();
session_ = NULL;
if (config.IsValid() && !config.unhandled_options) {
@@ -40,17 +40,15 @@
}
}
- virtual const DnsConfig* GetConfig() const override {
+ const DnsConfig* GetConfig() const override {
return session_.get() ? &session_->config() : NULL;
}
- virtual DnsTransactionFactory* GetTransactionFactory() override {
+ DnsTransactionFactory* GetTransactionFactory() override {
return session_.get() ? factory_.get() : NULL;
}
- virtual AddressSorter* GetAddressSorter() override {
- return address_sorter_.get();
- }
+ AddressSorter* GetAddressSorter() override { return address_sorter_.get(); }
private:
scoped_refptr<DnsSession> session_;
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index c0664eb..6b79f9c 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -263,7 +263,7 @@
explicit ConfigReader(DnsConfigServicePosix* service)
: service_(service), success_(false) {}
- virtual void DoWork() override {
+ void DoWork() override {
base::TimeTicks start_time = base::TimeTicks::Now();
ConfigParsePosixResult result = ReadDnsConfig(&dns_config_);
switch (result) {
@@ -285,7 +285,7 @@
base::TimeTicks::Now() - start_time);
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
DCHECK(!IsCancelled());
if (success_) {
service_->OnConfigRead(dns_config_);
@@ -295,7 +295,7 @@
}
private:
- virtual ~ConfigReader() {}
+ ~ConfigReader() override {}
DnsConfigServicePosix* service_;
// Written in DoWork, read in OnWorkFinished, no locking necessary.
@@ -312,9 +312,9 @@
: service_(service), path_(kFilePathHosts), success_(false) {}
private:
- virtual ~HostsReader() {}
+ ~HostsReader() override {}
- virtual void DoWork() override {
+ void DoWork() override {
base::TimeTicks start_time = base::TimeTicks::Now();
success_ = ParseHostsFile(path_, &hosts_);
UMA_HISTOGRAM_BOOLEAN("AsyncDNS.HostParseResult", success_);
@@ -322,7 +322,7 @@
base::TimeTicks::Now() - start_time);
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
if (success_) {
service_->OnHostsRead(hosts_);
} else {
diff --git a/net/dns/dns_config_service_posix.h b/net/dns/dns_config_service_posix.h
index 598d6ad..349c82d 100644
--- a/net/dns/dns_config_service_posix.h
+++ b/net/dns/dns_config_service_posix.h
@@ -23,12 +23,12 @@
class NET_EXPORT_PRIVATE DnsConfigServicePosix : public DnsConfigService {
public:
DnsConfigServicePosix();
- virtual ~DnsConfigServicePosix();
+ ~DnsConfigServicePosix() override;
protected:
// DnsConfigService:
- virtual void ReadNow() override;
- virtual bool StartWatching() override;
+ void ReadNow() override;
+ bool StartWatching() override;
private:
class Watcher;
diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc
index 0239f80..74020c8 100644
--- a/net/dns/dns_config_service_unittest.cc
+++ b/net/dns/dns_config_service_unittest.cc
@@ -121,8 +121,8 @@
protected:
class TestDnsConfigService : public DnsConfigService {
public:
- virtual void ReadNow() override {}
- virtual bool StartWatching() override { return true; }
+ void ReadNow() override {}
+ bool StartWatching() override { return true; }
// Expose the protected methods to this test suite.
void InvalidateConfig() {
diff --git a/net/dns/dns_session_unittest.cc b/net/dns/dns_session_unittest.cc
index 166abef..67080ca 100644
--- a/net/dns/dns_session_unittest.cc
+++ b/net/dns/dns_session_unittest.cc
@@ -24,22 +24,23 @@
class TestClientSocketFactory : public ClientSocketFactory {
public:
- virtual ~TestClientSocketFactory();
+ ~TestClientSocketFactory() override;
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
const net::NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
- NetLog*, const NetLog::Source&) override {
+ NetLog*,
+ const NetLog::Source&) override {
NOTIMPLEMENTED();
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -48,9 +49,7 @@
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
private:
std::list<SocketDataProvider*> data_providers_;
@@ -88,23 +87,21 @@
MockDnsSocketPool(ClientSocketFactory* factory, DnsSessionTest* test)
: DnsSocketPool(factory), test_(test) { }
- virtual ~MockDnsSocketPool() { }
+ ~MockDnsSocketPool() override {}
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override {
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override {
InitializeInternal(nameservers, net_log);
}
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override {
test_->OnSocketAllocated(server_index);
return CreateConnectedSocket(server_index);
}
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override {
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override {
test_->OnSocketFreed(server_index);
}
diff --git a/net/dns/dns_socket_pool.cc b/net/dns/dns_socket_pool.cc
index 09aca5a..2c3c8c2 100644
--- a/net/dns/dns_socket_pool.cc
+++ b/net/dns/dns_socket_pool.cc
@@ -95,21 +95,18 @@
: DnsSocketPool(factory) {
}
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override {
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override {
InitializeInternal(nameservers, net_log);
}
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override {
return CreateConnectedSocket(server_index);
}
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override {
- }
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override {}
private:
DISALLOW_COPY_AND_ASSIGN(NullDnsSocketPool);
@@ -127,18 +124,16 @@
: DnsSocketPool(factory) {
};
- virtual ~DefaultDnsSocketPool();
+ ~DefaultDnsSocketPool() override;
- virtual void Initialize(
- const std::vector<IPEndPoint>* nameservers,
- NetLog* net_log) override;
+ void Initialize(const std::vector<IPEndPoint>* nameservers,
+ NetLog* net_log) override;
- virtual scoped_ptr<DatagramClientSocket> AllocateSocket(
+ scoped_ptr<DatagramClientSocket> AllocateSocket(
unsigned server_index) override;
- virtual void FreeSocket(
- unsigned server_index,
- scoped_ptr<DatagramClientSocket> socket) override;
+ void FreeSocket(unsigned server_index,
+ scoped_ptr<DatagramClientSocket> socket) override;
private:
void FillPool(unsigned server_index, unsigned size);
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index 6327ed2..aee3ba7 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -25,9 +25,9 @@
class MockAddressSorter : public AddressSorter {
public:
- virtual ~MockAddressSorter() {}
- virtual void Sort(const AddressList& list,
- const CallbackType& callback) const override {
+ ~MockAddressSorter() override {}
+ void Sort(const AddressList& list,
+ const CallbackType& callback) const override {
// Do nothing.
callback.Run(true, list);
}
@@ -166,9 +166,9 @@
explicit MockTransactionFactory(const MockDnsClientRuleList& rules)
: rules_(rules) {}
- virtual ~MockTransactionFactory() {}
+ ~MockTransactionFactory() override {}
- virtual scoped_ptr<DnsTransaction> CreateTransaction(
+ scoped_ptr<DnsTransaction> CreateTransaction(
const std::string& hostname,
uint16 qtype,
const DnsTransactionFactory::CallbackType& callback,
diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h
index 5b363c7..e168afc 100644
--- a/net/dns/dns_test_util.h
+++ b/net/dns/dns_test_util.h
@@ -208,13 +208,13 @@
class MockDnsClient : public DnsClient {
public:
MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules);
- virtual ~MockDnsClient();
+ ~MockDnsClient() override;
// DnsClient interface:
- virtual void SetConfig(const DnsConfig& config) override;
- virtual const DnsConfig* GetConfig() const override;
- virtual DnsTransactionFactory* GetTransactionFactory() override;
- virtual AddressSorter* GetAddressSorter() override;
+ void SetConfig(const DnsConfig& config) override;
+ const DnsConfig* GetConfig() const override;
+ DnsTransactionFactory* GetTransactionFactory() override;
+ AddressSorter* GetAddressSorter() override;
// Completes all DnsTransactions that were delayed by a rule.
void CompleteDelayedTransactions();
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 32b5602..03eb7f2 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -141,7 +141,7 @@
query_(query.Pass()) {}
// DnsAttempt:
- virtual int Start(const CompletionCallback& callback) override {
+ int Start(const CompletionCallback& callback) override {
DCHECK_EQ(STATE_NONE, next_state_);
callback_ = callback;
start_time_ = base::TimeTicks::Now();
@@ -149,16 +149,14 @@
return DoLoop(OK);
}
- virtual const DnsQuery* GetQuery() const override {
- return query_.get();
- }
+ const DnsQuery* GetQuery() const override { return query_.get(); }
- virtual const DnsResponse* GetResponse() const override {
+ const DnsResponse* GetResponse() const override {
const DnsResponse* resp = response_.get();
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- virtual const BoundNetLog& GetSocketNetLog() const override {
+ const BoundNetLog& GetSocketNetLog() const override {
return socket_lease_->socket()->NetLog();
}
@@ -306,7 +304,7 @@
response_length_(0) {}
// DnsAttempt:
- virtual int Start(const CompletionCallback& callback) override {
+ int Start(const CompletionCallback& callback) override {
DCHECK_EQ(STATE_NONE, next_state_);
callback_ = callback;
start_time_ = base::TimeTicks::Now();
@@ -320,16 +318,14 @@
return DoLoop(rv);
}
- virtual const DnsQuery* GetQuery() const override {
- return query_.get();
- }
+ const DnsQuery* GetQuery() const override { return query_.get(); }
- virtual const DnsResponse* GetResponse() const override {
+ const DnsResponse* GetResponse() const override {
const DnsResponse* resp = response_.get();
return (resp != NULL && resp->IsValid()) ? resp : NULL;
}
- virtual const BoundNetLog& GetSocketNetLog() const override {
+ const BoundNetLog& GetSocketNetLog() const override {
return socket_->NetLog();
}
@@ -567,24 +563,24 @@
DCHECK(!IsIPLiteral(hostname_));
}
- virtual ~DnsTransactionImpl() {
+ ~DnsTransactionImpl() override {
if (!callback_.is_null()) {
net_log_.EndEventWithNetErrorCode(NetLog::TYPE_DNS_TRANSACTION,
ERR_ABORTED);
} // otherwise logged in DoCallback or Start
}
- virtual const std::string& GetHostname() const override {
+ const std::string& GetHostname() const override {
DCHECK(CalledOnValidThread());
return hostname_;
}
- virtual uint16 GetType() const override {
+ uint16 GetType() const override {
DCHECK(CalledOnValidThread());
return qtype_;
}
- virtual void Start() override {
+ void Start() override {
DCHECK(!callback_.is_null());
DCHECK(attempts_.empty());
net_log_.BeginEvent(NetLog::TYPE_DNS_TRANSACTION,
@@ -968,7 +964,7 @@
session_ = session;
}
- virtual scoped_ptr<DnsTransaction> CreateTransaction(
+ scoped_ptr<DnsTransaction> CreateTransaction(
const std::string& hostname,
uint16 qtype,
const CallbackType& callback,
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index e074966..5581f22 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -152,8 +152,8 @@
net::NetLog* net_log)
: MockUDPClientSocket(data, net_log) {
}
- virtual ~FailingUDPClientSocket() {}
- virtual int Connect(const IPEndPoint& endpoint) override {
+ ~FailingUDPClientSocket() override {}
+ int Connect(const IPEndPoint& endpoint) override {
return ERR_CONNECTION_REFUSED;
}
@@ -169,8 +169,8 @@
net::NetLog* net_log)
: MockUDPClientSocket(data, net_log), factory_(factory) {
}
- virtual ~TestUDPClientSocket() {}
- virtual int Connect(const IPEndPoint& endpoint) override;
+ ~TestUDPClientSocket() override {}
+ int Connect(const IPEndPoint& endpoint) override;
private:
TestSocketFactory* factory_;
@@ -182,9 +182,9 @@
class TestSocketFactory : public MockClientSocketFactory {
public:
TestSocketFactory() : fail_next_socket_(false) {}
- virtual ~TestSocketFactory() {}
+ ~TestSocketFactory() override {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index 5632ef9..8913f17 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -1221,7 +1221,7 @@
&key_.hostname));
}
- virtual ~Job() {
+ ~Job() override {
if (is_running()) {
// |resolver_| was destroyed with this Job still in flight.
// Clean-up, record in the log, but don't run any callbacks.
@@ -1424,7 +1424,7 @@
}
// PriorityDispatch::Job:
- virtual void Start() override {
+ void Start() override {
DCHECK_LE(num_occupied_job_slots_, 1u);
handle_.Reset();
@@ -1587,10 +1587,10 @@
// HostResolverImpl::DnsTask::Delegate implementation:
- virtual void OnDnsTaskComplete(base::TimeTicks start_time,
- int net_error,
- const AddressList& addr_list,
- base::TimeDelta ttl) override {
+ void OnDnsTaskComplete(base::TimeTicks start_time,
+ int net_error,
+ const AddressList& addr_list,
+ base::TimeDelta ttl) override {
DCHECK(is_dns_running());
base::TimeDelta duration = base::TimeTicks::Now() - start_time;
@@ -1625,7 +1625,7 @@
bounded_ttl);
}
- virtual void OnFirstDnsTransactionComplete() override {
+ void OnFirstDnsTransactionComplete() override {
DCHECK(dns_task_->needs_two_transactions());
DCHECK_EQ(dns_task_->needs_another_transaction(), is_queued());
// No longer need to occupy two dispatcher slots.
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index edd64fc..35ecb06 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -111,7 +111,7 @@
// If any completion callbacks are pending when the resolver is destroyed,
// the host resolutions are cancelled, and the completion callbacks will not
// be called.
- virtual ~HostResolverImpl();
+ ~HostResolverImpl() override;
// Configures maximum number of Jobs in the queue. Exposed for testing.
// Only allowed when the queue is empty.
@@ -124,21 +124,21 @@
void SetDnsClient(scoped_ptr<DnsClient> dns_client);
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& source_net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& source_net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual void SetDefaultAddressFamily(AddressFamily address_family) override;
- virtual AddressFamily GetDefaultAddressFamily() const override;
- virtual void SetDnsClientEnabled(bool enabled) override;
- virtual HostCache* GetHostCache() override;
- virtual base::Value* GetDnsConfigAsValue() const override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& source_net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& source_net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ void SetDefaultAddressFamily(AddressFamily address_family) override;
+ AddressFamily GetDefaultAddressFamily() const override;
+ void SetDnsClientEnabled(bool enabled) override;
+ HostCache* GetHostCache() override;
+ base::Value* GetDnsConfigAsValue() const override;
void set_proc_params_for_test(const ProcTaskParams& proc_params) {
proc_params_ = proc_params;
@@ -220,10 +220,10 @@
void TryServingAllJobsFromHosts();
// NetworkChangeNotifier::IPAddressObserver:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// NetworkChangeNotifier::DNSObserver:
- virtual void OnDNSChanged() override;
+ void OnDNSChanged() override;
// True if have a DnsClient with a valid DnsConfig.
bool HaveDnsConfig() const;
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index dadc03d..017625f 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -125,11 +125,11 @@
AddRule(hostname, ADDRESS_FAMILY_IPV6, result);
}
- virtual int Resolve(const std::string& hostname,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override {
+ int Resolve(const std::string& hostname,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override {
base::AutoLock lock(lock_);
capture_list_.push_back(ResolveKey(hostname, address_family));
++num_requests_waiting_;
@@ -166,7 +166,7 @@
}
protected:
- virtual ~MockHostResolverProc() {}
+ ~MockHostResolverProc() override {}
private:
mutable base::Lock lock_;
@@ -361,11 +361,11 @@
int resolved_attempt_number() { return resolved_attempt_number_; }
// HostResolverProc methods.
- virtual int Resolve(const std::string& host,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override {
+ int Resolve(const std::string& host,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override {
bool wait_for_right_attempt_to_complete = true;
{
base::AutoLock auto_lock(lock_);
@@ -401,7 +401,7 @@
}
protected:
- virtual ~LookupAttemptHostResolverProc() {}
+ ~LookupAttemptHostResolverProc() override {}
private:
int attempt_number_to_resolve_;
@@ -439,7 +439,7 @@
protected:
// A Request::Handler which is a proxy to the HostResolverImplTest fixture.
struct Handler : public Request::Handler {
- virtual ~Handler() {}
+ ~Handler() override {}
// Proxy functions so that classes derived from Handler can access them.
Request* CreateRequest(const HostResolver::RequestInfo& info,
@@ -732,7 +732,7 @@
TEST_F(HostResolverImplTest, CancelWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
// Port 80 is the first request that the callback will be invoked for.
// While we are executing within that callback, cancel the other requests
// in the job and start another request.
@@ -761,7 +761,7 @@
TEST_F(HostResolverImplTest, DeleteWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
EXPECT_EQ("a", req->info().hostname());
EXPECT_EQ(80, req->info().port());
@@ -787,7 +787,7 @@
TEST_F(HostResolverImplTest, DeleteWithinAbortedCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
EXPECT_EQ("a", req->info().hostname());
EXPECT_EQ(80, req->info().port());
@@ -827,7 +827,7 @@
TEST_F(HostResolverImplTest, StartWithinCallback) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
if (req->index() == 0) {
// On completing the first request, start another request for "a".
// Since caching is disabled, this will result in another async request.
@@ -858,7 +858,7 @@
TEST_F(HostResolverImplTest, BypassCache) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
if (req->index() == 0) {
// On completing the first request, start another request for "a".
// Since caching is enabled, this should complete synchronously.
@@ -956,7 +956,7 @@
// will not be aborted.
TEST_F(HostResolverImplTest, AbortOnlyExistingRequestsOnIPAddressChange) {
struct MyHandler : public Handler {
- virtual void Handle(Request* req) override {
+ void Handle(Request* req) override {
// Start new request for a different hostname to ensure that the order
// of jobs in HostResolverImpl is not stable.
std::string hostname;
@@ -1379,7 +1379,7 @@
}
// HostResolverImplTest implementation:
- virtual void CreateResolverWithLimitsAndParams(
+ void CreateResolverWithLimitsAndParams(
size_t max_concurrent_resolves,
const HostResolverImpl::ProcTaskParams& params) override {
HostResolverImpl::Options options = DefaultOptions();
diff --git a/net/dns/host_resolver_proc.h b/net/dns/host_resolver_proc.h
index 695e3bc..cb61e19 100644
--- a/net/dns/host_resolver_proc.h
+++ b/net/dns/host_resolver_proc.h
@@ -95,13 +95,14 @@
class NET_EXPORT_PRIVATE SystemHostResolverProc : public HostResolverProc {
public:
SystemHostResolverProc();
- virtual int Resolve(const std::string& hostname,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addr_list,
- int* os_error) override;
+ int Resolve(const std::string& hostname,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addr_list,
+ int* os_error) override;
+
protected:
- virtual ~SystemHostResolverProc();
+ ~SystemHostResolverProc() override;
DISALLOW_COPY_AND_ASSIGN(SystemHostResolverProc);
};
diff --git a/net/dns/mapped_host_resolver.h b/net/dns/mapped_host_resolver.h
index 6d4ab92..ecdc2e8 100644
--- a/net/dns/mapped_host_resolver.h
+++ b/net/dns/mapped_host_resolver.h
@@ -23,7 +23,7 @@
// Creates a MappedHostResolver that forwards all of its requests through
// |impl|.
explicit MappedHostResolver(scoped_ptr<HostResolver> impl);
- virtual ~MappedHostResolver();
+ ~MappedHostResolver() override;
// Adds a rule to this mapper. The format of the rule can be one of:
//
@@ -45,19 +45,19 @@
}
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual void SetDnsClientEnabled(bool enabled) override;
- virtual HostCache* GetHostCache() override;
- virtual base::Value* GetDnsConfigAsValue() const override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ void SetDnsClientEnabled(bool enabled) override;
+ HostCache* GetHostCache() override;
+ base::Value* GetDnsConfigAsValue() const override;
private:
// Modify the request |info| according to |rules_|. Returns either OK or
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h
index 9d5339f..501d0fc 100644
--- a/net/dns/mock_host_resolver.h
+++ b/net/dns/mock_host_resolver.h
@@ -55,7 +55,7 @@
public base::SupportsWeakPtr<MockHostResolverBase>,
public base::NonThreadSafe {
public:
- virtual ~MockHostResolverBase();
+ ~MockHostResolverBase() override;
RuleBasedHostResolverProc* rules() { return rules_.get(); }
void set_rules(RuleBasedHostResolverProc* rules) { rules_ = rules; }
@@ -74,17 +74,17 @@
}
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override;
- virtual HostCache* GetHostCache() override;
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override;
+ HostCache* GetHostCache() override;
// Resolves all pending requests. It is only valid to invoke this if
// set_ondemand_mode was set before. The requests are resolved asynchronously,
@@ -144,7 +144,7 @@
class MockHostResolver : public MockHostResolverBase {
public:
MockHostResolver() : MockHostResolverBase(false /*use_caching*/) {}
- virtual ~MockHostResolver() {}
+ ~MockHostResolver() override {}
};
// Same as MockHostResolver, except internally it uses a host-cache.
@@ -155,7 +155,7 @@
class MockCachingHostResolver : public MockHostResolverBase {
public:
MockCachingHostResolver() : MockHostResolverBase(true /*use_caching*/) {}
- virtual ~MockCachingHostResolver() {}
+ ~MockCachingHostResolver() override {}
};
// RuleBasedHostResolverProc applies a set of rules to map a host string to
@@ -202,17 +202,17 @@
void ClearRules();
// HostResolverProc methods:
- virtual int Resolve(const std::string& host,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) override;
+ int Resolve(const std::string& host,
+ AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
+ AddressList* addrlist,
+ int* os_error) override;
private:
struct Rule;
typedef std::list<Rule> RuleList;
- virtual ~RuleBasedHostResolverProc();
+ ~RuleBasedHostResolverProc() override;
RuleList rules_;
};
@@ -223,16 +223,16 @@
// HangingHostResolver never completes its |Resolve| request.
class HangingHostResolver : public HostResolver {
public:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override;
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle req) override {}
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override;
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle req) override {}
};
// This class sets the default HostResolverProc for a particular scope. The
diff --git a/net/dns/notify_watcher_mac.h b/net/dns/notify_watcher_mac.h
index 0951c2f..ded752c 100644
--- a/net/dns/notify_watcher_mac.h
+++ b/net/dns/notify_watcher_mac.h
@@ -20,7 +20,7 @@
NotifyWatcherMac();
// When deleted, automatically cancels.
- virtual ~NotifyWatcherMac();
+ ~NotifyWatcherMac() override;
// Registers for notifications for |key|. Returns true if succeeds. If so,
// will deliver asynchronous notifications and errors to |callback|.
@@ -31,8 +31,8 @@
private:
// MessageLoopForIO::Watcher:
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {}
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override {}
int notify_fd_;
int notify_token_;
diff --git a/net/dns/serial_worker_unittest.cc b/net/dns/serial_worker_unittest.cc
index c670a75..8e30e28 100644
--- a/net/dns/serial_worker_unittest.cc
+++ b/net/dns/serial_worker_unittest.cc
@@ -21,16 +21,16 @@
public:
explicit TestSerialWorker(SerialWorkerTest* t)
: test_(t) {}
- virtual void DoWork() override {
+ void DoWork() override {
ASSERT_TRUE(test_);
test_->OnWork();
}
- virtual void OnWorkFinished() override {
+ void OnWorkFinished() override {
ASSERT_TRUE(test_);
test_->OnWorkFinished();
}
private:
- virtual ~TestSerialWorker() {}
+ ~TestSerialWorker() override {}
SerialWorkerTest* test_;
};
diff --git a/net/dns/single_request_host_resolver_unittest.cc b/net/dns/single_request_host_resolver_unittest.cc
index 7b09193..a1442bd 100644
--- a/net/dns/single_request_host_resolver_unittest.cc
+++ b/net/dns/single_request_host_resolver_unittest.cc
@@ -22,20 +22,18 @@
public:
HangingHostResolver() : outstanding_request_(NULL) {}
- virtual ~HangingHostResolver() {
- EXPECT_TRUE(!has_outstanding_request());
- }
+ ~HangingHostResolver() override { EXPECT_TRUE(!has_outstanding_request()); }
bool has_outstanding_request() const {
return outstanding_request_ != NULL;
}
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override {
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override {
EXPECT_FALSE(has_outstanding_request());
outstanding_request_ = reinterpret_cast<RequestHandle>(0x1234);
*out_req = outstanding_request_;
@@ -45,14 +43,14 @@
return ERR_IO_PENDING;
}
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override {
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override {
NOTIMPLEMENTED();
return ERR_UNEXPECTED;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_TRUE(has_outstanding_request());
EXPECT_EQ(req, outstanding_request_);
outstanding_request_ = NULL;
diff --git a/net/extras/sqlite/sqlite_channel_id_store.h b/net/extras/sqlite/sqlite_channel_id_store.h
index e743ba6..fc85458 100644
--- a/net/extras/sqlite/sqlite_channel_id_store.h
+++ b/net/extras/sqlite/sqlite_channel_id_store.h
@@ -36,18 +36,18 @@
const scoped_refptr<base::SequencedTaskRunner>& background_task_runner);
// DefaultChannelIDStore::PersistentStore:
- virtual void Load(const LoadedCallback& loaded_callback) override;
- virtual void AddChannelID(
+ void Load(const LoadedCallback& loaded_callback) override;
+ void AddChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void DeleteChannelID(
+ void DeleteChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
// Delete channel ids from servers in |server_identifiers|.
void DeleteAllInList(const std::list<std::string>& server_identifiers);
private:
- virtual ~SQLiteChannelIDStore();
+ ~SQLiteChannelIDStore() override;
class Backend;
diff --git a/net/filter/gzip_filter.h b/net/filter/gzip_filter.h
index 07b7821..597c2e7 100644
--- a/net/filter/gzip_filter.h
+++ b/net/filter/gzip_filter.h
@@ -27,7 +27,7 @@
class GZipFilter : public Filter {
public:
- virtual ~GZipFilter();
+ ~GZipFilter() override;
// Initializes filter decoding mode and internal control blocks.
// Parameter filter_type specifies the type of filter, which corresponds to
@@ -48,8 +48,7 @@
// stream_buffer_. On the other hand, *dest_len can be 0 upon successful
// return. For example, the internal zlib may process some pre-filter data
// but not produce output yet.
- virtual FilterStatus ReadFilteredData(char* dest_buffer,
- int* dest_len) override;
+ FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override;
private:
enum DecodingStatus {
diff --git a/net/filter/mock_filter_context.h b/net/filter/mock_filter_context.h
index bdef812..8150e8b 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -18,7 +18,7 @@
class MockFilterContext : public FilterContext {
public:
MockFilterContext();
- virtual ~MockFilterContext();
+ ~MockFilterContext() override;
void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; }
void SetURL(const GURL& gurl) { gurl_ = gurl; }
@@ -41,37 +41,37 @@
// of those interfaces as coding errors.
void NukeUnstableInterfaces();
- virtual bool GetMimeType(std::string* mime_type) const override;
+ bool GetMimeType(std::string* mime_type) const override;
// What URL was used to access this data?
// Return false if gurl is not present.
- virtual bool GetURL(GURL* gurl) const override;
+ bool GetURL(GURL* gurl) const override;
// What Content-Disposition did the server supply for this data?
// Return false if Content-Disposition was not present.
- virtual bool GetContentDisposition(std::string* disposition) const override;
+ bool GetContentDisposition(std::string* disposition) const override;
// What was this data requested from a server?
- virtual base::Time GetRequestTime() const override;
+ base::Time GetRequestTime() const override;
// Is data supplied from cache, or fresh across the net?
- virtual bool IsCachedContent() const override;
+ bool IsCachedContent() const override;
// Is this a download?
- virtual bool IsDownload() const override;
+ bool IsDownload() const override;
// Was this data flagged as a response to a request with an SDCH dictionary?
- virtual bool SdchResponseExpected() const override;
+ bool SdchResponseExpected() const override;
// How many bytes were fed to filter(s) so far?
- virtual int64 GetByteReadCount() const override;
+ int64 GetByteReadCount() const override;
- virtual int GetResponseCode() const override;
+ int GetResponseCode() const override;
// The URLRequestContext associated with the request.
- virtual const URLRequestContext* GetURLRequestContext() const override;
+ const URLRequestContext* GetURLRequestContext() const override;
- virtual void RecordPacketStats(StatisticSelector statistic) const override {}
+ void RecordPacketStats(StatisticSelector statistic) const override {}
private:
int buffer_size_;
diff --git a/net/filter/sdch_filter.h b/net/filter/sdch_filter.h
index 861a9ae..e9648b1 100644
--- a/net/filter/sdch_filter.h
+++ b/net/filter/sdch_filter.h
@@ -29,7 +29,7 @@
class NET_EXPORT_PRIVATE SdchFilter : public Filter {
public:
- virtual ~SdchFilter();
+ ~SdchFilter() override;
// Initializes filter decoding mode and internal control blocks.
bool InitDecoding(Filter::FilterType filter_type);
@@ -40,8 +40,7 @@
// Upon entry, *dest_len is the total size (in number of chars) of the
// destination buffer. Upon exit, *dest_len is the actual number of chars
// written into the destination buffer.
- virtual FilterStatus ReadFilteredData(char* dest_buffer,
- int* dest_len) override;
+ FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override;
private:
// Internal status. Once we enter an error state, we stop processing data.
diff --git a/net/ftp/ftp_network_layer.h b/net/ftp/ftp_network_layer.h
index 6242f74..f174df9 100644
--- a/net/ftp/ftp_network_layer.h
+++ b/net/ftp/ftp_network_layer.h
@@ -19,13 +19,13 @@
class NET_EXPORT FtpNetworkLayer : public FtpTransactionFactory {
public:
explicit FtpNetworkLayer(HostResolver* host_resolver);
- virtual ~FtpNetworkLayer();
+ ~FtpNetworkLayer() override;
static FtpTransactionFactory* CreateFactory(HostResolver* host_resolver);
// FtpTransactionFactory methods:
- virtual FtpTransaction* CreateTransaction() override;
- virtual void Suspend(bool suspend) override;
+ FtpTransaction* CreateTransaction() override;
+ void Suspend(bool suspend) override;
private:
scoped_refptr<FtpNetworkSession> session_;
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index ee0f28a..c8ed550 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -30,22 +30,23 @@
public:
FtpNetworkTransaction(FtpNetworkSession* session,
ClientSocketFactory* socket_factory);
- virtual ~FtpNetworkTransaction();
+ ~FtpNetworkTransaction() override;
virtual int Stop(int error);
virtual int RestartIgnoringLastError(const CompletionCallback& callback);
// FtpTransaction methods:
- virtual int Start(const FtpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual const FtpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual uint64 GetUploadProgress() const override;
+ int Start(const FtpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ const FtpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ uint64 GetUploadProgress() const override;
private:
FRIEND_TEST_ALL_PREFIXES(FtpNetworkTransactionTest,
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index de407d5..4ee812d 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -63,7 +63,7 @@
Init();
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -131,7 +131,7 @@
return state_;
}
- virtual void Reset() override {
+ void Reset() override {
DynamicSocketDataProvider::Reset();
Init();
}
@@ -205,7 +205,7 @@
FtpSocketDataProviderDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -232,7 +232,7 @@
FtpSocketDataProviderDirectoryListingWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -258,7 +258,7 @@
FtpSocketDataProviderDirectoryListingZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -278,7 +278,7 @@
FtpSocketDataProviderVMSDirectoryListing() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -312,7 +312,7 @@
FtpSocketDataProviderVMSDirectoryListingRootDirectory() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -348,7 +348,7 @@
FtpSocketDataProviderFileDownloadWithFileTypecode() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -371,7 +371,7 @@
FtpSocketDataProviderFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -398,7 +398,7 @@
FtpSocketDataProviderFileNotFound() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -428,7 +428,7 @@
FtpSocketDataProviderFileDownloadWithPasvFallback() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -453,7 +453,7 @@
FtpSocketDataProviderFileDownloadZeroSize() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -479,7 +479,7 @@
FtpSocketDataProviderFileDownloadCWD451() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -501,7 +501,7 @@
FtpSocketDataProviderVMSFileDownload() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -536,7 +536,7 @@
FtpSocketDataProviderEscaping() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -565,7 +565,7 @@
FtpSocketDataProviderFileDownloadTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -589,7 +589,7 @@
FtpSocketDataProviderDirectoryListingTransferStarting() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -614,7 +614,7 @@
FtpSocketDataProviderFileDownloadInvalidResponse() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -648,7 +648,7 @@
epsv_response_length_(epsv_response_length),
expected_state_(expected_state) {}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -676,7 +676,7 @@
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -701,7 +701,7 @@
expected_state_(expected_state) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -728,7 +728,7 @@
expected_password_(expected_password) {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
@@ -755,7 +755,7 @@
FtpSocketDataProviderCloseConnection() {
}
- virtual MockWriteResult OnWrite(const std::string& data) override {
+ MockWriteResult OnWrite(const std::string& data) override {
if (InjectFault())
return MockWriteResult(ASYNC, data.length());
switch (state()) {
diff --git a/net/http/disk_cache_based_quic_server_info.h b/net/http/disk_cache_based_quic_server_info.h
index 7707037..e5ced3f 100644
--- a/net/http/disk_cache_based_quic_server_info.h
+++ b/net/http/disk_cache_based_quic_server_info.h
@@ -31,11 +31,11 @@
HttpCache* http_cache);
// QuicServerInfo implementation.
- virtual void Start() override;
- virtual int WaitForDataReady(const CompletionCallback& callback) override;
- virtual bool IsDataReady() override;
- virtual bool IsReadyToPersist() override;
- virtual void Persist() override;
+ void Start() override;
+ int WaitForDataReady(const CompletionCallback& callback) override;
+ bool IsDataReady() override;
+ bool IsReadyToPersist() override;
+ void Persist() override;
private:
struct CacheOperationDataShim;
@@ -55,7 +55,7 @@
NONE,
};
- virtual ~DiskCacheBasedQuicServerInfo();
+ ~DiskCacheBasedQuicServerInfo() override;
std::string key() const;
diff --git a/net/http/failing_http_transaction_factory.cc b/net/http/failing_http_transaction_factory.cc
index 0b97aa2..dfe78f2 100644
--- a/net/http/failing_http_transaction_factory.cc
+++ b/net/http/failing_http_transaction_factory.cc
@@ -29,43 +29,38 @@
class FailingHttpTransaction : public HttpTransaction {
public:
explicit FailingHttpTransaction(Error error);
- virtual ~FailingHttpTransaction();
+ ~FailingHttpTransaction() override;
// HttpTransaction
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(
- const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(
- net::QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
private:
Error error_;
diff --git a/net/http/failing_http_transaction_factory.h b/net/http/failing_http_transaction_factory.h
index 8a785f5..dd4a811 100644
--- a/net/http/failing_http_transaction_factory.h
+++ b/net/http/failing_http_transaction_factory.h
@@ -23,14 +23,13 @@
public:
// The caller must guarantee that |session| outlives this object.
FailingHttpTransactionFactory(HttpNetworkSession* session, Error error);
- virtual ~FailingHttpTransactionFactory();
+ ~FailingHttpTransactionFactory() override;
// HttpTransactionFactory:
- virtual int CreateTransaction(
- RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
private:
HttpNetworkSession* session_;
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc
index 4002bab..3565b0c 100644
--- a/net/http/http_auth_cache_unittest.cc
+++ b/net/http/http_auth_cache_unittest.cc
@@ -32,27 +32,27 @@
properties_ = 0;
}
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override {
return HttpAuth::AUTHORIZATION_RESULT_REJECT;
}
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override {
+ bool Init(HttpAuthChallengeTokenizer* challenge) override {
return false; // Unused.
}
- virtual int GenerateAuthTokenImpl(const AuthCredentials*,
- const HttpRequestInfo*,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials*,
+ const HttpRequestInfo*,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
*auth_token = "mock-credentials";
return OK;
}
private:
- virtual ~MockAuthHandler() {}
+ ~MockAuthHandler() override {}
};
const char* kRealm1 = "Realm1";
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index 306cabd..c39256b 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -128,7 +128,7 @@
}
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override {
+ bool Init(HttpAuthChallengeTokenizer* challenge) override {
HttpAuthHandlerMock::Init(challenge);
set_allows_default_credentials(true);
set_allows_explicit_credentials(false);
@@ -143,10 +143,10 @@
return true;
}
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
int result =
HttpAuthHandlerMock::GenerateAuthTokenImpl(credentials,
request, callback,
diff --git a/net/http/http_auth_filter.h b/net/http/http_auth_filter.h
index 419b8af..260da47 100644
--- a/net/http/http_auth_filter.h
+++ b/net/http/http_auth_filter.h
@@ -35,7 +35,7 @@
class NET_EXPORT HttpAuthFilterWhitelist : public HttpAuthFilter {
public:
explicit HttpAuthFilterWhitelist(const std::string& server_whitelist);
- virtual ~HttpAuthFilterWhitelist();
+ ~HttpAuthFilterWhitelist() override;
// Adds an individual URL |filter| to the list, of the specified |target|.
bool AddFilter(const std::string& filter, HttpAuth::Target target);
@@ -46,7 +46,7 @@
const ProxyBypassRules& rules() const { return rules_; }
// HttpAuthFilter methods:
- virtual bool IsValid(const GURL& url, HttpAuth::Target target) const override;
+ bool IsValid(const GURL& url, HttpAuth::Target target) const override;
private:
// Installs the whitelist.
diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h
index 41a1805..4091ba3 100644
--- a/net/http/http_auth_gssapi_posix.h
+++ b/net/http/http_auth_gssapi_posix.h
@@ -109,68 +109,59 @@
// If |gssapi_library_name| is empty, hard-coded default library names are
// used.
explicit GSSAPISharedLibrary(const std::string& gssapi_library_name);
- virtual ~GSSAPISharedLibrary();
+ ~GSSAPISharedLibrary() override;
// GSSAPILibrary methods:
- virtual bool Init() override;
- virtual OM_uint32 import_name(
- OM_uint32* minor_status,
- const gss_buffer_t input_name_buffer,
- const gss_OID input_name_type,
- gss_name_t* output_name) override;
- virtual OM_uint32 release_name(
- OM_uint32* minor_status,
- gss_name_t* input_name) override;
- virtual OM_uint32 release_buffer(
- OM_uint32* minor_status,
- gss_buffer_t buffer) override;
- virtual OM_uint32 display_name(
- OM_uint32* minor_status,
- const gss_name_t input_name,
- gss_buffer_t output_name_buffer,
- gss_OID* output_name_type) override;
- virtual OM_uint32 display_status(
- OM_uint32* minor_status,
- OM_uint32 status_value,
- int status_type,
- const gss_OID mech_type,
- OM_uint32* message_contex,
- gss_buffer_t status_string) override;
- virtual OM_uint32 init_sec_context(
- OM_uint32* minor_status,
- const gss_cred_id_t initiator_cred_handle,
- gss_ctx_id_t* context_handle,
- const gss_name_t target_name,
- const gss_OID mech_type,
- OM_uint32 req_flags,
- OM_uint32 time_req,
- const gss_channel_bindings_t input_chan_bindings,
- const gss_buffer_t input_token,
- gss_OID* actual_mech_type,
- gss_buffer_t output_token,
- OM_uint32* ret_flags,
- OM_uint32* time_rec) override;
- virtual OM_uint32 wrap_size_limit(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- int conf_req_flag,
- gss_qop_t qop_req,
- OM_uint32 req_output_size,
- OM_uint32* max_input_size) override;
- virtual OM_uint32 delete_sec_context(
- OM_uint32* minor_status,
- gss_ctx_id_t* context_handle,
- gss_buffer_t output_token) override;
- virtual OM_uint32 inquire_context(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- gss_name_t* src_name,
- gss_name_t* targ_name,
- OM_uint32* lifetime_rec,
- gss_OID* mech_type,
- OM_uint32* ctx_flags,
- int* locally_initiated,
- int* open) override;
+ bool Init() override;
+ OM_uint32 import_name(OM_uint32* minor_status,
+ const gss_buffer_t input_name_buffer,
+ const gss_OID input_name_type,
+ gss_name_t* output_name) override;
+ OM_uint32 release_name(OM_uint32* minor_status,
+ gss_name_t* input_name) override;
+ OM_uint32 release_buffer(OM_uint32* minor_status,
+ gss_buffer_t buffer) override;
+ OM_uint32 display_name(OM_uint32* minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t output_name_buffer,
+ gss_OID* output_name_type) override;
+ OM_uint32 display_status(OM_uint32* minor_status,
+ OM_uint32 status_value,
+ int status_type,
+ const gss_OID mech_type,
+ OM_uint32* message_contex,
+ gss_buffer_t status_string) override;
+ OM_uint32 init_sec_context(OM_uint32* minor_status,
+ const gss_cred_id_t initiator_cred_handle,
+ gss_ctx_id_t* context_handle,
+ const gss_name_t target_name,
+ const gss_OID mech_type,
+ OM_uint32 req_flags,
+ OM_uint32 time_req,
+ const gss_channel_bindings_t input_chan_bindings,
+ const gss_buffer_t input_token,
+ gss_OID* actual_mech_type,
+ gss_buffer_t output_token,
+ OM_uint32* ret_flags,
+ OM_uint32* time_rec) override;
+ OM_uint32 wrap_size_limit(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ int conf_req_flag,
+ gss_qop_t qop_req,
+ OM_uint32 req_output_size,
+ OM_uint32* max_input_size) override;
+ OM_uint32 delete_sec_context(OM_uint32* minor_status,
+ gss_ctx_id_t* context_handle,
+ gss_buffer_t output_token) override;
+ OM_uint32 inquire_context(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ gss_name_t* src_name,
+ gss_name_t* targ_name,
+ OM_uint32* lifetime_rec,
+ gss_OID* mech_type,
+ OM_uint32* ctx_flags,
+ int* locally_initiated,
+ int* open) override;
private:
typedef typeof(&gss_import_name) gss_import_name_type;
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index f718786..186caf6 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -19,31 +19,30 @@
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
};
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
- virtual ~HttpAuthHandlerBasic() {}
+ ~HttpAuthHandlerBasic() override {}
bool ParseChallenge(HttpAuthChallengeTokenizer* challenge);
};
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index ca148fe..dbe02b4 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -38,7 +38,8 @@
class DynamicNonceGenerator : public NonceGenerator {
public:
DynamicNonceGenerator();
- virtual std::string GenerateNonce() const override;
+ std::string GenerateNonce() const override;
+
private:
DISALLOW_COPY_AND_ASSIGN(DynamicNonceGenerator);
};
@@ -49,7 +50,7 @@
public:
explicit FixedNonceGenerator(const std::string& nonce);
- virtual std::string GenerateNonce() const override;
+ std::string GenerateNonce() const override;
private:
const std::string nonce_;
@@ -59,34 +60,33 @@
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
// This factory owns the passed in |nonce_generator|.
void set_nonce_generator(const NonceGenerator* nonce_generator);
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
scoped_ptr<const NonceGenerator> nonce_generator_;
};
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
FRIEND_TEST_ALL_PREFIXES(HttpAuthHandlerDigestTest, ParseChallenge);
@@ -120,7 +120,7 @@
// the handler. The lifetime of the |nonce_generator| must exceed that of this
// handler.
HttpAuthHandlerDigest(int nonce_count, const NonceGenerator* nonce_generator);
- virtual ~HttpAuthHandlerDigest();
+ ~HttpAuthHandlerDigest() override;
// Parse the challenge, saving the results into this instance.
// Returns true on success.
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
index efb432a..06f7f34 100644
--- a/net/http/http_auth_handler_factory.h
+++ b/net/http/http_auth_handler_factory.h
@@ -130,7 +130,7 @@
: public HttpAuthHandlerFactory {
public:
HttpAuthHandlerRegistryFactory();
- virtual ~HttpAuthHandlerRegistryFactory();
+ ~HttpAuthHandlerRegistryFactory() override;
// Sets an URL security manager into the factory associated with |scheme|.
void SetURLSecurityManager(const std::string& scheme,
@@ -183,13 +183,13 @@
// Creates an auth handler by dispatching out to the registered factories
// based on the first token in |challenge|.
- virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap;
diff --git a/net/http/http_auth_handler_factory_unittest.cc b/net/http/http_auth_handler_factory_unittest.cc
index 9860623..2aa7958 100644
--- a/net/http/http_auth_handler_factory_unittest.cc
+++ b/net/http/http_auth_handler_factory_unittest.cc
@@ -19,15 +19,15 @@
public:
explicit MockHttpAuthHandlerFactory(int return_code) :
return_code_(return_code) {}
- virtual ~MockHttpAuthHandlerFactory() {}
+ ~MockHttpAuthHandlerFactory() override {}
- virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override {
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override {
handler->reset();
return return_code_;
}
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h
index b903e8c..32b416d 100644
--- a/net/http/http_auth_handler_mock.h
+++ b/net/http/http_auth_handler_mock.h
@@ -33,7 +33,7 @@
class Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
void AddMockHandler(HttpAuthHandler* handler, HttpAuth::Target target);
@@ -42,14 +42,13 @@
}
// HttpAuthHandlerFactory:
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
ScopedVector<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS];
@@ -58,7 +57,7 @@
HttpAuthHandlerMock();
- virtual ~HttpAuthHandlerMock();
+ ~HttpAuthHandlerMock() override;
void SetResolveExpectation(Resolve resolve);
@@ -87,19 +86,19 @@
}
// HttpAuthHandler:
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
- virtual bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
- virtual bool AllowsExplicitCredentials() override;
+ bool NeedsIdentity() override;
+ bool AllowsDefaultCredentials() override;
+ bool AllowsExplicitCredentials() override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
void OnResolveCanonicalName();
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index 8ff9244..fc596fa 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -43,7 +43,7 @@
class NET_EXPORT_PRIVATE Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
// |disable_cname_lookup()| and |set_disable_cname_lookup()| get/set whether
// the auth handlers generated by this factory should skip looking up the
@@ -69,14 +69,13 @@
auth_library_.reset(auth_library);
}
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
private:
bool disable_cname_lookup_;
@@ -99,26 +98,26 @@
bool disable_cname_lookup,
bool use_port);
- virtual ~HttpAuthHandlerNegotiate();
+ ~HttpAuthHandlerNegotiate() override;
// These are public for unit tests
std::string CreateSPN(const AddressList& address_list, const GURL& orign);
const std::string& spn() const { return spn_; }
// HttpAuthHandler:
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
- virtual bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
- virtual bool AllowsExplicitCredentials() override;
+ bool NeedsIdentity() override;
+ bool AllowsDefaultCredentials() override;
+ bool AllowsExplicitCredentials() override;
protected:
- virtual bool Init(HttpAuthChallengeTokenizer* challenge) override;
+ bool Init(HttpAuthChallengeTokenizer* challenge) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
enum State {
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index 5a998ac..0712bb3 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -39,16 +39,15 @@
class Factory : public HttpAuthHandlerFactory {
public:
Factory();
- virtual ~Factory();
+ ~Factory() override;
- virtual int CreateAuthHandler(
- HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int digest_nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override;
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int digest_nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override;
#if defined(NTLM_SSPI)
// Set the SSPILibrary to use. Typically the only callers which need to use
// this are unit tests which pass in a mocked-out version of the SSPI
@@ -104,11 +103,11 @@
URLSecurityManager* url_security_manager);
#endif
- virtual bool NeedsIdentity() override;
+ bool NeedsIdentity() override;
- virtual bool AllowsDefaultCredentials() override;
+ bool AllowsDefaultCredentials() override;
- virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::AuthorizationResult HandleAnotherChallenge(
HttpAuthChallengeTokenizer* challenge) override;
protected:
@@ -116,15 +115,15 @@
// It does nothing in the portable implementation.
int InitializeBeforeFirstChallenge();
- virtual bool Init(HttpAuthChallengeTokenizer* tok) override;
+ bool Init(HttpAuthChallengeTokenizer* tok) override;
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override;
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override;
private:
- virtual ~HttpAuthHandlerNTLM();
+ ~HttpAuthHandlerNTLM() override;
#if defined(NTLM_PORTABLE)
// For unit tests to override the GenerateRandom and GetHostName functions.
diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h
index 541994d..194f7ef 100644
--- a/net/http/http_basic_stream.h
+++ b/net/http/http_basic_stream.h
@@ -30,55 +30,53 @@
// Constructs a new HttpBasicStream. InitializeStream must be called to
// initialize it correctly.
HttpBasicStream(ClientSocketHandle* connection, bool using_proxy);
- virtual ~HttpBasicStream();
+ ~HttpBasicStream() override;
// HttpStream methods:
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
- virtual UploadProgress GetUploadProgress() const override;
+ UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
+ void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
+ HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
+ bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
+ bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
+ bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
+ void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
+ bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
+ bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
+ void Drain(HttpNetworkSession* session) override;
- virtual void SetPriority(RequestPriority priority) override;
+ void SetPriority(RequestPriority priority) override;
private:
HttpStreamParser* parser() const { return state_.parser(); }
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 1c8e62a..61a12f6 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -286,8 +286,7 @@
: http_cache_(http_cache) {
}
- virtual QuicServerInfo* GetForServer(
- const QuicServerId& server_id) override {
+ QuicServerInfo* GetForServer(const QuicServerId& server_id) override {
return new DiskCacheBasedQuicServerInfo(server_id, http_cache_);
}
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 5e6851f..1c1338b 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -108,15 +108,15 @@
const base::FilePath& path,
int max_bytes,
const scoped_refptr<base::SingleThreadTaskRunner>& thread);
- virtual ~DefaultBackend();
+ ~DefaultBackend() override;
// Returns a factory for an in-memory cache.
static BackendFactory* InMemory(int max_bytes);
// BackendFactory implementation.
- virtual int CreateBackend(NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const CompletionCallback& callback) override;
+ int CreateBackend(NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const CompletionCallback& callback) override;
private:
CacheType type_;
@@ -145,7 +145,7 @@
NetLog* net_log,
BackendFactory* backend_factory);
- virtual ~HttpCache();
+ ~HttpCache() override;
HttpTransactionFactory* network_layer() { return network_layer_.get(); }
@@ -213,10 +213,10 @@
}
// HttpTransactionFactory implementation:
- virtual int CreateTransaction(RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
base::WeakPtr<HttpCache> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index cc1f467..0b4792b 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -61,7 +61,7 @@
Transaction(RequestPriority priority,
HttpCache* cache);
- virtual ~Transaction();
+ ~Transaction() override;
Mode mode() const { return mode_; }
@@ -110,39 +110,35 @@
}
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress(void) const override;
- virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress(void) const override;
+ void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
private:
static const size_t kNumValidationHeaders = 2;
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 0b05057..a0225e8 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -496,12 +496,13 @@
class FakeWebSocketHandshakeStreamCreateHelper
: public net::WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual ~FakeWebSocketHandshakeStreamCreateHelper() {}
- virtual net::WebSocketHandshakeStreamBase* CreateBasicStream(
- scoped_ptr<net::ClientSocketHandle> connect, bool using_proxy) override {
+ ~FakeWebSocketHandshakeStreamCreateHelper() override {}
+ net::WebSocketHandshakeStreamBase* CreateBasicStream(
+ scoped_ptr<net::ClientSocketHandle> connect,
+ bool using_proxy) override {
return NULL;
}
- virtual net::WebSocketHandshakeStreamBase* CreateSpdyStream(
+ net::WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<net::SpdySession>& session,
bool use_relative_url) override {
return NULL;
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index 58b02f2..13b0c79 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -28,7 +28,7 @@
// Construct a HttpNetworkLayer with an existing HttpNetworkSession which
// contains a valid ProxyService.
explicit HttpNetworkLayer(HttpNetworkSession* session);
- virtual ~HttpNetworkLayer();
+ ~HttpNetworkLayer() override;
// Create a transaction factory that instantiate a network layer over an
// existing network session. Network session contains some valuable
@@ -43,14 +43,14 @@
static void ForceAlternateProtocol();
// HttpTransactionFactory methods:
- virtual int CreateTransaction(RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override;
- virtual HttpCache* GetCache() override;
- virtual HttpNetworkSession* GetSession() override;
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override;
+ HttpCache* GetCache() override;
+ HttpNetworkSession* GetSession() override;
// base::PowerObserver methods:
- virtual void OnSuspend() override;
- virtual void OnResume() override;
+ void OnSuspend() override;
+ void OnResume() override;
private:
const scoped_refptr<HttpNetworkSession> session_;
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 57ebdf7..c7c217d 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -42,68 +42,62 @@
HttpNetworkTransaction(RequestPriority priority,
HttpNetworkSession* session);
- virtual ~HttpNetworkTransaction();
+ ~HttpNetworkTransaction() override;
// HttpTransaction methods:
- virtual int Start(const HttpRequestInfo* request_info,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
- const CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- X509Certificate* client_cert,
- const CompletionCallback& callback) override;
- virtual int RestartWithAuth(const AuthCredentials& credentials,
- const CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
+ int Start(const HttpRequestInfo* request_info,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ int RestartIgnoringLastError(const CompletionCallback& callback) override;
+ int RestartWithCertificate(X509Certificate* client_cert,
+ const CompletionCallback& callback) override;
+ int RestartWithAuth(const AuthCredentials& credentials,
+ const CompletionCallback& callback) override;
+ bool IsReadyToRestartForAuth() override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual const HttpResponseInfo* GetResponseInfo() const override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ const HttpResponseInfo* GetResponseInfo() const override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void SetPriority(RequestPriority priority) override;
+ void SetWebSocketHandshakeStreamCreateHelper(
WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
// HttpStreamRequest::Delegate methods:
- virtual void OnStreamReady(const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override;
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override;
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override;
- virtual void OnStreamFailed(int status,
- const SSLConfig& used_ssl_config) override;
- virtual void OnCertificateError(int status,
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override;
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override;
+ void OnNeedsProxyAuth(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override;
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override;
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override;
- virtual void OnNeedsProxyAuth(
- const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override;
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override;
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override;
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override;
private:
friend class HttpNetworkTransactionSSLTest;
diff --git a/net/http/http_network_transaction_ssl_unittest.cc b/net/http/http_network_transaction_ssl_unittest.cc
index 7b95f79..a84076e 100644
--- a/net/http/http_network_transaction_ssl_unittest.cc
+++ b/net/http/http_network_transaction_ssl_unittest.cc
@@ -31,12 +31,10 @@
ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1;
}
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = ssl_config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = ssl_config_; }
private:
- virtual ~TLS10SSLConfigService() {}
+ ~TLS10SSLConfigService() override {}
SSLConfig ssl_config_;
};
@@ -48,12 +46,10 @@
ssl_config_.version_max = SSL_PROTOCOL_VERSION_TLS1_1;
}
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = ssl_config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = ssl_config_; }
private:
- virtual ~TLS11SSLConfigService() {}
+ ~TLS11SSLConfigService() override {}
SSLConfig ssl_config_;
};
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index ca26d6f..e4a75b9 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -8191,20 +8191,20 @@
class FakeUploadElementReader : public UploadElementReader {
public:
FakeUploadElementReader() {}
- virtual ~FakeUploadElementReader() {}
+ ~FakeUploadElementReader() override {}
const CompletionCallback& callback() const { return callback_; }
// UploadElementReader overrides:
- virtual int Init(const CompletionCallback& callback) override {
+ int Init(const CompletionCallback& callback) override {
callback_ = callback;
return ERR_IO_PENDING;
}
- virtual uint64 GetContentLength() const override { return 0; }
- virtual uint64 BytesRemaining() const override { return 0; }
- virtual int Read(IOBuffer* buf,
- int buf_length,
- const CompletionCallback& callback) override {
+ uint64 GetContentLength() const override { return 0; }
+ uint64 BytesRemaining() const override { return 0; }
+ int Read(IOBuffer* buf,
+ int buf_length,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
@@ -9097,13 +9097,13 @@
class CapturingProxyResolver : public ProxyResolver {
public:
CapturingProxyResolver() : ProxyResolver(false /* expects_pac_bytes */) {}
- virtual ~CapturingProxyResolver() {}
+ ~CapturingProxyResolver() override {}
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
ProxyServer proxy_server(ProxyServer::SCHEME_HTTP,
HostPortPair("myproxy", 80));
results->UseProxyServer(proxy_server);
@@ -9111,21 +9111,17 @@
return OK;
}
- virtual void CancelRequest(RequestHandle request) override {
- NOTREACHED();
- }
+ void CancelRequest(RequestHandle request) override { NOTREACHED(); }
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- NOTREACHED();
- }
+ void CancelSetPacScript() override { NOTREACHED(); }
- virtual int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&,
- const CompletionCallback& /*callback*/) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&,
+ const CompletionCallback& /*callback*/) override {
return OK;
}
@@ -10060,13 +10056,13 @@
public:
explicit UrlRecordingHttpAuthHandlerMock(GURL* url) : url_(url) {}
- virtual ~UrlRecordingHttpAuthHandlerMock() {}
+ ~UrlRecordingHttpAuthHandlerMock() override {}
protected:
- virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
- const HttpRequestInfo* request,
- const CompletionCallback& callback,
- std::string* auth_token) override {
+ int GenerateAuthTokenImpl(const AuthCredentials* credentials,
+ const HttpRequestInfo* request,
+ const CompletionCallback& callback,
+ std::string* auth_token) override {
*url_ = request->url;
return HttpAuthHandlerMock::GenerateAuthTokenImpl(
credentials, request, callback, auth_token);
@@ -11153,31 +11149,31 @@
public:
explicit OneTimeCachingHostResolver(const HostPortPair& host_port)
: host_port_(host_port) {}
- virtual ~OneTimeCachingHostResolver() {}
+ ~OneTimeCachingHostResolver() override {}
RuleBasedHostResolverProc* rules() { return host_resolver_.rules(); }
// HostResolver methods:
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override {
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override {
return host_resolver_.Resolve(
info, priority, addresses, callback, out_req, net_log);
}
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override {
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override {
int rv = host_resolver_.ResolveFromCache(info, addresses, net_log);
if (rv == OK && info.host_port_pair().Equals(host_port_))
host_resolver_.GetHostCache()->clear();
return rv;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
host_resolver_.CancelRequest(req);
}
@@ -12202,92 +12198,81 @@
public base::SupportsWeakPtr<FakeStream> {
public:
explicit FakeStream(RequestPriority priority) : priority_(priority) {}
- virtual ~FakeStream() {}
+ ~FakeStream() override {}
RequestPriority priority() const { return priority_; }
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual void Close(bool not_reusable) override {}
+ void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override {
+ bool IsResponseBodyComplete() const override {
ADD_FAILURE();
return false;
}
- virtual bool CanFindEndOfResponse() const override {
- return false;
- }
+ bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override {
+ bool IsConnectionReused() const override {
ADD_FAILURE();
return false;
}
- virtual void SetConnectionReused() override {
- ADD_FAILURE();
- }
+ void SetConnectionReused() override { ADD_FAILURE(); }
- virtual bool IsConnectionReusable() const override {
+ bool IsConnectionReusable() const override {
ADD_FAILURE();
return false;
}
- virtual int64 GetTotalReceivedBytes() const override {
+ int64 GetTotalReceivedBytes() const override {
ADD_FAILURE();
return 0;
}
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override {
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
ADD_FAILURE();
return false;
}
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {
+ void GetSSLInfo(SSLInfo* ssl_info) override { ADD_FAILURE(); }
+
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
ADD_FAILURE();
}
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {
- ADD_FAILURE();
- }
-
- virtual bool IsSpdyHttpStream() const override {
+ bool IsSpdyHttpStream() const override {
ADD_FAILURE();
return false;
}
- virtual void Drain(HttpNetworkSession* session) override {
- ADD_FAILURE();
- }
+ void Drain(HttpNetworkSession* session) override { ADD_FAILURE(); }
- virtual void SetPriority(RequestPriority priority) override {
- priority_ = priority;
- }
+ void SetPriority(RequestPriority priority) override { priority_ = priority; }
private:
RequestPriority priority_;
@@ -12313,7 +12298,7 @@
delegate_(delegate),
websocket_stream_create_helper_(create_helper) {}
- virtual ~FakeStreamRequest() {}
+ ~FakeStreamRequest() override {}
RequestPriority priority() const { return priority_; }
@@ -12333,32 +12318,23 @@
return weak_stream;
}
- virtual int RestartTunnelWithProxyAuth(
- const AuthCredentials& credentials) override {
+ int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual LoadState GetLoadState() const override {
+ LoadState GetLoadState() const override {
ADD_FAILURE();
return LoadState();
}
- virtual void SetPriority(RequestPriority priority) override {
- priority_ = priority;
- }
+ void SetPriority(RequestPriority priority) override { priority_ = priority; }
- virtual bool was_npn_negotiated() const override {
- return false;
- }
+ bool was_npn_negotiated() const override { return false; }
- virtual NextProto protocol_negotiated() const override {
- return kProtoUnknown;
- }
+ NextProto protocol_negotiated() const override { return kProtoUnknown; }
- virtual bool using_spdy() const override {
- return false;
- }
+ bool using_spdy() const override { return false; }
private:
RequestPriority priority_;
@@ -12372,7 +12348,7 @@
class FakeStreamFactory : public HttpStreamFactory {
public:
FakeStreamFactory() {}
- virtual ~FakeStreamFactory() {}
+ ~FakeStreamFactory() override {}
// Returns a WeakPtr<> to the last HttpStreamRequest returned by
// RequestStream() (which may be NULL if it was destroyed already).
@@ -12380,19 +12356,18 @@
return last_stream_request_;
}
- virtual HttpStreamRequest* RequestStream(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override {
+ HttpStreamRequest* RequestStream(const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log) override {
FakeStreamRequest* fake_request = new FakeStreamRequest(priority, delegate);
last_stream_request_ = fake_request->AsWeakPtr();
return fake_request;
}
- virtual HttpStreamRequest* RequestWebSocketHandshakeStream(
+ HttpStreamRequest* RequestWebSocketHandshakeStream(
const HttpRequestInfo& info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -12406,15 +12381,15 @@
return fake_request;
}
- virtual void PreconnectStreams(int num_streams,
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config) override {
+ void PreconnectStreams(int num_streams,
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config) override {
ADD_FAILURE();
}
- virtual const HostMappingRules* GetHostMappingRules() const override {
+ const HostMappingRules* GetHostMappingRules() const override {
ADD_FAILURE();
return NULL;
}
@@ -12430,21 +12405,21 @@
class FakeWebSocketStreamCreateHelper :
public WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override {
NOTREACHED();
return NULL;
}
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& session,
bool use_relative_url) override {
NOTREACHED();
return NULL;
};
- virtual ~FakeWebSocketStreamCreateHelper() {}
+ ~FakeWebSocketStreamCreateHelper() override {}
virtual scoped_ptr<WebSocketStream> Upgrade() {
NOTREACHED();
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index 87eeda4..e4f8382 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -52,42 +52,41 @@
bool is_https_proxy);
// On destruction Disconnect() is called.
- virtual ~HttpProxyClientSocket();
+ ~HttpProxyClientSocket() override;
// ProxyClientSocket implementation.
- virtual const HttpResponseInfo* GetConnectResponseInfo() const override;
- virtual HttpStream* CreateConnectResponseStream() override;
- virtual int RestartWithAuth(const CompletionCallback& callback) override;
- virtual const scoped_refptr<HttpAuthController>& GetAuthController() const
- override;
- virtual bool IsUsingSpdy() const override;
- virtual NextProto GetProtocolNegotiated() const override;
+ const HttpResponseInfo* GetConnectResponseInfo() const override;
+ HttpStream* CreateConnectResponseStream() override;
+ int RestartWithAuth(const CompletionCallback& callback) override;
+ const scoped_refptr<HttpAuthController>& GetAuthController() const override;
+ bool IsUsingSpdy() const override;
+ NextProto GetProtocolNegotiated() const override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
private:
enum State {
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 9dac090..988191b 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -111,12 +111,12 @@
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~HttpProxyConnectJob();
+ ~HttpProxyConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
- virtual void GetAdditionalErrorState(ClientSocketHandle* handle) override;
+ void GetAdditionalErrorState(ClientSocketHandle* handle) override;
private:
enum State {
@@ -157,7 +157,7 @@
// that the tunnel needs authentication credentials, the socket will be
// returned in this case, and must be release back to the pool; or
// a standard net error code will be returned.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<HttpProxySocketParams> params_;
TransportClientSocketPool* const transport_pool_;
@@ -197,59 +197,57 @@
const ProxyDelegate* proxy_delegate,
NetLog* net_log);
- virtual ~HttpProxyClientSocketPool();
+ ~HttpProxyClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* connect_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* connect_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
- virtual void FlushWithError(int error) override;
+ void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
+ int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// LowerLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
// HigherLayeredPool implementation.
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
private:
typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
@@ -264,12 +262,12 @@
NetLog* net_log);
// ClientSocketPoolBase::ConnectJobFactory methods.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 98b7322..d256646 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -66,8 +66,7 @@
on_tunnel_headers_received_called_(false) {
}
- virtual ~TestProxyDelegate() override {
- }
+ ~TestProxyDelegate() override {}
bool on_before_tunnel_request_called() const {
return on_before_tunnel_request_called_;
@@ -89,31 +88,26 @@
}
// ProxyDelegate:
- virtual void OnResolveProxy(const GURL& url,
- int load_flags,
- const ProxyService& proxy_service,
- ProxyInfo* result) override {
- }
+ void OnResolveProxy(const GURL& url,
+ int load_flags,
+ const ProxyService& proxy_service,
+ ProxyInfo* result) override {}
- virtual void OnFallback(const ProxyServer& bad_proxy,
- int net_error) override {
- }
+ void OnFallback(const ProxyServer& bad_proxy, int net_error) override {}
- virtual void OnBeforeSendHeaders(URLRequest* request,
- const ProxyInfo& proxy_info,
- HttpRequestHeaders* headers) override {
- }
+ void OnBeforeSendHeaders(URLRequest* request,
+ const ProxyInfo& proxy_info,
+ HttpRequestHeaders* headers) override {}
- virtual void OnBeforeTunnelRequest(
- const net::HostPortPair& proxy_server,
- net::HttpRequestHeaders* extra_headers) override {
+ void OnBeforeTunnelRequest(const net::HostPortPair& proxy_server,
+ net::HttpRequestHeaders* extra_headers) override {
on_before_tunnel_request_called_ = true;
if (extra_headers) {
extra_headers->SetHeader("Foo", proxy_server.ToString());
}
}
- virtual void OnTunnelHeadersReceived(
+ void OnTunnelHeadersReceived(
const net::HostPortPair& origin,
const net::HostPortPair& proxy_server,
const net::HttpResponseHeaders& response_headers) override {
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 5a8713c..cb2f1a9 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -74,59 +74,56 @@
is_last_chunk_zero_size_(false),
is_complete_(false),
weak_factory_(this) {}
- virtual ~MockHttpStream() {}
+ ~MockHttpStream() override {}
// HttpStream implementation.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual UploadProgress GetUploadProgress() const override {
- return UploadProgress();
- }
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ UploadProgress GetUploadProgress() const override { return UploadProgress(); }
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual bool CanFindEndOfResponse() const override { return true; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {}
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {}
+ bool CanFindEndOfResponse() const override { return true; }
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
+ bool IsConnectionReusable() const override { return false; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
+ void GetSSLInfo(SSLInfo* ssl_info) override {}
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
// Mocked API
- virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override {
CHECK(!closed_);
closed_ = true;
result_waiter_->set_result(not_reusable);
}
- virtual HttpStream* RenewStreamForAuth() override {
- return NULL;
+ HttpStream* RenewStreamForAuth() override { return NULL; }
+
+ bool IsResponseBodyComplete() const override { return is_complete_; }
+
+ bool IsSpdyHttpStream() const override { return false; }
+
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
+ return false;
}
- virtual bool IsResponseBodyComplete() const override { return is_complete_; }
+ void Drain(HttpNetworkSession*) override {}
- virtual bool IsSpdyHttpStream() const override { return false; }
-
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override { return false; }
-
- virtual void Drain(HttpNetworkSession*) override {}
-
- virtual void SetPriority(RequestPriority priority) override {}
+ void SetPriority(RequestPriority priority) override {}
// Methods to tweak/observer mock behavior:
void set_stall_reads_forever() { stall_reads_forever_ = true; }
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index b68db36..7b5f2f6 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -30,7 +30,7 @@
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
HttpServerPropertiesImpl();
- virtual ~HttpServerPropertiesImpl();
+ ~HttpServerPropertiesImpl() override;
// Initializes |spdy_servers_map_| with the servers (host/port) from
// |spdy_servers| that either support SPDY or not.
@@ -69,94 +69,89 @@
// -----------------------------
// Gets a weak pointer for this object.
- virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
+ base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
// Deletes all data.
- virtual void Clear() override;
+ void Clear() override;
// Returns true if |server| supports SPDY.
- virtual bool SupportsSpdy(const HostPortPair& server) override;
+ bool SupportsSpdy(const HostPortPair& server) override;
// Add |server| into the persistent store.
- virtual void SetSupportsSpdy(const HostPortPair& server,
- bool support_spdy) override;
+ void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
// Returns true if |server| has an Alternate-Protocol header.
- virtual bool HasAlternateProtocol(const HostPortPair& server) override;
+ bool HasAlternateProtocol(const HostPortPair& server) override;
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
- virtual AlternateProtocolInfo GetAlternateProtocol(
+ AlternateProtocolInfo GetAlternateProtocol(
const HostPortPair& server) override;
// Sets the Alternate-Protocol for |server|.
- virtual void SetAlternateProtocol(
- const HostPortPair& server,
- uint16 alternate_port,
- AlternateProtocol alternate_protocol,
- double probability) override;
+ void SetAlternateProtocol(const HostPortPair& server,
+ uint16 alternate_port,
+ AlternateProtocol alternate_protocol,
+ double probability) override;
// Sets the Alternate-Protocol for |server| to be BROKEN.
- virtual void SetBrokenAlternateProtocol(const HostPortPair& server) override;
+ void SetBrokenAlternateProtocol(const HostPortPair& server) override;
// Returns true if Alternate-Protocol for |server| was recently BROKEN.
- virtual bool WasAlternateProtocolRecentlyBroken(
- const HostPortPair& server) override;
+ bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override;
// Confirms that Alternate-Protocol for |server| is working.
- virtual void ConfirmAlternateProtocol(const HostPortPair& server) override;
+ void ConfirmAlternateProtocol(const HostPortPair& server) override;
// Clears the Alternate-Protocol for |server|.
- virtual void ClearAlternateProtocol(const HostPortPair& server) override;
+ void ClearAlternateProtocol(const HostPortPair& server) override;
// Returns all Alternate-Protocol mappings.
- virtual const AlternateProtocolMap& alternate_protocol_map() const override;
+ const AlternateProtocolMap& alternate_protocol_map() const override;
- virtual void SetAlternateProtocolExperiment(
+ void SetAlternateProtocolExperiment(
AlternateProtocolExperiment experiment) override;
- virtual void SetAlternateProtocolProbabilityThreshold(
- double threshold) override;
+ void SetAlternateProtocolProbabilityThreshold(double threshold) override;
- virtual AlternateProtocolExperiment GetAlternateProtocolExperiment()
- const override;
+ AlternateProtocolExperiment GetAlternateProtocolExperiment() const override;
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
- virtual const SettingsMap& GetSpdySettings(
+ const SettingsMap& GetSpdySettings(
const HostPortPair& host_port_pair) override;
// Saves an individual SPDY setting for a host. Returns true if SPDY setting
// is to be persisted.
- virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
- SpdySettingsIds id,
- SpdySettingsFlags flags,
- uint32 value) override;
+ bool SetSpdySetting(const HostPortPair& host_port_pair,
+ SpdySettingsIds id,
+ SpdySettingsFlags flags,
+ uint32 value) override;
// Clears all entries in |spdy_settings_map_| for a host.
- virtual void ClearSpdySettings(const HostPortPair& host_port_pair) override;
+ void ClearSpdySettings(const HostPortPair& host_port_pair) override;
// Clears all entries in |spdy_settings_map_|.
- virtual void ClearAllSpdySettings() override;
+ void ClearAllSpdySettings() override;
// Returns all persistent SPDY settings.
- virtual const SpdySettingsMap& spdy_settings_map() const override;
+ const SpdySettingsMap& spdy_settings_map() const override;
// Methods for SupportsQuic.
- virtual SupportsQuic GetSupportsQuic(
+ SupportsQuic GetSupportsQuic(
const HostPortPair& host_port_pair) const override;
- virtual void SetSupportsQuic(const HostPortPair& host_port_pair,
- bool used_quic,
- const std::string& address) override;
+ void SetSupportsQuic(const HostPortPair& host_port_pair,
+ bool used_quic,
+ const std::string& address) override;
- virtual const SupportsQuicMap& supports_quic_map() const override;
+ const SupportsQuicMap& supports_quic_map() const override;
// Methods for NetworkStats.
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
- NetworkStats stats) override;
+ void SetServerNetworkStats(const HostPortPair& host_port_pair,
+ NetworkStats stats) override;
- virtual const NetworkStats* GetServerNetworkStats(
+ const NetworkStats* GetServerNetworkStats(
const HostPortPair& host_port_pair) const override;
private:
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index bcfe320..79506c4 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -57,7 +57,7 @@
PrefService* pref_service,
const char* pref_path,
scoped_refptr<base::SequencedTaskRunner> network_task_runner);
- virtual ~HttpServerPropertiesManager();
+ ~HttpServerPropertiesManager() override;
// Initialize on Network thread.
void InitializeOnNetworkThread();
@@ -78,95 +78,90 @@
// ----------------------------------
// Gets a weak pointer for this object.
- virtual base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
+ base::WeakPtr<HttpServerProperties> GetWeakPtr() override;
// Deletes all data. Works asynchronously.
- virtual void Clear() override;
+ void Clear() override;
// Returns true if |server| supports SPDY. Should only be called from IO
// thread.
- virtual bool SupportsSpdy(const HostPortPair& server) override;
+ bool SupportsSpdy(const HostPortPair& server) override;
// Add |server| as the SPDY server which supports SPDY protocol into the
// persisitent store. Should only be called from IO thread.
- virtual void SetSupportsSpdy(const HostPortPair& server,
- bool support_spdy) override;
+ void SetSupportsSpdy(const HostPortPair& server, bool support_spdy) override;
// Returns true if |server| has an Alternate-Protocol header.
- virtual bool HasAlternateProtocol(const HostPortPair& server) override;
+ bool HasAlternateProtocol(const HostPortPair& server) override;
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
- virtual AlternateProtocolInfo GetAlternateProtocol(
+ AlternateProtocolInfo GetAlternateProtocol(
const HostPortPair& server) override;
// Sets the Alternate-Protocol for |server|.
- virtual void SetAlternateProtocol(
- const HostPortPair& server,
- uint16 alternate_port,
- AlternateProtocol alternate_protocol,
- double alternate_probability) override;
+ void SetAlternateProtocol(const HostPortPair& server,
+ uint16 alternate_port,
+ AlternateProtocol alternate_protocol,
+ double alternate_probability) override;
// Sets the Alternate-Protocol for |server| to be BROKEN.
- virtual void SetBrokenAlternateProtocol(const HostPortPair& server) override;
+ void SetBrokenAlternateProtocol(const HostPortPair& server) override;
// Returns true if Alternate-Protocol for |server| was recently BROKEN.
- virtual bool WasAlternateProtocolRecentlyBroken(
- const HostPortPair& server) override;
+ bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override;
// Confirms that Alternate-Protocol for |server| is working.
- virtual void ConfirmAlternateProtocol(const HostPortPair& server) override;
+ void ConfirmAlternateProtocol(const HostPortPair& server) override;
// Clears the Alternate-Protocol for |server|.
- virtual void ClearAlternateProtocol(const HostPortPair& server) override;
+ void ClearAlternateProtocol(const HostPortPair& server) override;
// Returns all Alternate-Protocol mappings.
- virtual const AlternateProtocolMap& alternate_protocol_map() const override;
+ const AlternateProtocolMap& alternate_protocol_map() const override;
- virtual void SetAlternateProtocolExperiment(
+ void SetAlternateProtocolExperiment(
AlternateProtocolExperiment experiment) override;
- virtual void SetAlternateProtocolProbabilityThreshold(
- double threshold) override;
+ void SetAlternateProtocolProbabilityThreshold(double threshold) override;
- virtual AlternateProtocolExperiment GetAlternateProtocolExperiment()
- const override;
+ AlternateProtocolExperiment GetAlternateProtocolExperiment() const override;
// Gets a reference to the SettingsMap stored for a host.
// If no settings are stored, returns an empty SettingsMap.
- virtual const SettingsMap& GetSpdySettings(
+ const SettingsMap& GetSpdySettings(
const HostPortPair& host_port_pair) override;
// Saves an individual SPDY setting for a host. Returns true if SPDY setting
// is to be persisted.
- virtual bool SetSpdySetting(const HostPortPair& host_port_pair,
- SpdySettingsIds id,
- SpdySettingsFlags flags,
- uint32 value) override;
+ bool SetSpdySetting(const HostPortPair& host_port_pair,
+ SpdySettingsIds id,
+ SpdySettingsFlags flags,
+ uint32 value) override;
// Clears all SPDY settings for a host.
- virtual void ClearSpdySettings(const HostPortPair& host_port_pair) override;
+ void ClearSpdySettings(const HostPortPair& host_port_pair) override;
// Clears all SPDY settings for all hosts.
- virtual void ClearAllSpdySettings() override;
+ void ClearAllSpdySettings() override;
// Returns all SPDY persistent settings.
- virtual const SpdySettingsMap& spdy_settings_map() const override;
+ const SpdySettingsMap& spdy_settings_map() const override;
// Methods for SupportsQuic.
- virtual SupportsQuic GetSupportsQuic(
+ SupportsQuic GetSupportsQuic(
const HostPortPair& host_port_pair) const override;
- virtual void SetSupportsQuic(const HostPortPair& host_port_pair,
- bool used_quic,
- const std::string& address) override;
+ void SetSupportsQuic(const HostPortPair& host_port_pair,
+ bool used_quic,
+ const std::string& address) override;
- virtual const SupportsQuicMap& supports_quic_map() const override;
+ const SupportsQuicMap& supports_quic_map() const override;
- virtual void SetServerNetworkStats(const HostPortPair& host_port_pair,
- NetworkStats stats) override;
+ void SetServerNetworkStats(const HostPortPair& host_port_pair,
+ NetworkStats stats) override;
- virtual const NetworkStats* GetServerNetworkStats(
+ const NetworkStats* GetServerNetworkStats(
const HostPortPair& host_port_pair) const override;
protected:
diff --git a/net/http/http_stream.h b/net/http/http_stream.h
index 22362e2..3dda50b 100644
--- a/net/http/http_stream.h
+++ b/net/http/http_stream.h
@@ -24,7 +24,7 @@
class NET_EXPORT_PRIVATE HttpStream : public HttpStreamBase {
public:
HttpStream() {}
- virtual ~HttpStream() {}
+ ~HttpStream() override {}
// Queries the UploadDataStream for its progress (bytes sent).
virtual UploadProgress GetUploadProgress() const = 0;
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index 91a59c2..8ee03a6 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -29,18 +29,17 @@
// RequestWebSocketHandshakeStream may only be called if |for_websockets|
// is true.
HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets);
- virtual ~HttpStreamFactoryImpl();
+ ~HttpStreamFactoryImpl() override;
// HttpStreamFactory interface
- virtual HttpStreamRequest* RequestStream(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override;
+ HttpStreamRequest* RequestStream(const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log) override;
- virtual HttpStreamRequest* RequestWebSocketHandshakeStream(
+ HttpStreamRequest* RequestWebSocketHandshakeStream(
const HttpRequestInfo& info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -49,12 +48,12 @@
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
const BoundNetLog& net_log) override;
- virtual void PreconnectStreams(int num_streams,
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config) override;
- virtual const HostMappingRules* GetHostMappingRules() const override;
+ void PreconnectStreams(int num_streams,
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config) override;
+ const HostMappingRules* GetHostMappingRules() const override;
size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); }
diff --git a/net/http/http_stream_factory_impl_request.h b/net/http/http_stream_factory_impl_request.h
index 3ab7d95..70def25 100644
--- a/net/http/http_stream_factory_impl_request.h
+++ b/net/http/http_stream_factory_impl_request.h
@@ -27,7 +27,7 @@
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
const BoundNetLog& net_log);
- virtual ~Request();
+ ~Request() override;
// The GURL from the HttpRequestInfo the started the Request.
const GURL& url() const { return url_; }
@@ -98,13 +98,12 @@
// HttpStreamRequest methods.
- virtual int RestartTunnelWithProxyAuth(
- const AuthCredentials& credentials) override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual LoadState GetLoadState() const override;
- virtual bool was_npn_negotiated() const override;
- virtual NextProto protocol_negotiated() const override;
- virtual bool using_spdy() const override;
+ int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override;
+ void SetPriority(RequestPriority priority) override;
+ LoadState GetLoadState() const override;
+ bool was_npn_negotiated() const override;
+ NextProto protocol_negotiated() const override;
+ bool using_spdy() const override;
private:
// Used to orphan all jobs in |jobs_| other than |job| which becomes "bound"
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index 422abd0..e204c61 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -28,34 +28,30 @@
public:
DoNothingRequestDelegate() {}
- virtual ~DoNothingRequestDelegate() {}
+ ~DoNothingRequestDelegate() override {}
// HttpStreamRequest::Delegate
- virtual void OnStreamReady(
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override {}
- virtual void OnStreamFailed(
- int status,
- const SSLConfig& used_ssl_config) override {}
- virtual void OnCertificateError(
- int status,
- const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override {}
- virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override {}
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override {}
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {}
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override {}
+ void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override {}
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override {}
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
};
} // namespace
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index c1c42c3..1efbd46 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -52,51 +52,49 @@
explicit MockWebSocketHandshakeStream(StreamType type) : type_(type) {}
- virtual ~MockWebSocketHandshakeStream() {}
+ ~MockWebSocketHandshakeStream() override {}
StreamType type() const {
return type_;
}
// HttpStreamBase methods
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override { return false; }
- virtual bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
- virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
- override {
+ void Close(bool not_reusable) override {}
+ bool IsResponseBodyComplete() const override { return false; }
+ bool CanFindEndOfResponse() const override { return false; }
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
+ bool IsConnectionReusable() const override { return false; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
return false;
}
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {}
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override {}
- virtual bool IsSpdyHttpStream() const override { return false; }
- virtual void Drain(HttpNetworkSession* session) override {}
- virtual void SetPriority(RequestPriority priority) override {}
+ void GetSSLInfo(SSLInfo* ssl_info) override {}
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
+ bool IsSpdyHttpStream() const override { return false; }
+ void Drain(HttpNetworkSession* session) override {}
+ void SetPriority(RequestPriority priority) override {}
- virtual scoped_ptr<WebSocketStream> Upgrade() override {
+ scoped_ptr<WebSocketStream> Upgrade() override {
return scoped_ptr<WebSocketStream>();
}
@@ -124,7 +122,7 @@
private:
// HttpStreamFactoryImpl methods.
- virtual void OnPreconnectsCompleteInternal() override {
+ void OnPreconnectsCompleteInternal() override {
preconnect_done_ = true;
if (waiting_for_preconnect_)
base::MessageLoop::current()->Quit();
@@ -142,10 +140,9 @@
// HttpStreamRequest::Delegate
- virtual void OnStreamReady(
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {
+ void OnStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {
stream_done_ = true;
if (waiting_for_stream_)
base::MessageLoop::current()->Quit();
@@ -154,7 +151,7 @@
used_proxy_info_ = used_proxy_info;
}
- virtual void OnWebSocketHandshakeStreamReady(
+ void OnWebSocketHandshakeStreamReady(
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) override {
@@ -166,27 +163,24 @@
used_proxy_info_ = used_proxy_info;
}
- virtual void OnStreamFailed(
- int status,
- const SSLConfig& used_ssl_config) override {}
+ void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {}
- virtual void OnCertificateError(
- int status,
- const SSLConfig& used_ssl_config,
- const SSLInfo& ssl_info) override {}
+ void OnCertificateError(int status,
+ const SSLConfig& used_ssl_config,
+ const SSLInfo& ssl_info) override {}
- virtual void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpAuthController* auth_controller) override {}
+ void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpAuthController* auth_controller) override {}
- virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
- SSLCertRequestInfo* cert_info) override {}
+ void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
+ SSLCertRequestInfo* cert_info) override {}
- virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- HttpStreamBase* stream) override {}
+ void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ HttpStreamBase* stream) override {}
void WaitForStream() {
while (!stream_done_) {
@@ -232,7 +226,7 @@
: MockWebSocketHandshakeStream(kStreamTypeSpdy),
spdy_session_(spdy_session) {}
- virtual ~WebSocketSpdyHandshakeStream() {}
+ ~WebSocketSpdyHandshakeStream() override {}
SpdySession* spdy_session() { return spdy_session_.get(); }
@@ -247,7 +241,7 @@
: MockWebSocketHandshakeStream(kStreamTypeBasic),
connection_(connection.Pass()) {}
- virtual ~WebSocketBasicHandshakeStream() {
+ ~WebSocketBasicHandshakeStream() override {
connection_->socket()->Disconnect();
}
@@ -260,15 +254,15 @@
class WebSocketStreamCreateHelper
: public WebSocketHandshakeStreamBase::CreateHelper {
public:
- virtual ~WebSocketStreamCreateHelper() {}
+ ~WebSocketStreamCreateHelper() override {}
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override {
return new WebSocketBasicHandshakeStream(connection.Pass());
}
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& spdy_session,
bool use_relative_url) override {
return new WebSocketSpdyHandshakeStream(spdy_session);
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 4c1041b..8cd876f 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -162,7 +162,7 @@
int capacity() const { return capacity_; };
private:
- virtual ~SeekableIOBuffer() {
+ ~SeekableIOBuffer() override {
// data_ will be deleted in IOBuffer::~IOBuffer().
data_ = real_data_;
}
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index e0f5bda..e6e8312 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -168,61 +168,57 @@
public:
MockNetworkTransaction(net::RequestPriority priority,
MockNetworkLayer* factory);
- virtual ~MockNetworkTransaction();
+ ~MockNetworkTransaction() override;
- virtual int Start(const net::HttpRequestInfo* request,
- const net::CompletionCallback& callback,
- const net::BoundNetLog& net_log) override;
+ int Start(const net::HttpRequestInfo* request,
+ const net::CompletionCallback& callback,
+ const net::BoundNetLog& net_log) override;
- virtual int RestartIgnoringLastError(
+ int RestartIgnoringLastError(
const net::CompletionCallback& callback) override;
- virtual int RestartWithCertificate(
- net::X509Certificate* client_cert,
- const net::CompletionCallback& callback) override;
+ int RestartWithCertificate(net::X509Certificate* client_cert,
+ const net::CompletionCallback& callback) override;
- virtual int RestartWithAuth(
- const net::AuthCredentials& credentials,
- const net::CompletionCallback& callback) override;
+ int RestartWithAuth(const net::AuthCredentials& credentials,
+ const net::CompletionCallback& callback) override;
- virtual bool IsReadyToRestartForAuth() override;
+ bool IsReadyToRestartForAuth() override;
- virtual int Read(net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
+ int Read(net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
- virtual void StopCaching() override;
+ void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- net::HttpRequestHeaders* headers) const override;
+ bool GetFullRequestHeaders(net::HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
+ void DoneReading() override;
- virtual const net::HttpResponseInfo* GetResponseInfo() const override;
+ const net::HttpResponseInfo* GetResponseInfo() const override;
- virtual net::LoadState GetLoadState() const override;
+ net::LoadState GetLoadState() const override;
- virtual net::UploadProgress GetUploadProgress() const override;
+ net::UploadProgress GetUploadProgress() const override;
- virtual void SetQuicServerInfo(
- net::QuicServerInfo* quic_server_info) override;
+ void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override;
- virtual bool GetLoadTimingInfo(
- net::LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(net::LoadTimingInfo* load_timing_info) const override;
- virtual void SetPriority(net::RequestPriority priority) override;
+ void SetPriority(net::RequestPriority priority) override;
- virtual void SetWebSocketHandshakeStreamCreateHelper(
+ void SetWebSocketHandshakeStreamCreateHelper(
CreateHelper* create_helper) override;
- virtual void SetBeforeNetworkStartCallback(
+ void SetBeforeNetworkStartCallback(
const BeforeNetworkStartCallback& callback) override;
- virtual void SetBeforeProxyHeadersSentCallback(
+ void SetBeforeProxyHeadersSentCallback(
const BeforeProxyHeadersSentCallback& callback) override;
- virtual int ResumeNetworkStart() override;
+ int ResumeNetworkStart() override;
CreateHelper* websocket_handshake_stream_create_helper() {
return websocket_handshake_stream_create_helper_;
@@ -260,7 +256,7 @@
public base::SupportsWeakPtr<MockNetworkLayer> {
public:
MockNetworkLayer();
- virtual ~MockNetworkLayer();
+ ~MockNetworkLayer() override;
int transaction_count() const { return transaction_count_; }
bool done_reading_called() const { return done_reading_called_; }
@@ -290,11 +286,10 @@
}
// net::HttpTransactionFactory:
- virtual int CreateTransaction(
- net::RequestPriority priority,
- scoped_ptr<net::HttpTransaction>* trans) override;
- virtual net::HttpCache* GetCache() override;
- virtual net::HttpNetworkSession* GetSession() override;
+ int CreateTransaction(net::RequestPriority priority,
+ scoped_ptr<net::HttpTransaction>* trans) override;
+ net::HttpCache* GetCache() override;
+ net::HttpNetworkSession* GetSession() override;
private:
int transaction_count_;
diff --git a/net/http/mock_allow_url_security_manager.h b/net/http/mock_allow_url_security_manager.h
index 3e19f9b..2a0b205 100644
--- a/net/http/mock_allow_url_security_manager.h
+++ b/net/http/mock_allow_url_security_manager.h
@@ -14,10 +14,10 @@
class MockAllowURLSecurityManager : public URLSecurityManager {
public:
MockAllowURLSecurityManager();
- virtual ~MockAllowURLSecurityManager();
+ ~MockAllowURLSecurityManager() override;
- virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
- virtual bool CanDelegate(const GURL& auth_origin) const override;
+ bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
+ bool CanDelegate(const GURL& auth_origin) const override;
private:
DISALLOW_COPY_AND_ASSIGN(MockAllowURLSecurityManager);
diff --git a/net/http/mock_gssapi_library_posix.h b/net/http/mock_gssapi_library_posix.h
index cbd35e5..17e0d47 100644
--- a/net/http/mock_gssapi_library_posix.h
+++ b/net/http/mock_gssapi_library_posix.h
@@ -73,7 +73,7 @@
};
MockGSSAPILibrary();
- virtual ~MockGSSAPILibrary();
+ ~MockGSSAPILibrary() override;
// Establishes an expectation for a |init_sec_context()| call.
//
@@ -122,67 +122,58 @@
// Initializes the library, including any necessary dynamic libraries.
// This is done separately from construction (which happens at startup time)
// in order to delay work until the class is actually needed.
- virtual bool Init() override;
+ bool Init() override;
// These methods match the ones in the GSSAPI library.
- virtual OM_uint32 import_name(
- OM_uint32* minor_status,
- const gss_buffer_t input_name_buffer,
- const gss_OID input_name_type,
- gss_name_t* output_name) override;
- virtual OM_uint32 release_name(
- OM_uint32* minor_status,
- gss_name_t* input_name) override;
- virtual OM_uint32 release_buffer(
- OM_uint32* minor_status,
- gss_buffer_t buffer) override;
- virtual OM_uint32 display_name(
- OM_uint32* minor_status,
- const gss_name_t input_name,
- gss_buffer_t output_name_buffer,
- gss_OID* output_name_type) override;
- virtual OM_uint32 display_status(
- OM_uint32* minor_status,
- OM_uint32 status_value,
- int status_type,
- const gss_OID mech_type,
- OM_uint32* message_contex,
- gss_buffer_t status_string) override;
- virtual OM_uint32 init_sec_context(
- OM_uint32* minor_status,
- const gss_cred_id_t initiator_cred_handle,
- gss_ctx_id_t* context_handle,
- const gss_name_t target_name,
- const gss_OID mech_type,
- OM_uint32 req_flags,
- OM_uint32 time_req,
- const gss_channel_bindings_t input_chan_bindings,
- const gss_buffer_t input_token,
- gss_OID* actual_mech_type,
- gss_buffer_t output_token,
- OM_uint32* ret_flags,
- OM_uint32* time_rec) override;
- virtual OM_uint32 wrap_size_limit(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- int conf_req_flag,
- gss_qop_t qop_req,
- OM_uint32 req_output_size,
- OM_uint32* max_input_size) override;
- virtual OM_uint32 delete_sec_context(
- OM_uint32* minor_status,
- gss_ctx_id_t* context_handle,
- gss_buffer_t output_token) override;
- virtual OM_uint32 inquire_context(
- OM_uint32* minor_status,
- const gss_ctx_id_t context_handle,
- gss_name_t* src_name,
- gss_name_t* targ_name,
- OM_uint32* lifetime_rec,
- gss_OID* mech_type,
- OM_uint32* ctx_flags,
- int* locally_initiated,
- int* open) override;
+ OM_uint32 import_name(OM_uint32* minor_status,
+ const gss_buffer_t input_name_buffer,
+ const gss_OID input_name_type,
+ gss_name_t* output_name) override;
+ OM_uint32 release_name(OM_uint32* minor_status,
+ gss_name_t* input_name) override;
+ OM_uint32 release_buffer(OM_uint32* minor_status,
+ gss_buffer_t buffer) override;
+ OM_uint32 display_name(OM_uint32* minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t output_name_buffer,
+ gss_OID* output_name_type) override;
+ OM_uint32 display_status(OM_uint32* minor_status,
+ OM_uint32 status_value,
+ int status_type,
+ const gss_OID mech_type,
+ OM_uint32* message_contex,
+ gss_buffer_t status_string) override;
+ OM_uint32 init_sec_context(OM_uint32* minor_status,
+ const gss_cred_id_t initiator_cred_handle,
+ gss_ctx_id_t* context_handle,
+ const gss_name_t target_name,
+ const gss_OID mech_type,
+ OM_uint32 req_flags,
+ OM_uint32 time_req,
+ const gss_channel_bindings_t input_chan_bindings,
+ const gss_buffer_t input_token,
+ gss_OID* actual_mech_type,
+ gss_buffer_t output_token,
+ OM_uint32* ret_flags,
+ OM_uint32* time_rec) override;
+ OM_uint32 wrap_size_limit(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ int conf_req_flag,
+ gss_qop_t qop_req,
+ OM_uint32 req_output_size,
+ OM_uint32* max_input_size) override;
+ OM_uint32 delete_sec_context(OM_uint32* minor_status,
+ gss_ctx_id_t* context_handle,
+ gss_buffer_t output_token) override;
+ OM_uint32 inquire_context(OM_uint32* minor_status,
+ const gss_ctx_id_t context_handle,
+ gss_name_t* src_name,
+ gss_name_t* targ_name,
+ OM_uint32* lifetime_rec,
+ gss_OID* mech_type,
+ OM_uint32* ctx_flags,
+ int* locally_initiated,
+ int* open) override;
private:
FRIEND_TEST_ALL_PREFIXES(HttpAuthGSSAPIPOSIXTest, GSSAPICycle);
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index 325454e..4ca542e 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -459,8 +459,8 @@
class MockDiskCache::NotImplementedIterator : public Iterator {
public:
- virtual int OpenNextEntry(disk_cache::Entry** next_entry,
- const net::CompletionCallback& callback) override {
+ int OpenNextEntry(disk_cache::Entry** next_entry,
+ const net::CompletionCallback& callback) override {
return net::ERR_NOT_IMPLEMENTED;
}
};
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index 9b2caf5..7e3a67c 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -25,28 +25,38 @@
bool is_doomed() const { return doomed_; }
- virtual void Doom() override;
- virtual void Close() override;
- virtual std::string GetKey() const override;
- virtual base::Time GetLastUsed() const override;
- virtual base::Time GetLastModified() const override;
- virtual int32 GetDataSize(int index) const override;
- virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback,
- bool truncate) override;
- virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int WriteSparseData(
- int64 offset, net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual int GetAvailableRange(
- int64 offset, int len, int64* start,
- const net::CompletionCallback& callback) override;
- virtual bool CouldBeSparse() const override;
- virtual void CancelSparseIO() override;
- virtual int ReadyForSparseIO(
+ void Doom() override;
+ void Close() override;
+ std::string GetKey() const override;
+ base::Time GetLastUsed() const override;
+ base::Time GetLastModified() const override;
+ int32 GetDataSize(int index) const override;
+ int ReadData(int index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int WriteData(int index,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback,
+ bool truncate) override;
+ int ReadSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int WriteSparseData(int64 offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
+ const net::CompletionCallback& callback) override;
+ bool CouldBeSparse() const override;
+ void CancelSparseIO() override;
+ int ReadyForSparseIO(
const net::CompletionCallback& completion_callback) override;
// Fail most subsequent requests.
@@ -63,7 +73,7 @@
friend class base::RefCounted<MockDiskEntry>;
struct CallbackInfo;
- virtual ~MockDiskEntry();
+ ~MockDiskEntry() override;
// Unlike the callbacks for MockHttpTransaction, we want this one to run even
// if the consumer called Close on the MockDiskEntry. We achieve that by
@@ -96,28 +106,28 @@
class MockDiskCache : public disk_cache::Backend {
public:
MockDiskCache();
- virtual ~MockDiskCache();
+ ~MockDiskCache() override;
- virtual net::CacheType GetCacheType() const override;
- virtual int32 GetEntryCount() const override;
- virtual int OpenEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int DoomEntry(const std::string& key,
- const net::CompletionCallback& callback) override;
- virtual int DoomAllEntries(const net::CompletionCallback& callback) override;
- virtual int DoomEntriesBetween(
- base::Time initial_time,
- base::Time end_time,
- const net::CompletionCallback& callback) override;
- virtual int DoomEntriesSince(
- base::Time initial_time,
- const net::CompletionCallback& callback) override;
- virtual scoped_ptr<Iterator> CreateIterator() override;
- virtual void GetStats(
- std::vector<std::pair<std::string, std::string> >* stats) override;
- virtual void OnExternalCacheHit(const std::string& key) override;
+ net::CacheType GetCacheType() const override;
+ int32 GetEntryCount() const override;
+ int OpenEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int DoomEntry(const std::string& key,
+ const net::CompletionCallback& callback) override;
+ int DoomAllEntries(const net::CompletionCallback& callback) override;
+ int DoomEntriesBetween(base::Time initial_time,
+ base::Time end_time,
+ const net::CompletionCallback& callback) override;
+ int DoomEntriesSince(base::Time initial_time,
+ const net::CompletionCallback& callback) override;
+ scoped_ptr<Iterator> CreateIterator() override;
+ void GetStats(
+ std::vector<std::pair<std::string, std::string>>* stats) override;
+ void OnExternalCacheHit(const std::string& key) override;
// Returns number of times a cache entry was successfully opened.
int open_count() const { return open_count_; }
@@ -156,9 +166,9 @@
class MockBackendFactory : public net::HttpCache::BackendFactory {
public:
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
};
class MockHttpCache {
@@ -210,26 +220,27 @@
// This version of the disk cache doesn't invoke CreateEntry callbacks.
class MockDiskCacheNoCB : public MockDiskCache {
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
};
class MockBackendNoCbFactory : public net::HttpCache::BackendFactory {
public:
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
};
// This backend factory allows us to control the backend instantiation.
class MockBlockingBackendFactory : public net::HttpCache::BackendFactory {
public:
MockBlockingBackendFactory();
- virtual ~MockBlockingBackendFactory();
+ ~MockBlockingBackendFactory() override;
- virtual int CreateBackend(net::NetLog* net_log,
- scoped_ptr<disk_cache::Backend>* backend,
- const net::CompletionCallback& callback) override;
+ int CreateBackend(net::NetLog* net_log,
+ scoped_ptr<disk_cache::Backend>* backend,
+ const net::CompletionCallback& callback) override;
// Completes the backend creation. Any blocked call will be notified via the
// provided callback.
diff --git a/net/http/proxy_client_socket.h b/net/http/proxy_client_socket.h
index da255f3..aa59038 100644
--- a/net/http/proxy_client_socket.h
+++ b/net/http/proxy_client_socket.h
@@ -25,7 +25,7 @@
class NET_EXPORT_PRIVATE ProxyClientSocket : public StreamSocket {
public:
ProxyClientSocket() {}
- virtual ~ProxyClientSocket() {}
+ ~ProxyClientSocket() override {}
// Returns the HttpResponseInfo (including HTTP Headers) from
// the response to the CONNECT request.
diff --git a/net/http/proxy_connect_redirect_http_stream.h b/net/http/proxy_connect_redirect_http_stream.h
index ddaf9b7..701d18d 100644
--- a/net/http/proxy_connect_redirect_http_stream.h
+++ b/net/http/proxy_connect_redirect_http_stream.h
@@ -20,52 +20,50 @@
// GetLoadTimingInfo(), or NULL if there is none. Does not take
// ownership of |load_timing_info|.
explicit ProxyConnectRedirectHttpStream(LoadTimingInfo* load_timing_info);
- virtual ~ProxyConnectRedirectHttpStream();
+ ~ProxyConnectRedirectHttpStream() override;
// All functions below are expected not to be called except for the
// marked one.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// This function may be called.
- virtual void Close(bool not_reusable) override;
+ void Close(bool not_reusable) override;
- virtual bool IsResponseBodyComplete() const override;
+ bool IsResponseBodyComplete() const override;
// This function may be called.
- virtual bool CanFindEndOfResponse() const override;
+ bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
+ int64 GetTotalReceivedBytes() const override;
// This function may be called.
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
// This function may be called.
- virtual void SetPriority(RequestPriority priority) override;
+ void SetPriority(RequestPriority priority) override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual HttpStream* RenewStreamForAuth() override;
+ UploadProgress GetUploadProgress() const override;
+ HttpStream* RenewStreamForAuth() override;
private:
bool has_load_timing_info_;
diff --git a/net/http/transport_security_persister.h b/net/http/transport_security_persister.h
index 5081c38..09b32ac 100644
--- a/net/http/transport_security_persister.h
+++ b/net/http/transport_security_persister.h
@@ -62,10 +62,10 @@
const base::FilePath& profile_path,
const scoped_refptr<base::SequencedTaskRunner>& background_runner,
bool readonly);
- virtual ~TransportSecurityPersister();
+ ~TransportSecurityPersister() override;
// Called by the TransportSecurityState when it changes its state.
- virtual void StateIsDirty(TransportSecurityState*) override;
+ void StateIsDirty(TransportSecurityState*) override;
// ImportantFileWriter::DataSerializer:
//
@@ -97,7 +97,7 @@
// The reason for hashing them is so that the stored state does not
// trivially reveal a user's browsing history to an attacker reading the
// serialized state on disk.
- virtual bool SerializeData(std::string* data) override;
+ bool SerializeData(std::string* data) override;
// Clears any existing non-static entries, and then re-populates
// |transport_security_state_|.
diff --git a/net/http/url_security_manager.h b/net/http/url_security_manager.h
index 2835d89..c0d93a2 100644
--- a/net/http/url_security_manager.h
+++ b/net/http/url_security_manager.h
@@ -61,11 +61,11 @@
// The URLSecurityManagerWhitelist takes ownership of the whitelists.
URLSecurityManagerWhitelist(const HttpAuthFilter* whitelist_default,
const HttpAuthFilter* whitelist_delegation);
- virtual ~URLSecurityManagerWhitelist();
+ ~URLSecurityManagerWhitelist() override;
// URLSecurityManager methods.
- virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
- virtual bool CanDelegate(const GURL& auth_origin) const override;
+ bool CanUseDefaultCredentials(const GURL& auth_origin) const override;
+ bool CanDelegate(const GURL& auth_origin) const override;
private:
scoped_ptr<const HttpAuthFilter> whitelist_default_;
diff --git a/net/proxy/dhcp_proxy_script_fetcher.h b/net/proxy/dhcp_proxy_script_fetcher.h
index bb293de..85d4df8 100644
--- a/net/proxy/dhcp_proxy_script_fetcher.h
+++ b/net/proxy/dhcp_proxy_script_fetcher.h
@@ -83,12 +83,13 @@
: public DhcpProxyScriptFetcher {
public:
DoNothingDhcpProxyScriptFetcher();
- virtual ~DoNothingDhcpProxyScriptFetcher();
+ ~DoNothingDhcpProxyScriptFetcher() override;
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual const GURL& GetPacURL() const override;
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ const GURL& GetPacURL() const override;
+
private:
GURL gurl_;
DISALLOW_COPY_AND_ASSIGN(DoNothingDhcpProxyScriptFetcher);
diff --git a/net/proxy/mock_proxy_resolver.h b/net/proxy/mock_proxy_resolver.h
index 5a616dd..8ae551d 100644
--- a/net/proxy/mock_proxy_resolver.h
+++ b/net/proxy/mock_proxy_resolver.h
@@ -70,20 +70,19 @@
typedef std::vector<scoped_refptr<Request> > RequestsList;
- virtual ~MockAsyncProxyResolverBase();
+ ~MockAsyncProxyResolverBase() override;
// ProxyResolver implementation.
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& callback,
- RequestHandle* request_handle,
- const BoundNetLog& /*net_log*/) override;
- virtual void CancelRequest(RequestHandle request_handle) override;
- virtual LoadState GetLoadState(RequestHandle request_handle) const override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& callback) override;
- virtual void CancelSetPacScript() override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ RequestHandle* request_handle,
+ const BoundNetLog& /*net_log*/) override;
+ void CancelRequest(RequestHandle request_handle) override;
+ LoadState GetLoadState(RequestHandle request_handle) const override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& callback) override;
+ void CancelSetPacScript() override;
const RequestsList& pending_requests() const {
return pending_requests_;
diff --git a/net/proxy/mock_proxy_script_fetcher.h b/net/proxy/mock_proxy_script_fetcher.h
index 910c6b2..458f477 100644
--- a/net/proxy/mock_proxy_script_fetcher.h
+++ b/net/proxy/mock_proxy_script_fetcher.h
@@ -20,14 +20,14 @@
class MockProxyScriptFetcher : public ProxyScriptFetcher {
public:
MockProxyScriptFetcher();
- virtual ~MockProxyScriptFetcher();
+ ~MockProxyScriptFetcher() override;
// ProxyScriptFetcher implementation.
- virtual int Fetch(const GURL& url,
- base::string16* text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual URLRequestContext* GetRequestContext() const override;
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ URLRequestContext* GetRequestContext() const override;
void NotifyFetchCompletion(int result, const std::string& ascii_text);
const GURL& pending_request_url() const;
diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc
index a2a6515..863711c 100644
--- a/net/proxy/multi_threaded_proxy_resolver.cc
+++ b/net/proxy/multi_threaded_proxy_resolver.cc
@@ -175,7 +175,7 @@
}
// Runs on the worker thread.
- virtual void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
+ void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
ProxyResolver* resolver = executor()->resolver();
int rv = resolver->SetPacScript(script_data_, CompletionCallback());
@@ -186,7 +186,7 @@
}
protected:
- virtual ~SetPacScriptJob() {}
+ ~SetPacScriptJob() override {}
private:
// Runs the completion callback on the origin thread.
@@ -222,12 +222,12 @@
BoundNetLog* net_log() { return &net_log_; }
- virtual void WaitingForThread() override {
+ void WaitingForThread() override {
was_waiting_for_thread_ = true;
net_log_.BeginEvent(NetLog::TYPE_WAITING_FOR_PROXY_RESOLVER_THREAD);
}
- virtual void FinishedWaitingForThread() override {
+ void FinishedWaitingForThread() override {
DCHECK(executor());
if (was_waiting_for_thread_) {
@@ -240,7 +240,7 @@
}
// Runs on the worker thread.
- virtual void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
+ void Run(scoped_refptr<base::MessageLoopProxy> origin_loop) override {
ProxyResolver* resolver = executor()->resolver();
int rv = resolver->GetProxyForURL(
url_, &results_buf_, CompletionCallback(), NULL, net_log_);
@@ -252,7 +252,7 @@
}
protected:
- virtual ~GetProxyForURLJob() {}
+ ~GetProxyForURLJob() override {}
private:
// Runs the completion callback on the origin thread.
diff --git a/net/proxy/multi_threaded_proxy_resolver.h b/net/proxy/multi_threaded_proxy_resolver.h
index 0a14461..107e5f8 100644
--- a/net/proxy/multi_threaded_proxy_resolver.h
+++ b/net/proxy/multi_threaded_proxy_resolver.h
@@ -88,20 +88,19 @@
MultiThreadedProxyResolver(ProxyResolverFactory* resolver_factory,
size_t max_num_threads);
- virtual ~MultiThreadedProxyResolver();
+ ~MultiThreadedProxyResolver() override;
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override;
private:
class Executor;
diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
index d2e465c..7a8db63 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -36,11 +36,11 @@
request_count_(0) {}
// ProxyResolver implementation.
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
if (resolve_latency_ != base::TimeDelta())
base::PlatformThread::Sleep(resolve_latency_);
@@ -58,22 +58,17 @@
return request_count_++;
}
- virtual void CancelRequest(RequestHandle request) override {
- NOTREACHED();
- }
+ void CancelRequest(RequestHandle request) override { NOTREACHED(); }
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- NOTREACHED();
- }
+ void CancelSetPacScript() override { NOTREACHED(); }
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override {
CheckIsOnWorkerThread();
last_script_data_ = script_data;
return OK;
@@ -133,11 +128,11 @@
blocked_.Wait();
}
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
if (should_block_) {
blocked_.Signal();
unblocked_.Wait();
@@ -160,31 +155,28 @@
: ProxyResolver(impl->expects_pac_bytes()),
impl_(impl) {}
- virtual int GetProxyForURL(const GURL& query_url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& query_url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
return impl_->GetProxyForURL(
query_url, results, callback, request, net_log);
}
- virtual void CancelRequest(RequestHandle request) override {
+ void CancelRequest(RequestHandle request) override {
impl_->CancelRequest(request);
}
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- impl_->CancelSetPacScript();
- }
+ void CancelSetPacScript() override { impl_->CancelSetPacScript(); }
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override {
return impl_->SetPacScript(script_data, callback);
}
@@ -200,7 +192,7 @@
: ProxyResolverFactory(resolver->expects_pac_bytes()),
resolver_(resolver) {}
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
return new ForwardingProxyResolver(resolver_);
}
@@ -213,11 +205,9 @@
public:
BlockableProxyResolverFactory() : ProxyResolverFactory(true) {}
- virtual ~BlockableProxyResolverFactory() {
- STLDeleteElements(&resolvers_);
- }
+ ~BlockableProxyResolverFactory() override { STLDeleteElements(&resolvers_); }
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
BlockableProxyResolver* resolver = new BlockableProxyResolver;
resolvers_.push_back(resolver);
return new ForwardingProxyResolver(resolver);
diff --git a/net/proxy/network_delegate_error_observer.h b/net/proxy/network_delegate_error_observer.h
index 70a2bed..6fad578 100644
--- a/net/proxy/network_delegate_error_observer.h
+++ b/net/proxy/network_delegate_error_observer.h
@@ -24,11 +24,10 @@
public:
NetworkDelegateErrorObserver(NetworkDelegate* network_delegate,
base::MessageLoopProxy* origin_loop);
- virtual ~NetworkDelegateErrorObserver();
+ ~NetworkDelegateErrorObserver() override;
// ProxyResolverErrorObserver implementation.
- virtual void OnPACScriptError(int line_number, const base::string16& error)
- override;
+ void OnPACScriptError(int line_number, const base::string16& error) override;
private:
class Core;
diff --git a/net/proxy/network_delegate_error_observer_unittest.cc b/net/proxy/network_delegate_error_observer_unittest.cc
index 8547761..5d2c501 100644
--- a/net/proxy/network_delegate_error_observer_unittest.cc
+++ b/net/proxy/network_delegate_error_observer_unittest.cc
@@ -19,25 +19,25 @@
class TestNetworkDelegate : public net::NetworkDelegate {
public:
TestNetworkDelegate() : got_pac_error_(false) {}
- virtual ~TestNetworkDelegate() {}
+ ~TestNetworkDelegate() override {}
bool got_pac_error() const { return got_pac_error_; }
private:
// net::NetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -45,44 +45,40 @@
GURL* allowed_unsafe_redirect_url) override {
return net::OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
+ void OnResponseStarted(URLRequest* request) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {
+ void OnPACScriptError(int line_number, const base::string16& error) override {
got_pac_error_ = true;
}
- virtual AuthRequiredResponse OnAuthRequired(
- URLRequest* request,
- const AuthChallengeInfo& auth_info,
- const AuthCallback& callback,
- AuthCredentials* credentials) override {
+ AuthRequiredResponse OnAuthRequired(URLRequest* request,
+ const AuthChallengeInfo& auth_info,
+ const AuthCallback& callback,
+ AuthCredentials* credentials) override {
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
return false;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
diff --git a/net/proxy/polling_proxy_config_service.h b/net/proxy/polling_proxy_config_service.h
index dc0db48..c823056 100644
--- a/net/proxy/polling_proxy_config_service.h
+++ b/net/proxy/polling_proxy_config_service.h
@@ -20,10 +20,10 @@
class NET_EXPORT_PRIVATE PollingProxyConfigService : public ProxyConfigService {
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override;
- virtual void RemoveObserver(Observer* observer) override;
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
- virtual void OnLazyPoll() override;
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void OnLazyPoll() override;
protected:
// Function for retrieving the current proxy configuration.
@@ -38,7 +38,7 @@
base::TimeDelta poll_interval,
GetConfigFunction get_config_func);
- virtual ~PollingProxyConfigService();
+ ~PollingProxyConfigService() override;
// Polls for changes by posting a task to the worker pool.
void CheckForChangesNow();
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc
index debb2e8..970e3bb 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -27,7 +27,7 @@
optional_port_(optional_port) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (optional_port_ != -1 && url.EffectiveIntPort() != optional_port_)
return false; // Didn't match port expectation.
@@ -40,7 +40,7 @@
hostname_pattern_);
}
- virtual std::string ToString() const override {
+ std::string ToString() const override {
std::string str;
if (!optional_scheme_.empty())
base::StringAppendF(&str, "%s://", optional_scheme_.c_str());
@@ -50,7 +50,7 @@
return str;
}
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new HostnamePatternRule(optional_scheme_,
hostname_pattern_,
optional_port_);
@@ -64,20 +64,16 @@
class BypassLocalRule : public ProxyBypassRules::Rule {
public:
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
const std::string& host = url.host();
if (host == "127.0.0.1" || host == "[::1]")
return true;
return host.find('.') == std::string::npos;
}
- virtual std::string ToString() const override {
- return "<local>";
- }
+ std::string ToString() const override { return "<local>"; }
- virtual Rule* Clone() const override {
- return new BypassLocalRule();
- }
+ Rule* Clone() const override { return new BypassLocalRule(); }
};
// Rule for matching a URL that is an IP address, if that IP address falls
@@ -96,7 +92,7 @@
prefix_length_in_bits_(prefix_length_in_bits) {
}
- virtual bool Matches(const GURL& url) const override {
+ bool Matches(const GURL& url) const override {
if (!url.HostIsIPAddress())
return false;
@@ -113,11 +109,9 @@
prefix_length_in_bits_);
}
- virtual std::string ToString() const override {
- return description_;
- }
+ std::string ToString() const override { return description_; }
- virtual Rule* Clone() const override {
+ Rule* Clone() const override {
return new BypassIPBlockRule(description_,
optional_scheme_,
ip_prefix_,
diff --git a/net/proxy/proxy_config_service_fixed.h b/net/proxy/proxy_config_service_fixed.h
index 14185c6..a95bf78 100644
--- a/net/proxy/proxy_config_service_fixed.h
+++ b/net/proxy/proxy_config_service_fixed.h
@@ -16,12 +16,12 @@
class NET_EXPORT ProxyConfigServiceFixed : public ProxyConfigService {
public:
explicit ProxyConfigServiceFixed(const ProxyConfig& pc);
- virtual ~ProxyConfigServiceFixed();
+ ~ProxyConfigServiceFixed() override;
// ProxyConfigService methods:
- virtual void AddObserver(Observer* observer) override {}
- virtual void RemoveObserver(Observer* observer) override {}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void AddObserver(Observer* observer) override {}
+ void RemoveObserver(Observer* observer) override {}
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
private:
ProxyConfig pc_;
diff --git a/net/proxy/proxy_config_service_mac.h b/net/proxy/proxy_config_service_mac.h
index 6c60daf..87c8162 100644
--- a/net/proxy/proxy_config_service_mac.h
+++ b/net/proxy/proxy_config_service_mac.h
@@ -27,13 +27,13 @@
// (however it may be constructed from a different thread).
explicit ProxyConfigServiceMac(
const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_task_runner);
- virtual ~ProxyConfigServiceMac();
+ ~ProxyConfigServiceMac() override;
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override;
- virtual void RemoveObserver(Observer* observer) override;
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
private:
class Helper;
@@ -46,10 +46,9 @@
: proxy_config_service_(proxy_config_service) {}
// NetworkConfigWatcherMac::Delegate implementation:
- virtual void StartReachabilityNotifications() override {}
- virtual void SetDynamicStoreNotificationKeys(
- SCDynamicStoreRef store) override;
- virtual void OnNetworkConfigChange(CFArrayRef changed_keys) override;
+ void StartReachabilityNotifications() override {}
+ void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) override;
+ void OnNetworkConfigChange(CFArrayRef changed_keys) override;
private:
ProxyConfigServiceMac* const proxy_config_service_;
diff --git a/net/proxy/proxy_resolver_mac.h b/net/proxy/proxy_resolver_mac.h
index c732988..ef10b5c 100644
--- a/net/proxy/proxy_resolver_mac.h
+++ b/net/proxy/proxy_resolver_mac.h
@@ -18,24 +18,23 @@
class NET_EXPORT ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac();
- virtual ~ProxyResolverMac();
+ ~ProxyResolverMac() override;
// ProxyResolver methods:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
+ void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
+ LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
+ void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& /*callback*/) override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& /*callback*/) override;
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 061c13e..5db69d8 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -199,20 +199,17 @@
public:
MockJSBindings() {}
- virtual void Alert(const base::string16& message) override {
- CHECK(false);
- }
+ void Alert(const base::string16& message) override { CHECK(false); }
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override {
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override {
CHECK(false);
return false;
}
- virtual void OnError(int line_number,
- const base::string16& message) override {
+ void OnError(int line_number, const base::string16& message) override {
CHECK(false);
}
};
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index dc224cd..d7916e0 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -93,13 +93,11 @@
const scoped_refptr<ProxyResolverScriptData>& script_data)
: script_data_(script_data) {}
- virtual const uint16_t* data() const override {
+ const uint16_t* data() const override {
return reinterpret_cast<const uint16*>(script_data_->utf16().data());
}
- virtual size_t length() const override {
- return script_data_->utf16().size();
- }
+ size_t length() const override { return script_data_->utf16().size(); }
private:
const scoped_refptr<ProxyResolverScriptData> script_data_;
@@ -117,13 +115,9 @@
DCHECK(base::IsStringASCII(ascii));
}
- virtual const char* data() const override {
- return ascii_;
- }
+ const char* data() const override { return ascii_; }
- virtual size_t length() const override {
- return length_;
- }
+ size_t length() const override { return length_; }
private:
const char* ascii_;
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 38b958d..64d1983 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -76,23 +76,22 @@
// Constructs a ProxyResolverV8.
ProxyResolverV8();
- virtual ~ProxyResolverV8();
+ ~ProxyResolverV8() override;
JSBindings* js_bindings() const { return js_bindings_; }
void set_js_bindings(JSBindings* js_bindings) { js_bindings_ = js_bindings; }
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const net::CompletionCallback& /*callback*/,
- RequestHandle* /*request*/,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const net::CompletionCallback& /*callback*/) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& /*callback*/,
+ RequestHandle* /*request*/,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const net::CompletionCallback& /*callback*/) override;
// Create an isolate to use for the proxy resolver. If the embedder invokes
// this method multiple times, it must be invoked in a thread safe manner,
diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc
index b5e934b..17145d1 100644
--- a/net/proxy/proxy_resolver_v8_tracing.cc
+++ b/net/proxy/proxy_resolver_v8_tracing.cc
@@ -119,7 +119,7 @@
base::string16 message;
};
- virtual ~Job();
+ ~Job() override;
void CheckIsOnWorkerThread() const;
void CheckIsOnOriginThread() const;
@@ -145,12 +145,12 @@
int ExecuteProxyResolver();
// Implementation of ProxyResolverv8::JSBindings
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override;
- virtual void Alert(const base::string16& message) override;
- virtual void OnError(int line_number, const base::string16& error) override;
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override;
+ void Alert(const base::string16& message) override;
+ void OnError(int line_number, const base::string16& error) override;
bool ResolveDnsBlocking(const std::string& host,
ResolveDnsOperation op,
diff --git a/net/proxy/proxy_resolver_v8_tracing.h b/net/proxy/proxy_resolver_v8_tracing.h
index 92eac03..85aca51 100644
--- a/net/proxy/proxy_resolver_v8_tracing.h
+++ b/net/proxy/proxy_resolver_v8_tracing.h
@@ -42,20 +42,19 @@
ProxyResolverErrorObserver* error_observer,
NetLog* net_log);
- virtual ~ProxyResolverV8Tracing();
+ ~ProxyResolverV8Tracing() override;
// ProxyResolver implementation:
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(RequestHandle request) override;
- virtual LoadState GetLoadState(RequestHandle request) const override;
- virtual void CancelSetPacScript() override;
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& script_data,
- const CompletionCallback& callback) override;
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& script_data,
+ const CompletionCallback& callback) override;
private:
class Job;
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index a6e38cb..0c16a1a 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -70,8 +70,7 @@
public:
MockErrorObserver() : event_(true, false) {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {
+ void OnPACScriptError(int line_number, const base::string16& error) override {
{
base::AutoLock l(lock_);
output += base::StringPrintf("Error: line %d: %s\n", line_number,
@@ -763,12 +762,12 @@
BlockableHostResolver()
: num_cancelled_requests_(0), waiting_for_resolve_(false) {}
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override {
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override {
EXPECT_FALSE(callback.is_null());
EXPECT_TRUE(out_req);
@@ -789,14 +788,14 @@
return ERR_IO_PENDING;
}
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override {
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override {
NOTREACHED();
return ERR_DNS_CACHE_MISS;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_EQ(reinterpret_cast<RequestHandle*>(1), req);
num_cancelled_requests_++;
}
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index d0d01d9..76ad232 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -26,15 +26,15 @@
MockJSBindings() : my_ip_address_count(0), my_ip_address_ex_count(0),
should_terminate(false) {}
- virtual void Alert(const base::string16& message) override {
+ void Alert(const base::string16& message) override {
VLOG(1) << "PAC-alert: " << message; // Helpful when debugging.
alerts.push_back(base::UTF16ToUTF8(message));
}
- virtual bool ResolveDns(const std::string& host,
- ResolveDnsOperation op,
- std::string* output,
- bool* terminate) override {
+ bool ResolveDns(const std::string& host,
+ ResolveDnsOperation op,
+ std::string* output,
+ bool* terminate) override {
*terminate = should_terminate;
if (op == MY_IP_ADDRESS) {
@@ -65,8 +65,7 @@
return false;
}
- virtual void OnError(int line_number,
- const base::string16& message) override {
+ void OnError(int line_number, const base::string16& message) override {
// Helpful when debugging.
VLOG(1) << "PAC-error: [" << line_number << "] " << message;
@@ -102,8 +101,7 @@
set_js_bindings(&mock_js_bindings_);
}
- virtual ~ProxyResolverV8WithMockBindings() {
- }
+ ~ProxyResolverV8WithMockBindings() override {}
MockJSBindings* mock_js_bindings() {
return &mock_js_bindings_;
diff --git a/net/proxy/proxy_script_decider_unittest.cc b/net/proxy/proxy_script_decider_unittest.cc
index 880a187..ee2958c 100644
--- a/net/proxy/proxy_script_decider_unittest.cc
+++ b/net/proxy/proxy_script_decider_unittest.cc
@@ -105,9 +105,9 @@
}
// ProxyScriptFetcher implementation.
- virtual int Fetch(const GURL& url,
- base::string16* text,
- const CompletionCallback& callback) override {
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const CompletionCallback& callback) override {
const Rules::Rule& rule = rules_->GetRuleByUrl(url);
int rv = rule.fetch_error;
EXPECT_NE(ERR_UNEXPECTED, rv);
@@ -116,9 +116,9 @@
return rv;
}
- virtual void Cancel() override {}
+ void Cancel() override {}
- virtual URLRequestContext* GetRequestContext() const override {
+ URLRequestContext* GetRequestContext() const override {
return request_context_;
}
@@ -131,12 +131,12 @@
class MockDhcpProxyScriptFetcher : public DhcpProxyScriptFetcher {
public:
MockDhcpProxyScriptFetcher();
- virtual ~MockDhcpProxyScriptFetcher();
+ ~MockDhcpProxyScriptFetcher() override;
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual const GURL& GetPacURL() const override;
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override;
+ void Cancel() override;
+ const GURL& GetPacURL() const override;
virtual void SetPacURL(const GURL& url);
@@ -642,18 +642,15 @@
: gurl_("http://dhcppac/"), expected_text_(expected_text) {
}
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override {
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override {
*utf16_text = expected_text_;
return OK;
}
- virtual void Cancel() override {
- }
+ void Cancel() override {}
- virtual const GURL& GetPacURL() const override {
- return gurl_;
- }
+ const GURL& GetPacURL() const override { return gurl_; }
const base::string16& expected_text() const {
return expected_text_;
@@ -722,10 +719,10 @@
public base::SupportsWeakPtr<AsyncFailDhcpFetcher> {
public:
AsyncFailDhcpFetcher() {}
- virtual ~AsyncFailDhcpFetcher() {}
+ ~AsyncFailDhcpFetcher() override {}
- virtual int Fetch(base::string16* utf16_text,
- const CompletionCallback& callback) override {
+ int Fetch(base::string16* utf16_text,
+ const CompletionCallback& callback) override {
callback_ = callback;
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -733,13 +730,9 @@
return ERR_IO_PENDING;
}
- virtual void Cancel() override {
- callback_.Reset();
- }
+ void Cancel() override { callback_.Reset(); }
- virtual const GURL& GetPacURL() const override {
- return dummy_gurl_;
- }
+ const GURL& GetPacURL() const override { return dummy_gurl_; }
void CallbackWithFailure() {
if (!callback_.is_null())
diff --git a/net/proxy/proxy_script_fetcher_impl.h b/net/proxy/proxy_script_fetcher_impl.h
index 8cdcf81..54afa4c 100644
--- a/net/proxy/proxy_script_fetcher_impl.h
+++ b/net/proxy/proxy_script_fetcher_impl.h
@@ -36,7 +36,7 @@
// fetcher and the context; you can break such cycles by calling Cancel().
explicit ProxyScriptFetcherImpl(URLRequestContext* url_request_context);
- virtual ~ProxyScriptFetcherImpl();
+ ~ProxyScriptFetcherImpl() override;
// Used by unit-tests to modify the default limits.
base::TimeDelta SetTimeoutConstraint(base::TimeDelta timeout);
@@ -45,19 +45,20 @@
void OnResponseCompleted(URLRequest* request);
// ProxyScriptFetcher methods:
- virtual int Fetch(const GURL& url, base::string16* text,
- const net::CompletionCallback& callback) override;
- virtual void Cancel() override;
- virtual URLRequestContext* GetRequestContext() const override;
+ int Fetch(const GURL& url,
+ base::string16* text,
+ const net::CompletionCallback& callback) override;
+ void Cancel() override;
+ URLRequestContext* GetRequestContext() const override;
// URLRequest::Delegate methods:
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool is_hsts_ok) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request, int num_bytes) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool is_hsts_ok) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int num_bytes) override;
private:
enum { kBufSize = 4096 };
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index 5eb887e..2073d00 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -84,9 +84,7 @@
storage_.set_job_factory(job_factory);
}
- virtual ~RequestContext() {
- AssertNoURLRequests();
- }
+ ~RequestContext() override { AssertNoURLRequests(); }
private:
URLRequestContextStorage storage_;
@@ -112,26 +110,26 @@
class BasicNetworkDelegate : public NetworkDelegate {
public:
BasicNetworkDelegate() {}
- virtual ~BasicNetworkDelegate() {}
+ ~BasicNetworkDelegate() override {}
private:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
EXPECT_TRUE(request->load_flags() & LOAD_DISABLE_CERT_REVOCATION_CHECKING);
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -140,22 +138,21 @@
return OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
+ void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {}
+ void OnPACScriptError(int line_number, const base::string16& error) override {
+ }
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -163,28 +160,27 @@
return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
return false;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index cb1011c..f83806c 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -119,9 +119,9 @@
public:
DefaultPollPolicy() {}
- virtual Mode GetNextDelay(int initial_error,
- TimeDelta current_delay,
- TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int initial_error,
+ TimeDelta current_delay,
+ TimeDelta* next_delay) const override {
if (initial_error != OK) {
// Re-try policy for failures.
const int kDelay1Seconds = 8;
@@ -160,10 +160,9 @@
class ProxyConfigServiceDirect : public ProxyConfigService {
public:
// ProxyConfigService implementation:
- virtual void AddObserver(Observer* observer) override {}
- virtual void RemoveObserver(Observer* observer) override {}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config)
- override {
+ void AddObserver(Observer* observer) override {}
+ void RemoveObserver(Observer* observer) override {}
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override {
*config = ProxyConfig::CreateDirect();
config->set_source(PROXY_CONFIG_SOURCE_UNKNOWN);
return CONFIG_VALID;
@@ -176,28 +175,24 @@
ProxyResolverNull() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver implementation.
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
return ERR_NOT_IMPLEMENTED;
}
- virtual void CancelRequest(RequestHandle request) override {
- NOTREACHED();
- }
+ void CancelRequest(RequestHandle request) override { NOTREACHED(); }
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- NOTREACHED();
- }
+ void CancelSetPacScript() override { NOTREACHED(); }
- virtual int SetPacScript(
+ int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& /*script_data*/,
const CompletionCallback& /*callback*/) override {
return ERR_NOT_IMPLEMENTED;
@@ -212,31 +207,26 @@
: ProxyResolver(false /*expects_pac_bytes*/),
pac_string_(pac_string) {}
- virtual int GetProxyForURL(const GURL& url,
- ProxyInfo* results,
- const CompletionCallback& callback,
- RequestHandle* request,
- const BoundNetLog& net_log) override {
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override {
results->UsePacString(pac_string_);
return OK;
}
- virtual void CancelRequest(RequestHandle request) override {
- NOTREACHED();
- }
+ void CancelRequest(RequestHandle request) override { NOTREACHED(); }
- virtual LoadState GetLoadState(RequestHandle request) const override {
+ LoadState GetLoadState(RequestHandle request) const override {
NOTREACHED();
return LOAD_STATE_IDLE;
}
- virtual void CancelSetPacScript() override {
- NOTREACHED();
- }
+ void CancelSetPacScript() override { NOTREACHED(); }
- virtual int SetPacScript(
- const scoped_refptr<ProxyResolverScriptData>& pac_script,
- const CompletionCallback& callback) override {
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& pac_script,
+ const CompletionCallback& callback) override {
return OK;
}
@@ -250,7 +240,7 @@
ProxyResolverFactoryForSystem()
: ProxyResolverFactory(false /*expects_pac_bytes*/) {}
- virtual ProxyResolver* CreateProxyResolver() override {
+ ProxyResolver* CreateProxyResolver() override {
DCHECK(IsSupported());
#if defined(OS_WIN)
return new ProxyResolverWinHttp();
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 942c6a4..040a0f8 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -97,7 +97,7 @@
ProxyResolver* resolver,
NetLog* net_log);
- virtual ~ProxyService();
+ ~ProxyService() override;
// Used internally to handle PAC queries.
// TODO(eroman): consider naming this simply "Request".
@@ -375,14 +375,14 @@
// NetworkChangeNotifier::IPAddressObserver
// When this is called, we re-fetch PAC scripts and re-run WPAD.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// NetworkChangeNotifier::DNSObserver
// We respond as above.
- virtual void OnDNSChanged() override;
+ void OnDNSChanged() override;
// ProxyConfigService::Observer
- virtual void OnProxyConfigChanged(
+ void OnProxyConfigChanged(
const ProxyConfig& config,
ProxyConfigService::ConfigAvailability availability) override;
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index acc015e..aab3de3 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -37,8 +37,9 @@
public:
ImmediatePollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta::FromMilliseconds(1);
return MODE_USE_TIMER;
}
@@ -53,8 +54,9 @@
public:
NeverPollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta::FromDays(60);
return MODE_USE_TIMER;
}
@@ -68,8 +70,9 @@
public:
ImmediateAfterActivityPollPolicy() {}
- virtual Mode GetNextDelay(int error, base::TimeDelta current_delay,
- base::TimeDelta* next_delay) const override {
+ Mode GetNextDelay(int error,
+ base::TimeDelta current_delay,
+ base::TimeDelta* next_delay) const override {
*next_delay = base::TimeDelta();
return MODE_START_AFTER_ACTIVITY;
}
@@ -127,16 +130,15 @@
config_(ProxyConfig::CreateFromCustomPacURL(GURL(pac_url))) {
}
- virtual void AddObserver(Observer* observer) override {
+ void AddObserver(Observer* observer) override {
observers_.AddObserver(observer);
}
- virtual void RemoveObserver(Observer* observer) override {
+ void RemoveObserver(Observer* observer) override {
observers_.RemoveObserver(observer);
}
- virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* results)
- override {
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* results) override {
if (availability_ == CONFIG_VALID)
*results = config_;
return availability_;
@@ -165,10 +167,10 @@
proxy_service_(NULL) {
}
- virtual void OnResolveProxy(const GURL& url,
- int load_flags,
- const ProxyService& proxy_service,
- ProxyInfo* result) override {
+ void OnResolveProxy(const GURL& url,
+ int load_flags,
+ const ProxyService& proxy_service,
+ ProxyInfo* result) override {
on_resolve_proxy_called_ = true;
proxy_service_ = &proxy_service;
DCHECK(!add_proxy_ || !remove_proxy_);
@@ -210,8 +212,8 @@
proxy_fallback_net_error_(OK) {
}
- virtual void OnProxyFallback(const ProxyServer& proxy_server,
- int net_error) override {
+ void OnProxyFallback(const ProxyServer& proxy_server,
+ int net_error) override {
proxy_server_ = proxy_server;
proxy_fallback_net_error_ = net_error;
on_proxy_fallback_called_ = true;
diff --git a/net/quic/congestion_control/pacing_sender.cc b/net/quic/congestion_control/pacing_sender.cc
index 03e5534..d53fccc 100644
--- a/net/quic/congestion_control/pacing_sender.cc
+++ b/net/quic/congestion_control/pacing_sender.cc
@@ -62,13 +62,9 @@
next_packet_send_time_ = QuicTime::Zero();
return in_flight;
}
- // The next packet should be sent as soon as the current packets has
- // been transferred. We pace at twice the rate of the underlying
- // sender's bandwidth estimate during slow start and 1.25x during congestion
- // avoidance to ensure pacing doesn't prevent us from filling the window.
- const float kPacingAggression = sender_->InSlowStart() ? 2 : 1.25;
- QuicTime::Delta delay =
- BandwidthEstimate().Scale(kPacingAggression).TransferTime(bytes);
+ // The next packet should be sent as soon as the current packets has been
+ // transferred.
+ QuicTime::Delta delay = PacingRate().TransferTime(bytes);
// If the last send was delayed, and the alarm took a long time to get
// invoked, allow the connection to make up for lost time.
if (was_last_send_delayed_) {
@@ -145,6 +141,10 @@
return QuicTime::Delta::Zero();
}
+QuicBandwidth PacingSender::PacingRate() const {
+ return sender_->PacingRate();
+}
+
QuicBandwidth PacingSender::BandwidthEstimate() const {
return sender_->BandwidthEstimate();
}
diff --git a/net/quic/congestion_control/pacing_sender.h b/net/quic/congestion_control/pacing_sender.h
index e50527d..5271dbc 100644
--- a/net/quic/congestion_control/pacing_sender.h
+++ b/net/quic/congestion_control/pacing_sender.h
@@ -32,37 +32,38 @@
PacingSender(SendAlgorithmInterface* sender,
QuicTime::Delta alarm_granularity,
uint32 initial_packet_burst);
- virtual ~PacingSender();
+ ~PacingSender() override;
// SendAlgorithmInterface methods.
- virtual void SetFromConfig(const QuicConfig& config, bool is_server) override;
- virtual void SetNumEmulatedConnections(int num_connections) override;
- virtual void OnIncomingQuicCongestionFeedbackFrame(
+ void SetFromConfig(const QuicConfig& config, bool is_server) override;
+ void SetNumEmulatedConnections(int num_connections) override;
+ void OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time) override;
- virtual void OnCongestionEvent(bool rtt_updated,
- QuicByteCount bytes_in_flight,
- const CongestionVector& acked_packets,
- const CongestionVector& lost_packets) override;
- virtual bool OnPacketSent(QuicTime sent_time,
- QuicByteCount bytes_in_flight,
- QuicPacketSequenceNumber sequence_number,
- QuicByteCount bytes,
- HasRetransmittableData is_retransmittable) override;
- virtual void OnRetransmissionTimeout(bool packets_retransmitted) override;
- virtual void RevertRetransmissionTimeout() override;
- virtual QuicTime::Delta TimeUntilSend(
+ void OnCongestionEvent(bool rtt_updated,
+ QuicByteCount bytes_in_flight,
+ const CongestionVector& acked_packets,
+ const CongestionVector& lost_packets) override;
+ bool OnPacketSent(QuicTime sent_time,
+ QuicByteCount bytes_in_flight,
+ QuicPacketSequenceNumber sequence_number,
+ QuicByteCount bytes,
+ HasRetransmittableData is_retransmittable) override;
+ void OnRetransmissionTimeout(bool packets_retransmitted) override;
+ void RevertRetransmissionTimeout() override;
+ QuicTime::Delta TimeUntilSend(
QuicTime now,
QuicByteCount bytes_in_flight,
HasRetransmittableData has_retransmittable_data) const override;
- virtual QuicBandwidth BandwidthEstimate() const override;
- virtual bool HasReliableBandwidthEstimate() const override;
- virtual QuicTime::Delta RetransmissionDelay() const override;
- virtual QuicByteCount GetCongestionWindow() const override;
- virtual bool InSlowStart() const override;
- virtual bool InRecovery() const override;
- virtual QuicByteCount GetSlowStartThreshold() const override;
- virtual CongestionControlType GetCongestionControlType() const override;
+ QuicBandwidth PacingRate() const override;
+ QuicBandwidth BandwidthEstimate() const override;
+ bool HasReliableBandwidthEstimate() const override;
+ QuicTime::Delta RetransmissionDelay() const override;
+ QuicByteCount GetCongestionWindow() const override;
+ bool InSlowStart() const override;
+ bool InRecovery() const override;
+ QuicByteCount GetSlowStartThreshold() const override;
+ CongestionControlType GetCongestionControlType() const override;
private:
scoped_ptr<SendAlgorithmInterface> sender_; // Underlying sender.
diff --git a/net/quic/congestion_control/pacing_sender_test.cc b/net/quic/congestion_control/pacing_sender_test.cc
index f887c54..0be0b0a 100644
--- a/net/quic/congestion_control/pacing_sender_test.cc
+++ b/net/quic/congestion_control/pacing_sender_test.cc
@@ -134,14 +134,10 @@
}
TEST_F(PacingSenderTest, VariousSending) {
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
-
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Now update the RTT and verify that packets are actually paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -204,14 +200,10 @@
}
TEST_F(PacingSenderTest, CongestionAvoidanceSending) {
- // Start the test in congestion avoidance.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(false));
-
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize * 1.25, QuicTime::Delta::FromMilliseconds(2))));
// Now update the RTT and verify that packets are actually paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -272,14 +264,11 @@
pacing_sender_.reset(new PacingSender(mock_sender_,
QuicTime::Delta::FromMilliseconds(1),
10));
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Update the RTT and verify that the first 10 packets aren't paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -330,14 +319,11 @@
pacing_sender_.reset(new PacingSender(mock_sender_,
QuicTime::Delta::FromMilliseconds(1),
10));
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Send 10 packets, and verify that they are not paced.
for (int i = 0 ; i < kInitialBurstPackets; ++i) {
diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc
index b03686d..2eb0b8d 100644
--- a/net/quic/congestion_control/rtt_stats.cc
+++ b/net/quic/congestion_control/rtt_stats.cc
@@ -68,7 +68,7 @@
<< (rtt_sample.IsZero() ? "Zero" : "Infinite");
return;
}
- // RTT can't be negative.
+ // RTT can't be non-positive.
DCHECK_LT(0, rtt_sample.ToMicroseconds());
latest_rtt_ = rtt_sample;
@@ -138,4 +138,11 @@
return smoothed_rtt_;
}
+QuicTime::Delta RttStats::MinRtt() const {
+ if (!HasUpdates()) {
+ return QuicTime::Delta::FromMicroseconds(initial_rtt_us_);
+ }
+ return min_rtt_;
+}
+
} // namespace net
diff --git a/net/quic/congestion_control/rtt_stats.h b/net/quic/congestion_control/rtt_stats.h
index 5e01687..b7ec6b9 100644
--- a/net/quic/congestion_control/rtt_stats.h
+++ b/net/quic/congestion_control/rtt_stats.h
@@ -43,6 +43,11 @@
QuicTime::Delta SmoothedRtt() const;
+ // Returns the min_rtt for the entire connection if a min has been measured.
+ // This returns an initial non-zero RTT estimate if no measurements have yet
+ // been made.
+ QuicTime::Delta MinRtt() const;
+
int64 initial_rtt_us() const {
return initial_rtt_us_;
}
@@ -56,11 +61,6 @@
return latest_rtt_;
}
- // Returns the min_rtt for the entire connection.
- QuicTime::Delta min_rtt() const {
- return min_rtt_;
- }
-
// Returns the min_rtt since SampleNewRecentMinRtt has been called, or the
// min_rtt for the entire connection if SampleNewMinRtt was never called.
QuicTime::Delta recent_min_rtt() const {
diff --git a/net/quic/congestion_control/rtt_stats_test.cc b/net/quic/congestion_control/rtt_stats_test.cc
index 6b5ff7d..9b7ada1 100644
--- a/net/quic/congestion_control/rtt_stats_test.cc
+++ b/net/quic/congestion_control/rtt_stats_test.cc
@@ -26,36 +26,44 @@
RttStats rtt_stats_;
};
+TEST_F(RttStatsTest, DefaultsBeforeUpdate) {
+ EXPECT_LT(0u, rtt_stats_.initial_rtt_us());
+ EXPECT_EQ(QuicTime::Delta::FromMicroseconds(rtt_stats_.initial_rtt_us()),
+ rtt_stats_.MinRtt());
+ EXPECT_EQ(QuicTime::Delta::FromMicroseconds(rtt_stats_.initial_rtt_us()),
+ rtt_stats_.SmoothedRtt());
+}
+
TEST_F(RttStatsTest, MinRtt) {
- rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(100),
+ rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(200),
QuicTime::Delta::Zero(),
QuicTime::Zero());
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(100), rtt_stats_.min_rtt());
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(100),
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(200), rtt_stats_.MinRtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(200),
rtt_stats_.recent_min_rtt());
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(10),
QuicTime::Delta::Zero(),
QuicTime::Zero().Add(
QuicTime::Delta::FromMilliseconds(10)));
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(50),
QuicTime::Delta::Zero(),
QuicTime::Zero().Add(
QuicTime::Delta::FromMilliseconds(20)));
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(50),
QuicTime::Delta::Zero(),
QuicTime::Zero().Add(
QuicTime::Delta::FromMilliseconds(30)));
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(50),
QuicTime::Delta::Zero(),
QuicTime::Zero().Add(
QuicTime::Delta::FromMilliseconds(40)));
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
}
@@ -63,7 +71,7 @@
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(10),
QuicTime::Delta::Zero(),
QuicTime::Zero());
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
rtt_stats_.SampleNewRecentMinRtt(4);
@@ -71,14 +79,14 @@
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(50),
QuicTime::Delta::Zero(),
QuicTime::Zero());
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10),
rtt_stats_.recent_min_rtt());
}
rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(50),
QuicTime::Delta::Zero(),
QuicTime::Zero());
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(50), rtt_stats_.recent_min_rtt());
}
@@ -89,7 +97,7 @@
QuicTime now = QuicTime::Zero();
QuicTime::Delta rtt_sample = QuicTime::Delta::FromMilliseconds(10);
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.recent_min_rtt());
// Gradually increase the rtt samples and ensure the recent_min_rtt starts
@@ -98,7 +106,7 @@
now = now.Add(QuicTime::Delta::FromMilliseconds(25));
rtt_sample = rtt_sample.Add(QuicTime::Delta::FromMilliseconds(10));
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(rtt_sample, RttStatsPeer::GetQuarterWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample.Subtract(QuicTime::Delta::FromMilliseconds(10)),
RttStatsPeer::GetHalfWindowRtt(&rtt_stats_));
@@ -120,7 +128,7 @@
// A new quarter rtt low sets that, but nothing else.
rtt_sample = rtt_sample.Subtract(QuicTime::Delta::FromMilliseconds(5));
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(rtt_sample, RttStatsPeer::GetQuarterWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample.Subtract(QuicTime::Delta::FromMilliseconds(5)),
RttStatsPeer::GetHalfWindowRtt(&rtt_stats_));
@@ -130,7 +138,7 @@
// A new half rtt low sets that and the quarter rtt low.
rtt_sample = rtt_sample.Subtract(QuicTime::Delta::FromMilliseconds(15));
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(rtt_sample, RttStatsPeer::GetQuarterWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample, RttStatsPeer::GetHalfWindowRtt(&rtt_stats_));
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(70),
@@ -139,7 +147,7 @@
// A new full window loss sets the recent_min_rtt, but not min_rtt.
rtt_sample = QuicTime::Delta::FromMilliseconds(65);
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.min_rtt());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(10), rtt_stats_.MinRtt());
EXPECT_EQ(rtt_sample, RttStatsPeer::GetQuarterWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample, RttStatsPeer::GetHalfWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample, rtt_stats_.recent_min_rtt());
@@ -148,7 +156,7 @@
rtt_sample = QuicTime::Delta::FromMilliseconds(5);
rtt_stats_.UpdateRtt(rtt_sample, QuicTime::Delta::Zero(), now);
- EXPECT_EQ(rtt_sample, rtt_stats_.min_rtt());
+ EXPECT_EQ(rtt_sample, rtt_stats_.MinRtt());
EXPECT_EQ(rtt_sample, RttStatsPeer::GetQuarterWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample, RttStatsPeer::GetHalfWindowRtt(&rtt_stats_));
EXPECT_EQ(rtt_sample, rtt_stats_.recent_min_rtt());
@@ -157,7 +165,7 @@
TEST_F(RttStatsTest, ExpireSmoothedMetrics) {
QuicTime::Delta initial_rtt = QuicTime::Delta::FromMilliseconds(10);
rtt_stats_.UpdateRtt(initial_rtt, QuicTime::Delta::Zero(), QuicTime::Zero());
- EXPECT_EQ(initial_rtt, rtt_stats_.min_rtt());
+ EXPECT_EQ(initial_rtt, rtt_stats_.MinRtt());
EXPECT_EQ(initial_rtt, rtt_stats_.recent_min_rtt());
EXPECT_EQ(initial_rtt, rtt_stats_.SmoothedRtt());
diff --git a/net/quic/congestion_control/send_algorithm_interface.h b/net/quic/congestion_control/send_algorithm_interface.h
index 14383f8..4a11693 100644
--- a/net/quic/congestion_control/send_algorithm_interface.h
+++ b/net/quic/congestion_control/send_algorithm_interface.h
@@ -82,6 +82,8 @@
QuicByteCount bytes_in_flight,
HasRetransmittableData has_retransmittable_data) const = 0;
+ virtual QuicBandwidth PacingRate() const = 0;
+
// What's the current estimated bandwidth in bytes per second.
// Returns 0 when it does not have an estimate.
virtual QuicBandwidth BandwidthEstimate() const = 0;
diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc
index 0aae5fd..91b95cf 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -98,7 +98,7 @@
const CongestionVector& lost_packets) {
if (rtt_updated && InSlowStart() &&
hybrid_slow_start_.ShouldExitSlowStart(rtt_stats_->latest_rtt(),
- rtt_stats_->min_rtt(),
+ rtt_stats_->MinRtt(),
congestion_window_)) {
slowstart_threshold_ = congestion_window_;
}
@@ -204,7 +204,18 @@
return min(receive_window_, GetCongestionWindow());
}
+QuicBandwidth TcpCubicSender::PacingRate() const {
+ // We pace at twice the rate of the underlying sender's bandwidth estimate
+ // during slow start and 1.25x during congestion avoidance to ensure pacing
+ // doesn't prevent us from filling the window.
+ return BandwidthEstimate().Scale(InSlowStart() ? 2 : 1.25);
+}
+
QuicBandwidth TcpCubicSender::BandwidthEstimate() const {
+ if (rtt_stats_->SmoothedRtt().IsZero()) {
+ LOG(DFATAL) << "In BandwidthEstimate(), smoothed RTT is zero!";
+ return QuicBandwidth::Zero();
+ }
return QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(),
rtt_stats_->SmoothedRtt());
}
@@ -217,9 +228,8 @@
if (!rtt_stats_->HasUpdates()) {
return QuicTime::Delta::Zero();
}
- return QuicTime::Delta::FromMicroseconds(
- rtt_stats_->SmoothedRtt().ToMicroseconds() +
- 4 * rtt_stats_->mean_deviation().ToMicroseconds());
+ return rtt_stats_->SmoothedRtt().Add(
+ rtt_stats_->mean_deviation().Multiply(4));
}
QuicByteCount TcpCubicSender::GetCongestionWindow() const {
@@ -294,7 +304,7 @@
} else {
congestion_window_ = min(max_tcp_congestion_window_,
cubic_.CongestionWindowAfterAck(
- congestion_window_, rtt_stats_->min_rtt()));
+ congestion_window_, rtt_stats_->MinRtt()));
DVLOG(1) << "Cubic; congestion window: " << congestion_window_
<< " slowstart threshold: " << slowstart_threshold_;
}
diff --git a/net/quic/congestion_control/tcp_cubic_sender.h b/net/quic/congestion_control/tcp_cubic_sender.h
index dd0df58..ed0428a 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.h
+++ b/net/quic/congestion_control/tcp_cubic_sender.h
@@ -35,37 +35,38 @@
bool reno,
QuicTcpCongestionWindow max_tcp_congestion_window,
QuicConnectionStats* stats);
- virtual ~TcpCubicSender();
+ ~TcpCubicSender() override;
// Start implementation of SendAlgorithmInterface.
- virtual void SetFromConfig(const QuicConfig& config, bool is_server) override;
- virtual void SetNumEmulatedConnections(int num_connections) override;
- virtual void OnIncomingQuicCongestionFeedbackFrame(
+ void SetFromConfig(const QuicConfig& config, bool is_server) override;
+ void SetNumEmulatedConnections(int num_connections) override;
+ void OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time) override;
- virtual void OnCongestionEvent(bool rtt_updated,
- QuicByteCount bytes_in_flight,
- const CongestionVector& acked_packets,
- const CongestionVector& lost_packets) override;
- virtual bool OnPacketSent(QuicTime sent_time,
- QuicByteCount bytes_in_flight,
- QuicPacketSequenceNumber sequence_number,
- QuicByteCount bytes,
- HasRetransmittableData is_retransmittable) override;
- virtual void OnRetransmissionTimeout(bool packets_retransmitted) override;
- virtual void RevertRetransmissionTimeout() override;
- virtual QuicTime::Delta TimeUntilSend(
+ void OnCongestionEvent(bool rtt_updated,
+ QuicByteCount bytes_in_flight,
+ const CongestionVector& acked_packets,
+ const CongestionVector& lost_packets) override;
+ bool OnPacketSent(QuicTime sent_time,
+ QuicByteCount bytes_in_flight,
+ QuicPacketSequenceNumber sequence_number,
+ QuicByteCount bytes,
+ HasRetransmittableData is_retransmittable) override;
+ void OnRetransmissionTimeout(bool packets_retransmitted) override;
+ void RevertRetransmissionTimeout() override;
+ QuicTime::Delta TimeUntilSend(
QuicTime now,
QuicByteCount bytes_in_flight,
HasRetransmittableData has_retransmittable_data) const override;
- virtual QuicBandwidth BandwidthEstimate() const override;
- virtual bool HasReliableBandwidthEstimate() const override;
- virtual QuicTime::Delta RetransmissionDelay() const override;
- virtual QuicByteCount GetCongestionWindow() const override;
- virtual bool InSlowStart() const override;
- virtual bool InRecovery() const override;
- virtual QuicByteCount GetSlowStartThreshold() const override;
- virtual CongestionControlType GetCongestionControlType() const override;
+ QuicBandwidth PacingRate() const override;
+ QuicBandwidth BandwidthEstimate() const override;
+ bool HasReliableBandwidthEstimate() const override;
+ QuicTime::Delta RetransmissionDelay() const override;
+ QuicByteCount GetCongestionWindow() const override;
+ bool InSlowStart() const override;
+ bool InRecovery() const override;
+ QuicByteCount GetSlowStartThreshold() const override;
+ CongestionControlType GetCongestionControlType() const override;
// End implementation of SendAlgorithmInterface.
private:
diff --git a/net/quic/congestion_control/tcp_loss_algorithm.h b/net/quic/congestion_control/tcp_loss_algorithm.h
index 201354b..0b1c995 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm.h
+++ b/net/quic/congestion_control/tcp_loss_algorithm.h
@@ -21,19 +21,19 @@
class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface {
public:
TCPLossAlgorithm();
- virtual ~TCPLossAlgorithm() {}
+ ~TCPLossAlgorithm() override {}
- virtual LossDetectionType GetLossDetectionType() const override;
+ LossDetectionType GetLossDetectionType() const override;
// Uses nack counts to decide when packets are lost.
- virtual SequenceNumberSet DetectLostPackets(
+ SequenceNumberSet DetectLostPackets(
const QuicUnackedPacketMap& unacked_packets,
const QuicTime& time,
QuicPacketSequenceNumber largest_observed,
const RttStats& rtt_stats) override;
// Returns a non-zero value when the early retransmit timer is active.
- virtual QuicTime GetLossTimeout() const override;
+ QuicTime GetLossTimeout() const override;
private:
QuicTime loss_detection_timeout_;
diff --git a/net/quic/congestion_control/tcp_loss_algorithm_test.cc b/net/quic/congestion_control/tcp_loss_algorithm_test.cc
index 988f427..34bcc16 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm_test.cc
+++ b/net/quic/congestion_control/tcp_loss_algorithm_test.cc
@@ -27,8 +27,8 @@
void SendDataPacket(QuicPacketSequenceNumber sequence_number) {
SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER,
nullptr, 0, new RetransmittableFrames());
- unacked_packets_.AddPacket(packet);
- unacked_packets_.SetSent(sequence_number, clock_.Now(), 1000, true);
+ unacked_packets_.AddSentPacket(packet, 0, NOT_RETRANSMISSION, clock_.Now(),
+ 1000, true);
}
void VerifyLosses(QuicPacketSequenceNumber largest_observed,
diff --git a/net/quic/congestion_control/tcp_receiver.h b/net/quic/congestion_control/tcp_receiver.h
index 89e9186..7dae4f4 100644
--- a/net/quic/congestion_control/tcp_receiver.h
+++ b/net/quic/congestion_control/tcp_receiver.h
@@ -24,12 +24,12 @@
static const QuicByteCount kReceiveWindowTCP;
// Start implementation of SendAlgorithmInterface.
- virtual bool GenerateCongestionFeedback(
+ bool GenerateCongestionFeedback(
QuicCongestionFeedbackFrame* feedback) override;
- virtual void RecordIncomingPacket(QuicByteCount bytes,
- QuicPacketSequenceNumber sequence_number,
- QuicTime timestamp) override;
+ void RecordIncomingPacket(QuicByteCount bytes,
+ QuicPacketSequenceNumber sequence_number,
+ QuicTime timestamp) override;
private:
QuicByteCount receive_window_;
diff --git a/net/quic/congestion_control/time_loss_algorithm.h b/net/quic/congestion_control/time_loss_algorithm.h
index de517ef..794a07d 100644
--- a/net/quic/congestion_control/time_loss_algorithm.h
+++ b/net/quic/congestion_control/time_loss_algorithm.h
@@ -21,14 +21,14 @@
class NET_EXPORT_PRIVATE TimeLossAlgorithm : public LossDetectionInterface {
public:
TimeLossAlgorithm();
- virtual ~TimeLossAlgorithm() {}
+ ~TimeLossAlgorithm() override {}
- virtual LossDetectionType GetLossDetectionType() const override;
+ LossDetectionType GetLossDetectionType() const override;
// Declares pending packets less than the largest observed lost when it has
// been 1.25 RTT since they were sent. Packets larger than the largest
// observed are retransmitted via TLP.
- virtual SequenceNumberSet DetectLostPackets(
+ SequenceNumberSet DetectLostPackets(
const QuicUnackedPacketMap& unacked_packets,
const QuicTime& time,
QuicPacketSequenceNumber largest_observed,
@@ -39,7 +39,7 @@
// TODO(ianswett): Ideally the RTT variance and the RTT would be used to
// determine the time a packet is considered lost.
// TODO(ianswett): Consider using Max(1.25 * srtt, 1.125 * last_rtt).
- virtual QuicTime GetLossTimeout() const override;
+ QuicTime GetLossTimeout() const override;
private:
QuicTime loss_detection_timeout_;
diff --git a/net/quic/congestion_control/time_loss_algorithm_test.cc b/net/quic/congestion_control/time_loss_algorithm_test.cc
index 4139019..374e563 100644
--- a/net/quic/congestion_control/time_loss_algorithm_test.cc
+++ b/net/quic/congestion_control/time_loss_algorithm_test.cc
@@ -27,8 +27,8 @@
void SendDataPacket(QuicPacketSequenceNumber sequence_number) {
SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER,
nullptr, 0, new RetransmittableFrames());
- unacked_packets_.AddPacket(packet);
- unacked_packets_.SetSent(sequence_number, clock_.Now(), 1000, true);
+ unacked_packets_.AddSentPacket(packet, 0, NOT_RETRANSMISSION, clock_.Now(),
+ 1000, true);
}
void VerifyLosses(QuicPacketSequenceNumber largest_observed,
diff --git a/net/quic/crypto/aead_base_decrypter.h b/net/quic/crypto/aead_base_decrypter.h
index 116dbe1..5118b11 100644
--- a/net/quic/crypto/aead_base_decrypter.h
+++ b/net/quic/crypto/aead_base_decrypter.h
@@ -37,21 +37,21 @@
size_t auth_tag_size,
size_t nonce_prefix_size);
#endif
- virtual ~AeadBaseDecrypter();
+ ~AeadBaseDecrypter() override;
// QuicDecrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Decrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override;
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext) override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Decrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override;
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext) override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
protected:
// Make these constants available to the subclasses so that the subclasses
diff --git a/net/quic/crypto/aead_base_encrypter.h b/net/quic/crypto/aead_base_encrypter.h
index 89c7a1f..7d9b6fc 100644
--- a/net/quic/crypto/aead_base_encrypter.h
+++ b/net/quic/crypto/aead_base_encrypter.h
@@ -37,24 +37,24 @@
size_t auth_tag_size,
size_t nonce_prefix_size);
#endif
- virtual ~AeadBaseEncrypter();
+ ~AeadBaseEncrypter() override;
// QuicEncrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Encrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece plaintext,
- unsigned char* output) override;
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece plaintext) override;
- virtual size_t GetKeySize() const override;
- virtual size_t GetNoncePrefixSize() const override;
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Encrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext,
+ unsigned char* output) override;
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext) override;
+ size_t GetKeySize() const override;
+ size_t GetNoncePrefixSize() const override;
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
+ size_t GetCiphertextSize(size_t plaintext_size) const override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
protected:
// Make these constants available to the subclasses so that the subclasses
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter.h b/net/quic/crypto/aes_128_gcm_12_decrypter.h
index 4395dc2..3de537e 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter.h
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter.h
@@ -23,7 +23,7 @@
};
Aes128Gcm12Decrypter();
- virtual ~Aes128Gcm12Decrypter();
+ ~Aes128Gcm12Decrypter() override;
#if !defined(USE_OPENSSL)
protected:
diff --git a/net/quic/crypto/aes_128_gcm_12_encrypter.h b/net/quic/crypto/aes_128_gcm_12_encrypter.h
index afbeb14..bff3ec5 100644
--- a/net/quic/crypto/aes_128_gcm_12_encrypter.h
+++ b/net/quic/crypto/aes_128_gcm_12_encrypter.h
@@ -23,7 +23,7 @@
};
Aes128Gcm12Encrypter();
- virtual ~Aes128Gcm12Encrypter();
+ ~Aes128Gcm12Encrypter() override;
#if !defined(USE_OPENSSL)
protected:
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter.h b/net/quic/crypto/chacha20_poly1305_decrypter.h
index e3c3e7f..04f5341 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter.h
+++ b/net/quic/crypto/chacha20_poly1305_decrypter.h
@@ -24,7 +24,7 @@
};
ChaCha20Poly1305Decrypter();
- virtual ~ChaCha20Poly1305Decrypter();
+ ~ChaCha20Poly1305Decrypter() override;
// Returns true if the underlying crypto library supports ChaCha20+Poly1305.
static bool IsSupported();
diff --git a/net/quic/crypto/chacha20_poly1305_encrypter.h b/net/quic/crypto/chacha20_poly1305_encrypter.h
index b99fa27..1dcfd7c 100644
--- a/net/quic/crypto/chacha20_poly1305_encrypter.h
+++ b/net/quic/crypto/chacha20_poly1305_encrypter.h
@@ -24,7 +24,7 @@
};
ChaCha20Poly1305Encrypter();
- virtual ~ChaCha20Poly1305Encrypter();
+ ~ChaCha20Poly1305Encrypter() override;
// Returns true if the underlying crypto library supports ChaCha20+Poly1305.
static bool IsSupported();
diff --git a/net/quic/crypto/channel_id_chromium.h b/net/quic/crypto/channel_id_chromium.h
index 72f694d..20a1d8d 100644
--- a/net/quic/crypto/channel_id_chromium.h
+++ b/net/quic/crypto/channel_id_chromium.h
@@ -20,12 +20,12 @@
class NET_EXPORT_PRIVATE ChannelIDKeyChromium: public ChannelIDKey {
public:
explicit ChannelIDKeyChromium(crypto::ECPrivateKey* ec_private_key);
- virtual ~ChannelIDKeyChromium();
+ ~ChannelIDKeyChromium() override;
// ChannelIDKey interface
- virtual bool Sign(base::StringPiece signed_data,
- std::string* out_signature) const override;
- virtual std::string SerializeKey() const override;
+ bool Sign(base::StringPiece signed_data,
+ std::string* out_signature) const override;
+ std::string SerializeKey() const override;
private:
scoped_ptr<crypto::ECPrivateKey> ec_private_key_;
@@ -36,13 +36,12 @@
public:
explicit ChannelIDSourceChromium(
ChannelIDService* channel_id_service);
- virtual ~ChannelIDSourceChromium();
+ ~ChannelIDSourceChromium() override;
// ChannelIDSource interface
- virtual QuicAsyncStatus GetChannelIDKey(
- const std::string& hostname,
- scoped_ptr<ChannelIDKey>* channel_id_key,
- ChannelIDSourceCallback* callback) override;
+ QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
+ scoped_ptr<ChannelIDKey>* channel_id_key,
+ ChannelIDSourceCallback* callback) override;
private:
class Job;
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc
index 0d39ecc..cc4f91b 100644
--- a/net/quic/crypto/common_cert_set.cc
+++ b/net/quic/crypto/common_cert_set.cc
@@ -69,12 +69,12 @@
class CommonCertSetsQUIC : public CommonCertSets {
public:
// CommonCertSets interface.
- virtual StringPiece GetCommonHashes() const override {
+ StringPiece GetCommonHashes() const override {
return StringPiece(reinterpret_cast<const char*>(kSetHashes),
sizeof(uint64) * arraysize(kSetHashes));
}
- virtual StringPiece GetCert(uint64 hash, uint32 index) const override {
+ StringPiece GetCert(uint64 hash, uint32 index) const override {
for (size_t i = 0; i < arraysize(kSets); i++) {
if (kSets[i].hash == hash) {
if (index < kSets[i].num_certs) {
@@ -89,8 +89,10 @@
return StringPiece();
}
- virtual bool MatchCert(StringPiece cert, StringPiece common_set_hashes,
- uint64* out_hash, uint32* out_index) const override {
+ bool MatchCert(StringPiece cert,
+ StringPiece common_set_hashes,
+ uint64* out_hash,
+ uint32* out_index) const override {
if (common_set_hashes.size() % sizeof(uint64) != 0) {
return false;
}
@@ -140,7 +142,7 @@
private:
CommonCertSetsQUIC() {}
- virtual ~CommonCertSetsQUIC() {}
+ ~CommonCertSetsQUIC() override {}
friend struct DefaultSingletonTraits<CommonCertSetsQUIC>;
DISALLOW_COPY_AND_ASSIGN(CommonCertSetsQUIC);
diff --git a/net/quic/crypto/crypto_framer.cc b/net/quic/crypto/crypto_framer.cc
index 3f61115..029ec53 100644
--- a/net/quic/crypto/crypto_framer.cc
+++ b/net/quic/crypto/crypto_framer.cc
@@ -26,10 +26,9 @@
public:
OneShotVisitor() : error_(false) {}
- virtual void OnError(CryptoFramer* framer) override { error_ = true; }
+ void OnError(CryptoFramer* framer) override { error_ = true; }
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
out_.reset(new CryptoHandshakeMessage(message));
}
diff --git a/net/quic/crypto/crypto_framer_test.cc b/net/quic/crypto/crypto_framer_test.cc
index f9ea55d..ce815a8 100644
--- a/net/quic/crypto/crypto_framer_test.cc
+++ b/net/quic/crypto/crypto_framer_test.cc
@@ -33,13 +33,12 @@
public:
TestCryptoVisitor() : error_count_(0) {}
- virtual void OnError(CryptoFramer* framer) override {
+ void OnError(CryptoFramer* framer) override {
DLOG(ERROR) << "CryptoFramer Error: " << framer->error();
++error_count_;
}
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index 1f3380a..1905109 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -155,8 +155,8 @@
*called_ = false;
}
- virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
- const Result& result) override {
+ void RunImpl(const CryptoHandshakeMessage& client_hello,
+ const Result& result) override {
{
// Ensure that the strike register client lock is not held.
QuicCryptoServerConfigPeer peer(&test_->config_);
diff --git a/net/quic/crypto/curve25519_key_exchange.h b/net/quic/crypto/curve25519_key_exchange.h
index 310c614..cdb6d1a 100644
--- a/net/quic/crypto/curve25519_key_exchange.h
+++ b/net/quic/crypto/curve25519_key_exchange.h
@@ -20,7 +20,7 @@
// Diffie-Hellman on curve25519. See http://cr.yp.to/ecdh.html
class NET_EXPORT_PRIVATE Curve25519KeyExchange : public KeyExchange {
public:
- virtual ~Curve25519KeyExchange();
+ ~Curve25519KeyExchange() override;
// New creates a new object from a private key. If the private key is
// invalid, nullptr is returned.
@@ -31,11 +31,11 @@
static std::string NewPrivateKey(QuicRandom* rand);
// KeyExchange interface.
- virtual KeyExchange* NewKeyPair(QuicRandom* rand) const override;
- virtual bool CalculateSharedKey(const base::StringPiece& peer_public_value,
- std::string* shared_key) const override;
- virtual base::StringPiece public_value() const override;
- virtual QuicTag tag() const override;
+ KeyExchange* NewKeyPair(QuicRandom* rand) const override;
+ bool CalculateSharedKey(const base::StringPiece& peer_public_value,
+ std::string* shared_key) const override;
+ base::StringPiece public_value() const override;
+ QuicTag tag() const override;
private:
Curve25519KeyExchange();
diff --git a/net/quic/crypto/local_strike_register_client.h b/net/quic/crypto/local_strike_register_client.h
index b121299..5f576e9 100644
--- a/net/quic/crypto/local_strike_register_client.h
+++ b/net/quic/crypto/local_strike_register_client.h
@@ -26,10 +26,10 @@
const uint8 orbit[8],
StrikeRegister::StartupType startup);
- virtual bool IsKnownOrbit(base::StringPiece orbit) const override;
- virtual void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override;
+ bool IsKnownOrbit(base::StringPiece orbit) const override;
+ void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override;
private:
mutable base::Lock m_;
diff --git a/net/quic/crypto/local_strike_register_client_test.cc b/net/quic/crypto/local_strike_register_client_test.cc
index 70d2428..a2c3ce2 100644
--- a/net/quic/crypto/local_strike_register_client_test.cc
+++ b/net/quic/crypto/local_strike_register_client_test.cc
@@ -35,8 +35,8 @@
}
protected:
- virtual void RunImpl(bool nonce_is_valid_and_unique,
- InsertStatus nonce_error) override {
+ void RunImpl(bool nonce_is_valid_and_unique,
+ InsertStatus nonce_error) override {
*called_ = true;
*saved_value_ = nonce_is_valid_and_unique;
*saved_nonce_error_ = nonce_error;
diff --git a/net/quic/crypto/null_decrypter.h b/net/quic/crypto/null_decrypter.h
index 03038bd..6f23290 100644
--- a/net/quic/crypto/null_decrypter.h
+++ b/net/quic/crypto/null_decrypter.h
@@ -19,21 +19,21 @@
class NET_EXPORT_PRIVATE NullDecrypter : public QuicDecrypter {
public:
NullDecrypter();
- virtual ~NullDecrypter() {}
+ ~NullDecrypter() override {}
// QuicDecrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Decrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override;
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext) override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Decrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override;
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece ciphertext) override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
private:
bool ReadHash(QuicDataReader* reader, uint128* hash);
diff --git a/net/quic/crypto/null_encrypter.h b/net/quic/crypto/null_encrypter.h
index fbd2dff..b52bd9c 100644
--- a/net/quic/crypto/null_encrypter.h
+++ b/net/quic/crypto/null_encrypter.h
@@ -17,24 +17,24 @@
class NET_EXPORT_PRIVATE NullEncrypter : public QuicEncrypter {
public:
NullEncrypter();
- virtual ~NullEncrypter() {}
+ ~NullEncrypter() override {}
// QuicEncrypter implementation
- virtual bool SetKey(base::StringPiece key) override;
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- virtual bool Encrypt(base::StringPiece nonce,
- base::StringPiece associated_data,
- base::StringPiece plaintext,
- unsigned char* output) override;
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece plaintext) override;
- virtual size_t GetKeySize() const override;
- virtual size_t GetNoncePrefixSize() const override;
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override;
- virtual base::StringPiece GetKey() const override;
- virtual base::StringPiece GetNoncePrefix() const override;
+ bool SetKey(base::StringPiece key) override;
+ bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
+ bool Encrypt(base::StringPiece nonce,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext,
+ unsigned char* output) override;
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ base::StringPiece associated_data,
+ base::StringPiece plaintext) override;
+ size_t GetKeySize() const override;
+ size_t GetNoncePrefixSize() const override;
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override;
+ size_t GetCiphertextSize(size_t plaintext_size) const override;
+ base::StringPiece GetKey() const override;
+ base::StringPiece GetNoncePrefix() const override;
private:
size_t GetHashLength() const;
diff --git a/net/quic/crypto/p256_key_exchange.h b/net/quic/crypto/p256_key_exchange.h
index 36ba296..9e22a33 100644
--- a/net/quic/crypto/p256_key_exchange.h
+++ b/net/quic/crypto/p256_key_exchange.h
@@ -26,7 +26,7 @@
// Diffie-Hellman on NIST P-256.
class NET_EXPORT_PRIVATE P256KeyExchange : public KeyExchange {
public:
- virtual ~P256KeyExchange();
+ ~P256KeyExchange() override;
// New creates a new key exchange object from a private key. If
// |private_key| is invalid, nullptr is returned.
@@ -38,11 +38,11 @@
static std::string NewPrivateKey();
// KeyExchange interface.
- virtual KeyExchange* NewKeyPair(QuicRandom* rand) const override;
- virtual bool CalculateSharedKey(const base::StringPiece& peer_public_value,
- std::string* shared_key) const override;
- virtual base::StringPiece public_value() const override;
- virtual QuicTag tag() const override;
+ KeyExchange* NewKeyPair(QuicRandom* rand) const override;
+ bool CalculateSharedKey(const base::StringPiece& peer_public_value,
+ std::string* shared_key) const override;
+ base::StringPiece public_value() const override;
+ QuicTag tag() const override;
private:
enum {
diff --git a/net/quic/crypto/proof_source_chromium.h b/net/quic/crypto/proof_source_chromium.h
index 3d1849e..334466c 100644
--- a/net/quic/crypto/proof_source_chromium.h
+++ b/net/quic/crypto/proof_source_chromium.h
@@ -20,14 +20,14 @@
class NET_EXPORT_PRIVATE ProofSourceChromium : public ProofSource {
public:
ProofSourceChromium();
- virtual ~ProofSourceChromium() {}
+ ~ProofSourceChromium() override {}
// ProofSource interface
- virtual bool GetProof(const std::string& hostname,
- const std::string& server_config,
- bool ecdsa_ok,
- const std::vector<std::string>** out_certs,
- std::string* out_signature) override;
+ bool GetProof(const std::string& hostname,
+ const std::string& server_config,
+ bool ecdsa_ok,
+ const std::vector<std::string>** out_certs,
+ std::string* out_signature) override;
private:
DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium);
diff --git a/net/quic/crypto/proof_test.cc b/net/quic/crypto/proof_test.cc
index 0dde97c..5336e72 100644
--- a/net/quic/crypto/proof_test.cc
+++ b/net/quic/crypto/proof_test.cc
@@ -38,9 +38,9 @@
ok_(ok),
error_details_(error_details) {}
- virtual void Run(bool ok,
- const string& error_details,
- scoped_ptr<ProofVerifyDetails>* details) override {
+ void Run(bool ok,
+ const string& error_details,
+ scoped_ptr<ProofVerifyDetails>* details) override {
*ok_ = ok;
*error_details_ = error_details;
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h
index 057cc16..c51a024 100644
--- a/net/quic/crypto/proof_verifier_chromium.h
+++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -30,7 +30,7 @@
public:
// ProofVerifyDetails implementation
- virtual ProofVerifyDetails* Clone() const override;
+ ProofVerifyDetails* Clone() const override;
CertVerifyResult cert_verify_result;
@@ -56,18 +56,17 @@
public:
ProofVerifierChromium(CertVerifier* cert_verifier,
TransportSecurityState* transport_security_state);
- virtual ~ProofVerifierChromium();
+ ~ProofVerifierChromium() override;
// ProofVerifier interface
- virtual QuicAsyncStatus VerifyProof(
- const std::string& hostname,
- const std::string& server_config,
- const std::vector<std::string>& certs,
- const std::string& signature,
- const ProofVerifyContext* verify_context,
- std::string* error_details,
- scoped_ptr<ProofVerifyDetails>* verify_details,
- ProofVerifierCallback* callback) override;
+ QuicAsyncStatus VerifyProof(const std::string& hostname,
+ const std::string& server_config,
+ const std::vector<std::string>& certs,
+ const std::string& signature,
+ const ProofVerifyContext* verify_context,
+ std::string* error_details,
+ scoped_ptr<ProofVerifyDetails>* verify_details,
+ ProofVerifierCallback* callback) override;
private:
class Job;
diff --git a/net/quic/crypto/quic_crypto_client_config_test.cc b/net/quic/crypto/quic_crypto_client_config_test.cc
index d2c4920..21f4bd3 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -18,10 +18,10 @@
namespace {
class TestProofVerifyDetails : public ProofVerifyDetails {
- virtual ~TestProofVerifyDetails() {}
+ ~TestProofVerifyDetails() override {}
// ProofVerifyDetails implementation
- virtual ProofVerifyDetails* Clone() const override {
+ ProofVerifyDetails* Clone() const override {
return new TestProofVerifyDetails;
}
};
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index d5a2b75..08cdb7e 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -107,8 +107,8 @@
}
protected:
- virtual void RunImpl(bool nonce_is_valid_and_unique,
- InsertStatus nonce_error) override {
+ void RunImpl(bool nonce_is_valid_and_unique,
+ InsertStatus nonce_error) override {
DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique
<< " nonce_error: " << nonce_error;
result_->info.unique = nonce_is_valid_and_unique;
diff --git a/net/quic/crypto/quic_crypto_server_config_test.cc b/net/quic/crypto/quic_crypto_server_config_test.cc
index 59d6cf4..0743a18 100644
--- a/net/quic/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/crypto/quic_crypto_server_config_test.cc
@@ -207,7 +207,7 @@
is_known_orbit_called_(false) {
}
- virtual bool IsKnownOrbit(StringPiece orbit) const override {
+ bool IsKnownOrbit(StringPiece orbit) const override {
// Ensure that the strike register client lock is not held.
QuicCryptoServerConfigPeer peer(config_);
base::Lock* m = peer.GetStrikeRegisterClientLock();
@@ -220,10 +220,9 @@
return true;
}
- virtual void VerifyNonceIsValidAndUnique(
- StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override {
+ void VerifyNonceIsValidAndUnique(StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override {
LOG(FATAL) << "Not implemented";
}
diff --git a/net/quic/crypto/quic_random.cc b/net/quic/crypto/quic_random.cc
index bc85c2d..6b34465 100644
--- a/net/quic/crypto/quic_random.cc
+++ b/net/quic/crypto/quic_random.cc
@@ -17,14 +17,13 @@
static DefaultRandom* GetInstance();
// QuicRandom implementation
- virtual void RandBytes(void* data, size_t len) override;
- virtual uint64 RandUint64() override;
- virtual void Reseed(const void* additional_entropy,
- size_t entropy_len) override;
+ void RandBytes(void* data, size_t len) override;
+ uint64 RandUint64() override;
+ void Reseed(const void* additional_entropy, size_t entropy_len) override;
private:
DefaultRandom() {};
- virtual ~DefaultRandom() {}
+ ~DefaultRandom() override {}
friend struct DefaultSingletonTraits<DefaultRandom>;
DISALLOW_COPY_AND_ASSIGN(DefaultRandom);
diff --git a/net/quic/quic_alarm_test.cc b/net/quic/quic_alarm_test.cc
index 47e23e3..dfd40ed 100644
--- a/net/quic/quic_alarm_test.cc
+++ b/net/quic/quic_alarm_test.cc
@@ -32,12 +32,12 @@
}
protected:
- virtual void SetImpl() override {
+ void SetImpl() override {
DCHECK(deadline().IsInitialized());
scheduled_ = true;
}
- virtual void CancelImpl() override {
+ void CancelImpl() override {
DCHECK(!deadline().IsInitialized());
scheduled_ = false;
}
diff --git a/net/quic/quic_client_session.h b/net/quic/quic_client_session.h
index 430ef52..b1a35d9 100644
--- a/net/quic/quic_client_session.h
+++ b/net/quic/quic_client_session.h
@@ -98,7 +98,7 @@
const QuicConfig& config,
base::TaskRunner* task_runner,
NetLog* net_log);
- virtual ~QuicClientSession();
+ ~QuicClientSession() override;
// Initialize session's connection to |server_id|.
void InitializeSession(
@@ -123,31 +123,28 @@
void CancelRequest(StreamRequest* request);
// QuicSession methods:
- virtual void OnStreamFrames(
- const std::vector<QuicStreamFrame>& frames) override;
- virtual QuicReliableClientStream* CreateOutgoingDataStream() override;
- virtual QuicCryptoClientStream* GetCryptoStream() override;
- virtual void CloseStream(QuicStreamId stream_id) override;
- virtual void SendRstStream(QuicStreamId id,
- QuicRstStreamErrorCode error,
- QuicStreamOffset bytes_written) override;
- virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
- virtual void OnCryptoHandshakeMessageSent(
+ void OnStreamFrames(const std::vector<QuicStreamFrame>& frames) override;
+ QuicReliableClientStream* CreateOutgoingDataStream() override;
+ QuicCryptoClientStream* GetCryptoStream() override;
+ void CloseStream(QuicStreamId stream_id) override;
+ void SendRstStream(QuicStreamId id,
+ QuicRstStreamErrorCode error,
+ QuicStreamOffset bytes_written) override;
+ void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
+ void OnCryptoHandshakeMessageSent(
const CryptoHandshakeMessage& message) override;
- virtual void OnCryptoHandshakeMessageReceived(
+ void OnCryptoHandshakeMessageReceived(
const CryptoHandshakeMessage& message) override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) const override;
// QuicClientSessionBase methods:
- virtual void OnProofValid(
- const QuicCryptoClientConfig::CachedState& cached) override;
- virtual void OnProofVerifyDetailsAvailable(
+ void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override;
+ void OnProofVerifyDetailsAvailable(
const ProofVerifyDetails& verify_details) override;
// QuicConnectionVisitorInterface methods:
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
// Performs a crypto handshake with the server.
int CryptoConnect(bool require_confirmation,
@@ -182,7 +179,7 @@
protected:
// QuicSession methods:
- virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
+ QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
private:
friend class test::QuicClientSessionPeer;
diff --git a/net/quic/quic_client_session_base.h b/net/quic/quic_client_session_base.h
index ae0644e..d72996c 100644
--- a/net/quic/quic_client_session_base.h
+++ b/net/quic/quic_client_session_base.h
@@ -16,7 +16,7 @@
QuicClientSessionBase(QuicConnection* connection,
const QuicConfig& config);
- virtual ~QuicClientSessionBase();
+ ~QuicClientSessionBase() override;
// Called when the proof in |cached| is marked valid. If this is a secure
// QUIC session, then this will happen only after the proof verifier
@@ -33,7 +33,7 @@
const ProofVerifyDetails& verify_details) = 0;
// Override base class to set FEC policy before any data is sent by client.
- virtual void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
+ void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
private:
DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase);
diff --git a/net/quic/quic_config.h b/net/quic/quic_config.h
index 7be4569..5328ef6 100644
--- a/net/quic/quic_config.h
+++ b/net/quic/quic_config.h
@@ -61,7 +61,7 @@
class NET_EXPORT_PRIVATE QuicNegotiableValue : public QuicConfigValue {
public:
QuicNegotiableValue(QuicTag tag, QuicConfigPresence presence);
- virtual ~QuicNegotiableValue();
+ ~QuicNegotiableValue() override;
bool negotiated() const {
return negotiated_;
@@ -75,7 +75,7 @@
public:
// Default and max values default to 0.
QuicNegotiableUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableUint32();
+ ~QuicNegotiableUint32() override;
// Sets the maximum possible value that can be achieved after negotiation and
// also the default values to be assumed if PRESENCE_OPTIONAL and the *HLO msg
@@ -89,16 +89,15 @@
// Serialises |name_| and value to |out|. If |negotiated_| is true then
// |negotiated_value_| is serialised, otherwise |max_value_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |negotiated_value_| to the minimum of |max_value_| and the
// corresponding value from |peer_hello|. If the corresponding value is
// missing and PRESENCE_OPTIONAL then |negotiated_value_| is set to
// |default_value_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 max_value_;
@@ -109,7 +108,7 @@
class NET_EXPORT_PRIVATE QuicNegotiableTag : public QuicNegotiableValue {
public:
QuicNegotiableTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableTag();
+ ~QuicNegotiableTag() override;
// Sets the possible values that |negotiated_tag_| can take after negotiation
// and the default value that |negotiated_tag_| takes if OPTIONAL and *HLO
@@ -123,15 +122,14 @@
// Serialises |name_| and vector (either possible or negotiated) to |out|. If
// |negotiated_| is true then |negotiated_tag_| is serialised, otherwise
// |possible_values_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Selects the tag common to both tags in |client_hello| for |name_| and
// |possible_values_| with preference to tag in |possible_values_|. The
// selected tag is set as |negotiated_tag_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
// Reads the vector corresponding to |name_| from |msg| into |out|. If the
@@ -151,7 +149,7 @@
class NET_EXPORT_PRIVATE QuicFixedUint32 : public QuicConfigValue {
public:
QuicFixedUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedUint32();
+ ~QuicFixedUint32() override;
bool HasSendValue() const;
@@ -166,13 +164,12 @@
void SetReceivedValue(uint32 value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |peer_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 send_value_;
@@ -185,7 +182,7 @@
class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
public:
QuicFixedTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTag();
+ ~QuicFixedTag() override;
bool HasSendValue() const;
@@ -200,13 +197,12 @@
void SetReceivedValue(QuicTag value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |client_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTag send_value_;
@@ -219,7 +215,7 @@
class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
public:
QuicFixedTagVector(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTagVector();
+ ~QuicFixedTagVector() override;
bool HasSendValues() const;
@@ -235,14 +231,13 @@
// If has_send_value is true, serialises |tag_vector_| and |send_value_| to
// |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |receive_values_| to the corresponding value from |client_hello_| if
// it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) override;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTagVector send_values_;
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index f684cf2..a0794f3 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -69,7 +69,7 @@
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->SendAck();
return QuicTime::Zero();
}
@@ -89,7 +89,7 @@
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->OnRetransmissionTimeout();
return QuicTime::Zero();
}
@@ -108,7 +108,7 @@
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->WriteIfNotBlocked();
// Never reschedule the alarm, since CanWrite does that.
return QuicTime::Zero();
@@ -126,7 +126,7 @@
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->CheckForTimeout();
// Never reschedule the alarm, since CheckForTimeout does that.
return QuicTime::Zero();
@@ -144,7 +144,7 @@
: connection_(connection) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
connection_->SendPing();
return QuicTime::Zero();
}
@@ -196,6 +196,7 @@
connection_id_(connection_id),
peer_address_(address),
migrating_peer_port_(0),
+ last_packet_decrypted_(false),
last_packet_revived_(false),
last_size_(0),
last_decrypted_packet_level_(ENCRYPTION_NONE),
@@ -291,10 +292,16 @@
}
void QuicConnection::OnError(QuicFramer* framer) {
- // Packets that we cannot decrypt are dropped.
+ // Packets that we can not or have not decrypted are dropped.
// TODO(rch): add stats to measure this.
- if (!connected_ || framer->error() == QUIC_DECRYPTION_FAILURE) {
- return;
+ if (FLAGS_quic_drop_junk_packets) {
+ if (!connected_ || last_packet_decrypted_ == false) {
+ return;
+ }
+ } else {
+ if (!connected_ || framer->error() == QUIC_DECRYPTION_FAILURE) {
+ return;
+ }
}
SendConnectionCloseWithDetails(framer->error(), framer->detailed_error());
}
@@ -310,6 +317,8 @@
last_blocked_frames_.empty() &&
last_ping_frames_.empty() &&
last_close_frames_.empty());
+ last_packet_decrypted_ = false;
+ last_packet_revived_ = false;
}
void QuicConnection::OnPublicResetPacket(
@@ -435,6 +444,7 @@
void QuicConnection::OnDecryptedPacket(EncryptionLevel level) {
last_decrypted_packet_level_ = level;
+ last_packet_decrypted_ = true;
}
bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) {
@@ -1082,7 +1092,7 @@
const QuicConnectionStats& QuicConnection::GetStats() {
// Update rtt and estimated bandwidth.
stats_.min_rtt_us =
- sent_packet_manager_.GetRttStats()->min_rtt().ToMicroseconds();
+ sent_packet_manager_.GetRttStats()->MinRtt().ToMicroseconds();
stats_.srtt_us =
sent_packet_manager_.GetRttStats()->SmoothedRtt().ToMicroseconds();
stats_.estimated_bandwidth =
@@ -1102,7 +1112,6 @@
if (debug_visitor_.get() != nullptr) {
debug_visitor_->OnPacketReceived(self_address, peer_address, packet);
}
- last_packet_revived_ = false;
last_size_ = packet.length();
CheckForAddressMigration(self_address, peer_address);
@@ -1721,7 +1730,7 @@
if (fec_group_num == 0) {
return nullptr;
}
- if (group_map_.count(fec_group_num) == 0) {
+ if (!ContainsKey(group_map_, fec_group_num)) {
if (group_map_.size() >= kMaxFecGroups) { // Too many groups
if (fec_group_num < group_map_.begin()->first) {
// The group being requested is a group we've seen before and deleted.
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index fa117f8..0b5dd00 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -121,7 +121,7 @@
: public QuicPacketGenerator::DebugDelegate,
public QuicSentPacketManager::DebugDelegate {
public:
- virtual ~QuicConnectionDebugVisitor() {}
+ ~QuicConnectionDebugVisitor() override {}
// Called when a packet has been sent.
virtual void OnPacketSent(const SerializedPacket& serialized_packet,
@@ -252,7 +252,7 @@
bool owns_writer,
bool is_server,
const QuicVersionVector& supported_versions);
- virtual ~QuicConnection();
+ ~QuicConnection() override;
// Sets connection parameters from the supplied |config|.
void SetFromConfig(const QuicConfig& config);
@@ -299,7 +299,7 @@
virtual void SendConnectionCloseWithDetails(QuicErrorCode error,
const std::string& details);
// Notifies the visitor of the close and marks the connection as disconnected.
- virtual void CloseConnection(QuicErrorCode error, bool from_peer) override;
+ void CloseConnection(QuicErrorCode error, bool from_peer) override;
virtual void SendGoAway(QuicErrorCode error,
QuicStreamId last_good_stream_id,
const std::string& reason);
@@ -317,7 +317,7 @@
// QuicBlockedWriterInterface
// Called when the underlying connection becomes writable to allow queued
// writes to happen.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// Called when an error occurs while attempting to write a packet to the
// network.
@@ -335,47 +335,44 @@
}
// From QuicFramerVisitorInterface
- virtual void OnError(QuicFramer* framer) override;
- virtual bool OnProtocolVersionMismatch(QuicVersion received_version) override;
- virtual void OnPacket() override;
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override;
- virtual void OnVersionNegotiationPacket(
+ void OnError(QuicFramer* framer) override;
+ bool OnProtocolVersionMismatch(QuicVersion received_version) override;
+ void OnPacket() override;
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override;
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override;
- virtual void OnRevivedPacket() override;
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnRevivedPacket() override;
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override;
- virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
- virtual void OnDecryptedPacket(EncryptionLevel level) override;
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnFecProtectedPayload(base::StringPiece payload) override;
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual bool OnAckFrame(const QuicAckFrame& frame) override;
- virtual bool OnCongestionFeedbackFrame(
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
+ void OnDecryptedPacket(EncryptionLevel level) override;
+ bool OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnFecProtectedPayload(base::StringPiece payload) override;
+ bool OnStreamFrame(const QuicStreamFrame& frame) override;
+ bool OnAckFrame(const QuicAckFrame& frame) override;
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
- virtual bool OnPingFrame(const QuicPingFrame& frame) override;
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnFecData(const QuicFecData& fec) override;
- virtual void OnPacketComplete() override;
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ bool OnPingFrame(const QuicPingFrame& frame) override;
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnFecData(const QuicFecData& fec) override;
+ void OnPacketComplete() override;
// QuicPacketGenerator::DelegateInterface
- virtual bool ShouldGeneratePacket(TransmissionType transmission_type,
- HasRetransmittableData retransmittable,
- IsHandshake handshake) override;
- virtual QuicAckFrame* CreateAckFrame() override;
- virtual QuicCongestionFeedbackFrame* CreateFeedbackFrame() override;
- virtual QuicStopWaitingFrame* CreateStopWaitingFrame() override;
- virtual void OnSerializedPacket(const SerializedPacket& packet) override;
+ bool ShouldGeneratePacket(TransmissionType transmission_type,
+ HasRetransmittableData retransmittable,
+ IsHandshake handshake) override;
+ QuicAckFrame* CreateAckFrame() override;
+ QuicCongestionFeedbackFrame* CreateFeedbackFrame() override;
+ QuicStopWaitingFrame* CreateStopWaitingFrame() override;
+ void OnSerializedPacket(const SerializedPacket& packet) override;
// QuicSentPacketManager::NetworkChangeVisitor
- virtual void OnCongestionWindowChange(
- QuicByteCount congestion_window) override;
+ void OnCongestionWindowChange(QuicByteCount congestion_window) override;
// Called by the crypto stream when the handshake completes. In the server's
// case this is when the SHLO has been ACKed. Clients call this on receipt of
@@ -683,6 +680,9 @@
// Used to store latest peer port to possibly migrate to later.
int migrating_peer_port_;
+ // True if the last packet has gotten far enough in the framer to be
+ // decrypted.
+ bool last_packet_decrypted_;
bool last_packet_revived_; // True if the last packet was revived from FEC.
size_t last_size_; // Size of the last received packet.
EncryptionLevel last_decrypted_packet_level_;
diff --git a/net/quic/quic_connection_helper.cc b/net/quic/quic_connection_helper.cc
index 83c1648..195dfb3 100644
--- a/net/quic/quic_connection_helper.cc
+++ b/net/quic/quic_connection_helper.cc
@@ -29,7 +29,7 @@
weak_factory_(this) {}
protected:
- virtual void SetImpl() override {
+ void SetImpl() override {
DCHECK(deadline().IsInitialized());
if (task_deadline_.IsInitialized()) {
if (task_deadline_ <= deadline()) {
@@ -54,7 +54,7 @@
task_deadline_ = deadline();
}
- virtual void CancelImpl() override {
+ void CancelImpl() override {
DCHECK(!deadline().IsInitialized());
// Since tasks can not be un-posted, OnAlarm will be invoked which
// will notice that deadline is not Initialized and will do nothing.
diff --git a/net/quic/quic_connection_helper.h b/net/quic/quic_connection_helper.h
index e1754e5..140bf9a 100644
--- a/net/quic/quic_connection_helper.h
+++ b/net/quic/quic_connection_helper.h
@@ -34,12 +34,12 @@
QuicConnectionHelper(base::TaskRunner* task_runner,
const QuicClock* clock,
QuicRandom* random_generator);
- virtual ~QuicConnectionHelper();
+ ~QuicConnectionHelper() override;
// QuicConnectionHelperInterface
- virtual const QuicClock* GetClock() const override;
- virtual QuicRandom* GetRandomGenerator() override;
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
+ const QuicClock* GetClock() const override;
+ QuicRandom* GetRandomGenerator() override;
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
private:
base::TaskRunner* task_runner_;
diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_connection_helper_test.cc
index 8a2c931..f5a6907 100644
--- a/net/quic/quic_connection_helper_test.cc
+++ b/net/quic/quic_connection_helper_test.cc
@@ -17,7 +17,7 @@
public:
TestDelegate() : fired_(false) {}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
fired_ = true;
return QuicTime::Zero();
}
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index c714e3b..1d38049 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -29,49 +29,44 @@
public:
QuicConnectionLogger(QuicSession* session, const BoundNetLog& net_log);
- virtual ~QuicConnectionLogger();
+ ~QuicConnectionLogger() override;
// QuicPacketGenerator::DebugDelegateInterface
- virtual void OnFrameAddedToPacket(const QuicFrame& frame) override;
+ void OnFrameAddedToPacket(const QuicFrame& frame) override;
// QuicConnectionDebugVisitorInterface
- virtual void OnPacketSent(const SerializedPacket& serialized_packet,
- QuicPacketSequenceNumber original_sequence_number,
- EncryptionLevel level,
- TransmissionType transmission_type,
- const QuicEncryptedPacket& packet,
- QuicTime sent_time) override;
- virtual void OnPacketReceived(const IPEndPoint& self_address,
- const IPEndPoint& peer_address,
- const QuicEncryptedPacket& packet) override;
- virtual void OnIncorrectConnectionId(
- QuicConnectionId connection_id) override;
- virtual void OnUndecryptablePacket() override;
- virtual void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number)
- override;
- virtual void OnProtocolVersionMismatch(QuicVersion version) override;
- virtual void OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual void OnAckFrame(const QuicAckFrame& frame) override;
- virtual void OnCongestionFeedbackFrame(
+ void OnPacketSent(const SerializedPacket& serialized_packet,
+ QuicPacketSequenceNumber original_sequence_number,
+ EncryptionLevel level,
+ TransmissionType transmission_type,
+ const QuicEncryptedPacket& packet,
+ QuicTime sent_time) override;
+ void OnPacketReceived(const IPEndPoint& self_address,
+ const IPEndPoint& peer_address,
+ const QuicEncryptedPacket& packet) override;
+ void OnIncorrectConnectionId(QuicConnectionId connection_id) override;
+ void OnUndecryptablePacket() override;
+ void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number) override;
+ void OnProtocolVersionMismatch(QuicVersion version) override;
+ void OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnStreamFrame(const QuicStreamFrame& frame) override;
+ void OnAckFrame(const QuicAckFrame& frame) override;
+ void OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
- virtual void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual void OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual void OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual void OnPingFrame(const QuicPingFrame& frame) override;
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override;
- virtual void OnVersionNegotiationPacket(
+ void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ void OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ void OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ void OnPingFrame(const QuicPingFrame& frame) override;
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override;
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override;
- virtual void OnRevivedPacket(const QuicPacketHeader& revived_header,
- base::StringPiece payload) override;
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
+ void OnRevivedPacket(const QuicPacketHeader& revived_header,
+ base::StringPiece payload) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
void OnCryptoHandshakeMessageReceived(
const CryptoHandshakeMessage& message);
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index b084428..1c47f32 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -90,51 +90,45 @@
: tag_(tag) {
}
- virtual ~TaggingEncrypter() {}
+ ~TaggingEncrypter() override {}
// QuicEncrypter interface.
- virtual bool SetKey(StringPiece key) override { return true; }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
- virtual bool Encrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece plaintext,
- unsigned char* output) override {
+ bool Encrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece plaintext,
+ unsigned char* output) override {
memcpy(output, plaintext.data(), plaintext.size());
output += plaintext.size();
memset(output, tag_, kTagSize);
return true;
}
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece plaintext) override {
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece plaintext) override {
const size_t len = plaintext.size() + kTagSize;
uint8* buffer = new uint8[len];
Encrypt(StringPiece(), associated_data, plaintext, buffer);
return new QuicData(reinterpret_cast<char*>(buffer), len, true);
}
- virtual size_t GetKeySize() const override { return 0; }
- virtual size_t GetNoncePrefixSize() const override { return 0; }
+ size_t GetKeySize() const override { return 0; }
+ size_t GetNoncePrefixSize() const override { return 0; }
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
return ciphertext_size - kTagSize;
}
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override {
+ size_t GetCiphertextSize(size_t plaintext_size) const override {
return plaintext_size + kTagSize;
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
private:
enum {
@@ -150,19 +144,17 @@
// have the same value and then removes them.
class TaggingDecrypter : public QuicDecrypter {
public:
- virtual ~TaggingDecrypter() {}
+ ~TaggingDecrypter() override {}
// QuicDecrypter interface
- virtual bool SetKey(StringPiece key) override { return true; }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
- virtual bool Decrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override {
+ bool Decrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override {
if (ciphertext.size() < kTagSize) {
return false;
}
@@ -174,9 +166,9 @@
return true;
}
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece ciphertext) override {
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece ciphertext) override {
if (ciphertext.size() < kTagSize) {
return nullptr;
}
@@ -190,8 +182,8 @@
true /* owns buffer */);
}
- virtual StringPiece GetKey() const override { return StringPiece(); }
- virtual StringPiece GetNoncePrefix() const override { return StringPiece(); }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
protected:
virtual uint8 GetTag(StringPiece ciphertext) {
@@ -219,12 +211,10 @@
class StrictTaggingDecrypter : public TaggingDecrypter {
public:
explicit StrictTaggingDecrypter(uint8 tag) : tag_(tag) {}
- virtual ~StrictTaggingDecrypter() {}
+ ~StrictTaggingDecrypter() override {}
// TaggingQuicDecrypter
- virtual uint8 GetTag(StringPiece ciphertext) override {
- return tag_;
- }
+ uint8 GetTag(StringPiece ciphertext) override { return tag_; }
private:
const uint8 tag_;
@@ -238,8 +228,8 @@
: QuicAlarm(delegate) {
}
- virtual void SetImpl() override {}
- virtual void CancelImpl() override {}
+ void SetImpl() override {}
+ void CancelImpl() override {}
using QuicAlarm::Fire;
};
@@ -250,15 +240,11 @@
}
// QuicConnectionHelperInterface
- virtual const QuicClock* GetClock() const override {
- return clock_;
- }
+ const QuicClock* GetClock() const override { return clock_; }
- virtual QuicRandom* GetRandomGenerator() override {
- return random_generator_;
- }
+ QuicRandom* GetRandomGenerator() override { return random_generator_; }
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override {
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override {
return new TestAlarm(delegate);
}
@@ -285,10 +271,10 @@
}
// QuicPacketWriter interface
- virtual WriteResult WritePacket(
- const char* buffer, size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override {
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override {
QuicEncryptedPacket packet(buffer, buf_len);
++packets_write_attempts_;
@@ -313,13 +299,13 @@
return WriteResult(WRITE_STATUS_OK, last_packet_size_);
}
- virtual bool IsWriteBlockedDataBuffered() const override {
+ bool IsWriteBlockedDataBuffered() const override {
return is_write_blocked_data_buffered_;
}
- virtual bool IsWriteBlocked() const override { return write_blocked_; }
+ bool IsWriteBlocked() const override { return write_blocked_; }
- virtual void SetWritable() override { write_blocked_ = false; }
+ void SetWritable() override { write_blocked_ = false; }
void BlockOnNextWrite() { block_on_next_write_ = true; }
@@ -590,8 +576,8 @@
class FecQuicConnectionDebugVisitor
: public QuicConnectionDebugVisitor {
public:
- virtual void OnRevivedPacket(const QuicPacketHeader& header,
- StringPiece data) override {
+ void OnRevivedPacket(const QuicPacketHeader& header,
+ StringPiece data) override {
revived_header_ = header;
}
@@ -2813,13 +2799,7 @@
clock_.AdvanceTime(QuicTime::Delta::FromSeconds(15));
connection_.GetPingAlarm()->Fire();
EXPECT_EQ(1u, writer_->frame_count());
- if (version() >= QUIC_VERSION_18) {
- ASSERT_EQ(1u, writer_->ping_frames().size());
- } else {
- ASSERT_EQ(1u, writer_->stream_frames().size());
- EXPECT_EQ(kCryptoStreamId, writer_->stream_frames()[0].stream_id);
- EXPECT_EQ(0u, writer_->stream_frames()[0].offset);
- }
+ ASSERT_EQ(1u, writer_->ping_frames().size());
writer_->Reset();
EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false));
@@ -3021,16 +3001,6 @@
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
}
-TEST_P(QuicConnectionTest, SendDelayedAckForPing) {
- if (version() < QUIC_VERSION_18) {
- return;
- }
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
- ProcessPingPacket(1);
- EXPECT_TRUE(connection_.GetAckAlarm()->IsSet());
-}
-
TEST_P(QuicConnectionTest, NoAckOnOldNacks) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Drop one packet, triggering a sequence of acks.
@@ -3229,15 +3199,11 @@
ProcessFramePacket(QuicFrame(&blocked));
}
-TEST_P(QuicConnectionTest, InvalidPacket) {
- EXPECT_CALL(visitor_,
- OnConnectionClosed(QUIC_INVALID_PACKET_HEADER, false));
+TEST_P(QuicConnectionTest, ZeroBytePacket) {
+ // Don't close the connection for zero byte packets.
+ EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(0);
QuicEncryptedPacket encrypted(nullptr, 0);
connection_.ProcessUdpPacket(IPEndPoint(), IPEndPoint(), encrypted);
- // The connection close packet should have error details.
- ASSERT_FALSE(writer_->connection_close_frames().empty());
- EXPECT_EQ("Unable to read public flags.",
- writer_->connection_close_frames()[0].error_details);
}
TEST_P(QuicConnectionTest, MissingPacketsBeforeLeastUnacked) {
diff --git a/net/quic/quic_crypto_client_stream.h b/net/quic/quic_crypto_client_stream.h
index 801c3da..f2a4244 100644
--- a/net/quic/quic_crypto_client_stream.h
+++ b/net/quic/quic_crypto_client_stream.h
@@ -29,11 +29,10 @@
QuicClientSessionBase* session,
ProofVerifyContext* verify_context,
QuicCryptoClientConfig* crypto_config);
- virtual ~QuicCryptoClientStream();
+ ~QuicCryptoClientStream() override;
// CryptoFramerVisitorInterface implementation
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// Performs a crypto handshake with the server. Returns true if the crypto
// handshake is started successfully.
@@ -59,10 +58,10 @@
class ChannelIDSourceCallbackImpl : public ChannelIDSourceCallback {
public:
explicit ChannelIDSourceCallbackImpl(QuicCryptoClientStream* stream);
- virtual ~ChannelIDSourceCallbackImpl();
+ ~ChannelIDSourceCallbackImpl() override;
// ChannelIDSourceCallback interface.
- virtual void Run(scoped_ptr<ChannelIDKey>* channel_id_key) override;
+ void Run(scoped_ptr<ChannelIDKey>* channel_id_key) override;
// Cancel causes any future callbacks to be ignored. It must be called on
// the same thread as the callback will be made on.
@@ -78,12 +77,12 @@
class ProofVerifierCallbackImpl : public ProofVerifierCallback {
public:
explicit ProofVerifierCallbackImpl(QuicCryptoClientStream* stream);
- virtual ~ProofVerifierCallbackImpl();
+ ~ProofVerifierCallbackImpl() override;
// ProofVerifierCallback interface.
- virtual void Run(bool ok,
- const string& error_details,
- scoped_ptr<ProofVerifyDetails>* details) override;
+ void Run(bool ok,
+ const string& error_details,
+ scoped_ptr<ProofVerifyDetails>* details) override;
// Cancel causes any future callbacks to be ignored. It must be called on
// the same thread as the callback will be made on.
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc
index e912c32..1c110da 100644
--- a/net/quic/quic_crypto_server_stream.cc
+++ b/net/quic/quic_crypto_server_stream.cc
@@ -189,6 +189,12 @@
session()->connection()->OnHandshakeComplete();
}
+void QuicCryptoServerStream::set_previous_cached_network_params(
+ CachedNetworkParameters cached_network_params) {
+ previous_cached_network_params_.reset(
+ new CachedNetworkParameters(cached_network_params));
+}
+
bool QuicCryptoServerStream::GetBase64SHA256ClientChannelID(
string* output) const {
if (!encryption_established_ ||
@@ -245,6 +251,11 @@
void QuicCryptoServerStream::OverrideQuicConfigDefaults(QuicConfig* config) {
}
+CachedNetworkParameters*
+QuicCryptoServerStream::get_previous_cached_network_params() {
+ return previous_cached_network_params_.get();
+}
+
QuicCryptoServerStream::ValidateCallback::ValidateCallback(
QuicCryptoServerStream* parent) : parent_(parent) {
}
diff --git a/net/quic/quic_crypto_server_stream.h b/net/quic/quic_crypto_server_stream.h
index 5d55564..692a713 100644
--- a/net/quic/quic_crypto_server_stream.h
+++ b/net/quic/quic_crypto_server_stream.h
@@ -33,15 +33,14 @@
: server_stream_(stream) {}
// QuicAckNotifier::DelegateInterface implementation
- virtual void OnAckNotification(
- int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed) override;
+ void OnAckNotification(int num_original_packets,
+ int num_original_bytes,
+ int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed) override;
private:
- virtual ~ServerHelloNotifier() {}
+ ~ServerHelloNotifier() override {}
QuicCryptoServerStream* server_stream_;
@@ -52,15 +51,14 @@
public:
QuicCryptoServerStream(const QuicCryptoServerConfig& crypto_config,
QuicSession* session);
- virtual ~QuicCryptoServerStream();
+ ~QuicCryptoServerStream() override;
// Cancel any outstanding callbacks, such as asynchronous validation of client
// hello.
void CancelOutstandingCallbacks();
// CryptoFramerVisitorInterface implementation
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// GetBase64SHA256ClientChannelID sets |*output| to the base64 encoded,
// SHA-256 hash of the client's ChannelID key and returns true, if the client
@@ -84,6 +82,9 @@
// client.
void OnServerHelloAcked();
+ void set_previous_cached_network_params(
+ CachedNetworkParameters cached_network_params);
+
protected:
virtual QuicErrorCode ProcessClientHello(
const CryptoHandshakeMessage& message,
@@ -95,6 +96,8 @@
// before going through the parameter negotiation step.
virtual void OverrideQuicConfigDefaults(QuicConfig* config);
+ CachedNetworkParameters* get_previous_cached_network_params();
+
private:
friend class test::CryptoTestUtils;
@@ -105,8 +108,8 @@
void Cancel();
// From ValidateClientHelloResultCallback
- virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
- const Result& result) override;
+ void RunImpl(const CryptoHandshakeMessage& client_hello,
+ const Result& result) override;
private:
QuicCryptoServerStream* parent_;
diff --git a/net/quic/quic_crypto_stream.h b/net/quic/quic_crypto_stream.h
index 6698e3e..37a2a91 100644
--- a/net/quic/quic_crypto_stream.h
+++ b/net/quic/quic_crypto_stream.h
@@ -34,13 +34,12 @@
explicit QuicCryptoStream(QuicSession* session);
// CryptoFramerVisitorInterface implementation
- virtual void OnError(CryptoFramer* framer) override;
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnError(CryptoFramer* framer) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// ReliableQuicStream implementation
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ QuicPriority EffectivePriority() const override;
// Sends |message| to the peer.
// TODO(wtc): return a success/failure status.
diff --git a/net/quic/quic_crypto_stream_test.cc b/net/quic/quic_crypto_stream_test.cc
index e79a1f3..a491235 100644
--- a/net/quic/quic_crypto_stream_test.cc
+++ b/net/quic/quic_crypto_stream_test.cc
@@ -29,8 +29,7 @@
: QuicCryptoStream(session) {
}
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
diff --git a/net/quic/quic_data_stream.h b/net/quic/quic_data_stream.h
index 7cb9816..0337b30 100644
--- a/net/quic/quic_data_stream.h
+++ b/net/quic/quic_data_stream.h
@@ -54,16 +54,16 @@
QuicDataStream(QuicStreamId id, QuicSession* session);
- virtual ~QuicDataStream();
+ ~QuicDataStream() override;
// ReliableQuicStream implementation
- virtual void OnClose() override;
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ void OnClose() override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
// By default, this is the same as priority(), however it allows streams
// to temporarily alter effective priority. For example if a SPDY stream has
// compressed but not written headers it can write the headers with a higher
// priority.
- virtual QuicPriority EffectivePriority() const override;
+ QuicPriority EffectivePriority() const override;
// Overridden by subclasses to process data. The headers will be delivered
// via OnStreamHeaders, so only data will be delivered through this method.
diff --git a/net/quic/quic_data_stream_test.cc b/net/quic/quic_data_stream_test.cc
index 2f6d84e..16e6341 100644
--- a/net/quic/quic_data_stream_test.cc
+++ b/net/quic/quic_data_stream_test.cc
@@ -40,7 +40,7 @@
: QuicDataStream(id, session),
should_process_data_(should_process_data) {}
- virtual uint32 ProcessData(const char* data, uint32 data_len) override {
+ uint32 ProcessData(const char* data, uint32 data_len) override {
EXPECT_NE(0u, data_len);
DVLOG(1) << "ProcessData data_len: " << data_len;
data_ += string(data, data_len);
@@ -403,9 +403,6 @@
// Tests that on receipt of data, the connection updates its receive window
// offset appropriately, and sends WINDOW_UPDATE frames when its receive
// window drops too low.
- if (GetParam() < QUIC_VERSION_19) {
- return;
- }
Initialize(kShouldProcessData);
// Set a small flow control limit for streams and connection.
@@ -484,9 +481,6 @@
// Tests that on if the peer sends too much data (i.e. violates the flow
// control protocol), at the connection level (rather than the stream level)
// then we terminate the connection.
- if (GetParam() < QUIC_VERSION_19) {
- return;
- }
// Stream should not process data, so that data gets buffered in the
// sequencer, triggering flow control limits.
diff --git a/net/quic/quic_default_packet_writer.h b/net/quic/quic_default_packet_writer.h
index 329f7cc..e282d88 100644
--- a/net/quic/quic_default_packet_writer.h
+++ b/net/quic/quic_default_packet_writer.h
@@ -23,16 +23,16 @@
public:
QuicDefaultPacketWriter();
explicit QuicDefaultPacketWriter(DatagramClientSocket* socket);
- virtual ~QuicDefaultPacketWriter();
+ ~QuicDefaultPacketWriter() override;
// QuicPacketWriter
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
void OnWriteComplete(int rv);
void SetConnection(QuicConnection* connection) {
diff --git a/net/quic/quic_dispatcher.cc b/net/quic/quic_dispatcher.cc
index 121e32f..cbdd540 100644
--- a/net/quic/quic_dispatcher.cc
+++ b/net/quic/quic_dispatcher.cc
@@ -28,7 +28,7 @@
: dispatcher_(dispatcher) {
}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
dispatcher_->DeleteSessions();
return QuicTime::Zero();
}
@@ -44,23 +44,21 @@
connection_id_(0) {}
// QuicFramerVisitorInterface implementation
- virtual void OnPacket() override {}
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnPacket() override {}
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
connection_id_ = header.connection_id;
return dispatcher_->OnUnauthenticatedPublicHeader(header);
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
dispatcher_->OnUnauthenticatedHeader(header);
return false;
}
- virtual void OnError(QuicFramer* framer) override {
+ void OnError(QuicFramer* framer) override {
DVLOG(1) << QuicUtils::ErrorToString(framer->error());
}
- virtual bool OnProtocolVersionMismatch(
- QuicVersion /*received_version*/) override {
+ bool OnProtocolVersionMismatch(QuicVersion /*received_version*/) override {
if (dispatcher_->time_wait_list_manager()->IsConnectionIdInTimeWait(
connection_id_)) {
// Keep processing after protocol mismatch - this will be dealt with by
@@ -76,77 +74,66 @@
// The following methods should never get called because we always return
// false from OnUnauthenticatedHeader(). As a result, we never process the
// payload of the packet.
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& /*packet*/) override {
+ void OnPublicResetPacket(const QuicPublicResetPacket& /*packet*/) override {
DCHECK(false);
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& /*packet*/) override {
DCHECK(false);
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {
- DCHECK(false);
- }
- virtual bool OnPacketHeader(const QuicPacketHeader& /*header*/) override {
+ void OnDecryptedPacket(EncryptionLevel level) override { DCHECK(false); }
+ bool OnPacketHeader(const QuicPacketHeader& /*header*/) override {
DCHECK(false);
return false;
}
- virtual void OnRevivedPacket() override {
+ void OnRevivedPacket() override { DCHECK(false); }
+ void OnFecProtectedPayload(StringPiece /*payload*/) override {
DCHECK(false);
}
- virtual void OnFecProtectedPayload(StringPiece /*payload*/) override {
- DCHECK(false);
- }
- virtual bool OnStreamFrame(const QuicStreamFrame& /*frame*/) override {
+ bool OnStreamFrame(const QuicStreamFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnAckFrame(const QuicAckFrame& /*frame*/) override {
+ bool OnAckFrame(const QuicAckFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnStopWaitingFrame(
- const QuicStopWaitingFrame& /*frame*/) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnPingFrame(const QuicPingFrame& /*frame*/) override {
+ bool OnPingFrame(const QuicPingFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& /*frame*/) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame & /*frame*/) override {
+ bool OnConnectionCloseFrame(
+ const QuicConnectionCloseFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& /*frame*/) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& /*frame*/)
- override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& /*frame*/) override {
DCHECK(false);
return false;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
DCHECK(false);
return false;
}
- virtual void OnFecData(const QuicFecData& /*fec*/) override {
- DCHECK(false);
- }
- virtual void OnPacketComplete() override {
- DCHECK(false);
- }
+ void OnFecData(const QuicFecData& /*fec*/) override { DCHECK(false); }
+ void OnPacketComplete() override { DCHECK(false); }
private:
QuicDispatcher* dispatcher_;
diff --git a/net/quic/quic_dispatcher.h b/net/quic/quic_dispatcher.h
index b4be0ee..640cec8 100644
--- a/net/quic/quic_dispatcher.h
+++ b/net/quic/quic_dispatcher.h
@@ -60,11 +60,10 @@
// Creates ordinary QuicPerConnectionPacketWriter instances.
class DefaultPacketWriterFactory : public PacketWriterFactory {
public:
- virtual ~DefaultPacketWriterFactory() {}
+ ~DefaultPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(
- QuicServerPacketWriter* writer,
- QuicConnection* connection) override;
+ QuicPacketWriter* Create(QuicServerPacketWriter* writer,
+ QuicConnection* connection) override;
};
// Ideally we'd have a linked_hash_set: the boolean is unused.
@@ -80,16 +79,16 @@
PacketWriterFactory* packet_writer_factory,
QuicConnectionHelperInterface* helper);
- virtual ~QuicDispatcher();
+ ~QuicDispatcher() override;
// Takes ownership of the packet writer.
virtual void Initialize(QuicServerPacketWriter* writer);
// Process the incoming packet by creating a new session, passing it to
// an existing session, or passing it to the TimeWaitListManager.
- virtual void ProcessPacket(const IPEndPoint& server_address,
- const IPEndPoint& client_address,
- const QuicEncryptedPacket& packet) override;
+ void ProcessPacket(const IPEndPoint& server_address,
+ const IPEndPoint& client_address,
+ const QuicEncryptedPacket& packet) override;
// Returns true if there's anything in the blocked writer list.
virtual bool HasPendingWrites() const;
@@ -99,16 +98,15 @@
// QuicBlockedWriterInterface implementation:
// Called when the socket becomes writable to allow queued writes to happen.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// QuicServerSessionVisitor interface implementation:
// Ensure that the closed connection is cleaned up asynchronously.
- virtual void OnConnectionClosed(QuicConnectionId connection_id,
- QuicErrorCode error) override;
+ void OnConnectionClosed(QuicConnectionId connection_id,
+ QuicErrorCode error) override;
// Queues the blocked writer for later resumption.
- virtual void OnWriteBlocked(
- QuicBlockedWriterInterface* blocked_writer) override;
+ void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override;
typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap;
@@ -183,9 +181,9 @@
public QuicConnection::PacketWriterFactory {
public:
PacketWriterFactoryAdapter(QuicDispatcher* dispatcher);
- virtual ~PacketWriterFactoryAdapter ();
+ ~PacketWriterFactoryAdapter() override;
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override;
+ QuicPacketWriter* Create(QuicConnection* connection) const override;
private:
QuicDispatcher* dispatcher_;
diff --git a/net/quic/quic_fec_group.cc b/net/quic/quic_fec_group.cc
index 344f216..5d55aed 100644
--- a/net/quic/quic_fec_group.cc
+++ b/net/quic/quic_fec_group.cc
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/stl_util.h"
using base::StringPiece;
using std::numeric_limits;
@@ -31,7 +32,7 @@
bool QuicFecGroup::Update(EncryptionLevel encryption_level,
const QuicPacketHeader& header,
StringPiece decrypted_payload) {
- if (received_packets_.count(header.packet_sequence_number) != 0) {
+ if (ContainsKey(received_packets_, header.packet_sequence_number)) {
return false;
}
if (min_protected_packet_ != kNoSequenceNumber &&
diff --git a/net/quic/quic_flags.cc b/net/quic/quic_flags.cc
index 9a49a34..28ae889 100644
--- a/net/quic/quic_flags.cc
+++ b/net/quic/quic_flags.cc
@@ -50,3 +50,7 @@
// If true, store any CachedNetworkParams that are provided in the STK from the
// CHLO.
bool FLAGS_quic_store_cached_network_params_from_chlo = false;
+
+// If true, QUIC will be more resilliant to junk packets with valid connection
+// IDs.
+bool FLAGS_quic_drop_junk_packets = true;
diff --git a/net/quic/quic_flags.h b/net/quic/quic_flags.h
index 7693260..fcda2cb 100644
--- a/net/quic/quic_flags.h
+++ b/net/quic/quic_flags.h
@@ -19,5 +19,6 @@
NET_EXPORT_PRIVATE extern bool FLAGS_quic_timeouts_only_from_alarms;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_unified_timeouts;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_store_cached_network_params_from_chlo;
+NET_EXPORT_PRIVATE extern bool FLAGS_quic_drop_junk_packets;
#endif // NET_QUIC_QUIC_FLAGS_H_
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index 9ba0fd6..b2dc6eb 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -103,46 +103,34 @@
class TestEncrypter : public QuicEncrypter {
public:
- virtual ~TestEncrypter() {}
- virtual bool SetKey(StringPiece key) override {
- return true;
- }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
- virtual bool Encrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece plaintext,
- unsigned char* output) override {
+ ~TestEncrypter() override {}
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
+ bool Encrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece plaintext,
+ unsigned char* output) override {
CHECK(false) << "Not implemented";
return false;
}
- virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece plaintext) override {
+ QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece plaintext) override {
sequence_number_ = sequence_number;
associated_data_ = associated_data.as_string();
plaintext_ = plaintext.as_string();
return new QuicData(plaintext.data(), plaintext.length());
}
- virtual size_t GetKeySize() const override {
- return 0;
- }
- virtual size_t GetNoncePrefixSize() const override {
- return 0;
- }
- virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
+ size_t GetKeySize() const override { return 0; }
+ size_t GetNoncePrefixSize() const override { return 0; }
+ size_t GetMaxPlaintextSize(size_t ciphertext_size) const override {
return ciphertext_size;
}
- virtual size_t GetCiphertextSize(size_t plaintext_size) const override {
+ size_t GetCiphertextSize(size_t plaintext_size) const override {
return plaintext_size;
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
QuicPacketSequenceNumber sequence_number_;
string associated_data_;
string plaintext_;
@@ -150,35 +138,27 @@
class TestDecrypter : public QuicDecrypter {
public:
- virtual ~TestDecrypter() {}
- virtual bool SetKey(StringPiece key) override {
- return true;
- }
- virtual bool SetNoncePrefix(StringPiece nonce_prefix) override {
- return true;
- }
- virtual bool Decrypt(StringPiece nonce,
- StringPiece associated_data,
- StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) override {
+ ~TestDecrypter() override {}
+ bool SetKey(StringPiece key) override { return true; }
+ bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
+ bool Decrypt(StringPiece nonce,
+ StringPiece associated_data,
+ StringPiece ciphertext,
+ unsigned char* output,
+ size_t* output_length) override {
CHECK(false) << "Not implemented";
return false;
}
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- StringPiece associated_data,
- StringPiece ciphertext) override {
+ QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ StringPiece associated_data,
+ StringPiece ciphertext) override {
sequence_number_ = sequence_number;
associated_data_ = associated_data.as_string();
ciphertext_ = ciphertext.as_string();
return new QuicData(ciphertext.data(), ciphertext.length());
}
- virtual StringPiece GetKey() const override {
- return StringPiece();
- }
- virtual StringPiece GetNoncePrefix() const override {
- return StringPiece();
- }
+ StringPiece GetKey() const override { return StringPiece(); }
+ StringPiece GetNoncePrefix() const override { return StringPiece(); }
QuicPacketSequenceNumber sequence_number_;
string associated_data_;
string ciphertext_;
@@ -198,7 +178,7 @@
accept_public_header_(true) {
}
- virtual ~TestQuicVisitor() {
+ ~TestQuicVisitor() override {
STLDeleteElements(&stream_frames_);
STLDeleteElements(&ack_frames_);
STLDeleteElements(&congestion_feedback_frames_);
@@ -207,70 +187,66 @@
STLDeleteElements(&fec_data_);
}
- virtual void OnError(QuicFramer* f) override {
+ void OnError(QuicFramer* f) override {
DVLOG(1) << "QuicFramer Error: " << QuicUtils::ErrorToString(f->error())
<< " (" << f->error() << ")";
++error_count_;
}
- virtual void OnPacket() override {}
+ void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {
public_reset_packet_.reset(new QuicPublicResetPacket(packet));
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {
version_negotiation_packet_.reset(new QuicVersionNegotiationPacket(packet));
}
- virtual void OnRevivedPacket() override {
- ++revived_packets_;
- }
+ void OnRevivedPacket() override { ++revived_packets_; }
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override {
+ bool OnProtocolVersionMismatch(QuicVersion version) override {
DVLOG(1) << "QuicFramer Version Mismatch, version: " << version;
++version_mismatch_;
return true;
}
- virtual bool OnUnauthenticatedPublicHeader(
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
public_header_.reset(new QuicPacketPublicHeader(header));
return accept_public_header_;
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
return true;
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
+ void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override {
+ bool OnPacketHeader(const QuicPacketHeader& header) override {
++packet_count_;
header_.reset(new QuicPacketHeader(header));
return accept_packet_;
}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override {
+ bool OnStreamFrame(const QuicStreamFrame& frame) override {
++frame_count_;
stream_frames_.push_back(new QuicStreamFrame(frame));
return true;
}
- virtual void OnFecProtectedPayload(StringPiece payload) override {
+ void OnFecProtectedPayload(StringPiece payload) override {
fec_protected_payload_ = payload.as_string();
}
- virtual bool OnAckFrame(const QuicAckFrame& frame) override {
+ bool OnAckFrame(const QuicAckFrame& frame) override {
++frame_count_;
ack_frames_.push_back(new QuicAckFrame(frame));
return true;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override {
++frame_count_;
congestion_feedback_frames_.push_back(
@@ -278,50 +254,46 @@
return true;
}
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
++frame_count_;
stop_waiting_frames_.push_back(new QuicStopWaitingFrame(frame));
return true;
}
- virtual bool OnPingFrame(const QuicPingFrame& frame) override {
+ bool OnPingFrame(const QuicPingFrame& frame) override {
++frame_count_;
ping_frames_.push_back(new QuicPingFrame(frame));
return true;
}
- virtual void OnFecData(const QuicFecData& fec) override {
+ void OnFecData(const QuicFecData& fec) override {
++fec_count_;
fec_data_.push_back(new QuicFecData(fec));
}
- virtual void OnPacketComplete() override {
- ++complete_packets_;
- }
+ void OnPacketComplete() override { ++complete_packets_; }
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
rst_stream_frame_ = frame;
return true;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override {
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override {
connection_close_frame_ = frame;
return true;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
goaway_frame_ = frame;
return true;
}
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame)
- override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override {
window_update_frame_ = frame;
return true;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
blocked_frame_ = frame;
return true;
}
@@ -4538,20 +4510,12 @@
0x07,
};
- if (version_ >= QUIC_VERSION_18) {
- scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
- ASSERT_TRUE(data != nullptr);
+ scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
+ ASSERT_TRUE(data != nullptr);
- test::CompareCharArraysWithHexError("constructed packet", data->data(),
- data->length(), AsChars(packet),
- arraysize(packet));
- } else {
- string expected_error =
- "Attempt to add a PingFrame in " + QuicVersionToString(version_);
- EXPECT_DFATAL(BuildDataPacket(header, frames),
- expected_error);
- return;
- }
+ test::CompareCharArraysWithHexError("constructed packet", data->data(),
+ data->length(), AsChars(packet),
+ arraysize(packet));
}
TEST_P(QuicFramerTest, BuildPublicResetPacket) {
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 56b700e..b99e9d2 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -26,11 +26,11 @@
explicit SpdyFramerVisitor(QuicHeadersStream* stream) : stream_(stream) {}
// SpdyFramerVisitorInterface implementation
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
if (!stream_->IsConnected()) {
return;
}
@@ -48,7 +48,7 @@
stream_->OnSynStream(stream_id, priority, fin);
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
if (!stream_->IsConnected()) {
return;
}
@@ -56,9 +56,9 @@
stream_->OnSynReply(stream_id, fin);
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
if (!stream_->IsConnected()) {
return false;
}
@@ -66,10 +66,10 @@
return true;
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
if (fin && len == 0) {
// The framer invokes OnStreamFrameData with zero-length data and
// fin = true after processing a SYN_STREAM or SYN_REPLY frame
@@ -79,78 +79,76 @@
CloseConnection("SPDY DATA frame received.");
}
- virtual void OnError(SpdyFramer* framer) override {
+ void OnError(SpdyFramer* framer) override {
CloseConnection("SPDY framing error.");
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
CloseConnection("SPDY DATA frame received.");
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
CloseConnection("SPDY RST_STREAM frame received.");
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnSettingsAck() override {
+ void OnSettingsAck() override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnSettingsEnd() override {
+ void OnSettingsEnd() override {
CloseConnection("SPDY SETTINGS frame received.");
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {
CloseConnection("SPDY PING frame received.");
}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
CloseConnection("SPDY GOAWAY frame received.");
}
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
CloseConnection("SPDY HEADERS frame received.");
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
CloseConnection("SPDY WINDOW_UPDATE frame received.");
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
LOG(DFATAL) << "PUSH_PROMISE frame received from a SPDY/3 framer";
CloseConnection("SPDY PUSH_PROMISE frame received.");
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
CloseConnection("SPDY CONTINUATION frame received.");
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
CloseConnection("SPDY unknown frame received.");
return false;
}
// SpdyFramerDebugVisitorInterface implementation
- virtual void OnSendCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override {}
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override {}
- virtual void OnReceiveCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override {
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override {
if (stream_->IsConnected()) {
stream_->OnCompressedFrameSize(frame_len);
}
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h
index fb96ec7..95066b6 100644
--- a/net/quic/quic_headers_stream.h
+++ b/net/quic/quic_headers_stream.h
@@ -21,7 +21,7 @@
class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
public:
explicit QuicHeadersStream(QuicSession* session);
- virtual ~QuicHeadersStream();
+ ~QuicHeadersStream() override;
// Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY
// frame to the peer. If |fin| is true, the fin flag will be set on
@@ -34,8 +34,8 @@
QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
// ReliableQuicStream implementation
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessRawData(const char* data, uint32 data_len) override;
+ QuicPriority EffectivePriority() const override;
private:
class SpdyFramerVisitor;
diff --git a/net/quic/quic_http_stream.h b/net/quic/quic_http_stream.h
index 44e98e8..81d4be9 100644
--- a/net/quic/quic_http_stream.h
+++ b/net/quic/quic_http_stream.h
@@ -29,47 +29,45 @@
public:
explicit QuicHttpStream(const base::WeakPtr<QuicClientSession>& session);
- virtual ~QuicHttpStream();
+ ~QuicHttpStream() override;
// HttpStream implementation.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
- virtual void SetPriority(RequestPriority priority) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ UploadProgress GetUploadProgress() const override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override;
+ HttpStream* RenewStreamForAuth() override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// QuicReliableClientStream::Delegate implementation
- virtual int OnDataReceived(const char* data, int length) override;
- virtual void OnClose(QuicErrorCode error) override;
- virtual void OnError(int error) override;
- virtual bool HasSendHeadersComplete() override;
+ int OnDataReceived(const char* data, int length) override;
+ void OnClose(QuicErrorCode error) override;
+ void OnError(int error) override;
+ bool HasSendHeadersComplete() override;
// QuicClientSession::Observer implementation
- virtual void OnCryptoHandshakeConfirmed() override;
- virtual void OnSessionClosed(int error) override;
+ void OnCryptoHandshakeConfirmed() override;
+ void OnSessionClosed(int error) override;
private:
friend class test::QuicHttpStreamPeer;
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index b6ecc77..53be4dd 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -98,7 +98,7 @@
: QuicHttpStream(session) {
}
- virtual int OnDataReceived(const char* data, int length) override {
+ int OnDataReceived(const char* data, int length) override {
Close(false);
return OK;
}
@@ -108,9 +108,9 @@
public:
explicit TestPacketWriterFactory(DatagramClientSocket* socket)
: socket_(socket) {}
- virtual ~TestPacketWriterFactory() {}
+ ~TestPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override {
+ QuicPacketWriter* Create(QuicConnection* connection) const override {
return new QuicDefaultPacketWriter(socket_);
}
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index cb4cb05..55de997 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -34,11 +34,11 @@
QuicFramer* framer,
QuicRandom* random_generator);
- virtual ~QuicPacketCreator();
+ ~QuicPacketCreator() override;
// QuicFecBuilderInterface
- virtual void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
- base::StringPiece payload) override;
+ void OnBuiltFecProtectedPayload(const QuicPacketHeader& header,
+ base::StringPiece payload) override;
// Turn on FEC protection for subsequently created packets. FEC should be
// enabled first (max_packets_per_fec_group should be non-zero) for FEC
diff --git a/net/quic/quic_per_connection_packet_writer.h b/net/quic/quic_per_connection_packet_writer.h
index 4e5e8c8..6d91312 100644
--- a/net/quic/quic_per_connection_packet_writer.h
+++ b/net/quic/quic_per_connection_packet_writer.h
@@ -22,20 +22,20 @@
// Does not take ownership of |shared_writer| or |connection|.
QuicPerConnectionPacketWriter(QuicServerPacketWriter* shared_writer,
QuicConnection* connection);
- virtual ~QuicPerConnectionPacketWriter();
+ ~QuicPerConnectionPacketWriter() override;
QuicPacketWriter* shared_writer() const;
QuicConnection* connection() const { return connection_; }
// Default implementation of the QuicPacketWriter interface: Passes everything
// to |shared_writer_|.
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
private:
void OnWriteComplete(WriteResult result);
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 96a4557..d040167 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -158,8 +158,6 @@
QuicTag QuicVersionToQuicTag(const QuicVersion version) {
switch (version) {
- case QUIC_VERSION_18:
- return MakeQuicTag('Q', '0', '1', '8');
case QUIC_VERSION_19:
return MakeQuicTag('Q', '0', '1', '9');
case QUIC_VERSION_21:
@@ -194,7 +192,6 @@
string QuicVersionToString(const QuicVersion version) {
switch (version) {
- RETURN_STRING_LITERAL(QUIC_VERSION_18);
RETURN_STRING_LITERAL(QUIC_VERSION_19);
RETURN_STRING_LITERAL(QUIC_VERSION_21);
RETURN_STRING_LITERAL(QUIC_VERSION_22);
@@ -277,15 +274,6 @@
QuicRstStreamErrorCode AdjustErrorForVersion(
QuicRstStreamErrorCode error_code,
QuicVersion version) {
- switch (error_code) {
- case QUIC_RST_FLOW_CONTROL_ACCOUNTING:
- if (version < QUIC_VERSION_18) {
- return QUIC_STREAM_NO_ERROR;
- }
- break;
- default:
- return error_code;
- }
return error_code;
}
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 47be63c..7d46719 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -298,7 +298,6 @@
// Special case to indicate unknown/unsupported QUIC version.
QUIC_VERSION_UNSUPPORTED = 0,
- QUIC_VERSION_18 = 18, // PING frame.
QUIC_VERSION_19 = 19, // Connection level flow control.
QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled.
QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream.
@@ -315,8 +314,7 @@
static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23,
QUIC_VERSION_22,
QUIC_VERSION_21,
- QUIC_VERSION_19,
- QUIC_VERSION_18};
+ QUIC_VERSION_19};
typedef std::vector<QuicVersion> QuicVersionVector;
diff --git a/net/quic/quic_protocol_test.cc b/net/quic/quic_protocol_test.cc
index 4f23490..43a009a 100644
--- a/net/quic/quic_protocol_test.cc
+++ b/net/quic/quic_protocol_test.cc
@@ -16,9 +16,11 @@
<< "Any additions to QuicRstStreamErrorCode require an addition to "
<< "AdjustErrorForVersion and this associated test.";
- EXPECT_EQ(QUIC_RST_FLOW_CONTROL_ACCOUNTING, AdjustErrorForVersion(
- QUIC_RST_FLOW_CONTROL_ACCOUNTING,
- QUIC_VERSION_18));
+ // If we ever add different RST codes, we should have a test akin to the
+ // following.
+ // EXPECT_EQ(QUIC_RST_FLOW_CONTROL_ACCOUNTING, AdjustErrorForVersion(
+ // QUIC_RST_FLOW_CONTROL_ACCOUNTING,
+ // QUIC_VERSION_18));
}
TEST(QuicProtocolTest, MakeQuicTag) {
diff --git a/net/quic/quic_received_packet_manager.h b/net/quic/quic_received_packet_manager.h
index 9eccfe0..a15d570 100644
--- a/net/quic/quic_received_packet_manager.h
+++ b/net/quic/quic_received_packet_manager.h
@@ -96,7 +96,7 @@
};
explicit QuicReceivedPacketManager(QuicConnectionStats* stats);
- virtual ~QuicReceivedPacketManager();
+ ~QuicReceivedPacketManager() override;
// Updates the internal state concerning which packets have been received.
// bytes: the packet size in bytes including Quic Headers.
@@ -128,7 +128,7 @@
// QuicReceivedEntropyHashCalculatorInterface
// Called by QuicFramer, when the outgoing ack gets truncated, to recalculate
// the received entropy hash for the truncated ack frame.
- virtual QuicPacketEntropyHash EntropyHash(
+ QuicPacketEntropyHash EntropyHash(
QuicPacketSequenceNumber sequence_number) const override;
// Updates internal state based on |stop_waiting|.
diff --git a/net/quic/quic_reliable_client_stream.h b/net/quic/quic_reliable_client_stream.h
index 065db9e..9ed6601 100644
--- a/net/quic/quic_reliable_client_stream.h
+++ b/net/quic/quic_reliable_client_stream.h
@@ -51,13 +51,13 @@
QuicSession* session,
const BoundNetLog& net_log);
- virtual ~QuicReliableClientStream();
+ ~QuicReliableClientStream() override;
// QuicDataStream
- virtual uint32 ProcessData(const char* data, uint32 data_len) override;
- virtual void OnFinRead() override;
- virtual void OnCanWrite() override;
- virtual QuicPriority EffectivePriority() const override;
+ uint32 ProcessData(const char* data, uint32 data_len) override;
+ void OnFinRead() override;
+ void OnCanWrite() override;
+ QuicPriority EffectivePriority() const override;
// While the server's set_priority shouldn't be called externally, the creator
// of client-side streams should be able to set the priority.
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index 3e81e74..c004197 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -148,31 +148,6 @@
return false;
}
-void QuicSentPacketManager::OnRetransmittedPacket(
- QuicPacketSequenceNumber old_sequence_number,
- QuicPacketSequenceNumber new_sequence_number) {
- TransmissionType transmission_type;
- PendingRetransmissionMap::iterator it =
- pending_retransmissions_.find(old_sequence_number);
- if (it != pending_retransmissions_.end()) {
- transmission_type = it->second;
- pending_retransmissions_.erase(it);
- } else {
- DLOG(DFATAL) << "Expected sequence number to be in "
- "pending_retransmissions_. sequence_number: " << old_sequence_number;
- transmission_type = NOT_RETRANSMISSION;
- }
-
- // A notifier may be waiting to hear about ACKs for the original sequence
- // number. Inform them that the sequence number has changed.
- ack_notifier_manager_.UpdateSequenceNumber(old_sequence_number,
- new_sequence_number);
-
- unacked_packets_.OnRetransmittedPacket(old_sequence_number,
- new_sequence_number,
- transmission_type);
-}
-
void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
QuicTime ack_receive_time) {
QuicByteCount bytes_in_flight = unacked_packets_.bytes_in_flight();
@@ -451,8 +426,8 @@
const TransmissionInfo& info,
QuicTime::Delta delta_largest_observed) {
QuicPacketSequenceNumber newest_transmission =
- info.all_transmissions == nullptr ? sequence_number
- : *info.all_transmissions->rbegin();
+ info.all_transmissions == nullptr ?
+ sequence_number : *info.all_transmissions->rbegin();
// Remove the most recent packet, if it is pending retransmission.
pending_retransmissions_.erase(newest_transmission);
@@ -508,10 +483,20 @@
if (serialized_packet->retransmittable_frames) {
ack_notifier_manager_.OnSerializedPacket(*serialized_packet);
}
- unacked_packets_.AddPacket(*serialized_packet);
- serialized_packet->retransmittable_frames = nullptr;
} else {
- OnRetransmittedPacket(original_sequence_number, sequence_number);
+ PendingRetransmissionMap::iterator it =
+ pending_retransmissions_.find(original_sequence_number);
+ if (it != pending_retransmissions_.end()) {
+ pending_retransmissions_.erase(it);
+ } else {
+ DLOG(DFATAL) << "Expected sequence number to be in "
+ << "pending_retransmissions_. sequence_number: "
+ << original_sequence_number;
+ }
+ // A notifier may be waiting to hear about ACKs for the original sequence
+ // number. Inform them that the sequence number has changed.
+ ack_notifier_manager_.UpdateSequenceNumber(original_sequence_number,
+ sequence_number);
}
if (pending_timer_transmission_count_ > 0) {
@@ -533,8 +518,15 @@
sequence_number,
bytes,
has_retransmittable_data);
- unacked_packets_.SetSent(sequence_number, sent_time, bytes, in_flight);
+ unacked_packets_.AddSentPacket(*serialized_packet,
+ original_sequence_number,
+ transmission_type,
+ sent_time,
+ bytes,
+ in_flight);
+ // Take ownership of the retransmittable frames before exiting.
+ serialized_packet->retransmittable_frames = nullptr;
// Reset the retransmission timer anytime a pending packet is sent.
return in_flight;
}
@@ -873,11 +865,12 @@
return;
}
- // Set up a pacing sender with a 5 millisecond alarm granularity.
+ // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
+ // the default granularity of the Linux kernel's FQ qdisc.
using_pacing_ = true;
send_algorithm_.reset(
new PacingSender(send_algorithm_.release(),
- QuicTime::Delta::FromMilliseconds(5),
+ QuicTime::Delta::FromMilliseconds(1),
kInitialUnpacedBurst));
}
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 3260ab1..d3f0312 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -168,7 +168,7 @@
old_sequence_number,
clock_.Now(),
kDefaultLength,
- LOSS_RETRANSMISSION,
+ TLP_RETRANSMISSION,
HAS_RETRANSMITTABLE_DATA);
EXPECT_TRUE(QuicSentPacketManagerPeer::IsRetransmission(
&manager_, new_sequence_number));
@@ -1036,7 +1036,7 @@
QuicSentPacketManagerPeer::GetRttStats(&manager_)->UpdateRtt(
min_rtt, QuicTime::Delta::Zero(), QuicTime::Zero());
EXPECT_EQ(min_rtt,
- QuicSentPacketManagerPeer::GetRttStats(&manager_)->min_rtt());
+ QuicSentPacketManagerPeer::GetRttStats(&manager_)->MinRtt());
EXPECT_EQ(min_rtt,
QuicSentPacketManagerPeer::GetRttStats(
&manager_)->recent_min_rtt());
@@ -1063,7 +1063,7 @@
manager_.OnIncomingAck(ack_frame, clock_.Now());
EXPECT_EQ(min_rtt,
- QuicSentPacketManagerPeer::GetRttStats(&manager_)->min_rtt());
+ QuicSentPacketManagerPeer::GetRttStats(&manager_)->MinRtt());
EXPECT_EQ(QuicTime::Delta::FromMilliseconds(100),
QuicSentPacketManagerPeer::GetRttStats(
&manager_)->recent_min_rtt());
diff --git a/net/quic/quic_server_packet_writer.h b/net/quic/quic_server_packet_writer.h
index 15c946b..2e4646d 100644
--- a/net/quic/quic_server_packet_writer.h
+++ b/net/quic/quic_server_packet_writer.h
@@ -26,7 +26,7 @@
QuicServerPacketWriter(UDPServerSocket* socket,
QuicBlockedWriterInterface* blocked_writer);
- virtual ~QuicServerPacketWriter();
+ ~QuicServerPacketWriter() override;
// Use this method to write packets rather than WritePacket:
// QuicServerPacketWriter requires a callback to exist for every write, which
@@ -41,16 +41,17 @@
void OnWriteComplete(int rv);
// QuicPacketWriter implementation:
- virtual bool IsWriteBlockedDataBuffered() const override;
- virtual bool IsWriteBlocked() const override;
- virtual void SetWritable() override;
+ bool IsWriteBlockedDataBuffered() const override;
+ bool IsWriteBlocked() const override;
+ void SetWritable() override;
protected:
// Do not call WritePacket on its own -- use WritePacketWithCallback
- virtual WriteResult WritePacket(const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
+
private:
UDPServerSocket* socket_;
diff --git a/net/quic/quic_server_session.cc b/net/quic/quic_server_session.cc
index f2967a5..c55496e 100644
--- a/net/quic/quic_server_session.cc
+++ b/net/quic/quic_server_session.cc
@@ -122,7 +122,7 @@
cached_network_params.set_max_bandwidth_timestamp_seconds(
max_bandwidth_timestamp);
cached_network_params.set_min_rtt_ms(
- sent_packet_manager.GetRttStats()->min_rtt().ToMilliseconds());
+ sent_packet_manager.GetRttStats()->MinRtt().ToMilliseconds());
cached_network_params.set_previous_connection_state(
bandwidth_recorder.EstimateRecordedDuringSlowStart()
? CachedNetworkParameters::SLOW_START
diff --git a/net/quic/quic_server_session.h b/net/quic/quic_server_session.h
index 80b6443..2f0bdea 100644
--- a/net/quic/quic_server_session.h
+++ b/net/quic/quic_server_session.h
@@ -49,14 +49,14 @@
QuicServerSessionVisitor* visitor);
// Override the base class to notify the owner of the connection close.
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnWriteBlocked() override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnWriteBlocked() override;
// Sends a server config update to the client, containing new bandwidth
// estimate.
- virtual void OnCongestionWindowChange(QuicTime now) override;
+ void OnCongestionWindowChange(QuicTime now) override;
- virtual ~QuicServerSession();
+ ~QuicServerSession() override;
virtual void InitializeSession(const QuicCryptoServerConfig& crypto_config);
@@ -65,7 +65,7 @@
}
// Override base class to process FEC config received from client.
- virtual void OnConfigNegotiated() override;
+ void OnConfigNegotiated() override;
void set_serving_region(string serving_region) {
serving_region_ = serving_region;
@@ -73,9 +73,9 @@
protected:
// QuicSession methods:
- virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
- virtual QuicDataStream* CreateOutgoingDataStream() override;
- virtual QuicCryptoServerStream* GetCryptoStream() override;
+ QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
+ QuicDataStream* CreateOutgoingDataStream() override;
+ QuicCryptoServerStream* GetCryptoStream() override;
// If we should create an incoming stream, returns true. Otherwise
// does error handling, including communicating the error to the client and
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 3299e71..596be40 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -34,65 +34,60 @@
public:
explicit VisitorShim(QuicSession* session) : session_(session) {}
- virtual void OnStreamFrames(const vector<QuicStreamFrame>& frames) override {
+ void OnStreamFrames(const vector<QuicStreamFrame>& frames) override {
session_->OnStreamFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnRstStream(const QuicRstStreamFrame& frame) override {
+ void OnRstStream(const QuicRstStreamFrame& frame) override {
session_->OnRstStream(frame);
session_->PostProcessAfterData();
}
- virtual void OnGoAway(const QuicGoAwayFrame& frame) override {
+ void OnGoAway(const QuicGoAwayFrame& frame) override {
session_->OnGoAway(frame);
session_->PostProcessAfterData();
}
- virtual void OnWindowUpdateFrames(const vector<QuicWindowUpdateFrame>& frames)
- override {
+ void OnWindowUpdateFrames(
+ const vector<QuicWindowUpdateFrame>& frames) override {
session_->OnWindowUpdateFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnBlockedFrames(const vector<QuicBlockedFrame>& frames)
- override {
+ void OnBlockedFrames(const vector<QuicBlockedFrame>& frames) override {
session_->OnBlockedFrames(frames);
session_->PostProcessAfterData();
}
- virtual void OnCanWrite() override {
+ void OnCanWrite() override {
session_->OnCanWrite();
session_->PostProcessAfterData();
}
- virtual void OnCongestionWindowChange(QuicTime now) override {
+ void OnCongestionWindowChange(QuicTime now) override {
session_->OnCongestionWindowChange(now);
}
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override {
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override {
session_->OnSuccessfulVersionNegotiation(version);
}
- virtual void OnConnectionClosed(
- QuicErrorCode error, bool from_peer) override {
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override {
session_->OnConnectionClosed(error, from_peer);
// The session will go away, so don't bother with cleanup.
}
- virtual void OnWriteBlocked() override {
- session_->OnWriteBlocked();
- }
+ void OnWriteBlocked() override { session_->OnWriteBlocked(); }
- virtual bool WillingAndAbleToWrite() const override {
+ bool WillingAndAbleToWrite() const override {
return session_->WillingAndAbleToWrite();
}
- virtual bool HasPendingHandshake() const override {
+ bool HasPendingHandshake() const override {
return session_->HasPendingHandshake();
}
- virtual bool HasOpenDataStreams() const override {
+ bool HasOpenDataStreams() const override {
return session_->HasOpenDataStreams();
}
@@ -111,7 +106,7 @@
goaway_received_(false),
goaway_sent_(false),
has_pending_handshake_(false) {
- if (connection_->version() <= QUIC_VERSION_19) {
+ if (connection_->version() == QUIC_VERSION_19) {
flow_controller_.reset(new QuicFlowController(
connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow,
config_.GetInitialFlowControlWindowToSend(),
@@ -487,8 +482,8 @@
set_max_open_streams(max_streams);
}
- if (version <= QUIC_VERSION_19) {
- // QUIC_VERSION_17,18,19 don't support independent stream/session flow
+ if (version == QUIC_VERSION_19) {
+ // QUIC_VERSION_19 doesn't support independent stream/session flow
// control windows.
if (config_.HasReceivedInitialFlowControlWindowBytes()) {
// Streams which were created before the SHLO was received (0-RTT
@@ -715,7 +710,7 @@
// For peer created streams, we also need to consider implicitly created
// streams.
return id <= largest_peer_created_stream_id_ &&
- implicitly_created_streams_.count(id) == 0;
+ !ContainsKey(implicitly_created_streams_, id);
}
size_t QuicSession::GetNumOpenStreams() const {
@@ -770,10 +765,6 @@
}
void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) {
- if (version < QUIC_VERSION_19) {
- flow_controller_->Disable();
- }
-
// Disable stream level flow control based on negotiated version. Streams may
// have been created with a different version.
if (version < QUIC_VERSION_21) {
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 6414b6d..1bca3aa 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -55,26 +55,23 @@
QuicSession(QuicConnection* connection, const QuicConfig& config);
void InitializeSession();
- virtual ~QuicSession();
+ ~QuicSession() override;
// QuicConnectionVisitorInterface methods:
- virtual void OnStreamFrames(
- const std::vector<QuicStreamFrame>& frames) override;
- virtual void OnRstStream(const QuicRstStreamFrame& frame) override;
- virtual void OnGoAway(const QuicGoAwayFrame& frame) override;
- virtual void OnWindowUpdateFrames(
+ void OnStreamFrames(const std::vector<QuicStreamFrame>& frames) override;
+ void OnRstStream(const QuicRstStreamFrame& frame) override;
+ void OnGoAway(const QuicGoAwayFrame& frame) override;
+ void OnWindowUpdateFrames(
const std::vector<QuicWindowUpdateFrame>& frames) override;
- virtual void OnBlockedFrames(
- const std::vector<QuicBlockedFrame>& frames) override;
- virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
- virtual void OnWriteBlocked() override {}
- virtual void OnSuccessfulVersionNegotiation(
- const QuicVersion& version) override;
- virtual void OnCanWrite() override;
- virtual void OnCongestionWindowChange(QuicTime now) override {}
- virtual bool WillingAndAbleToWrite() const override;
- virtual bool HasPendingHandshake() const override;
- virtual bool HasOpenDataStreams() const override;
+ void OnBlockedFrames(const std::vector<QuicBlockedFrame>& frames) override;
+ void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
+ void OnWriteBlocked() override {}
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
+ void OnCanWrite() override;
+ void OnCongestionWindowChange(QuicTime now) override {}
+ bool WillingAndAbleToWrite() const override;
+ bool HasPendingHandshake() const override;
+ bool HasOpenDataStreams() const override;
// Called by the headers stream when headers have been received for a stream.
virtual void OnStreamHeaders(QuicStreamId stream_id,
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index 770a564..0a5032e 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/rand_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/quic_crypto_stream.h"
@@ -227,7 +228,7 @@
void CheckClosedStreams() {
for (int i = kCryptoStreamId; i < 100; i++) {
- if (closed_streams_.count(i) == 0) {
+ if (!ContainsKey(closed_streams_, i)) {
EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i;
} else {
EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i;
@@ -529,10 +530,6 @@
}
TEST_P(QuicSessionTest, OnCanWriteLimitsNumWritesIfFlowControlBlocked) {
- if (version() < QUIC_VERSION_19) {
- return;
- }
-
// Ensure connection level flow control blockage.
QuicFlowControllerPeer::SetSendWindowOffset(session_.flow_controller(), 0);
EXPECT_TRUE(session_.flow_controller()->IsBlocked());
@@ -732,7 +729,7 @@
EXPECT_FALSE(session_.IsStreamFlowControlBlocked());
QuicStreamId stream_id = 5;
// Write until the header stream is flow control blocked.
- while (!headers_stream->flow_controller()->IsBlocked() && stream_id < 2000) {
+ while (!headers_stream->flow_controller()->IsBlocked() && stream_id < 2010) {
EXPECT_FALSE(session_.IsConnectionFlowControlBlocked());
EXPECT_FALSE(session_.IsStreamFlowControlBlocked());
SpdyHeaderBlock headers;
@@ -747,7 +744,8 @@
EXPECT_FALSE(session_.IsConnectionFlowControlBlocked());
EXPECT_TRUE(session_.IsStreamFlowControlBlocked());
EXPECT_FALSE(session_.HasDataToWrite());
- EXPECT_TRUE(headers_stream->HasBufferedData());
+ // TODO(rtenneti): crbug.com/423586 headers_stream->HasBufferedData is flaky.
+ // EXPECT_TRUE(headers_stream->HasBufferedData());
// Now complete the crypto handshake, resulting in an increased flow control
// send window.
@@ -778,43 +776,7 @@
session_.OnConfigNegotiated();
}
-TEST_P(QuicSessionTest, InvalidStreamFlowControlWindowInHandshake) {
- // Test that receipt of an invalid (< default) stream flow control window from
- // the peer results in the connection being torn down.
- if (version() <= QUIC_VERSION_19) {
- return;
- }
-
- uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1;
- QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow(session_.config(),
- kInvalidWindow);
-
- EXPECT_CALL(*connection_,
- SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW));
- session_.OnConfigNegotiated();
-}
-
-TEST_P(QuicSessionTest, InvalidSessionFlowControlWindowInHandshake) {
- // Test that receipt of an invalid (< default) session flow control window
- // from the peer results in the connection being torn down.
- if (version() <= QUIC_VERSION_19) {
- return;
- }
-
- uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1;
- QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow(session_.config(),
- kInvalidWindow);
-
- EXPECT_CALL(*connection_,
- SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW));
- session_.OnConfigNegotiated();
-}
-
TEST_P(QuicSessionTest, ConnectionFlowControlAccountingRstOutOfOrder) {
- if (version() < QUIC_VERSION_19) {
- return;
- }
-
// Test that when we receive an out of order stream RST we correctly adjust
// our connection level flow control receive window.
// On close, the stream should mark as consumed all bytes between the highest
@@ -839,10 +801,6 @@
}
TEST_P(QuicSessionTest, ConnectionFlowControlAccountingFinAndLocalReset) {
- if (version() < QUIC_VERSION_19) {
- return;
- }
-
// Test the situation where we receive a FIN on a stream, and before we fully
// consume all the data from the sequencer buffer we locally RST the stream.
// The bytes between highest consumed byte, and the final byte offset that we
@@ -885,9 +843,6 @@
// Test that when we RST the stream (and tear down stream state), and then
// receive a FIN from the peer, we correctly adjust our connection level flow
// control receive window.
- if (version() < QUIC_VERSION_19) {
- return;
- }
// Connection starts with some non-zero highest received byte offset,
// due to other active streams.
@@ -927,9 +882,6 @@
// Test that when we RST the stream (and tear down stream state), and then
// receive a RST from the peer, we correctly adjust our connection level flow
// control receive window.
- if (version() < QUIC_VERSION_19) {
- return;
- }
// Connection starts with some non-zero highest received byte offset,
// due to other active streams.
@@ -959,6 +911,38 @@
session_.flow_controller()->highest_received_byte_offset());
}
+TEST_P(QuicSessionTest, InvalidStreamFlowControlWindowInHandshake) {
+ // Test that receipt of an invalid (< default) stream flow control window from
+ // the peer results in the connection being torn down.
+ if (version() <= QUIC_VERSION_19) {
+ return;
+ }
+
+ uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1;
+ QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow(session_.config(),
+ kInvalidWindow);
+
+ EXPECT_CALL(*connection_,
+ SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW));
+ session_.OnConfigNegotiated();
+}
+
+TEST_P(QuicSessionTest, InvalidSessionFlowControlWindowInHandshake) {
+ // Test that receipt of an invalid (< default) session flow control window
+ // from the peer results in the connection being torn down.
+ if (version() == QUIC_VERSION_19) {
+ return;
+ }
+
+ uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1;
+ QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow(session_.config(),
+ kInvalidWindow);
+
+ EXPECT_CALL(*connection_,
+ SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW));
+ session_.OnConfigNegotiated();
+}
+
TEST_P(QuicSessionTest, FlowControlWithInvalidFinalOffset) {
// Test that if we receive a stream RST with a highest byte offset that
// violates flow control, that we close the connection.
@@ -981,26 +965,6 @@
session_.OnRstStream(rst_frame);
}
-TEST_P(QuicSessionTest, VersionNegotiationDisablesFlowControl) {
- if (version() < QUIC_VERSION_19) {
- return;
- }
-
- // Test that after successful version negotiation, flow control is disabled
- // appropriately at both the connection and stream level.
-
- // Initially both stream and connection flow control are enabled.
- TestStream* stream = session_.CreateOutgoingDataStream();
- EXPECT_TRUE(stream->flow_controller()->IsEnabled());
- EXPECT_TRUE(session_.flow_controller()->IsEnabled());
-
- // Version 18 implies that stream flow control is enabled, but connection
- // level is disabled.
- session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_18);
- EXPECT_FALSE(session_.flow_controller()->IsEnabled());
- EXPECT_TRUE(stream->flow_controller()->IsEnabled());
-}
-
TEST_P(QuicSessionTest, WindowUpdateUnblocksHeadersStream) {
// Test that a flow control blocked headers stream gets unblocked on recipt of
// a WINDOW_UPDATE frame. Regression test for b/17413860.
@@ -1029,9 +993,6 @@
}
TEST_P(QuicSessionTest, TooManyUnfinishedStreamsCauseConnectionClose) {
- if (version() < QUIC_VERSION_18) {
- return;
- }
// If a buggy/malicious peer creates too many streams that are not ended with
// a FIN or RST then we send a connection close.
ValueRestore<bool> old_flag(&FLAGS_close_quic_connection_unfinished_streams_2,
diff --git a/net/quic/quic_spdy_server_stream.h b/net/quic/quic_spdy_server_stream.h
index afd1291..54506d1 100644
--- a/net/quic/quic_spdy_server_stream.h
+++ b/net/quic/quic_spdy_server_stream.h
@@ -27,12 +27,12 @@
class QuicSpdyServerStream : public QuicDataStream {
public:
QuicSpdyServerStream(QuicStreamId id, QuicSession* session);
- virtual ~QuicSpdyServerStream();
+ ~QuicSpdyServerStream() override;
// ReliableQuicStream implementation called by the session when there's
// data for us.
- virtual uint32 ProcessData(const char* data, uint32 data_len) override;
- virtual void OnFinRead() override;
+ uint32 ProcessData(const char* data, uint32 data_len) override;
+ void OnFinRead() override;
void ParseRequestHeaders();
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 687ea4c..dac3096 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -103,9 +103,9 @@
public:
explicit DefaultPacketWriterFactory(DatagramClientSocket* socket)
: socket_(socket) {}
- virtual ~DefaultPacketWriterFactory() {}
+ ~DefaultPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(QuicConnection* connection) const override;
+ QuicPacketWriter* Create(QuicConnection* connection) const override;
private:
DatagramClientSocket* socket_;
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index f962699..7ee3681 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -105,7 +105,7 @@
bool always_require_handshake_confirmation,
bool disable_connection_pooling,
const QuicTagVector& connection_options);
- virtual ~QuicStreamFactory();
+ ~QuicStreamFactory() override;
// Creates a new QuicHttpStream to |host_port_pair| which will be
// owned by |request|. |is_https| specifies if the protocol is https or not.
@@ -147,13 +147,13 @@
// Until the servers support roaming, close all connections when the local
// IP address changes.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// CertDatabase::Observer methods:
// We close all sessions when certificate database is changed.
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
bool require_confirmation() const {
return require_confirmation_;
diff --git a/net/quic/quic_time_wait_list_manager.cc b/net/quic/quic_time_wait_list_manager.cc
index 4e069d5..42dae00 100644
--- a/net/quic/quic_time_wait_list_manager.cc
+++ b/net/quic/quic_time_wait_list_manager.cc
@@ -41,7 +41,7 @@
QuicTimeWaitListManager* time_wait_list_manager)
: time_wait_list_manager_(time_wait_list_manager) {}
- virtual QuicTime OnAlarm() override {
+ QuicTime OnAlarm() override {
time_wait_list_manager_->CleanUpOldConnectionIds();
// Let the time wait manager register the alarm at appropriate time.
return QuicTime::Zero();
diff --git a/net/quic/quic_time_wait_list_manager.h b/net/quic/quic_time_wait_list_manager.h
index 13544b7..a01ad2e 100644
--- a/net/quic/quic_time_wait_list_manager.h
+++ b/net/quic/quic_time_wait_list_manager.h
@@ -48,7 +48,7 @@
QuicServerSessionVisitor* visitor,
QuicConnectionHelperInterface* helper,
const QuicVersionVector& supported_versions);
- virtual ~QuicTimeWaitListManager();
+ ~QuicTimeWaitListManager() override;
// Adds the given connection_id to time wait state for kTimeWaitPeriod.
// Henceforth, any packet bearing this connection_id should not be processed
@@ -79,7 +79,7 @@
// Called by the dispatcher when the underlying socket becomes writable again,
// since we might need to send pending public reset packets which we didn't
// send because the underlying socket was write blocked.
- virtual void OnCanWrite() override;
+ void OnCanWrite() override;
// Used to delete connection_id entries that have outlived their time wait
// period.
diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
index ab46dfb..b289c61 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -34,25 +34,42 @@
}
}
-// TODO(ianswett): Combine this method with OnPacketSent once packets are always
-// sent in order and the connection tracks RetransmittableFrames for longer.
-void QuicUnackedPacketMap::AddPacket(
- const SerializedPacket& serialized_packet) {
- DCHECK_GE(serialized_packet.sequence_number,
- least_unacked_ + unacked_packets_.size());
- while (least_unacked_ + unacked_packets_.size() <
- serialized_packet.sequence_number) {
+void QuicUnackedPacketMap::AddSentPacket(
+ const SerializedPacket& packet,
+ QuicPacketSequenceNumber old_sequence_number,
+ TransmissionType transmission_type,
+ QuicTime sent_time,
+ QuicByteCount bytes_sent,
+ bool set_in_flight) {
+ QuicPacketSequenceNumber sequence_number = packet.sequence_number;
+ DCHECK_LT(largest_sent_packet_, sequence_number);
+ DCHECK_GE(sequence_number, least_unacked_ + unacked_packets_.size());
+ while (least_unacked_ + unacked_packets_.size() < sequence_number) {
unacked_packets_.push_back(TransmissionInfo());
unacked_packets_.back().is_unackable = true;
}
- unacked_packets_.push_back(
- TransmissionInfo(serialized_packet.retransmittable_frames,
- serialized_packet.sequence_number_length));
- if (serialized_packet.retransmittable_frames != nullptr &&
- serialized_packet.retransmittable_frames->HasCryptoHandshake() ==
- IS_HANDSHAKE) {
- ++pending_crypto_packet_count_;
+
+ TransmissionInfo info;
+ if (old_sequence_number == 0) {
+ if (packet.retransmittable_frames != nullptr &&
+ packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) {
+ ++pending_crypto_packet_count_;
+ }
+ info = TransmissionInfo(packet.retransmittable_frames,
+ packet.sequence_number_length);
+ } else {
+ info = OnRetransmittedPacket(
+ old_sequence_number, sequence_number, transmission_type);
}
+ info.sent_time = sent_time;
+
+ largest_sent_packet_ = max(sequence_number, largest_sent_packet_);
+ if (set_in_flight) {
+ bytes_in_flight_ += bytes_sent;
+ info.bytes_sent = bytes_sent;
+ info.in_flight = true;
+ }
+ unacked_packets_.push_back(info);
}
void QuicUnackedPacketMap::RemoveObsoletePackets() {
@@ -65,29 +82,24 @@
}
}
-void QuicUnackedPacketMap::OnRetransmittedPacket(
+TransmissionInfo QuicUnackedPacketMap::OnRetransmittedPacket(
QuicPacketSequenceNumber old_sequence_number,
QuicPacketSequenceNumber new_sequence_number,
TransmissionType transmission_type) {
DCHECK_GE(old_sequence_number, least_unacked_);
DCHECK_LT(old_sequence_number, least_unacked_ + unacked_packets_.size());
DCHECK_GE(new_sequence_number, least_unacked_ + unacked_packets_.size());
- while (least_unacked_ + unacked_packets_.size() < new_sequence_number) {
- unacked_packets_.push_back(TransmissionInfo());
- unacked_packets_.back().is_unackable = true;
- }
+ DCHECK_NE(NOT_RETRANSMISSION, transmission_type);
// TODO(ianswett): Discard and lose the packet lazily instead of immediately.
TransmissionInfo* transmission_info =
&unacked_packets_.at(old_sequence_number - least_unacked_);
RetransmittableFrames* frames = transmission_info->retransmittable_frames;
+ transmission_info->retransmittable_frames = nullptr;
LOG_IF(DFATAL, frames == nullptr)
<< "Attempt to retransmit packet with no "
<< "retransmittable frames: " << old_sequence_number;
- // We keep the old packet in the unacked packet list until it, or one of
- // the retransmissions of it are acked.
- transmission_info->retransmittable_frames = nullptr;
// Only keep one transmission older than largest observed, because only the
// most recent is expected to possibly be a spurious retransmission.
while (transmission_info->all_transmissions != nullptr &&
@@ -118,12 +130,14 @@
}
transmission_info->all_transmissions->push_back(new_sequence_number);
}
- unacked_packets_.push_back(
+ TransmissionInfo info =
TransmissionInfo(frames,
transmission_info->sequence_number_length,
transmission_type,
- transmission_info->all_transmissions));
+ transmission_info->all_transmissions);
+ // Proactively remove obsolete packets so the least unacked can be raised.
RemoveObsoletePackets();
+ return info;
}
void QuicUnackedPacketMap::ClearAllPreviousRetransmissions() {
@@ -356,25 +370,6 @@
return least_unacked_;
}
-void QuicUnackedPacketMap::SetSent(QuicPacketSequenceNumber sequence_number,
- QuicTime sent_time,
- QuicByteCount bytes_sent,
- bool set_in_flight) {
- DCHECK_GE(sequence_number, least_unacked_);
- DCHECK_LT(sequence_number, least_unacked_ + unacked_packets_.size());
- TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_];
- DCHECK(!info->in_flight);
-
- DCHECK_LT(largest_sent_packet_, sequence_number);
- largest_sent_packet_ = max(sequence_number, largest_sent_packet_);
- info->sent_time = sent_time;
- if (set_in_flight) {
- bytes_in_flight_ += bytes_sent;
- info->bytes_sent = bytes_sent;
- info->in_flight = true;
- }
-}
-
void QuicUnackedPacketMap::RestoreInFlight(
QuicPacketSequenceNumber sequence_number) {
DCHECK_GE(sequence_number, least_unacked_);
diff --git a/net/quic/quic_unacked_packet_map.h b/net/quic/quic_unacked_packet_map.h
index 9806ffc..6e437fb 100644
--- a/net/quic/quic_unacked_packet_map.h
+++ b/net/quic/quic_unacked_packet_map.h
@@ -20,16 +20,18 @@
QuicUnackedPacketMap();
~QuicUnackedPacketMap();
- // Adds |serialized_packet| to the map. Does not mark it in flight.
- void AddPacket(const SerializedPacket& serialized_packet);
-
- // Called when a packet is retransmitted with a new sequence number.
- // |old_sequence_number| will remain unacked, but will have no
- // retransmittable data associated with it. |new_sequence_number| will
- // be both unacked and associated with retransmittable data.
- void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number,
- QuicPacketSequenceNumber new_sequence_number,
- TransmissionType transmission_type);
+ // Adds |serialized_packet| to the map and marks it as sent at |sent_time|.
+ // Marks the packet as in flight if |set_in_flight| is true.
+ // Packets marked as in flight are expected to be marked as missing when they
+ // don't arrive, indicating the need for retransmission.
+ // |old_sequence_number| is the sequence number of the previous transmission,
+ // or 0 if there was none.
+ void AddSentPacket(const SerializedPacket& serialized_packet,
+ QuicPacketSequenceNumber old_sequence_number,
+ TransmissionType transmission_type,
+ QuicTime sent_time,
+ QuicByteCount bytes_sent,
+ bool set_in_flight);
// Returns true if the packet |sequence_number| is unacked.
bool IsUnacked(QuicPacketSequenceNumber sequence_number) const;
@@ -74,15 +76,6 @@
// been acked by the peer. If there are no unacked packets, returns 0.
QuicPacketSequenceNumber GetLeastUnacked() const;
- // Sets a packet as sent with the sent time |sent_time|. Marks the packet
- // as in flight if |set_in_flight| is true.
- // Packets marked as in flight are expected to be marked as missing when they
- // don't arrive, indicating the need for retransmission.
- void SetSent(QuicPacketSequenceNumber sequence_number,
- QuicTime sent_time,
- QuicByteCount bytes_sent,
- bool set_in_flight);
-
// Restores the in flight status for a packet that was previously sent.
void RestoreInFlight(QuicPacketSequenceNumber sequence_number);
@@ -137,6 +130,15 @@
void RemoveObsoletePackets();
private:
+ // Called when a packet is retransmitted with a new sequence number.
+ // |old_sequence_number| will remain unacked, but will have no
+ // retransmittable data associated with it. A transmission info will be
+ // created for |new_sequence_number| and returned.
+ TransmissionInfo OnRetransmittedPacket(
+ QuicPacketSequenceNumber old_sequence_number,
+ QuicPacketSequenceNumber new_sequence_number,
+ TransmissionType transmission_type);
+
void MaybeRemoveRetransmittableFrames(TransmissionInfo* transmission_info);
// Returns true if the packet no longer has a purpose in the map.
diff --git a/net/quic/quic_unacked_packet_map_test.cc b/net/quic/quic_unacked_packet_map_test.cc
index 4f5d6a5..d31ce44 100644
--- a/net/quic/quic_unacked_packet_map_test.cc
+++ b/net/quic/quic_unacked_packet_map_test.cc
@@ -101,8 +101,9 @@
TEST_F(QuicUnackedPacketMapTest, RttOnly) {
// Acks are only tracked for RTT measurement purposes.
- unacked_packets_.AddPacket(CreateNonRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultAckLength, false);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultAckLength,
+ false);
QuicPacketSequenceNumber unacked[] = { 1 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -120,8 +121,9 @@
// when more than 200 accumulate.
const size_t kNumUnackedPackets = 200;
for (size_t i = 1; i < 400; ++i) {
- unacked_packets_.AddPacket(CreateNonRetransmittablePacket(i));
- unacked_packets_.SetSent(i, now_, kDefaultAckLength, false);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(i), 0,
+ NOT_RETRANSMISSION, now_, kDefaultAckLength,
+ false);
unacked_packets_.RemoveObsoletePackets();
EXPECT_EQ(min(i, kNumUnackedPackets),
unacked_packets_.GetNumUnackedPacketsDebugOnly());
@@ -130,8 +132,9 @@
TEST_F(QuicUnackedPacketMapTest, RetransmittableInflightAndRtt) {
// Simulate a retransmittable packet being sent and acked.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked[] = { 1 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -157,10 +160,12 @@
TEST_F(QuicUnackedPacketMapTest, RetransmittedPacket) {
// Simulate a retransmittable packet being sent, retransmitted, and the first
// transmission being acked.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
- unacked_packets_.OnRetransmittedPacket(1, 2, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(2, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(2), 1,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked[] = { 1, 2 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -192,10 +197,12 @@
TEST_F(QuicUnackedPacketMapTest, RetransmitThreeTimes) {
// Simulate a retransmittable packet being sent and retransmitted twice.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(2));
- unacked_packets_.SetSent(2, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(2), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked[] = { 1, 2 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -208,10 +215,12 @@
unacked_packets_.RemoveFromInFlight(2);
unacked_packets_.RemoveRetransmittability(2);
unacked_packets_.RemoveFromInFlight(1);
- unacked_packets_.OnRetransmittedPacket(1, 3, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(3, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(4));
- unacked_packets_.SetSent(4, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(3), 1,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(4), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked2[] = { 1, 3, 4 };
VerifyUnackedPackets(unacked2, arraysize(unacked2));
@@ -224,10 +233,12 @@
unacked_packets_.IncreaseLargestObserved(4);
unacked_packets_.RemoveFromInFlight(4);
unacked_packets_.RemoveRetransmittability(4);
- unacked_packets_.OnRetransmittedPacket(3, 5, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(5, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(6));
- unacked_packets_.SetSent(6, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(5), 3,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(6), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked3[] = { 3, 5, 6 };
VerifyUnackedPackets(unacked3, arraysize(unacked3));
@@ -240,8 +251,9 @@
unacked_packets_.IncreaseLargestObserved(6);
unacked_packets_.RemoveFromInFlight(6);
unacked_packets_.RemoveRetransmittability(6);
- unacked_packets_.OnRetransmittedPacket(5, 7, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(7, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(7), 5,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked4[] = { 3, 5, 7 };
VerifyUnackedPackets(unacked4, arraysize(unacked4));
@@ -266,10 +278,12 @@
TEST_F(QuicUnackedPacketMapTest, RetransmitFourTimes) {
// Simulate a retransmittable packet being sent and retransmitted twice.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(2));
- unacked_packets_.SetSent(2, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(2), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked[] = { 1, 2 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -282,8 +296,9 @@
unacked_packets_.RemoveFromInFlight(2);
unacked_packets_.RemoveRetransmittability(2);
unacked_packets_.RemoveFromInFlight(1);
- unacked_packets_.OnRetransmittedPacket(1, 3, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(3, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(3), 1,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked2[] = { 1, 3 };
VerifyUnackedPackets(unacked2, arraysize(unacked2));
@@ -293,10 +308,12 @@
VerifyRetransmittablePackets(retransmittable2, arraysize(retransmittable2));
// TLP 3 (formerly 1) as 4, and don't remove 1 from unacked.
- unacked_packets_.OnRetransmittedPacket(3, 4, TLP_RETRANSMISSION);
- unacked_packets_.SetSent(4, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(5));
- unacked_packets_.SetSent(5, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(4), 3,
+ TLP_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(5), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked3[] = { 1, 3, 4, 5 };
VerifyUnackedPackets(unacked3, arraysize(unacked3));
@@ -311,8 +328,9 @@
unacked_packets_.RemoveRetransmittability(5);
unacked_packets_.RemoveFromInFlight(3);
unacked_packets_.RemoveFromInFlight(4);
- unacked_packets_.OnRetransmittedPacket(4, 6, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(6, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(6), 4,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked4[] = { 4, 6 };
VerifyUnackedPackets(unacked4, arraysize(unacked4));
@@ -325,11 +343,13 @@
TEST_F(QuicUnackedPacketMapTest, RestoreInflight) {
// Simulate a retransmittable packet being sent, retransmitted, and the first
// transmission being acked.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
- unacked_packets_.OnRetransmittedPacket(1, 2, RTO_RETRANSMISSION);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
unacked_packets_.RemoveFromInFlight(1);
- unacked_packets_.SetSent(2, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(2), 1,
+ RTO_RETRANSMISSION, now_, kDefaultLength,
+ true);
QuicPacketSequenceNumber unacked[] = { 1, 2 };
VerifyUnackedPackets(unacked, arraysize(unacked));
@@ -349,12 +369,15 @@
TEST_F(QuicUnackedPacketMapTest, SendWithGap) {
// Simulate a retransmittable packet being sent, retransmitted, and the first
// transmission being acked.
- unacked_packets_.AddPacket(CreateRetransmittablePacket(1));
- unacked_packets_.SetSent(1, now_, kDefaultLength, true);
- unacked_packets_.AddPacket(CreateRetransmittablePacket(3));
- unacked_packets_.SetSent(3, now_, kDefaultLength, true);
- unacked_packets_.OnRetransmittedPacket(1, 5, LOSS_RETRANSMISSION);
- unacked_packets_.SetSent(5, now_, kDefaultLength, true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(1), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateRetransmittablePacket(3), 0,
+ NOT_RETRANSMISSION, now_, kDefaultLength,
+ true);
+ unacked_packets_.AddSentPacket(CreateNonRetransmittablePacket(5), 3,
+ LOSS_RETRANSMISSION, now_, kDefaultLength,
+ true);
EXPECT_EQ(1u, unacked_packets_.GetLeastUnacked());
EXPECT_TRUE(unacked_packets_.IsUnacked(1));
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index a65203b..7db9a57 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -76,12 +76,11 @@
num_retransmitted_bytes_(0) {
}
- virtual void OnAckNotification(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed)
- override {
+ void OnAckNotification(int num_original_packets,
+ int num_original_bytes,
+ int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed) override {
DCHECK_LT(0, pending_acks_);
--pending_acks_;
num_original_packets_ += num_original_packets;
@@ -106,8 +105,7 @@
protected:
// Delegates are ref counted.
- virtual ~ProxyAckNotifierDelegate() override {
- }
+ ~ProxyAckNotifierDelegate() override {}
private:
// Original delegate. delegate_->OnAckNotification will be called when:
diff --git a/net/quic/reliable_quic_stream_test.cc b/net/quic/reliable_quic_stream_test.cc
index 713d0e3..d63a5d8 100644
--- a/net/quic/reliable_quic_stream_test.cc
+++ b/net/quic/reliable_quic_stream_test.cc
@@ -48,14 +48,14 @@
: ReliableQuicStream(id, session),
should_process_data_(should_process_data) {}
- virtual uint32 ProcessRawData(const char* data, uint32 data_len) override {
+ uint32 ProcessRawData(const char* data, uint32 data_len) override {
EXPECT_NE(0u, data_len);
DVLOG(1) << "ProcessData data_len: " << data_len;
data_ += string(data, data_len);
return should_process_data_ ? data_len : 0;
}
- virtual QuicPriority EffectivePriority() const override {
+ QuicPriority EffectivePriority() const override {
return QuicUtils::HighestPriority();
}
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 9f4dc8b..814be7b 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -41,10 +41,9 @@
: error_(false) {
}
- virtual void OnError(CryptoFramer* framer) override { error_ = true; }
+ void OnError(CryptoFramer* framer) override { error_ = true; }
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override {
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
messages_.push_back(message);
}
@@ -137,13 +136,12 @@
// Takes ownership of |sync_source|, a synchronous ChannelIDSource.
explicit AsyncTestChannelIDSource(ChannelIDSource* sync_source)
: sync_source_(sync_source) {}
- virtual ~AsyncTestChannelIDSource() {}
+ ~AsyncTestChannelIDSource() override {}
// ChannelIDSource implementation.
- virtual QuicAsyncStatus GetChannelIDKey(
- const string& hostname,
- scoped_ptr<ChannelIDKey>* channel_id_key,
- ChannelIDSourceCallback* callback) override {
+ QuicAsyncStatus GetChannelIDKey(const string& hostname,
+ scoped_ptr<ChannelIDKey>* channel_id_key,
+ ChannelIDSourceCallback* callback) override {
// Synchronous mode.
if (!callback) {
return sync_source_->GetChannelIDKey(hostname, channel_id_key, nullptr);
@@ -160,7 +158,7 @@
}
// CallbackSource implementation.
- virtual void RunPendingCallbacks() override {
+ void RunPendingCallbacks() override {
if (callback_.get()) {
callback_->Run(&channel_id_key_);
callback_.reset();
@@ -353,22 +351,22 @@
index_(index) {
}
- virtual StringPiece GetCommonHashes() const override {
+ StringPiece GetCommonHashes() const override {
CHECK(false) << "not implemented";
return StringPiece();
}
- virtual StringPiece GetCert(uint64 hash, uint32 index) const override {
+ StringPiece GetCert(uint64 hash, uint32 index) const override {
if (hash == hash_ && index == index_) {
return cert_;
}
return StringPiece();
}
- virtual bool MatchCert(StringPiece cert,
- StringPiece common_set_hashes,
- uint64* out_hash,
- uint32* out_index) const override {
+ bool MatchCert(StringPiece cert,
+ StringPiece common_set_hashes,
+ uint64* out_hash,
+ uint32* out_index) const override {
if (cert != cert_) {
return false;
}
diff --git a/net/quic/test_tools/crypto_test_utils_chromium.cc b/net/quic/test_tools/crypto_test_utils_chromium.cc
index d5edc6c..0f0f83f 100644
--- a/net/quic/test_tools/crypto_test_utils_chromium.cc
+++ b/net/quic/test_tools/crypto_test_utils_chromium.cc
@@ -34,7 +34,7 @@
ImportCertFromFile(GetTestCertsDirectory(), cert_file);
scoped_root_.Reset(root_cert.get());
}
- virtual ~TestProofVerifierChromium() {}
+ ~TestProofVerifierChromium() override {}
private:
ScopedTestRoot scoped_root_;
@@ -52,14 +52,14 @@
certs_[0] = kLeafCert;
certs_[1] = kIntermediateCert;
}
- virtual ~FakeProofSource() {}
+ ~FakeProofSource() override {}
// ProofSource interface
- virtual bool GetProof(const std::string& hostname,
- const std::string& server_config,
- bool ecdsa_ok,
- const std::vector<std::string>** out_certs,
- std::string* out_signature) override {
+ bool GetProof(const std::string& hostname,
+ const std::string& server_config,
+ bool ecdsa_ok,
+ const std::vector<std::string>** out_certs,
+ std::string* out_signature) override {
*out_certs = &certs_;
*out_signature = kSignature;
return true;
@@ -73,18 +73,17 @@
class FakeProofVerifier : public ProofVerifier {
public:
FakeProofVerifier() {}
- virtual ~FakeProofVerifier() {}
+ ~FakeProofVerifier() override {}
// ProofVerifier interface
- virtual QuicAsyncStatus VerifyProof(
- const std::string& hostname,
- const std::string& server_config,
- const std::vector<std::string>& certs,
- const std::string& signature,
- const ProofVerifyContext* verify_context,
- std::string* error_details,
- scoped_ptr<ProofVerifyDetails>* verify_details,
- ProofVerifierCallback* callback) override {
+ QuicAsyncStatus VerifyProof(const std::string& hostname,
+ const std::string& server_config,
+ const std::vector<std::string>& certs,
+ const std::string& signature,
+ const ProofVerifyContext* verify_context,
+ std::string* error_details,
+ scoped_ptr<ProofVerifyDetails>* verify_details,
+ ProofVerifierCallback* callback) override {
error_details->clear();
scoped_ptr<ProofVerifyDetailsChromium> verify_details_chromium(
new ProofVerifyDetailsChromium);
diff --git a/net/quic/test_tools/crypto_test_utils_openssl.cc b/net/quic/test_tools/crypto_test_utils_openssl.cc
index 4db57b5..39b48a5 100644
--- a/net/quic/test_tools/crypto_test_utils_openssl.cc
+++ b/net/quic/test_tools/crypto_test_utils_openssl.cc
@@ -26,12 +26,11 @@
class TestChannelIDKey : public ChannelIDKey {
public:
explicit TestChannelIDKey(EVP_PKEY* ecdsa_key) : ecdsa_key_(ecdsa_key) {}
- virtual ~TestChannelIDKey() override {}
+ ~TestChannelIDKey() override {}
// ChannelIDKey implementation.
- virtual bool Sign(StringPiece signed_data,
- string* out_signature) const override {
+ bool Sign(StringPiece signed_data, string* out_signature) const override {
crypto::ScopedEVP_MD_CTX md_ctx(EVP_MD_CTX_create());
if (!md_ctx ||
EVP_DigestSignInit(md_ctx.get(), nullptr, EVP_sha256(), nullptr,
@@ -75,7 +74,7 @@
return true;
}
- virtual string SerializeKey() const override {
+ string SerializeKey() const override {
// i2d_PublicKey will produce an ANSI X9.62 public key which, for a P-256
// key, is 0x04 (meaning uncompressed) followed by the x and y field
// elements as 32-byte, big-endian numbers.
@@ -99,11 +98,11 @@
class TestChannelIDSource : public ChannelIDSource {
public:
- virtual ~TestChannelIDSource() {}
+ ~TestChannelIDSource() override {}
// ChannelIDSource implementation.
- virtual QuicAsyncStatus GetChannelIDKey(
+ QuicAsyncStatus GetChannelIDKey(
const string& hostname,
scoped_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* /*callback*/) override {
diff --git a/net/quic/test_tools/delayed_verify_strike_register_client.h b/net/quic/test_tools/delayed_verify_strike_register_client.h
index 479647b..6d5002b 100644
--- a/net/quic/test_tools/delayed_verify_strike_register_client.h
+++ b/net/quic/test_tools/delayed_verify_strike_register_client.h
@@ -23,11 +23,11 @@
uint32 window_secs,
const uint8 orbit[8],
StrikeRegister::StartupType startup);
- virtual ~DelayedVerifyStrikeRegisterClient();
+ ~DelayedVerifyStrikeRegisterClient() override;
- virtual void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) override;
+ void VerifyNonceIsValidAndUnique(base::StringPiece nonce,
+ QuicWallTime now,
+ ResultCallback* cb) override;
// Start queueing verifications instead of executing them immediately.
void StartDelayingVerification() {
diff --git a/net/quic/test_tools/mock_clock.h b/net/quic/test_tools/mock_clock.h
index 4a2a28c..30c76dd 100644
--- a/net/quic/test_tools/mock_clock.h
+++ b/net/quic/test_tools/mock_clock.h
@@ -16,15 +16,15 @@
class MockClock : public QuicClock {
public:
MockClock();
- virtual ~MockClock();
+ ~MockClock() override;
void AdvanceTime(QuicTime::Delta delta);
- virtual QuicTime Now() const override;
+ QuicTime Now() const override;
- virtual QuicTime ApproximateNow() const override;
+ QuicTime ApproximateNow() const override;
- virtual QuicWallTime WallNow() const override;
+ QuicWallTime WallNow() const override;
base::TimeTicks NowInTicks() const;
diff --git a/net/quic/test_tools/mock_crypto_client_stream.h b/net/quic/test_tools/mock_crypto_client_stream.h
index 10803e8..636314a 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.h
+++ b/net/quic/test_tools/mock_crypto_client_stream.h
@@ -42,14 +42,13 @@
QuicCryptoClientConfig* crypto_config,
HandshakeMode handshake_mode,
const ProofVerifyDetails* proof_verify_details_);
- virtual ~MockCryptoClientStream();
+ ~MockCryptoClientStream() override;
// CryptoFramerVisitorInterface implementation.
- virtual void OnHandshakeMessage(
- const CryptoHandshakeMessage& message) override;
+ void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
// QuicCryptoClientStream implementation.
- virtual bool CryptoConnect() override;
+ bool CryptoConnect() override;
// Invokes the sessions's CryptoHandshakeEvent method with the specified
// event.
diff --git a/net/quic/test_tools/mock_crypto_client_stream_factory.h b/net/quic/test_tools/mock_crypto_client_stream_factory.h
index 5add188..b138c70 100644
--- a/net/quic/test_tools/mock_crypto_client_stream_factory.h
+++ b/net/quic/test_tools/mock_crypto_client_stream_factory.h
@@ -18,9 +18,9 @@
class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
public:
MockCryptoClientStreamFactory();
- virtual ~MockCryptoClientStreamFactory() {}
+ ~MockCryptoClientStreamFactory() override {}
- virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
+ QuicCryptoClientStream* CreateQuicCryptoClientStream(
const QuicServerId& server_id,
QuicClientSession* session,
QuicCryptoClientConfig* crypto_config) override;
diff --git a/net/quic/test_tools/mock_random.h b/net/quic/test_tools/mock_random.h
index b04f170..44f9426 100644
--- a/net/quic/test_tools/mock_random.h
+++ b/net/quic/test_tools/mock_random.h
@@ -18,12 +18,11 @@
// QuicRandom:
// Fills the |data| buffer with a repeating byte, initially 'r'.
- virtual void RandBytes(void* data, size_t len) override;
+ void RandBytes(void* data, size_t len) override;
// Returns base + the current increment.
- virtual uint64 RandUint64() override;
+ uint64 RandUint64() override;
// Does nothing.
- virtual void Reseed(const void* additional_entropy,
- size_t entropy_len) override;
+ void Reseed(const void* additional_entropy, size_t entropy_len) override;
// ChangeValue increments |increment_|. This causes the value returned by
// |RandUint64| and the byte that |RandBytes| fills with, to change.
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 6cdd02a..7835e40 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -37,8 +37,8 @@
: QuicAlarm(delegate) {
}
- virtual void SetImpl() override {}
- virtual void CancelImpl() override {}
+ void SetImpl() override {}
+ void CancelImpl() override {}
};
} // namespace
@@ -226,10 +226,9 @@
: public QuicConnection::PacketWriterFactory {
public:
NiceMockPacketWriterFactory() {}
- virtual ~NiceMockPacketWriterFactory() {}
+ ~NiceMockPacketWriterFactory() override {}
- virtual QuicPacketWriter* Create(
- QuicConnection* /*connection*/) const override {
+ QuicPacketWriter* Create(QuicConnection* /*connection*/) const override {
return new testing::NiceMock<MockPacketWriter>();
}
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index f009641..99a5ae5 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -190,35 +190,32 @@
public:
NoOpFramerVisitor() {}
- virtual void OnError(QuicFramer* framer) override {}
- virtual void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {}
- virtual void OnVersionNegotiationPacket(
+ void OnError(QuicFramer* framer) override {}
+ void OnPacket() override {}
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {}
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {}
- virtual void OnRevivedPacket() override {}
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override;
- virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
- virtual bool OnUnauthenticatedPublicHeader(
+ void OnRevivedPacket() override {}
+ bool OnProtocolVersionMismatch(QuicVersion version) override;
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override;
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override;
- virtual void OnFecProtectedPayload(base::StringPiece payload) override {}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override;
- virtual bool OnAckFrame(const QuicAckFrame& frame) override;
- virtual bool OnCongestionFeedbackFrame(
+ void OnDecryptedPacket(EncryptionLevel level) override {}
+ bool OnPacketHeader(const QuicPacketHeader& header) override;
+ void OnFecProtectedPayload(base::StringPiece payload) override {}
+ bool OnStreamFrame(const QuicStreamFrame& frame) override;
+ bool OnAckFrame(const QuicAckFrame& frame) override;
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override;
- virtual bool OnStopWaitingFrame(
- const QuicStopWaitingFrame& frame) override;
- virtual bool OnPingFrame(const QuicPingFrame& frame) override;
- virtual void OnFecData(const QuicFecData& fec) override {}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override;
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
- virtual bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
- virtual void OnPacketComplete() override {}
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
+ bool OnPingFrame(const QuicPingFrame& frame) override;
+ void OnFecData(const QuicFecData& fec) override {}
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override;
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override;
+ void OnPacketComplete() override {}
private:
DISALLOW_COPY_AND_ASSIGN(NoOpFramerVisitor);
@@ -254,10 +251,10 @@
class MockHelper : public QuicConnectionHelperInterface {
public:
MockHelper();
- virtual ~MockHelper();
- virtual const QuicClock* GetClock() const override;
- virtual QuicRandom* GetRandomGenerator() override;
- virtual QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
+ ~MockHelper() override;
+ const QuicClock* GetClock() const override;
+ QuicRandom* GetRandomGenerator() override;
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
void AdvanceTime(QuicTime::Delta delta);
private:
@@ -329,9 +326,9 @@
PacketSavingConnection(bool is_server,
const QuicVersionVector& supported_versions);
- virtual ~PacketSavingConnection();
+ ~PacketSavingConnection() override;
- virtual void SendOrQueuePacket(QueuedPacket packet) override;
+ void SendOrQueuePacket(QueuedPacket packet) override;
std::vector<QuicPacket*> packets_;
std::vector<QuicEncryptedPacket*> encrypted_packets_;
@@ -458,6 +455,7 @@
QuicTime::Delta(QuicTime now,
QuicByteCount bytes_in_flight,
HasRetransmittableData));
+ MOCK_CONST_METHOD0(PacingRate, QuicBandwidth(void));
MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void));
MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool());
MOCK_METHOD1(OnRttUpdated, void(QuicPacketSequenceNumber));
@@ -493,9 +491,9 @@
public QuicReceivedEntropyHashCalculatorInterface {
public:
TestEntropyCalculator();
- virtual ~TestEntropyCalculator();
+ ~TestEntropyCalculator() override;
- virtual QuicPacketEntropyHash EntropyHash(
+ QuicPacketEntropyHash EntropyHash(
QuicPacketSequenceNumber sequence_number) const override;
private:
@@ -551,10 +549,10 @@
class TestWriterFactory : public QuicDispatcher::PacketWriterFactory {
public:
TestWriterFactory();
- virtual ~TestWriterFactory();
+ ~TestWriterFactory() override;
- virtual QuicPacketWriter* Create(QuicServerPacketWriter* writer,
- QuicConnection* connection) override;
+ QuicPacketWriter* Create(QuicServerPacketWriter* writer,
+ QuicConnection* connection) override;
// Calls OnPacketSent on the last QuicConnection to write through one of the
// packet writers created by this factory.
@@ -566,13 +564,12 @@
PerConnectionPacketWriter(TestWriterFactory* factory,
QuicServerPacketWriter* writer,
QuicConnection* connection);
- virtual ~PerConnectionPacketWriter();
+ ~PerConnectionPacketWriter() override;
- virtual WriteResult WritePacket(
- const char* buffer,
- size_t buf_len,
- const IPAddressNumber& self_address,
- const IPEndPoint& peer_address) override;
+ WriteResult WritePacket(const char* buffer,
+ size_t buf_len,
+ const IPAddressNumber& self_address,
+ const IPEndPoint& peer_address) override;
private:
TestWriterFactory* factory_;
diff --git a/net/quic/test_tools/simple_quic_framer.cc b/net/quic/test_tools/simple_quic_framer.cc
index 6999cf5..0f413d7 100644
--- a/net/quic/test_tools/simple_quic_framer.cc
+++ b/net/quic/test_tools/simple_quic_framer.cc
@@ -22,48 +22,40 @@
: error_(QUIC_NO_ERROR) {
}
- virtual ~SimpleFramerVisitor() override {
- STLDeleteElements(&stream_data_);
- }
+ ~SimpleFramerVisitor() override { STLDeleteElements(&stream_data_); }
- virtual void OnError(QuicFramer* framer) override {
- error_ = framer->error();
- }
+ void OnError(QuicFramer* framer) override { error_ = framer->error(); }
- virtual bool OnProtocolVersionMismatch(QuicVersion version) override {
- return false;
- }
+ bool OnProtocolVersionMismatch(QuicVersion version) override { return false; }
- virtual void OnPacket() override {}
- virtual void OnPublicResetPacket(
- const QuicPublicResetPacket& packet) override {
+ void OnPacket() override {}
+ void OnPublicResetPacket(const QuicPublicResetPacket& packet) override {
public_reset_packet_.reset(new QuicPublicResetPacket(packet));
}
- virtual void OnVersionNegotiationPacket(
+ void OnVersionNegotiationPacket(
const QuicVersionNegotiationPacket& packet) override {
version_negotiation_packet_.reset(
new QuicVersionNegotiationPacket(packet));
}
- virtual void OnRevivedPacket() override {}
+ void OnRevivedPacket() override {}
- virtual bool OnUnauthenticatedPublicHeader(
+ bool OnUnauthenticatedPublicHeader(
const QuicPacketPublicHeader& header) override {
return true;
}
- virtual bool OnUnauthenticatedHeader(
- const QuicPacketHeader& header) override {
+ bool OnUnauthenticatedHeader(const QuicPacketHeader& header) override {
return true;
}
- virtual void OnDecryptedPacket(EncryptionLevel level) override {}
- virtual bool OnPacketHeader(const QuicPacketHeader& header) override {
+ void OnDecryptedPacket(EncryptionLevel level) override {}
+ bool OnPacketHeader(const QuicPacketHeader& header) override {
has_header_ = true;
header_ = header;
return true;
}
- virtual void OnFecProtectedPayload(StringPiece payload) override {}
+ void OnFecProtectedPayload(StringPiece payload) override {}
- virtual bool OnStreamFrame(const QuicStreamFrame& frame) override {
+ bool OnStreamFrame(const QuicStreamFrame& frame) override {
// Save a copy of the data so it is valid after the packet is processed.
stream_data_.push_back(frame.GetDataAsString());
QuicStreamFrame stream_frame(frame);
@@ -75,61 +67,59 @@
return true;
}
- virtual bool OnAckFrame(const QuicAckFrame& frame) override {
+ bool OnAckFrame(const QuicAckFrame& frame) override {
ack_frames_.push_back(frame);
return true;
}
- virtual bool OnCongestionFeedbackFrame(
+ bool OnCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame) override {
feedback_frames_.push_back(frame);
return true;
}
- virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
+ bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
stop_waiting_frames_.push_back(frame);
return true;
}
- virtual bool OnPingFrame(const QuicPingFrame& frame) override {
+ bool OnPingFrame(const QuicPingFrame& frame) override {
ping_frames_.push_back(frame);
return true;
}
- virtual void OnFecData(const QuicFecData& fec) override {
+ void OnFecData(const QuicFecData& fec) override {
fec_data_ = fec;
fec_redundancy_ = fec_data_.redundancy.as_string();
fec_data_.redundancy = fec_redundancy_;
}
- virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
+ bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override {
rst_stream_frames_.push_back(frame);
return true;
}
- virtual bool OnConnectionCloseFrame(
- const QuicConnectionCloseFrame& frame) override {
+ bool OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override {
connection_close_frames_.push_back(frame);
return true;
}
- virtual bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
+ bool OnGoAwayFrame(const QuicGoAwayFrame& frame) override {
goaway_frames_.push_back(frame);
return true;
}
- virtual bool OnWindowUpdateFrame(
- const QuicWindowUpdateFrame& frame) override {
+ bool OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override {
window_update_frames_.push_back(frame);
return true;
}
- virtual bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
+ bool OnBlockedFrame(const QuicBlockedFrame& frame) override {
blocked_frames_.push_back(frame);
return true;
}
- virtual void OnPacketComplete() override {}
+ void OnPacketComplete() override {}
const QuicPacketHeader& header() const { return header_; }
const vector<QuicAckFrame>& ack_frames() const { return ack_frames_; }
diff --git a/net/quic/test_tools/test_task_runner.h b/net/quic/test_tools/test_task_runner.h
index ea6793f..69a1bcb 100644
--- a/net/quic/test_tools/test_task_runner.h
+++ b/net/quic/test_tools/test_task_runner.h
@@ -26,17 +26,17 @@
explicit TestTaskRunner(MockClock* clock);
// base::TaskRunner implementation.
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override;
- virtual bool RunsTasksOnCurrentThread() const override;
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override;
+ bool RunsTasksOnCurrentThread() const override;
const std::vector<PostedTask>& GetPostedTasks() const;
void RunNextTask();
protected:
- virtual ~TestTaskRunner();
+ ~TestTaskRunner() override;
private:
std::vector<PostedTask>::iterator FindNextTask();
diff --git a/net/server/http_connection.h b/net/server/http_connection.h
index c7225e1..8163ced 100644
--- a/net/server/http_connection.h
+++ b/net/server/http_connection.h
@@ -59,7 +59,7 @@
}
private:
- virtual ~ReadIOBuffer();
+ ~ReadIOBuffer() override;
scoped_refptr<GrowableIOBuffer> base_;
int max_buffer_size_;
@@ -101,7 +101,7 @@
}
private:
- virtual ~QueuedWriteIOBuffer();
+ ~QueuedWriteIOBuffer() override;
std::queue<std::string> pending_data_;
int total_size_;
diff --git a/net/server/http_server_unittest.cc b/net/server/http_server_unittest.cc
index be0e271..5da2c0f 100644
--- a/net/server/http_server_unittest.cc
+++ b/net/server/http_server_unittest.cc
@@ -189,26 +189,25 @@
ASSERT_EQ(OK, server_->GetLocalAddress(&server_address_));
}
- virtual void OnConnect(int connection_id) override {}
+ void OnConnect(int connection_id) override {}
- virtual void OnHttpRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnHttpRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
requests_.push_back(std::make_pair(info, connection_id));
if (requests_.size() == quit_after_request_count_)
run_loop_quit_func_.Run();
}
- virtual void OnWebSocketRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnWebSocketRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
NOTREACHED();
}
- virtual void OnWebSocketMessage(int connection_id,
- const std::string& data) override {
+ void OnWebSocketMessage(int connection_id, const std::string& data) override {
NOTREACHED();
}
- virtual void OnClose(int connection_id) override {}
+ void OnClose(int connection_id) override {}
bool RunUntilRequestsReceived(size_t count) {
quit_after_request_count_ = count;
@@ -248,18 +247,17 @@
namespace {
class WebSocketTest : public HttpServerTest {
- virtual void OnHttpRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnHttpRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
NOTREACHED();
}
- virtual void OnWebSocketRequest(int connection_id,
- const HttpServerRequestInfo& info) override {
+ void OnWebSocketRequest(int connection_id,
+ const HttpServerRequestInfo& info) override {
HttpServerTest::OnHttpRequest(connection_id, info);
}
- virtual void OnWebSocketMessage(int connection_id,
- const std::string& data) override {
+ void OnWebSocketMessage(int connection_id, const std::string& data) override {
}
};
@@ -407,9 +405,9 @@
public:
TestURLFetcherDelegate(const base::Closure& quit_loop_func)
: quit_loop_func_(quit_loop_func) {}
- virtual ~TestURLFetcherDelegate() {}
+ ~TestURLFetcherDelegate() override {}
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
EXPECT_EQ(HTTP_INTERNAL_SERVER_ERROR, source->GetResponseCode());
quit_loop_func_.Run();
}
@@ -473,10 +471,10 @@
read_buf_len_(0) {}
// StreamSocket
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_NOT_IMPLEMENTED;
}
- virtual void Disconnect() override {
+ void Disconnect() override {
connected_ = false;
if (!read_callback_.is_null()) {
read_buf_ = NULL;
@@ -484,28 +482,27 @@
base::ResetAndReturn(&read_callback_).Run(ERR_CONNECTION_CLOSED);
}
}
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override { return IsConnected(); }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override { return IsConnected(); }
+ int GetPeerAddress(IPEndPoint* address) const override {
return ERR_NOT_IMPLEMENTED;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return ERR_NOT_IMPLEMENTED;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return true; }
- virtual bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return true; }
+ bool UsingTCPFastOpen() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
if (!connected_) {
return ERR_SOCKET_NOT_CONNECTED;
}
@@ -522,16 +519,13 @@
pending_read_data_.erase(0, read_len);
return read_len;
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_NOT_IMPLEMENTED;
}
- virtual int SetReceiveBufferSize(int32 size) override {
- return ERR_NOT_IMPLEMENTED;
- }
- virtual int SetSendBufferSize(int32 size) override {
- return ERR_NOT_IMPLEMENTED;
- }
+ int SetReceiveBufferSize(int32 size) override { return ERR_NOT_IMPLEMENTED; }
+ int SetSendBufferSize(int32 size) override { return ERR_NOT_IMPLEMENTED; }
void DidRead(const char* data, int data_len) {
if (!read_buf_.get()) {
@@ -547,7 +541,7 @@
}
private:
- virtual ~MockStreamSocket() {}
+ ~MockStreamSocket() override {}
bool connected_;
scoped_refptr<IOBuffer> read_buf_;
@@ -621,7 +615,7 @@
class CloseOnConnectHttpServerTest : public HttpServerTest {
public:
- virtual void OnConnect(int connection_id) override {
+ void OnConnect(int connection_id) override {
connection_ids_.push_back(connection_id);
server_->Close(connection_id);
}
diff --git a/net/server/web_socket.cc b/net/server/web_socket.cc
index 118cdf8..d67ecb6 100644
--- a/net/server/web_socket.cc
+++ b/net/server/web_socket.cc
@@ -54,7 +54,7 @@
return new WebSocketHixie76(server, connection, request, pos);
}
- virtual void Accept(const HttpServerRequestInfo& request) override {
+ void Accept(const HttpServerRequestInfo& request) override {
std::string key1 = request.GetHeaderValue("sec-websocket-key1");
std::string key2 = request.GetHeaderValue("sec-websocket-key2");
@@ -86,7 +86,7 @@
std::string(reinterpret_cast<char*>(digest.a), 16));
}
- virtual ParseResult Read(std::string* message) override {
+ ParseResult Read(std::string* message) override {
DCHECK(message);
HttpConnection::ReadIOBuffer* read_buf = connection_->read_buf();
if (read_buf->StartOfBuffer()[0])
@@ -103,7 +103,7 @@
return FRAME_OK;
}
- virtual void Send(const std::string& message) override {
+ void Send(const std::string& message) override {
char message_start = 0;
char message_end = -1;
server_->SendRaw(connection_->id(), std::string(1, message_start));
@@ -199,7 +199,7 @@
return new WebSocketHybi17(server, connection, request, pos);
}
- virtual void Accept(const HttpServerRequestInfo& request) override {
+ void Accept(const HttpServerRequestInfo& request) override {
static const char* const kWebSocketGuid =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
std::string key = request.GetHeaderValue("sec-websocket-key");
@@ -217,7 +217,7 @@
encoded_hash.c_str()));
}
- virtual ParseResult Read(std::string* message) override {
+ ParseResult Read(std::string* message) override {
HttpConnection::ReadIOBuffer* read_buf = connection_->read_buf();
base::StringPiece frame(read_buf->StartOfBuffer(), read_buf->GetSize());
int bytes_consumed = 0;
@@ -230,7 +230,7 @@
return result;
}
- virtual void Send(const std::string& message) override {
+ void Send(const std::string& message) override {
if (closed_)
return;
server_->SendRaw(connection_->id(),
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index f372aff..51aea71 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -50,24 +50,24 @@
CertDatabase::GetInstance()->AddObserver(this);
}
- virtual ~DefaultClientSocketFactory() {
+ ~DefaultClientSocketFactory() override {
// Note: This code never runs, as the factory is defined as a Leaky
// singleton.
CertDatabase::GetInstance()->RemoveObserver(this);
}
- virtual void OnCertAdded(const X509Certificate* cert) override {
+ void OnCertAdded(const X509Certificate* cert) override {
ClearSSLSessionCache();
}
- virtual void OnCACertChanged(const X509Certificate* cert) override {
+ void OnCACertChanged(const X509Certificate* cert) override {
// Per wtc, we actually only need to flush when trust is reduced.
// Always flush now because OnCACertChanged does not tell us this.
// See comments in ClientSocketPoolManager::OnCACertChanged.
ClearSSLSessionCache();
}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
@@ -76,7 +76,7 @@
new UDPClientSocket(bind_type, rand_int_cb, net_log, source));
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override {
@@ -84,7 +84,7 @@
new TCPClientSocket(addresses, net_log, source));
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -120,9 +120,7 @@
#endif
}
- virtual void ClearSSLSessionCache() override {
- SSLClientSocket::ClearSessionCache();
- }
+ void ClearSSLSessionCache() override { SSLClientSocket::ClearSessionCache(); }
private:
scoped_refptr<base::SequencedWorkerPool> worker_pool_;
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index 715cddb..2a2be36 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -182,7 +182,7 @@
protected:
ClientSocketPool();
- virtual ~ClientSocketPool();
+ ~ClientSocketPool() override;
// Return the connection timeout for this pool.
virtual base::TimeDelta ConnectionTimeout() const = 0;
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 0378c99..ec4e33c 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -219,7 +219,7 @@
base::TimeDelta used_idle_socket_timeout,
ConnectJobFactory* connect_job_factory);
- virtual ~ClientSocketPoolBaseHelper();
+ ~ClientSocketPoolBaseHelper() override;
// Adds a lower layered pool to |this|, and adds |this| as a higher layered
// pool on top of |lower_pool|.
@@ -327,10 +327,10 @@
void EnableConnectBackupJobs();
// ConnectJob::Delegate methods:
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override;
+ void OnConnectJobComplete(int result, ConnectJob* job) override;
// NetworkChangeNotifier::IPAddressObserver methods:
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
private:
friend class base::RefCounted<ClientSocketPoolBaseHelper>;
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 3cafc89..e2666fb 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -128,9 +128,9 @@
}
// Socket implementation.
- virtual int Read(
- IOBuffer* /* buf */, int len,
- const CompletionCallback& /* callback */) override {
+ int Read(IOBuffer* /* buf */,
+ int len,
+ const CompletionCallback& /* callback */) override {
if (has_unread_data_ && len > 0) {
has_unread_data_ = false;
was_used_to_convey_data_ = true;
@@ -139,54 +139,44 @@
return ERR_UNEXPECTED;
}
- virtual int Write(
- IOBuffer* /* buf */, int len,
- const CompletionCallback& /* callback */) override {
+ int Write(IOBuffer* /* buf */,
+ int len,
+ const CompletionCallback& /* callback */) override {
was_used_to_convey_data_ = true;
return len;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
connected_ = true;
return OK;
}
- virtual void Disconnect() override { connected_ = false; }
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override {
+ void Disconnect() override { connected_ = false; }
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override {
return connected_ && !has_unread_data_;
}
- virtual int GetPeerAddress(IPEndPoint* /* address */) const override {
+ int GetPeerAddress(IPEndPoint* /* address */) const override {
return ERR_UNEXPECTED;
}
- virtual int GetLocalAddress(IPEndPoint* /* address */) const override {
+ int GetLocalAddress(IPEndPoint* /* address */) const override {
return ERR_UNEXPECTED;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override {
- return was_used_to_convey_data_;
- }
- virtual bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override {
- return false;
- }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
- return false;
- }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return was_used_to_convey_data_; }
+ bool UsingTCPFastOpen() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
private:
bool connected_;
@@ -203,7 +193,7 @@
public:
MockClientSocketFactory() : allocation_count_(0) {}
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
@@ -212,7 +202,7 @@
return scoped_ptr<DatagramClientSocket>();
}
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* /* net_log */,
const NetLog::Source& /*source*/) override {
@@ -220,7 +210,7 @@
return scoped_ptr<StreamSocket>();
}
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
@@ -229,9 +219,7 @@
return scoped_ptr<SSLClientSocket>();
}
- virtual void ClearSSLSessionCache() override {
- NOTIMPLEMENTED();
- }
+ void ClearSSLSessionCache() override { NOTIMPLEMENTED(); }
void WaitForSignal(TestConnectJob* job) { waiting_jobs_.push_back(job); }
@@ -291,9 +279,9 @@
// From ConnectJob:
- virtual LoadState GetLoadState() const override { return load_state_; }
+ LoadState GetLoadState() const override { return load_state_; }
- virtual void GetAdditionalErrorState(ClientSocketHandle* handle) override {
+ void GetAdditionalErrorState(ClientSocketHandle* handle) override {
if (store_additional_error_state_) {
// Set all of the additional error state fields in some way.
handle->set_is_ssl_error(true);
@@ -306,7 +294,7 @@
private:
// From ConnectJob:
- virtual int ConnectInternal() override {
+ int ConnectInternal() override {
AddressList ignored;
client_socket_factory_->CreateTransportClientSocket(
ignored, NULL, net::NetLog::Source());
@@ -439,7 +427,7 @@
net_log_(net_log) {
}
- virtual ~TestConnectJobFactory() {}
+ ~TestConnectJobFactory() override {}
void set_job_type(TestConnectJob::JobType job_type) { job_type_ = job_type; }
@@ -454,7 +442,7 @@
// ConnectJobFactory implementation.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const TestClientSocketPoolBase::Request& request,
ConnectJob::Delegate* delegate) const override {
@@ -473,7 +461,7 @@
net_log_));
}
- virtual base::TimeDelta ConnectionTimeout() const override {
+ base::TimeDelta ConnectionTimeout() const override {
return timeout_duration_;
}
@@ -502,92 +490,78 @@
unused_idle_socket_timeout, used_idle_socket_timeout,
connect_job_factory) {}
- virtual ~TestClientSocketPool() {}
+ ~TestClientSocketPool() override {}
- virtual int RequestSocket(
- const std::string& group_name,
- const void* params,
- net::RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override {
+ int RequestSocket(const std::string& group_name,
+ const void* params,
+ net::RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override {
const scoped_refptr<TestSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
return base_.RequestSocket(group_name, *casted_socket_params, priority,
handle, callback, net_log);
}
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override {
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override {
const scoped_refptr<TestSocketParams>* casted_params =
static_cast<const scoped_refptr<TestSocketParams>*>(params);
base_.RequestSockets(group_name, *casted_params, num_sockets, net_log);
}
- virtual void CancelRequest(
- const std::string& group_name,
- ClientSocketHandle* handle) override {
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override {
base_.CancelRequest(group_name, handle);
}
- virtual void ReleaseSocket(
- const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override {
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override {
base_.ReleaseSocket(group_name, socket.Pass(), id);
}
- virtual void FlushWithError(int error) override {
- base_.FlushWithError(error);
- }
+ void FlushWithError(int error) override { base_.FlushWithError(error); }
- virtual bool IsStalled() const override {
- return base_.IsStalled();
- }
+ bool IsStalled() const override { return base_.IsStalled(); }
- virtual void CloseIdleSockets() override {
- base_.CloseIdleSockets();
- }
+ void CloseIdleSockets() override { base_.CloseIdleSockets(); }
- virtual int IdleSocketCount() const override {
- return base_.idle_socket_count();
- }
+ int IdleSocketCount() const override { return base_.idle_socket_count(); }
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override {
+ int IdleSocketCountInGroup(const std::string& group_name) const override {
return base_.IdleSocketCountInGroup(group_name);
}
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override {
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override {
return base_.GetLoadState(group_name, handle);
}
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override {
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override {
base_.AddHigherLayeredPool(higher_pool);
}
- virtual void RemoveHigherLayeredPool(
- HigherLayeredPool* higher_pool) override {
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override {
base_.RemoveHigherLayeredPool(higher_pool);
}
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override {
return base_.GetInfoAsValue(name, type);
}
- virtual base::TimeDelta ConnectionTimeout() const override {
+ base::TimeDelta ConnectionTimeout() const override {
return base_.ConnectionTimeout();
}
- virtual ClientSocketPoolHistograms* histograms() const override {
+ ClientSocketPoolHistograms* histograms() const override {
return base_.histograms();
}
@@ -651,9 +625,9 @@
public:
TestConnectJobDelegate()
: have_result_(false), waiting_for_result_(false), result_(OK) {}
- virtual ~TestConnectJobDelegate() {}
+ ~TestConnectJobDelegate() override {}
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override {
+ void OnConnectJobComplete(int result, ConnectJob* job) override {
result_ = result;
scoped_ptr<ConnectJob> owned_job(job);
scoped_ptr<StreamSocket> socket = owned_job->PassSocket();
@@ -1473,7 +1447,7 @@
base::Unretained(this))) {
}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
@@ -2591,7 +2565,7 @@
base::Unretained(this))) {
}
- virtual ~TestReleasingSocketRequest() {}
+ ~TestReleasingSocketRequest() override {}
ClientSocketHandle* handle() { return &handle_; }
@@ -2716,7 +2690,7 @@
base::Unretained(this))) {
}
- virtual ~ConnectWithinCallback() {}
+ ~ConnectWithinCallback() override {}
int WaitForNestedResult() {
return nested_callback_.WaitForResult();
diff --git a/net/socket/client_socket_pool_manager_impl.h b/net/socket/client_socket_pool_manager_impl.h
index 94fd55d..f9f8d3b 100644
--- a/net/socket/client_socket_pool_manager_impl.h
+++ b/net/socket/client_socket_pool_manager_impl.h
@@ -71,31 +71,31 @@
bool enable_ssl_connect_job_waiting,
ProxyDelegate* proxy_delegate,
HttpNetworkSession::SocketPoolType pool_type);
- virtual ~ClientSocketPoolManagerImpl();
+ ~ClientSocketPoolManagerImpl() override;
- virtual void FlushSocketPoolsWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void FlushSocketPoolsWithError(int error) override;
+ void CloseIdleSockets() override;
- virtual TransportClientSocketPool* GetTransportSocketPool() override;
+ TransportClientSocketPool* GetTransportSocketPool() override;
- virtual SSLClientSocketPool* GetSSLSocketPool() override;
+ SSLClientSocketPool* GetSSLSocketPool() override;
- virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
+ SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
const HostPortPair& socks_proxy) override;
- virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
+ HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
const HostPortPair& http_proxy) override;
- virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
+ SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
const HostPortPair& proxy_server) override;
// Creates a Value summary of the state of the socket pools. The caller is
// responsible for deleting the returned value.
- virtual base::Value* SocketPoolInfoToValue() const override;
+ base::Value* SocketPoolInfoToValue() const override;
// CertDatabase::Observer methods:
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
private:
typedef internal::OwnedPoolMap<HostPortPair, TransportClientSocketPool*>
diff --git a/net/socket/mock_client_socket_pool_manager.h b/net/socket/mock_client_socket_pool_manager.h
index 03930e3..76d7704 100644
--- a/net/socket/mock_client_socket_pool_manager.h
+++ b/net/socket/mock_client_socket_pool_manager.h
@@ -14,7 +14,7 @@
class MockClientSocketPoolManager : public ClientSocketPoolManager {
public:
MockClientSocketPoolManager();
- virtual ~MockClientSocketPoolManager();
+ ~MockClientSocketPoolManager() override;
// Sets "override" socket pools that get used instead.
void SetTransportSocketPool(TransportClientSocketPool* pool);
@@ -27,17 +27,17 @@
SSLClientSocketPool* pool);
// ClientSocketPoolManager methods:
- virtual void FlushSocketPoolsWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual TransportClientSocketPool* GetTransportSocketPool() override;
- virtual SSLClientSocketPool* GetSSLSocketPool() override;
- virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
+ void FlushSocketPoolsWithError(int error) override;
+ void CloseIdleSockets() override;
+ TransportClientSocketPool* GetTransportSocketPool() override;
+ SSLClientSocketPool* GetSSLSocketPool() override;
+ SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
const HostPortPair& socks_proxy) override;
- virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
+ HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
const HostPortPair& http_proxy) override;
- virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
+ SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
const HostPortPair& proxy_server) override;
- virtual base::Value* SocketPoolInfoToValue() const override;
+ base::Value* SocketPoolInfoToValue() const override;
private:
typedef internal::OwnedPoolMap<HostPortPair, TransportClientSocketPool*>
diff --git a/net/socket/socket_libevent.h b/net/socket/socket_libevent.h
index a072738..00a0ca6 100644
--- a/net/socket/socket_libevent.h
+++ b/net/socket/socket_libevent.h
@@ -27,7 +27,7 @@
: public base::MessageLoopForIO::Watcher {
public:
SocketLibevent();
- virtual ~SocketLibevent();
+ ~SocketLibevent() override;
// Opens a socket and returns net::OK if |address_family| is AF_INET, AF_INET6
// or AF_UNIX. Otherwise, it does DCHECK() and returns a net error.
@@ -81,8 +81,8 @@
private:
// base::MessageLoopForIO::Watcher methods.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
int DoAccept(scoped_ptr<SocketLibevent>* socket);
void AcceptCompleted();
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 1496aec..7bccdae 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -243,7 +243,7 @@
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~StaticSocketDataProvider();
+ ~StaticSocketDataProvider() override;
// These functions get access to the next available read and write data.
const MockRead& PeekRead() const;
@@ -262,9 +262,9 @@
virtual void CompleteRead() {}
// SocketDataProvider implementation.
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
private:
MockRead* reads_;
@@ -284,7 +284,7 @@
class DynamicSocketDataProvider : public SocketDataProvider {
public:
DynamicSocketDataProvider();
- virtual ~DynamicSocketDataProvider();
+ ~DynamicSocketDataProvider() override;
int short_read_limit() const { return short_read_limit_; }
void set_short_read_limit(int limit) { short_read_limit_ = limit; }
@@ -292,9 +292,9 @@
void allow_unconsumed_reads(bool allow) { allow_unconsumed_reads_ = allow; }
// SocketDataProvider implementation.
- virtual MockRead GetNextRead() override;
+ MockRead GetNextRead() override;
virtual MockWriteResult OnWrite(const std::string& data) = 0;
- virtual void Reset() override;
+ void Reset() override;
protected:
// The next time there is a read from this socket, it will return |data|.
@@ -371,15 +371,15 @@
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~DelayedSocketData();
+ ~DelayedSocketData() override;
void ForceNextRead();
// StaticSocketDataProvider:
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override;
private:
int write_delay_;
@@ -412,7 +412,7 @@
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~OrderedSocketData();
+ ~OrderedSocketData() override;
// |connect| the result for the connect phase.
// |reads| the list of MockRead completions.
@@ -430,10 +430,10 @@
void EndLoop();
// StaticSocketDataProvider:
- virtual MockRead GetNextRead() override;
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override;
+ MockRead GetNextRead() override;
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override;
private:
int sequence_number_;
@@ -536,7 +536,7 @@
size_t reads_count,
MockWrite* writes,
size_t writes_count);
- virtual ~DeterministicSocketData();
+ ~DeterministicSocketData() override;
// Consume all the data up to the give stop point (via SetStop()).
void Run();
@@ -560,14 +560,14 @@
// When the socket calls Read(), that calls GetNextRead(), and expects either
// ERR_IO_PENDING or data.
- virtual MockRead GetNextRead() override;
+ MockRead GetNextRead() override;
// When the socket calls Write(), it always completes synchronously. OnWrite()
// checks to make sure the written data matches the expected data. The
// callback will not be invoked until its sequence number is reached.
- virtual MockWriteResult OnWrite(const std::string& data) override;
- virtual void Reset() override;
- virtual void CompleteRead() override {}
+ MockWriteResult OnWrite(const std::string& data) override;
+ void Reset() override;
+ void CompleteRead() override {}
private:
// Invoke the read and write callbacks, if the timing is appropriate.
@@ -633,7 +633,7 @@
class MockClientSocketFactory : public ClientSocketFactory {
public:
MockClientSocketFactory();
- virtual ~MockClientSocketFactory();
+ ~MockClientSocketFactory() override;
void AddSocketDataProvider(SocketDataProvider* socket);
void AddSSLSocketDataProvider(SSLSocketDataProvider* socket);
@@ -650,21 +650,21 @@
}
// ClientSocketFactory
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
private:
SocketDataProviderArray<SocketDataProvider> mock_data_;
@@ -688,42 +688,41 @@
virtual int Write(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) = 0;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// StreamSocket implementation.
virtual int Connect(const CompletionCallback& callback) = 0;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(const base::Closure& cb) override;
- virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info)
- override;
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& cb) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ ChannelIDService* GetChannelIDService() const override;
protected:
- virtual ~MockClientSocket();
+ ~MockClientSocket() override;
void RunCallbackAsync(const CompletionCallback& callback, int result);
void RunCallback(const CompletionCallback& callback, int result);
// SSLClientSocket implementation.
- virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
+ scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
const override;
// True if Connect completed successfully and Disconnect hasn't been called.
@@ -745,32 +744,32 @@
MockTCPClientSocket(const AddressList& addresses,
net::NetLog* net_log,
SocketDataProvider* socket);
- virtual ~MockTCPClientSocket();
+ ~MockTCPClientSocket() override;
const AddressList& addresses() const { return addresses_; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// AsyncSocket:
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
private:
int CompleteRead();
@@ -851,36 +850,36 @@
public:
DeterministicMockUDPClientSocket(net::NetLog* net_log,
DeterministicSocketData* data);
- virtual ~DeterministicMockUDPClientSocket();
+ ~DeterministicMockUDPClientSocket() override;
// DeterministicSocketData::Delegate:
- virtual bool WritePending() const override;
- virtual bool ReadPending() const override;
- virtual void CompleteWrite() override;
- virtual int CompleteRead() override;
+ bool WritePending() const override;
+ bool ReadPending() const override;
+ void CompleteWrite() override;
+ int CompleteRead() override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// DatagramSocket implementation.
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
+ int Connect(const IPEndPoint& address) override;
// AsyncSocket implementation.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
void set_source_port(int port) { source_port_ = port; }
@@ -902,35 +901,35 @@
public:
DeterministicMockTCPClientSocket(net::NetLog* net_log,
DeterministicSocketData* data);
- virtual ~DeterministicMockTCPClientSocket();
+ ~DeterministicMockTCPClientSocket() override;
// DeterministicSocketData::Delegate:
- virtual bool WritePending() const override;
- virtual bool ReadPending() const override;
- virtual void CompleteWrite() override;
- virtual int CompleteRead() override;
+ bool WritePending() const override;
+ bool ReadPending() const override;
+ void CompleteWrite() override;
+ int CompleteRead() override;
// Socket:
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// StreamSocket:
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// AsyncSocket:
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
private:
DeterministicSocketHelper helper_;
@@ -944,44 +943,43 @@
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
SSLSocketDataProvider* socket);
- virtual ~MockSSLClientSocket();
+ ~MockSSLClientSocket() override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual bool WasNpnNegotiated() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ bool WasNpnNegotiated() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(const base::Closure& cb) override;
- virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info)
- override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual bool set_was_npn_negotiated(bool negotiated) override;
- virtual void set_protocol_negotiated(NextProto protocol_negotiated) override;
- virtual NextProto GetNegotiatedProtocol() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& cb) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ bool set_was_npn_negotiated(bool negotiated) override;
+ void set_protocol_negotiated(NextProto protocol_negotiated) override;
+ NextProto GetNegotiatedProtocol() const override;
// This MockSocket does not implement the manual async IO feature.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
- virtual bool WasChannelIDSent() const override;
- virtual void set_channel_id_sent(bool channel_id_sent) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ bool WasChannelIDSent() const override;
+ void set_channel_id_sent(bool channel_id_sent) override;
+ ChannelIDService* GetChannelIDService() const override;
bool reached_connect() const { return reached_connect_; }
@@ -1028,30 +1026,30 @@
class MockUDPClientSocket : public DatagramClientSocket, public AsyncSocket {
public:
MockUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log);
- virtual ~MockUDPClientSocket();
+ ~MockUDPClientSocket() override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// DatagramSocket implementation.
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
+ int Connect(const IPEndPoint& address) override;
// AsyncSocket implementation.
- virtual void OnReadComplete(const MockRead& data) override;
- virtual void OnConnectComplete(const MockConnect& data) override;
+ void OnReadComplete(const MockRead& data) override;
+ void OnConnectComplete(const MockConnect& data) override;
void set_source_port(int port) { source_port_ = port;}
@@ -1087,7 +1085,7 @@
public:
TestSocketRequest(std::vector<TestSocketRequest*>* request_order,
size_t* completion_count);
- virtual ~TestSocketRequest();
+ ~TestSocketRequest() override;
ClientSocketHandle* handle() { return &handle_; }
@@ -1207,7 +1205,7 @@
ClientSocketPoolHistograms* histograms,
ClientSocketFactory* socket_factory);
- virtual ~MockTransportClientSocketPool();
+ ~MockTransportClientSocketPool() override;
RequestPriority last_request_priority() const {
return last_request_priority_;
@@ -1216,18 +1214,18 @@
int cancel_count() const { return cancel_count_; }
// TransportClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* socket_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
private:
ClientSocketFactory* client_socket_factory_;
@@ -1242,7 +1240,7 @@
class DeterministicMockClientSocketFactory : public ClientSocketFactory {
public:
DeterministicMockClientSocketFactory();
- virtual ~DeterministicMockClientSocketFactory();
+ ~DeterministicMockClientSocketFactory() override;
void AddSocketDataProvider(DeterministicSocketData* socket);
void AddSSLSocketDataProvider(SSLSocketDataProvider* socket);
@@ -1263,21 +1261,21 @@
}
// ClientSocketFactory
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
private:
SocketDataProviderArray<DeterministicSocketData> mock_data_;
@@ -1298,21 +1296,21 @@
ClientSocketPoolHistograms* histograms,
TransportClientSocketPool* transport_pool);
- virtual ~MockSOCKSClientSocketPool();
+ ~MockSOCKSClientSocketPool() override;
// SOCKSClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* socket_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h
index 5d4e060..a405212 100644
--- a/net/socket/socks5_client_socket.h
+++ b/net/socket/socks5_client_socket.h
@@ -38,37 +38,37 @@
const HostResolver::RequestInfo& req_info);
// On destruction Disconnect() is called.
- virtual ~SOCKS5ClientSocket();
+ ~SOCKS5ClientSocket() override;
// StreamSocket implementation.
// Does the SOCKS handshake and completes the protocol.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
private:
enum State {
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index d480de4..e792881 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -35,37 +35,37 @@
HostResolver* host_resolver);
// On destruction Disconnect() is called.
- virtual ~SOCKSClientSocket();
+ ~SOCKSClientSocket() override;
// StreamSocket implementation.
// Does the SOCKS handshake and completes the protocol.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
private:
FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake);
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index d324f0a..35f7146 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -63,10 +63,10 @@
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~SOCKSConnectJob();
+ ~SOCKSConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
private:
enum State {
@@ -90,7 +90,7 @@
// Begins the transport connection and the SOCKS handshake. Returns OK on
// success and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<SOCKSSocketParams> socks_params_;
TransportClientSocketPool* const transport_pool_;
@@ -117,59 +117,57 @@
TransportClientSocketPool* transport_pool,
NetLog* net_log);
- virtual ~SOCKSClientSocketPool();
+ ~SOCKSClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* connect_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* connect_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
- virtual void FlushWithError(int error) override;
+ void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
+ int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// LowerLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
// HigherLayeredPool implementation.
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
private:
typedef ClientSocketPoolBase<SOCKSSocketParams> PoolBase;
@@ -183,15 +181,15 @@
host_resolver_(host_resolver),
net_log_(net_log) {}
- virtual ~SOCKSConnectJobFactory() {}
+ ~SOCKSConnectJobFactory() override {}
// ClientSocketPoolBase::ConnectJobFactory methods.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 84aaf6f..ced7d9e 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -96,12 +96,12 @@
public:
HangingHostResolverWithCancel() : outstanding_request_(NULL) {}
- virtual int Resolve(const RequestInfo& info,
- RequestPriority priority,
- AddressList* addresses,
- const CompletionCallback& callback,
- RequestHandle* out_req,
- const BoundNetLog& net_log) override {
+ int Resolve(const RequestInfo& info,
+ RequestPriority priority,
+ AddressList* addresses,
+ const CompletionCallback& callback,
+ RequestHandle* out_req,
+ const BoundNetLog& net_log) override {
DCHECK(addresses);
DCHECK_EQ(false, callback.is_null());
EXPECT_FALSE(HasOutstandingRequest());
@@ -110,14 +110,14 @@
return ERR_IO_PENDING;
}
- virtual int ResolveFromCache(const RequestInfo& info,
- AddressList* addresses,
- const BoundNetLog& net_log) override {
+ int ResolveFromCache(const RequestInfo& info,
+ AddressList* addresses,
+ const BoundNetLog& net_log) override {
NOTIMPLEMENTED();
return ERR_UNEXPECTED;
}
- virtual void CancelRequest(RequestHandle req) override {
+ void CancelRequest(RequestHandle req) override {
EXPECT_TRUE(HasOutstandingRequest());
EXPECT_EQ(outstanding_request_, req);
outstanding_request_ = NULL;
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index 8f40f84..c6bd366 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -87,8 +87,8 @@
};
// StreamSocket:
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
// Computes a unique key string for the SSL session cache.
virtual std::string GetSessionCacheKey() const = 0;
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index dff457b..49a2b45 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -51,7 +51,7 @@
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context);
- virtual ~SSLClientSocketOpenSSL();
+ ~SSLClientSocketOpenSSL() override;
const HostPortPair& host_and_port() const { return host_and_port_; }
const std::string& ssl_session_cache_shard() const {
@@ -59,48 +59,48 @@
}
// SSLClientSocket implementation.
- virtual std::string GetSessionCacheKey() const override;
- virtual bool InSessionCache() const override;
- virtual void SetHandshakeCompletionCallback(
- const base::Closure& callback) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual NextProtoStatus GetNextProto(std::string* proto) override;
- virtual ChannelIDService* GetChannelIDService() const override;
+ std::string GetSessionCacheKey() const override;
+ bool InSessionCache() const override;
+ void SetHandshakeCompletionCallback(const base::Closure& callback) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ NextProtoStatus GetNextProto(std::string* proto) override;
+ ChannelIDService* GetChannelIDService() const override;
// SSLSocket implementation.
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
protected:
// SSLClientSocket implementation.
- virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
+ scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
const override;
private:
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 5854015..c7f613e 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -194,12 +194,12 @@
const GetMessengerCallback& get_messenger_callback,
Delegate* delegate,
NetLog* net_log);
- virtual ~SSLConnectJob();
+ ~SSLConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
- virtual void GetAdditionalErrorState(ClientSocketHandle * handle) override;
+ void GetAdditionalErrorState(ClientSocketHandle* handle) override;
private:
enum State {
@@ -242,7 +242,7 @@
// Starts the SSL connection process. Returns OK on success and
// ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
scoped_refptr<SSLSocketParams> params_;
TransportClientSocketPool* const transport_pool_;
@@ -294,59 +294,57 @@
bool enable_ssl_connect_job_waiting,
NetLog* net_log);
- virtual ~SSLClientSocketPool();
+ ~SSLClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* connect_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
+ int RequestSocket(const std::string& group_name,
+ const void* connect_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
- virtual void FlushWithError(int error) override;
+ void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
+ void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
+ int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// LowerLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
// HigherLayeredPool implementation.
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
// Gets the SSLConnectJobMessenger for the given ssl session |cache_key|. If
// none exits, it creates one and stores it in |messenger_map_|.
@@ -363,7 +361,7 @@
// When the user changes the SSL config, we flush all idle sockets so they
// won't get re-used.
- virtual void OnSSLConfigChanged() override;
+ void OnSSLConfigChanged() override;
class SSLConnectJobFactory : public PoolBase::ConnectJobFactory {
public:
@@ -377,15 +375,15 @@
const SSLConnectJob::GetMessengerCallback& get_messenger_callback,
NetLog* net_log);
- virtual ~SSLConnectJobFactory();
+ ~SSLConnectJobFactory() override;
// ClientSocketPoolBase::ConnectJobFactory methods.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
private:
TransportClientSocketPool* const transport_pool_;
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 58e43c7..13a3863 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -57,65 +57,57 @@
public:
explicit WrappedStreamSocket(scoped_ptr<StreamSocket> transport)
: transport_(transport.Pass()) {}
- virtual ~WrappedStreamSocket() {}
+ ~WrappedStreamSocket() override {}
// StreamSocket implementation:
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return transport_->Connect(callback);
}
- virtual void Disconnect() override { transport_->Disconnect(); }
- virtual bool IsConnected() const override {
- return transport_->IsConnected();
- }
- virtual bool IsConnectedAndIdle() const override {
+ void Disconnect() override { transport_->Disconnect(); }
+ bool IsConnected() const override { return transport_->IsConnected(); }
+ bool IsConnectedAndIdle() const override {
return transport_->IsConnectedAndIdle();
}
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
return transport_->GetPeerAddress(address);
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return transport_->GetLocalAddress(address);
}
- virtual const BoundNetLog& NetLog() const override {
- return transport_->NetLog();
- }
- virtual void SetSubresourceSpeculation() override {
+ const BoundNetLog& NetLog() const override { return transport_->NetLog(); }
+ void SetSubresourceSpeculation() override {
transport_->SetSubresourceSpeculation();
}
- virtual void SetOmniboxSpeculation() override {
- transport_->SetOmniboxSpeculation();
- }
- virtual bool WasEverUsed() const override {
- return transport_->WasEverUsed();
- }
- virtual bool UsingTCPFastOpen() const override {
+ void SetOmniboxSpeculation() override { transport_->SetOmniboxSpeculation(); }
+ bool WasEverUsed() const override { return transport_->WasEverUsed(); }
+ bool UsingTCPFastOpen() const override {
return transport_->UsingTCPFastOpen();
}
- virtual bool WasNpnNegotiated() const override {
+ bool WasNpnNegotiated() const override {
return transport_->WasNpnNegotiated();
}
- virtual NextProto GetNegotiatedProtocol() const override {
+ NextProto GetNegotiatedProtocol() const override {
return transport_->GetNegotiatedProtocol();
}
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
+ bool GetSSLInfo(SSLInfo* ssl_info) override {
return transport_->GetSSLInfo(ssl_info);
}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return transport_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return transport_->Write(buf, buf_len, callback);
}
- virtual int SetReceiveBufferSize(int32 size) override {
+ int SetReceiveBufferSize(int32 size) override {
return transport_->SetReceiveBufferSize(size);
}
- virtual int SetSendBufferSize(int32 size) override {
+ int SetSendBufferSize(int32 size) override {
return transport_->SetSendBufferSize(size);
}
@@ -132,12 +124,12 @@
class ReadBufferingStreamSocket : public WrappedStreamSocket {
public:
explicit ReadBufferingStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~ReadBufferingStreamSocket() {}
+ ~ReadBufferingStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Sets the internal buffer to |size|. This must not be greater than
// the largest value supplied to Read() - that is, it does not handle
@@ -262,15 +254,15 @@
class SynchronousErrorStreamSocket : public WrappedStreamSocket {
public:
explicit SynchronousErrorStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~SynchronousErrorStreamSocket() {}
+ ~SynchronousErrorStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Sets the next Read() call and all future calls to return |error|.
// If there is already a pending asynchronous read, the configured error
@@ -333,15 +325,15 @@
class FakeBlockingStreamSocket : public WrappedStreamSocket {
public:
explicit FakeBlockingStreamSocket(scoped_ptr<StreamSocket> transport);
- virtual ~FakeBlockingStreamSocket() {}
+ ~FakeBlockingStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
// Blocks read results on the socket. Reads will not complete until
// UnblockReadResult() has been called and a result is ready from the
@@ -549,18 +541,18 @@
: WrappedStreamSocket(transport.Pass()),
read_count_(0),
write_count_(0) {}
- virtual ~CountingStreamSocket() {}
+ ~CountingStreamSocket() override {}
// Socket implementation:
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
read_count_++;
return transport_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
write_count_++;
return transport_->Write(buf, buf_len, callback);
}
@@ -581,7 +573,7 @@
: socket_(socket),
callback_(base::Bind(&DeleteSocketCallback::OnComplete,
base::Unretained(this))) {}
- virtual ~DeleteSocketCallback() {}
+ ~DeleteSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
@@ -605,62 +597,58 @@
// A ChannelIDStore that always returns an error when asked for a
// channel id.
class FailingChannelIDStore : public ChannelIDStore {
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override {
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override {
return ERR_UNEXPECTED;
}
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {}
- virtual void DeleteChannelID(const std::string& server_identifier,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAllCreatedBetween(base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAll(const base::Closure& completion_callback) override {}
- virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback)
- override {}
- virtual int GetChannelIDCount() override { return 0; }
- virtual void SetForceKeepSessionState() override {}
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {}
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback) override {}
+ void DeleteAllCreatedBetween(
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion_callback) override {}
+ void DeleteAll(const base::Closure& completion_callback) override {}
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override {}
+ int GetChannelIDCount() override { return 0; }
+ void SetForceKeepSessionState() override {}
};
// A ChannelIDStore that asynchronously returns an error when asked for a
// channel id.
class AsyncFailingChannelIDStore : public ChannelIDStore {
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override {
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, ERR_UNEXPECTED,
server_identifier, base::Time(), "", ""));
return ERR_IO_PENDING;
}
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {}
- virtual void DeleteChannelID(const std::string& server_identifier,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAllCreatedBetween(base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& completion_callback)
- override {}
- virtual void DeleteAll(const base::Closure& completion_callback) override {}
- virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback)
- override {}
- virtual int GetChannelIDCount() override { return 0; }
- virtual void SetForceKeepSessionState() override {}
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {}
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback) override {}
+ void DeleteAllCreatedBetween(
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion_callback) override {}
+ void DeleteAll(const base::Closure& completion_callback) override {}
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override {}
+ int GetChannelIDCount() override { return 0; }
+ void SetForceKeepSessionState() override {}
};
// A mock CTVerifier that records every call to Verify but doesn't verify
diff --git a/net/socket/ssl_server_socket.h b/net/socket/ssl_server_socket.h
index 8b607bf..88f7f94 100644
--- a/net/socket/ssl_server_socket.h
+++ b/net/socket/ssl_server_socket.h
@@ -23,7 +23,7 @@
class SSLServerSocket : public SSLSocket {
public:
- virtual ~SSLServerSocket() {}
+ ~SSLServerSocket() override {}
// Perform the SSL server handshake, and notify the supplied callback
// if the process completes asynchronously. If Disconnect is called before
diff --git a/net/socket/ssl_server_socket_openssl.h b/net/socket/ssl_server_socket_openssl.h
index 379ca57..c58bd56 100644
--- a/net/socket/ssl_server_socket_openssl.h
+++ b/net/socket/ssl_server_socket_openssl.h
@@ -30,42 +30,44 @@
scoped_refptr<X509Certificate> certificate,
crypto::RSAPrivateKey* key,
const SSLConfig& ssl_config);
- virtual ~SSLServerSocketOpenSSL();
+ ~SSLServerSocketOpenSSL() override;
// SSLServerSocket interface.
- virtual int Handshake(const CompletionCallback& callback) override;
+ int Handshake(const CompletionCallback& callback) override;
// SSLSocket interface.
- virtual int ExportKeyingMaterial(const base::StringPiece& label,
- bool has_context,
- const base::StringPiece& context,
- unsigned char* out,
- unsigned int outlen) override;
- virtual int GetTLSUniqueChannelBinding(std::string* out) override;
+ int ExportKeyingMaterial(const base::StringPiece& label,
+ bool has_context,
+ const base::StringPiece& context,
+ unsigned char* out,
+ unsigned int outlen) override;
+ int GetTLSUniqueChannelBinding(std::string* out) override;
// Socket interface (via StreamSocket).
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
private:
enum State {
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 1d70258..e9957f5 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -167,87 +167,65 @@
outgoing_(outgoing_channel) {
}
- virtual ~FakeSocket() {
- }
+ ~FakeSocket() override {}
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Read random number of bytes.
buf_len = rand() % buf_len + 1;
return incoming_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Write random number of bytes.
buf_len = rand() % buf_len + 1;
return outgoing_->Write(buf, buf_len, callback);
}
- virtual int SetReceiveBufferSize(int32 size) override {
- return OK;
- }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override {
- return OK;
- }
+ int SetSendBufferSize(int32 size) override { return OK; }
- virtual int Connect(const CompletionCallback& callback) override {
- return OK;
- }
+ int Connect(const CompletionCallback& callback) override { return OK; }
- virtual void Disconnect() override {
+ void Disconnect() override {
incoming_->Close();
outgoing_->Close();
}
- virtual bool IsConnected() const override {
- return true;
- }
+ bool IsConnected() const override { return true; }
- virtual bool IsConnectedAndIdle() const override {
- return true;
- }
+ bool IsConnectedAndIdle() const override { return true; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(kIPv4AddressSize);
*address = IPEndPoint(ip_address, 0 /*port*/);
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(4);
*address = IPEndPoint(ip_address, 0);
return OK;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override {
- return true;
- }
+ bool WasEverUsed() const override { return true; }
- virtual bool UsingTCPFastOpen() const override {
- return false;
- }
+ bool UsingTCPFastOpen() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
- virtual bool WasNpnNegotiated() const override {
- return false;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
-
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
- return false;
- }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
private:
BoundNetLog net_log_;
diff --git a/net/socket/ssl_socket.h b/net/socket/ssl_socket.h
index 68d1e4a..0dc817b 100644
--- a/net/socket/ssl_socket.h
+++ b/net/socket/ssl_socket.h
@@ -15,7 +15,7 @@
// and server SSL sockets.
class NET_EXPORT SSLSocket : public StreamSocket {
public:
- virtual ~SSLSocket() {}
+ ~SSLSocket() override {}
// Exports data derived from the SSL master-secret (see RFC 5705).
// If |has_context| is false, uses the no-context construction from the
diff --git a/net/socket/stream_listen_socket.h b/net/socket/stream_listen_socket.h
index ead35c4..f8f9419 100644
--- a/net/socket/stream_listen_socket.h
+++ b/net/socket/stream_listen_socket.h
@@ -47,7 +47,7 @@
#endif
public:
- virtual ~StreamListenSocket();
+ ~StreamListenSocket() override;
// TODO(erikkay): this delegate should really be split into two parts
// to split up the listener from the connected socket. Perhaps this class
@@ -116,8 +116,8 @@
HANDLE socket_event_;
#elif defined(OS_POSIX)
// Called by MessagePumpLibevent when the socket is ready to do I/O.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
- virtual void OnFileCanWriteWithoutBlocking(int fd) override;
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
WaitState wait_state_;
// The socket's libevent wrapper.
base::MessageLoopForIO::FileDescriptorWatcher watcher_;
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h
index 7631e12..b41fed8 100644
--- a/net/socket/stream_socket.h
+++ b/net/socket/stream_socket.h
@@ -17,7 +17,7 @@
class NET_EXPORT_PRIVATE StreamSocket : public Socket {
public:
- virtual ~StreamSocket() {}
+ ~StreamSocket() override {}
// Called to establish a connection. Returns OK if the connection could be
// established synchronously. Otherwise, ERR_IO_PENDING is returned and the
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
index 1672a95..0deec2a 100644
--- a/net/socket/tcp_client_socket.h
+++ b/net/socket/tcp_client_socket.h
@@ -32,37 +32,39 @@
TCPClientSocket(scoped_ptr<TCPSocket> connected_socket,
const IPEndPoint& peer_address);
- virtual ~TCPClientSocket();
+ ~TCPClientSocket() override;
// Binds the socket to a local IP address and port.
int Bind(const IPEndPoint& address);
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual void EnableTCPFastOpenIfSupported() override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ void EnableTCPFastOpenIfSupported() override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
// Multiple outstanding requests are not supported.
// Full duplex mode (reading and writing at the same time) is supported.
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
virtual bool SetKeepAlive(bool enable, int delay);
virtual bool SetNoDelay(bool no_delay);
diff --git a/net/socket/tcp_listen_socket.h b/net/socket/tcp_listen_socket.h
index d726dcc..1702e50 100644
--- a/net/socket/tcp_listen_socket.h
+++ b/net/socket/tcp_listen_socket.h
@@ -17,7 +17,7 @@
// Implements a TCP socket.
class NET_EXPORT TCPListenSocket : public StreamListenSocket {
public:
- virtual ~TCPListenSocket();
+ ~TCPListenSocket() override;
// Listen on port for the specified IP address. Use 127.0.0.1 to only
// accept local connections.
static scoped_ptr<TCPListenSocket> CreateAndListen(
@@ -34,7 +34,7 @@
TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del);
// Implements StreamListenSocket::Accept.
- virtual void Accept() override;
+ void Accept() override;
private:
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
@@ -44,10 +44,10 @@
class NET_EXPORT TCPListenSocketFactory : public StreamListenSocketFactory {
public:
TCPListenSocketFactory(const std::string& ip, int port);
- virtual ~TCPListenSocketFactory();
+ ~TCPListenSocketFactory() override;
// StreamListenSocketFactory overrides.
- virtual scoped_ptr<StreamListenSocket> CreateAndListen(
+ scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const override;
private:
diff --git a/net/socket/tcp_listen_socket_unittest.h b/net/socket/tcp_listen_socket_unittest.h
index 9393370..984442a 100644
--- a/net/socket/tcp_listen_socket_unittest.h
+++ b/net/socket/tcp_listen_socket_unittest.h
@@ -90,11 +90,12 @@
virtual bool Send(SocketDescriptor sock, const std::string& str);
// StreamListenSocket::Delegate:
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override;
- virtual void DidRead(StreamListenSocket* connection, const char* data,
- int len) override;
- virtual void DidClose(StreamListenSocket* sock) override;
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override;
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int len) override;
+ void DidClose(StreamListenSocket* sock) override;
scoped_ptr<base::Thread> thread_;
base::MessageLoopForIO* loop_;
@@ -111,7 +112,7 @@
private:
friend class base::RefCountedThreadSafe<TCPListenSocketTester>;
- virtual ~TCPListenSocketTester();
+ ~TCPListenSocketTester() override;
virtual scoped_ptr<TCPListenSocket> DoListen();
diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h
index 9fc719a..a3919e6 100644
--- a/net/socket/tcp_server_socket.h
+++ b/net/socket/tcp_server_socket.h
@@ -19,13 +19,13 @@
class NET_EXPORT_PRIVATE TCPServerSocket : public ServerSocket {
public:
TCPServerSocket(NetLog* net_log, const NetLog::Source& source);
- virtual ~TCPServerSocket();
+ ~TCPServerSocket() override;
// net::ServerSocket implementation.
- virtual int Listen(const IPEndPoint& address, int backlog) override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int Accept(scoped_ptr<StreamSocket>* socket,
- const CompletionCallback& callback) override;
+ int Listen(const IPEndPoint& address, int backlog) override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int Accept(scoped_ptr<StreamSocket>* socket,
+ const CompletionCallback& callback) override;
private:
// Converts |accepted_socket_| and stores the result in
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h
index 14af726..15cef5c 100644
--- a/net/socket/transport_client_socket_pool.h
+++ b/net/socket/transport_client_socket_pool.h
@@ -164,10 +164,10 @@
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log);
- virtual ~TransportConnectJob();
+ ~TransportConnectJob() override;
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
// Rolls |addrlist| forward until the first IPv4 address, if any.
// WARNING: this method should only be used to implement the prefer-IPv4 hack.
@@ -194,7 +194,7 @@
// Begins the host resolution and the TCP connect. Returns OK on success
// and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
TransportConnectJobHelper helper_;
@@ -223,43 +223,41 @@
ClientSocketFactory* client_socket_factory,
NetLog* net_log);
- virtual ~TransportClientSocketPool();
+ ~TransportClientSocketPool() override;
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* resolve_info,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
- virtual void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ int RequestSocket(const std::string& group_name,
+ const void* resolve_info,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
+ void FlushWithError(int error) override;
+ void CloseIdleSockets() override;
+ int IdleSocketCount() const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ base::TimeDelta ConnectionTimeout() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// HigherLayeredPool implementation.
- virtual bool IsStalled() const override;
- virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
- virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ bool IsStalled() const override;
+ void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override;
+ void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
protected:
// Methods shared with WebSocketTransportClientSocketPool
@@ -280,16 +278,16 @@
host_resolver_(host_resolver),
net_log_(net_log) {}
- virtual ~TransportConnectJobFactory() {}
+ ~TransportConnectJobFactory() override {}
// ClientSocketPoolBase::ConnectJobFactory methods.
- virtual scoped_ptr<ConnectJob> NewConnectJob(
+ scoped_ptr<ConnectJob> NewConnectJob(
const std::string& group_name,
const PoolBase::Request& request,
ConnectJob::Delegate* delegate) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
+ base::TimeDelta ConnectionTimeout() const override;
private:
ClientSocketFactory* const client_socket_factory_;
diff --git a/net/socket/transport_client_socket_pool_test_util.cc b/net/socket/transport_client_socket_pool_test_util.cc
index bfe6922..82ed8e6 100644
--- a/net/socket/transport_client_socket_pool_test_util.cc
+++ b/net/socket/transport_client_socket_pool_test_util.cc
@@ -38,19 +38,19 @@
use_tcp_fastopen_(false) {}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
connected_ = true;
return OK;
}
- virtual void Disconnect() override { connected_ = false; }
- virtual bool IsConnected() const override { return connected_; }
- virtual bool IsConnectedAndIdle() const override { return connected_; }
+ void Disconnect() override { connected_ = false; }
+ bool IsConnected() const override { return connected_; }
+ bool IsConnectedAndIdle() const override { return connected_; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
*address = addrlist_.front();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!connected_)
return ERR_SOCKET_NOT_CONNECTED;
if (addrlist_.front().GetFamily() == ADDRESS_FAMILY_IPV4)
@@ -59,34 +59,30 @@
SetIPv6Address(address);
return OK;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
bool connected_;
@@ -105,49 +101,45 @@
use_tcp_fastopen_(false) {}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_CONNECTION_FAILED;
}
- virtual void Disconnect() override {}
+ void Disconnect() override {}
- virtual bool IsConnected() const override { return false; }
- virtual bool IsConnectedAndIdle() const override { return false; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return false; }
+ bool IsConnectedAndIdle() const override { return false; }
+ int GetPeerAddress(IPEndPoint* address) const override {
return ERR_UNEXPECTED;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
return ERR_UNEXPECTED;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
const AddressList addrlist_;
@@ -211,21 +203,21 @@
}
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
DCHECK(callback_.is_null());
callback_ = callback;
return ERR_IO_PENDING;
}
- virtual void Disconnect() override {}
+ void Disconnect() override {}
- virtual bool IsConnected() const override { return is_connected_; }
- virtual bool IsConnectedAndIdle() const override { return is_connected_; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ bool IsConnected() const override { return is_connected_; }
+ bool IsConnectedAndIdle() const override { return is_connected_; }
+ int GetPeerAddress(IPEndPoint* address) const override {
*address = addrlist_.front();
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
if (!is_connected_)
return ERR_SOCKET_NOT_CONNECTED;
if (addrlist_.front().GetFamily() == ADDRESS_FAMILY_IPV4)
@@ -234,35 +226,31 @@
SetIPv6Address(address);
return OK;
}
- virtual const BoundNetLog& NetLog() const override { return net_log_; }
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
- virtual bool WasEverUsed() const override { return false; }
- virtual void EnableTCPFastOpenIfSupported() override {
- use_tcp_fastopen_ = true;
- }
- virtual bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
- virtual bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
+ bool WasEverUsed() const override { return false; }
+ void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
+ bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
+ bool WasNpnNegotiated() const override { return false; }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override { return OK; }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
+ int SetSendBufferSize(int32 size) override { return OK; }
private:
void DoCallback() {
diff --git a/net/socket/transport_client_socket_pool_test_util.h b/net/socket/transport_client_socket_pool_test_util.h
index b4adb71..b375353 100644
--- a/net/socket/transport_client_socket_pool_test_util.h
+++ b/net/socket/transport_client_socket_pool_test_util.h
@@ -67,26 +67,26 @@
};
explicit MockTransportClientSocketFactory(NetLog* net_log);
- virtual ~MockTransportClientSocketFactory();
+ ~MockTransportClientSocketFactory() override;
- virtual scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
+ scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
DatagramSocket::BindType bind_type,
const RandIntCallback& rand_int_cb,
NetLog* net_log,
const NetLog::Source& source) override;
- virtual scoped_ptr<StreamSocket> CreateTransportClientSocket(
+ scoped_ptr<StreamSocket> CreateTransportClientSocket(
const AddressList& addresses,
NetLog* /* net_log */,
const NetLog::Source& /* source */) override;
- virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
+ scoped_ptr<SSLClientSocket> CreateSSLClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const SSLClientSocketContext& context) override;
- virtual void ClearSSLSessionCache() override;
+ void ClearSSLSessionCache() override;
int allocation_count() const { return allocation_count_; }
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index 2a05b44..e3e9873 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -465,7 +465,7 @@
base::Unretained(this))) {
}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 8bfb674..ed68bf1 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -47,19 +47,19 @@
}
// Implement StreamListenSocket::Delegate methods
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override {
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override {
connected_sock_.reset(
static_cast<TCPListenSocket*>(connection.release()));
}
- virtual void DidRead(StreamListenSocket*, const char* str, int len) override {
+ void DidRead(StreamListenSocket*, const char* str, int len) override {
// TODO(dkegel): this might not be long enough to tickle some bugs.
connected_sock_->Send(kServerReply, arraysize(kServerReply) - 1,
false /* Don't append line feed */);
if (close_server_socket_on_next_send_)
CloseServerSocket();
}
- virtual void DidClose(StreamListenSocket* sock) override {}
+ void DidClose(StreamListenSocket* sock) override {}
// Testcase hooks
virtual void SetUp();
diff --git a/net/socket/unix_domain_client_socket_posix.h b/net/socket/unix_domain_client_socket_posix.h
index e70694a..2a8bdb6 100644
--- a/net/socket/unix_domain_client_socket_posix.h
+++ b/net/socket/unix_domain_client_socket_posix.h
@@ -32,7 +32,7 @@
// UnixDomainServerSocket uses this after it accepts a connection.
explicit UnixDomainClientSocket(scoped_ptr<SocketLibevent> socket);
- virtual ~UnixDomainClientSocket();
+ ~UnixDomainClientSocket() override;
// Fills |address| with |socket_path| and its length. For Android or Linux
// platform, this supports abstract namespaces.
@@ -41,28 +41,30 @@
SockaddrStorage* address);
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
// Releases ownership of underlying SocketDescriptor to caller.
// Internal state is reset so that this object can be used again.
diff --git a/net/socket/unix_domain_listen_socket_posix.h b/net/socket/unix_domain_listen_socket_posix.h
index 8b9ba8e..b8f428d 100644
--- a/net/socket/unix_domain_listen_socket_posix.h
+++ b/net/socket/unix_domain_listen_socket_posix.h
@@ -30,7 +30,7 @@
public:
typedef UnixDomainServerSocket::AuthCallback AuthCallback;
- virtual ~UnixDomainListenSocket();
+ ~UnixDomainListenSocket() override;
// Note that the returned UnixDomainListenSocket instance does not take
// ownership of |del|.
@@ -64,7 +64,7 @@
bool use_abstract_namespace);
// StreamListenSocket:
- virtual void Accept() override;
+ void Accept() override;
AuthCallback auth_callback_;
@@ -79,10 +79,10 @@
UnixDomainListenSocketFactory(
const std::string& path,
const UnixDomainListenSocket::AuthCallback& auth_callback);
- virtual ~UnixDomainListenSocketFactory();
+ ~UnixDomainListenSocketFactory() override;
// StreamListenSocketFactory:
- virtual scoped_ptr<StreamListenSocket> CreateAndListen(
+ scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const override;
protected:
diff --git a/net/socket/unix_domain_listen_socket_posix_unittest.cc b/net/socket/unix_domain_listen_socket_posix_unittest.cc
index bea60c6..bfa9200 100644
--- a/net/socket/unix_domain_listen_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_listen_socket_posix_unittest.cc
@@ -94,16 +94,16 @@
const scoped_refptr<EventManager>& event_manager)
: event_manager_(event_manager) {}
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override {
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override {
LOG(ERROR) << __PRETTY_FUNCTION__;
connection_ = connection.Pass();
Notify(EVENT_ACCEPT);
}
- virtual void DidRead(StreamListenSocket* connection,
- const char* data,
- int len) override {
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int len) override {
{
base::AutoLock lock(mutex_);
DCHECK(len);
@@ -112,9 +112,7 @@
Notify(EVENT_READ);
}
- virtual void DidClose(StreamListenSocket* sock) override {
- Notify(EVENT_CLOSE);
- }
+ void DidClose(StreamListenSocket* sock) override { Notify(EVENT_CLOSE); }
void OnListenCompleted() {
Notify(EVENT_LISTEN);
diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h
index 8fd8b34..0a26eb3 100644
--- a/net/socket/unix_domain_server_socket_posix.h
+++ b/net/socket/unix_domain_server_socket_posix.h
@@ -44,20 +44,20 @@
UnixDomainServerSocket(const AuthCallback& auth_callack,
bool use_abstract_namespace);
- virtual ~UnixDomainServerSocket();
+ ~UnixDomainServerSocket() override;
// Gets credentials of peer to check permissions.
static bool GetPeerCredentials(SocketDescriptor socket_fd,
Credentials* credentials);
// ServerSocket implementation.
- virtual int Listen(const IPEndPoint& address, int backlog) override;
- virtual int ListenWithAddressAndPort(const std::string& unix_domain_path,
- int port_unused,
- int backlog) override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int Accept(scoped_ptr<StreamSocket>* socket,
- const CompletionCallback& callback) override;
+ int Listen(const IPEndPoint& address, int backlog) override;
+ int ListenWithAddressAndPort(const std::string& unix_domain_path,
+ int port_unused,
+ int backlog) override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int Accept(scoped_ptr<StreamSocket>* socket,
+ const CompletionCallback& callback) override;
// Accepts an incoming connection on |listen_socket_|, but passes back
// a raw SocketDescriptor instead of a StreamSocket.
diff --git a/net/socket/websocket_endpoint_lock_manager_unittest.cc b/net/socket/websocket_endpoint_lock_manager_unittest.cc
index cafd1aa..01c9dbc 100644
--- a/net/socket/websocket_endpoint_lock_manager_unittest.cc
+++ b/net/socket/websocket_endpoint_lock_manager_unittest.cc
@@ -22,57 +22,51 @@
FakeStreamSocket() {}
// StreamSocket implementation
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual void Disconnect() override { return; }
+ void Disconnect() override { return; }
- virtual bool IsConnected() const override { return false; }
+ bool IsConnected() const override { return false; }
- virtual bool IsConnectedAndIdle() const override { return false; }
+ bool IsConnectedAndIdle() const override { return false; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
- return ERR_FAILED;
- }
+ int GetPeerAddress(IPEndPoint* address) const override { return ERR_FAILED; }
- virtual int GetLocalAddress(IPEndPoint* address) const override {
- return ERR_FAILED;
- }
+ int GetLocalAddress(IPEndPoint* address) const override { return ERR_FAILED; }
- virtual const BoundNetLog& NetLog() const override { return bound_net_log_; }
+ const BoundNetLog& NetLog() const override { return bound_net_log_; }
- virtual void SetSubresourceSpeculation() override { return; }
- virtual void SetOmniboxSpeculation() override { return; }
+ void SetSubresourceSpeculation() override { return; }
+ void SetOmniboxSpeculation() override { return; }
- virtual bool WasEverUsed() const override { return false; }
+ bool WasEverUsed() const override { return false; }
- virtual bool UsingTCPFastOpen() const override { return false; }
+ bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override { return false; }
+ bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
// Socket implementation
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_FAILED;
}
- virtual int SetReceiveBufferSize(int32 size) override { return ERR_FAILED; }
+ int SetReceiveBufferSize(int32 size) override { return ERR_FAILED; }
- virtual int SetSendBufferSize(int32 size) override { return ERR_FAILED; }
+ int SetSendBufferSize(int32 size) override { return ERR_FAILED; }
private:
BoundNetLog bound_net_log_;
@@ -84,7 +78,7 @@
public:
FakeWaiter() : called_(false) {}
- virtual void GotEndpointLock() override {
+ void GotEndpointLock() override {
CHECK(!called_);
called_ = true;
}
diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h
index e918354..f0a94be 100644
--- a/net/socket/websocket_transport_client_socket_pool.h
+++ b/net/socket/websocket_transport_client_socket_pool.h
@@ -53,7 +53,7 @@
Delegate* delegate,
NetLog* pool_net_log,
const BoundNetLog& request_net_log);
- virtual ~WebSocketTransportConnectJob();
+ ~WebSocketTransportConnectJob() override;
// Unlike normal socket pools, the WebSocketTransportClientPool uses
// early-binding of sockets.
@@ -65,7 +65,7 @@
const BoundNetLog& request_net_log() const { return request_net_log_; }
// ConnectJob methods.
- virtual LoadState GetLoadState() const override;
+ LoadState GetLoadState() const override;
private:
friend class WebSocketTransportConnectSubJob;
@@ -90,7 +90,7 @@
// Begins the host resolution and the TCP connect. Returns OK on success
// and ERR_IO_PENDING if it cannot immediately service the request.
// Otherwise, it returns a net error code.
- virtual int ConnectInternal() override;
+ int ConnectInternal() override;
TransportConnectJobHelper helper_;
@@ -123,7 +123,7 @@
ClientSocketFactory* client_socket_factory,
NetLog* net_log);
- virtual ~WebSocketTransportClientSocketPool();
+ ~WebSocketTransportClientSocketPool() override;
// Allow another connection to be started to the IPEndPoint that this |handle|
// is connected to. Used when the WebSocket handshake completes successfully.
@@ -133,46 +133,44 @@
static void UnlockEndpoint(ClientSocketHandle* handle);
// ClientSocketPool implementation.
- virtual int RequestSocket(const std::string& group_name,
- const void* resolve_info,
- RequestPriority priority,
- ClientSocketHandle* handle,
- const CompletionCallback& callback,
- const BoundNetLog& net_log) override;
- virtual void RequestSockets(const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) override;
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle) override;
- virtual void ReleaseSocket(const std::string& group_name,
- scoped_ptr<StreamSocket> socket,
- int id) override;
- virtual void FlushWithError(int error) override;
- virtual void CloseIdleSockets() override;
- virtual int IdleSocketCount() const override;
- virtual int IdleSocketCountInGroup(
- const std::string& group_name) const override;
- virtual LoadState GetLoadState(
- const std::string& group_name,
- const ClientSocketHandle* handle) const override;
- virtual base::DictionaryValue* GetInfoAsValue(
+ int RequestSocket(const std::string& group_name,
+ const void* resolve_info,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) override;
+ void RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(const std::string& group_name,
+ ClientSocketHandle* handle) override;
+ void ReleaseSocket(const std::string& group_name,
+ scoped_ptr<StreamSocket> socket,
+ int id) override;
+ void FlushWithError(int error) override;
+ void CloseIdleSockets() override;
+ int IdleSocketCount() const override;
+ int IdleSocketCountInGroup(const std::string& group_name) const override;
+ LoadState GetLoadState(const std::string& group_name,
+ const ClientSocketHandle* handle) const override;
+ base::DictionaryValue* GetInfoAsValue(
const std::string& name,
const std::string& type,
bool include_nested_pools) const override;
- virtual base::TimeDelta ConnectionTimeout() const override;
- virtual ClientSocketPoolHistograms* histograms() const override;
+ base::TimeDelta ConnectionTimeout() const override;
+ ClientSocketPoolHistograms* histograms() const override;
// HigherLayeredPool implementation.
- virtual bool IsStalled() const override;
+ bool IsStalled() const override;
private:
class ConnectJobDelegate : public ConnectJob::Delegate {
public:
explicit ConnectJobDelegate(WebSocketTransportClientSocketPool* owner);
- virtual ~ConnectJobDelegate();
+ ~ConnectJobDelegate() override;
- virtual void OnConnectJobComplete(int result, ConnectJob* job) override;
+ void OnConnectJobComplete(int result, ConnectJob* job) override;
private:
WebSocketTransportClientSocketPool* owner_;
diff --git a/net/socket/websocket_transport_client_socket_pool_unittest.cc b/net/socket/websocket_transport_client_socket_pool_unittest.cc
index bfb2090..4d04c10 100644
--- a/net/socket/websocket_transport_client_socket_pool_unittest.cc
+++ b/net/socket/websocket_transport_client_socket_pool_unittest.cc
@@ -382,7 +382,7 @@
callback_(base::Bind(&RequestSocketCallback::OnComplete,
base::Unretained(this))) {}
- virtual ~RequestSocketCallback() {}
+ ~RequestSocketCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/socket/websocket_transport_connect_sub_job.h b/net/socket/websocket_transport_connect_sub_job.h
index e6f81e8..5709a46 100644
--- a/net/socket/websocket_transport_connect_sub_job.h
+++ b/net/socket/websocket_transport_connect_sub_job.h
@@ -33,7 +33,7 @@
WebSocketTransportConnectJob* parent_job,
SubJobType type);
- virtual ~WebSocketTransportConnectSubJob();
+ ~WebSocketTransportConnectSubJob() override;
// Start connecting.
int Start();
@@ -47,7 +47,7 @@
scoped_ptr<StreamSocket> PassSocket() { return transport_socket_.Pass(); }
// Implementation of WebSocketEndpointLockManager::EndpointWaiter.
- virtual void GotEndpointLock() override;
+ void GotEndpointLock() override;
private:
enum State {
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index c9de0c1..7387eb6 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -212,7 +212,7 @@
std::string headers_;
private:
- virtual ~RequestHeaders();
+ ~RequestHeaders() override;
};
class ResponseHeaders : public IOBuffer {
@@ -225,7 +225,7 @@
void Realloc(size_t new_size);
private:
- virtual ~ResponseHeaders();
+ ~ResponseHeaders() override;
scoped_ptr<char, base::FreeDeleter> headers_;
};
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index 7c4b50e..6d47086 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -59,7 +59,7 @@
// with the error code.
explicit SocketStreamEventRecorder(const CompletionCallback& callback)
: callback_(callback) {}
- virtual ~SocketStreamEventRecorder() {}
+ ~SocketStreamEventRecorder() override {}
void SetOnStartOpenConnection(
const base::Callback<int(SocketStreamEvent*)>& callback) {
@@ -88,9 +88,8 @@
on_error_ = callback;
}
- virtual int OnStartOpenConnection(
- SocketStream* socket,
- const CompletionCallback& callback) override {
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override {
connection_callback_ = callback;
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
@@ -99,8 +98,8 @@
return on_start_open_connection_.Run(&events_.back());
return OK;
}
- virtual void OnConnected(SocketStream* socket,
- int num_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int num_pending_send_allowed) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_CONNECTED,
socket, num_pending_send_allowed, std::string(),
@@ -108,23 +107,23 @@
if (!on_connected_.is_null())
on_connected_.Run(&events_.back());
}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_SENT_DATA, socket,
amount_sent, std::string(), NULL, OK));
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_RECEIVED_DATA, socket, len,
std::string(data, len), NULL, OK));
if (!on_received_data_.is_null())
on_received_data_.Run(&events_.back());
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_CLOSE, socket, 0,
std::string(), NULL, OK));
@@ -133,15 +132,15 @@
if (!callback_.is_null())
callback_.Run(OK);
}
- virtual void OnAuthRequired(SocketStream* socket,
- AuthChallengeInfo* auth_info) override {
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_AUTH_REQUIRED, socket, 0,
std::string(), auth_info, OK));
if (!on_auth_required_.is_null())
on_auth_required_.Run(&events_.back());
}
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
events_.push_back(
SocketStreamEvent(SocketStreamEvent::EVENT_ERROR, NULL, 0,
std::string(), NULL, error));
@@ -195,10 +194,10 @@
explicit SelfDeletingDelegate(const CompletionCallback& callback)
: socket_stream_(), callback_(callback) {}
- virtual ~SelfDeletingDelegate() {}
+ ~SelfDeletingDelegate() override {}
// Call DetachDelegate(), delete |this|, then run the callback.
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
// callback_ will be deleted when we delete |this|, so copy it to call it
// afterwards.
CompletionCallback callback = callback_;
@@ -214,18 +213,19 @@
EXPECT_EQ(socket_stream_->delegate(), this);
}
- virtual void OnConnected(SocketStream* socket, int max_pending_send_allowed)
- override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
ADD_FAILURE() << "OnConnected() should not be called";
}
- virtual void OnSentData(SocketStream* socket, int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
ADD_FAILURE() << "OnSentData() should not be called";
}
- virtual void OnReceivedData(SocketStream* socket, const char* data, int len)
- override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
ADD_FAILURE() << "OnReceivedData() should not be called";
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
ADD_FAILURE() << "OnClose() should not be called";
}
@@ -243,18 +243,17 @@
context_storage_.set_proxy_service(ProxyService::CreateFixed(proxy));
Init();
}
- virtual ~TestURLRequestContextWithProxy() {}
+ ~TestURLRequestContextWithProxy() override {}
};
class TestSocketStreamNetworkDelegate : public TestNetworkDelegate {
public:
TestSocketStreamNetworkDelegate()
: before_connect_result_(OK) {}
- virtual ~TestSocketStreamNetworkDelegate() {}
+ ~TestSocketStreamNetworkDelegate() override {}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return before_connect_result_;
}
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h
index fba98d7..02fa583 100644
--- a/net/spdy/buffered_spdy_framer.h
+++ b/net/spdy/buffered_spdy_framer.h
@@ -121,7 +121,7 @@
public:
BufferedSpdyFramer(SpdyMajorVersion version,
bool enable_compression);
- virtual ~BufferedSpdyFramer();
+ ~BufferedSpdyFramer() override;
// Sets callbacks to be called from the buffered spdy framer. A visitor must
// be set, or else the framer will likely crash. It is acceptable for the
@@ -135,41 +135,39 @@
void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor);
// SpdyFramerVisitorInterface
- virtual void OnError(SpdyFramer* spdy_framer) override;
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override;
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override;
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override;
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override;
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override;
- virtual void OnSettings(bool clear_persisted) override;
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override;
- virtual void OnSettingsAck() override;
- virtual void OnSettingsEnd() override;
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override;
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override;
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override;
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override;
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override;
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override;
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override;
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
+ void OnError(SpdyFramer* spdy_framer) override;
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override;
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override;
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override;
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override;
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override;
+ void OnSettings(bool clear_persisted) override;
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override;
+ void OnSettingsAck() override;
+ void OnSettingsEnd() override;
+ void OnPing(SpdyPingId unique_id, bool is_ack) override;
+ void OnRstStream(SpdyStreamId stream_id, SpdyRstStreamStatus status) override;
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override;
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override;
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override;
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override;
+ void OnContinuation(SpdyStreamId stream_id, bool end) override;
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
// SpdyFramer methods.
size_t ProcessInput(const char* data, size_t len);
diff --git a/net/spdy/buffered_spdy_framer_unittest.cc b/net/spdy/buffered_spdy_framer_unittest.cc
index 0fc758b..6be20dd 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -25,79 +25,74 @@
promised_stream_id_(static_cast<SpdyStreamId>(-1)) {
}
- virtual void OnError(SpdyFramer::SpdyError error_code) override {
+ void OnError(SpdyFramer::SpdyError error_code) override {
LOG(INFO) << "SpdyFramer Error: " << error_code;
error_count_++;
}
- virtual void OnStreamError(
- SpdyStreamId stream_id,
- const std::string& description) override {
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override {
LOG(INFO) << "SpdyFramer Error on stream: " << stream_id << " "
<< description;
error_count_++;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
syn_frame_count_++;
headers_ = headers;
}
- virtual void OnSynReply(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
syn_reply_frame_count_++;
headers_ = headers;
}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
headers_frame_count_++;
headers_ = headers;
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
ADD_FAILURE() << "Unexpected OnDataFrameHeader call.";
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
LOG(FATAL) << "Unexpected OnStreamFrameData call.";
}
- virtual void OnSettings(bool clear_persisted) override {}
+ void OnSettings(bool clear_persisted) override {}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
setting_count_++;
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {}
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
- }
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
- }
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {}
bool OnCredentialFrameData(const char*, size_t) {
LOG(FATAL) << "Unexpected OnCredentialFrameData call.";
@@ -111,12 +106,12 @@
void OnRstStream(const SpdyFrame& frame) {}
void OnGoAway(const SpdyFrame& frame) {}
void OnPing(const SpdyFrame& frame) {}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {}
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
EXPECT_NE(header_stream_id_, SpdyFramer::kInvalidStream);
push_promise_frame_count_++;
@@ -125,7 +120,7 @@
headers_ = headers;
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
return true;
}
diff --git a/net/spdy/spdy_buffer.cc b/net/spdy/spdy_buffer.cc
index 0a69cd3..c1a602e 100644
--- a/net/spdy/spdy_buffer.cc
+++ b/net/spdy/spdy_buffer.cc
@@ -45,7 +45,7 @@
offset_(offset) {}
private:
- virtual ~SharedFrameIOBuffer() {
+ ~SharedFrameIOBuffer() override {
// Prevent ~IOBuffer() from trying to delete |data_|.
data_ = NULL;
}
diff --git a/net/spdy/spdy_buffer_producer.h b/net/spdy/spdy_buffer_producer.h
index d8777af..d098bb9 100644
--- a/net/spdy/spdy_buffer_producer.h
+++ b/net/spdy/spdy_buffer_producer.h
@@ -35,9 +35,9 @@
public:
explicit SimpleBufferProducer(scoped_ptr<SpdyBuffer> buffer);
- virtual ~SimpleBufferProducer();
+ ~SimpleBufferProducer() override;
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override;
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override;
private:
scoped_ptr<SpdyBuffer> buffer_;
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 6affd7b..9d7ea87 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -2839,53 +2839,50 @@
class FrameSerializationVisitor : public SpdyFrameVisitor {
public:
explicit FrameSerializationVisitor(SpdyFramer* framer) : framer_(framer) {}
- virtual ~FrameSerializationVisitor() {}
+ ~FrameSerializationVisitor() override {}
SpdySerializedFrame* ReleaseSerializedFrame() { return frame_.release(); }
- virtual void VisitData(const SpdyDataIR& data) override {
+ void VisitData(const SpdyDataIR& data) override {
frame_.reset(framer_->SerializeData(data));
}
- virtual void VisitSynStream(const SpdySynStreamIR& syn_stream) override {
+ void VisitSynStream(const SpdySynStreamIR& syn_stream) override {
frame_.reset(framer_->SerializeSynStream(syn_stream));
}
- virtual void VisitSynReply(const SpdySynReplyIR& syn_reply) override {
+ void VisitSynReply(const SpdySynReplyIR& syn_reply) override {
frame_.reset(framer_->SerializeSynReply(syn_reply));
}
- virtual void VisitRstStream(const SpdyRstStreamIR& rst_stream) override {
+ void VisitRstStream(const SpdyRstStreamIR& rst_stream) override {
frame_.reset(framer_->SerializeRstStream(rst_stream));
}
- virtual void VisitSettings(const SpdySettingsIR& settings) override {
+ void VisitSettings(const SpdySettingsIR& settings) override {
frame_.reset(framer_->SerializeSettings(settings));
}
- virtual void VisitPing(const SpdyPingIR& ping) override {
+ void VisitPing(const SpdyPingIR& ping) override {
frame_.reset(framer_->SerializePing(ping));
}
- virtual void VisitGoAway(const SpdyGoAwayIR& goaway) override {
+ void VisitGoAway(const SpdyGoAwayIR& goaway) override {
frame_.reset(framer_->SerializeGoAway(goaway));
}
- virtual void VisitHeaders(const SpdyHeadersIR& headers) override {
+ void VisitHeaders(const SpdyHeadersIR& headers) override {
frame_.reset(framer_->SerializeHeaders(headers));
}
- virtual void VisitWindowUpdate(
- const SpdyWindowUpdateIR& window_update) override {
+ void VisitWindowUpdate(const SpdyWindowUpdateIR& window_update) override {
frame_.reset(framer_->SerializeWindowUpdate(window_update));
}
- virtual void VisitBlocked(const SpdyBlockedIR& blocked) override {
+ void VisitBlocked(const SpdyBlockedIR& blocked) override {
frame_.reset(framer_->SerializeBlocked(blocked));
}
- virtual void VisitPushPromise(
- const SpdyPushPromiseIR& push_promise) override {
+ void VisitPushPromise(const SpdyPushPromiseIR& push_promise) override {
frame_.reset(framer_->SerializePushPromise(push_promise));
}
- virtual void VisitContinuation(
- const SpdyContinuationIR& continuation) override {
+ void VisitContinuation(const SpdyContinuationIR& continuation) override {
frame_.reset(framer_->SerializeContinuation(continuation));
}
- virtual void VisitAltSvc(const SpdyAltSvcIR& altsvc) override {
+ void VisitAltSvc(const SpdyAltSvcIR& altsvc) override {
frame_.reset(framer_->SerializeAltSvc(altsvc));
}
- virtual void VisitPriority(const SpdyPriorityIR& priority) override {
+ void VisitPriority(const SpdyPriorityIR& priority) override {
frame_.reset(framer_->SerializePriority(priority));
}
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 982e75c..35b8a46 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -82,22 +82,22 @@
buffer_.reset(new char[kMaxDecompressedSize]);
}
- virtual void OnError(SpdyFramer* framer) override { LOG(FATAL); }
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnError(SpdyFramer* framer) override { LOG(FATAL); }
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
LOG(FATAL) << "Unexpected data frame header";
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
LOG(FATAL);
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
CHECK(buffer_.get() != NULL);
CHECK_GE(kMaxDecompressedSize, size_ + len);
CHECK(!finished_);
@@ -111,11 +111,11 @@
return true;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdySynStreamIR syn_stream(stream_id);
@@ -129,7 +129,7 @@
size_ += framer.GetSynStreamMinimumSize();
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
@@ -140,27 +140,21 @@
size_ += framer.GetSynStreamMinimumSize();
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
LOG(FATAL);
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
LOG(FATAL);
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
- LOG(FATAL);
- }
- virtual void OnSettingsEnd() override { LOG(FATAL); }
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnPing(SpdyPingId unique_id, bool is_ack) override { LOG(FATAL); }
+ void OnSettingsEnd() override { LOG(FATAL); }
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
LOG(FATAL);
}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
@@ -175,9 +169,9 @@
LOG(FATAL);
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyPushPromiseIR push_promise(stream_id, promised_stream_id);
@@ -187,19 +181,18 @@
size_ += framer.GetPushPromiseMinimumSize();
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
LOG(FATAL);
}
- virtual void OnPriority(SpdyStreamId stream_id,
- SpdyStreamId parent_stream_id,
- uint8 weight,
- bool exclusive) override {
+ void OnPriority(SpdyStreamId stream_id,
+ SpdyStreamId parent_stream_id,
+ uint8 weight,
+ bool exclusive) override {
// Do nothing.
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id,
- int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
LOG(FATAL);
return false;
}
@@ -209,8 +202,8 @@
return buffer_.release();
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
LOG(FATAL);
}
@@ -277,23 +270,23 @@
header_control_type_(DATA),
header_buffer_valid_(false) {}
- virtual void OnError(SpdyFramer* f) override {
+ void OnError(SpdyFramer* f) override {
LOG(INFO) << "SpdyFramer Error: "
<< SpdyFramer::ErrorCodeToString(f->error_code());
++error_count_;
}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {
++data_frame_count_;
header_stream_id_ = stream_id;
}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {
EXPECT_EQ(header_stream_id_, stream_id);
if (len == 0)
++zero_length_data_frame_count_;
@@ -308,9 +301,9 @@
std::cerr << "\", " << len << ")\n";
}
- virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id,
- const char* header_data,
- size_t len) override {
+ bool OnControlFrameHeaderData(SpdyStreamId stream_id,
+ const char* header_data,
+ size_t len) override {
++control_frame_header_data_count_;
CHECK_EQ(header_stream_id_, stream_id);
if (len == 0) {
@@ -335,11 +328,11 @@
return true;
}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional) override {
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional) override {
++syn_frame_count_;
if (framer_.protocol_version() > SPDY3) {
InitHeaderStreaming(HEADERS, stream_id);
@@ -351,7 +344,7 @@
}
}
- virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ void OnSynReply(SpdyStreamId stream_id, bool fin) override {
++syn_reply_frame_count_;
if (framer_.protocol_version() > SPDY3) {
InitHeaderStreaming(HEADERS, stream_id);
@@ -363,45 +356,40 @@
}
}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {
++fin_frame_count_;
}
- virtual bool OnRstStreamFrameData(const char* rst_stream_data,
- size_t len) override {
+ bool OnRstStreamFrameData(const char* rst_stream_data, size_t len) override {
if ((rst_stream_data != NULL) && (len > 0)) {
fin_opaque_data_ += std::string(rst_stream_data, len);
}
return true;
}
- virtual void OnSetting(SpdySettingsIds id,
- uint8 flags,
- uint32 value) override {
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
++setting_count_;
}
- virtual void OnSettingsAck() override {
+ void OnSettingsAck() override {
DCHECK_LT(SPDY3, framer_.protocol_version());
++settings_ack_received_;
}
- virtual void OnSettingsEnd() override {
+ void OnSettingsEnd() override {
if (framer_.protocol_version() <= SPDY3) { return; }
++settings_ack_sent_;
}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {
- DLOG(FATAL);
- }
+ void OnPing(SpdyPingId unique_id, bool is_ack) override { DLOG(FATAL); }
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {
++goaway_count_;
}
- virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override {
++headers_frame_count_;
InitHeaderStreaming(HEADERS, stream_id);
if (fin) {
@@ -409,31 +397,31 @@
}
}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {
last_window_update_stream_ = stream_id;
last_window_update_delta_ = delta_window_size;
}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- bool end) override {
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ bool end) override {
++push_promise_frame_count_;
InitHeaderStreaming(PUSH_PROMISE, stream_id);
last_push_promise_stream_ = stream_id;
last_push_promise_promised_stream_ = promised_stream_id;
}
- virtual void OnContinuation(SpdyStreamId stream_id, bool end) override {
+ void OnContinuation(SpdyStreamId stream_id, bool end) override {
++continuation_count_;
}
- virtual void OnAltSvc(SpdyStreamId stream_id,
- uint32 max_age,
- uint16 port,
- StringPiece protocol_id,
- StringPiece host,
- StringPiece origin) override {
+ void OnAltSvc(SpdyStreamId stream_id,
+ uint32 max_age,
+ uint16 port,
+ StringPiece protocol_id,
+ StringPiece host,
+ StringPiece origin) override {
test_altsvc_ir_.set_stream_id(stream_id);
test_altsvc_ir_.set_max_age(max_age);
test_altsvc_ir_.set_port(port);
@@ -445,29 +433,29 @@
++altsvc_count_;
}
- virtual void OnPriority(SpdyStreamId stream_id,
- SpdyStreamId parent_stream_id,
- uint8 weight,
- bool exclusive) override {
+ void OnPriority(SpdyStreamId stream_id,
+ SpdyStreamId parent_stream_id,
+ uint8 weight,
+ bool exclusive) override {
++priority_count_;
}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
DLOG(INFO) << "Unknown frame type " << frame_type;
return on_unknown_frame_result_;
}
- virtual void OnSendCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override {
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override {
last_payload_len_ = payload_len;
last_frame_len_ = frame_len;
}
- virtual void OnReceiveCompressedFrame(SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override {
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override {
last_frame_len_ = frame_len;
}
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index fe3c87d..db84be1 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -32,7 +32,7 @@
public:
// |spdy_session| must not be NULL.
SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session, bool direct);
- virtual ~SpdyHttpStream();
+ ~SpdyHttpStream() override;
SpdyStream* stream() { return stream_.get(); }
@@ -41,47 +41,45 @@
// HttpStream implementation.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
- virtual HttpStream* RenewStreamForAuth() override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
+ int SendRequest(const HttpRequestHeaders& headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ UploadProgress GetUploadProgress() const override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override;
+ HttpStream* RenewStreamForAuth() override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
// Must not be called if a NULL SpdySession was pssed into the
// constructor.
- virtual bool IsConnectionReused() const override;
+ bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual bool GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
- virtual void SetPriority(RequestPriority priority) override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
// Must be called only when |request_info_| is non-NULL.
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index fc1b165..58dc73b 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1545,7 +1545,7 @@
base::Unretained(this))) {
}
- virtual ~KillerCallback() {}
+ ~KillerCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index cb9bdfe..c408f0a 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -559,7 +559,7 @@
// to them.
class NET_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
public:
- virtual ~SpdyFrameWithStreamIdIR() {}
+ ~SpdyFrameWithStreamIdIR() override {}
SpdyStreamId stream_id() const { return stream_id_; }
void set_stream_id(SpdyStreamId stream_id) {
DCHECK_EQ(0u, stream_id & ~kStreamIdMask);
@@ -581,7 +581,7 @@
// flag. Implies SpdyFrameWithStreamIdIR.
class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR {
public:
- virtual ~SpdyFrameWithFinIR() {}
+ ~SpdyFrameWithFinIR() override {}
bool fin() const { return fin_; }
void set_fin(bool fin) { fin_ = fin; }
@@ -618,7 +618,7 @@
protected:
explicit SpdyFrameWithNameValueBlockIR(SpdyStreamId stream_id);
- virtual ~SpdyFrameWithNameValueBlockIR();
+ ~SpdyFrameWithNameValueBlockIR() override;
private:
SpdyNameValueBlock name_value_block_;
@@ -635,7 +635,7 @@
// Use in conjunction with SetDataShallow() for shallow-copy on data.
explicit SpdyDataIR(SpdyStreamId stream_id);
- virtual ~SpdyDataIR();
+ ~SpdyDataIR() override;
base::StringPiece data() const { return data_; }
@@ -663,7 +663,7 @@
data_ = data;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
// Used to store data that this SpdyDataIR should own.
@@ -698,7 +698,7 @@
unidirectional_ = unidirectional;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId associated_to_stream_id_;
@@ -713,7 +713,7 @@
explicit SpdySynReplyIR(SpdyStreamId stream_id)
: SpdyFrameWithNameValueBlockIR(stream_id) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
DISALLOW_COPY_AND_ASSIGN(SpdySynReplyIR);
@@ -724,7 +724,7 @@
SpdyRstStreamIR(SpdyStreamId stream_id, SpdyRstStreamStatus status,
base::StringPiece description);
- virtual ~SpdyRstStreamIR();
+ ~SpdyRstStreamIR() override;
SpdyRstStreamStatus status() const {
return status_;
@@ -739,7 +739,7 @@
description_ = description;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyRstStreamStatus status_;
@@ -763,7 +763,7 @@
SpdySettingsIR();
- virtual ~SpdySettingsIR();
+ ~SpdySettingsIR() override;
// Overwrites as appropriate.
const ValueMap& values() const { return values_; }
@@ -785,7 +785,7 @@
is_ack_ = is_ack;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
ValueMap values_;
@@ -804,7 +804,7 @@
bool is_ack() const { return is_ack_; }
void set_is_ack(bool is_ack) { is_ack_ = is_ack; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyPingId id_;
@@ -817,7 +817,7 @@
public:
SpdyGoAwayIR(SpdyStreamId last_good_stream_id, SpdyGoAwayStatus status,
const base::StringPiece& description);
- virtual ~SpdyGoAwayIR();
+ ~SpdyGoAwayIR() override;
SpdyStreamId last_good_stream_id() const { return last_good_stream_id_; }
void set_last_good_stream_id(SpdyStreamId last_good_stream_id) {
DCHECK_LE(0u, last_good_stream_id);
@@ -832,7 +832,7 @@
const base::StringPiece& description() const;
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId last_good_stream_id_;
@@ -849,7 +849,7 @@
has_priority_(false),
priority_(0) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
bool has_priority() const { return has_priority_; }
void set_has_priority(bool has_priority) { has_priority_ = has_priority; }
@@ -876,7 +876,7 @@
delta_ = delta;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
int32 delta_;
@@ -890,7 +890,7 @@
explicit SpdyBlockedIR(SpdyStreamId stream_id)
: SpdyFrameWithStreamIdIR(stream_id) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
DISALLOW_COPY_AND_ASSIGN(SpdyBlockedIR);
@@ -905,7 +905,7 @@
SpdyStreamId promised_stream_id() const { return promised_stream_id_; }
void set_promised_stream_id(SpdyStreamId id) { promised_stream_id_ = id; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId promised_stream_id_;
@@ -921,7 +921,7 @@
: SpdyFrameWithNameValueBlockIR(stream_id),
end_headers_(false) {}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
bool end_headers() const { return end_headers_; }
void set_end_headers(bool end_headers) {end_headers_ = end_headers;}
@@ -955,7 +955,7 @@
origin_ = origin;
}
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
uint32 max_age_;
@@ -980,7 +980,7 @@
bool exclusive() const { return exclusive_; }
void set_exclusive(bool exclusive) { exclusive_ = exclusive; }
- virtual void Visit(SpdyFrameVisitor* visitor) const override;
+ void Visit(SpdyFrameVisitor* visitor) const override;
private:
SpdyStreamId parent_stream_id_;
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index 3b0736c..806af73 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -54,50 +54,49 @@
// On destruction Disconnect() is called.
- virtual ~SpdyProxyClientSocket();
+ ~SpdyProxyClientSocket() override;
// ProxyClientSocket methods:
- virtual const HttpResponseInfo* GetConnectResponseInfo() const override;
- virtual HttpStream* CreateConnectResponseStream() override;
- virtual const scoped_refptr<HttpAuthController>& GetAuthController() const
- override;
- virtual int RestartWithAuth(const CompletionCallback& callback) override;
- virtual bool IsUsingSpdy() const override;
- virtual NextProto GetProtocolNegotiated() const override;
+ const HttpResponseInfo* GetConnectResponseInfo() const override;
+ HttpStream* CreateConnectResponseStream() override;
+ const scoped_refptr<HttpAuthController>& GetAuthController() const override;
+ int RestartWithAuth(const CompletionCallback& callback) override;
+ bool IsUsingSpdy() const override;
+ NextProto GetProtocolNegotiated() const override;
// StreamSocket implementation.
- virtual int Connect(const CompletionCallback& callback) override;
- virtual void Disconnect() override;
- virtual bool IsConnected() const override;
- virtual bool IsConnectedAndIdle() const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void SetSubresourceSpeculation() override;
- virtual void SetOmniboxSpeculation() override;
- virtual bool WasEverUsed() const override;
- virtual bool UsingTCPFastOpen() const override;
- virtual bool WasNpnNegotiated() const override;
- virtual NextProto GetNegotiatedProtocol() const override;
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override;
+ int Connect(const CompletionCallback& callback) override;
+ void Disconnect() override;
+ bool IsConnected() const override;
+ bool IsConnectedAndIdle() const override;
+ const BoundNetLog& NetLog() const override;
+ void SetSubresourceSpeculation() override;
+ void SetOmniboxSpeculation() override;
+ bool WasEverUsed() const override;
+ bool UsingTCPFastOpen() const override;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
+ bool GetSSLInfo(SSLInfo* ssl_info) override;
// Socket implementation.
- virtual int Read(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
enum State {
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 13e6624..26785c6 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -1317,8 +1317,7 @@
base::Unretained(this))) {
}
- virtual ~DeleteSockCallback() {
- }
+ ~DeleteSockCallback() override {}
const CompletionCallback& callback() const { return callback_; }
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 293ed2b..ef2d8fe 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -250,7 +250,7 @@
const HostPortPair& trusted_spdy_proxy,
NetLog* net_log);
- virtual ~SpdySession();
+ ~SpdySession() override;
const HostPortPair& host_port_pair() const {
return spdy_session_key_.host_port_proxy_pair().first;
@@ -517,7 +517,7 @@
base::WeakPtr<SpdySession> GetWeakPtr();
// HigherLayeredPool implementation:
- virtual bool CloseOneIdleConnection() override;
+ bool CloseOneIdleConnection() override;
private:
friend class base::RefCounted<SpdySession>;
@@ -813,55 +813,49 @@
void DeleteExpiredPushedStreams();
// BufferedSpdyFramerVisitorInterface:
- virtual void OnError(SpdyFramer::SpdyError error_code) override;
- virtual void OnStreamError(SpdyStreamId stream_id,
- const std::string& description) override;
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override;
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override;
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override;
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override;
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override;
- virtual void OnSettings(bool clear_persisted) override;
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override;
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override;
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override;
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override;
- virtual void OnSynReply(
- SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override;
- virtual void OnHeaders(
- SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override;
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
+ void OnError(SpdyFramer::SpdyError error_code) override;
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override;
+ void OnPing(SpdyPingId unique_id, bool is_ack) override;
+ void OnRstStream(SpdyStreamId stream_id, SpdyRstStreamStatus status) override;
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override;
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override;
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override;
+ void OnSettings(bool clear_persisted) override;
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override;
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override;
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override;
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override;
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override;
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override;
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
// SpdyFramerDebugVisitorInterface
- virtual void OnSendCompressedFrame(
- SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t payload_len,
- size_t frame_len) override;
- virtual void OnReceiveCompressedFrame(
- SpdyStreamId stream_id,
- SpdyFrameType type,
- size_t frame_len) override;
+ void OnSendCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t payload_len,
+ size_t frame_len) override;
+ void OnReceiveCompressedFrame(SpdyStreamId stream_id,
+ SpdyFrameType type,
+ size_t frame_len) override;
// Called when bytes are consumed from a SpdyBuffer for a DATA frame
// that is to be written or is being written. Increases the send
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index de2ddfa..32b4ee3 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -61,7 +61,7 @@
size_t max_concurrent_streams_limit,
SpdySessionPool::TimeFunc time_func,
const std::string& trusted_spdy_proxy);
- virtual ~SpdySessionPool();
+ ~SpdySessionPool() override;
// In the functions below, a session is "available" if this pool has
// a reference to it and there is some SpdySessionKey for which
@@ -133,19 +133,19 @@
// We flush all idle sessions and release references to the active ones so
// they won't get re-used. The active ones will either complete successfully
// or error out due to the IP address change.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// SSLConfigService::Observer methods:
// We perform the same flushing as described above when SSL settings change.
- virtual void OnSSLConfigChanged() override;
+ void OnSSLConfigChanged() override;
// CertDatabase::Observer methods:
// We perform the same flushing as described above when certificate database
// is changed.
- virtual void OnCertAdded(const X509Certificate* cert) override;
- virtual void OnCACertChanged(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
+ void OnCACertChanged(const X509Certificate* cert) override;
private:
friend class SpdySessionPoolPeer; // For testing.
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 0a9903c..fef27bf 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -62,20 +62,20 @@
: spdy_session_pool_(spdy_session_pool),
key_(key) {}
- virtual ~SessionOpeningDelegate() {}
+ ~SessionOpeningDelegate() override {}
- virtual void OnRequestHeadersSent() override {}
+ void OnRequestHeadersSent() override {}
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override {
return RESPONSE_HEADERS_ARE_COMPLETE;
}
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
- virtual void OnDataSent() override {}
+ void OnDataSent() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_));
}
diff --git a/net/spdy/spdy_session_test_util.h b/net/spdy/spdy_session_test_util.h
index cc3f136..dcb1733 100644
--- a/net/spdy/spdy_session_test_util.h
+++ b/net/spdy/spdy_session_test_util.h
@@ -26,11 +26,11 @@
// function = "DoFoo"
SpdySessionTestTaskObserver(const std::string& file_name,
const std::string& function_name);
- virtual ~SpdySessionTestTaskObserver();
+ ~SpdySessionTestTaskObserver() override;
// Implements MessageLoop::TaskObserver.
- virtual void WillProcessTask(const base::PendingTask& pending_task) override;
- virtual void DidProcessTask(const base::PendingTask& pending_task) override;
+ void WillProcessTask(const base::PendingTask& pending_task) override;
+ void DidProcessTask(const base::PendingTask& pending_task) override;
// Returns the number of tasks posted by the given function and file.
uint16 executed_count() const { return executed_count_; }
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 914f6fe..e56d9ef 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -207,7 +207,7 @@
public:
StreamRequestDestroyingCallback() {}
- virtual ~StreamRequestDestroyingCallback() {}
+ ~StreamRequestDestroyingCallback() override {}
void SetRequestToDestroy(scoped_ptr<SpdyStreamRequest> request) {
request_ = request.Pass();
@@ -2303,9 +2303,9 @@
: StreamDelegateDoNothing(stream),
session_to_close_(session_to_close) {}
- virtual ~SessionClosingDelegate() {}
+ ~SessionClosingDelegate() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
session_to_close_->CloseSessionOnError(ERR_SPDY_PROTOCOL_ERROR, "Error");
}
@@ -3379,9 +3379,9 @@
: StreamDelegateDoNothing(stream),
session_(session) {}
- virtual ~StreamCreatingDelegate() {}
+ ~StreamCreatingDelegate() override {}
- virtual void OnClose(int status) override {
+ void OnClose(int status) override {
GURL url(kDefaultURL);
ignore_result(
CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
@@ -3658,10 +3658,10 @@
base::StringPiece data)
: StreamDelegateSendImmediate(stream, data) {}
- virtual ~DropReceivedDataDelegate() {}
+ ~DropReceivedDataDelegate() override {}
// Drop any received data.
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
};
// Send data back and forth but use a delegate that drops its received
@@ -4243,13 +4243,13 @@
base::StringPiece data)
: StreamDelegateWithBody(stream, data) {}
- virtual ~StreamClosingDelegate() {}
+ ~StreamClosingDelegate() override {}
void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) {
stream_to_close_ = stream_to_close;
}
- virtual void OnDataSent() override {
+ void OnDataSent() override {
test::StreamDelegateWithBody::OnDataSent();
if (stream_to_close_.get()) {
stream_to_close_->Close();
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 6de0a39..e7dcd5b 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -61,9 +61,9 @@
DCHECK(stream_.get());
}
- virtual ~SynStreamBufferProducer() {}
+ ~SynStreamBufferProducer() override {}
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override {
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override {
if (!stream_.get()) {
NOTREACHED();
return scoped_ptr<SpdyBuffer>();
diff --git a/net/spdy/spdy_stream_test_util.h b/net/spdy/spdy_stream_test_util.h
index 7df12e8..16f4efb 100644
--- a/net/spdy/spdy_stream_test_util.h
+++ b/net/spdy/spdy_stream_test_util.h
@@ -23,15 +23,15 @@
class ClosingDelegate : public SpdyStream::Delegate {
public:
explicit ClosingDelegate(const base::WeakPtr<SpdyStream>& stream);
- virtual ~ClosingDelegate();
+ ~ClosingDelegate() override;
// SpdyStream::Delegate implementation.
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
// Returns whether or not the stream is closed.
bool StreamIsClosed() const { return !stream_.get(); }
@@ -45,14 +45,14 @@
class StreamDelegateBase : public SpdyStream::Delegate {
public:
explicit StreamDelegateBase(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateBase();
+ ~StreamDelegateBase() override;
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
// Waits for the stream to be closed and returns the status passed
// to OnClose().
@@ -89,7 +89,7 @@
class StreamDelegateDoNothing : public StreamDelegateBase {
public:
StreamDelegateDoNothing(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateDoNothing();
+ ~StreamDelegateDoNothing() override;
};
// Test delegate that sends data immediately in OnResponseHeadersUpdated().
@@ -98,9 +98,9 @@
// |data| can be NULL.
StreamDelegateSendImmediate(const base::WeakPtr<SpdyStream>& stream,
base::StringPiece data);
- virtual ~StreamDelegateSendImmediate();
+ ~StreamDelegateSendImmediate() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
private:
@@ -112,9 +112,9 @@
public:
StreamDelegateWithBody(const base::WeakPtr<SpdyStream>& stream,
base::StringPiece data);
- virtual ~StreamDelegateWithBody();
+ ~StreamDelegateWithBody() override;
- virtual void OnRequestHeadersSent() override;
+ void OnRequestHeadersSent() override;
private:
scoped_refptr<StringIOBuffer> buf_;
@@ -124,9 +124,9 @@
class StreamDelegateCloseOnHeaders : public StreamDelegateBase {
public:
StreamDelegateCloseOnHeaders(const base::WeakPtr<SpdyStream>& stream);
- virtual ~StreamDelegateCloseOnHeaders();
+ ~StreamDelegateCloseOnHeaders() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
};
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 2e1aba5..baa3548 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -208,50 +208,49 @@
class PriorityGetter : public BufferedSpdyFramerVisitorInterface {
public:
PriorityGetter() : priority_(0) {}
- virtual ~PriorityGetter() {}
+ ~PriorityGetter() override {}
SpdyPriority priority() const {
return priority_;
}
- virtual void OnError(SpdyFramer::SpdyError error_code) override {}
- virtual void OnStreamError(SpdyStreamId stream_id,
- const std::string& description) override {}
- virtual void OnSynStream(SpdyStreamId stream_id,
- SpdyStreamId associated_stream_id,
- SpdyPriority priority,
- bool fin,
- bool unidirectional,
- const SpdyHeaderBlock& headers) override {
+ void OnError(SpdyFramer::SpdyError error_code) override {}
+ void OnStreamError(SpdyStreamId stream_id,
+ const std::string& description) override {}
+ void OnSynStream(SpdyStreamId stream_id,
+ SpdyStreamId associated_stream_id,
+ SpdyPriority priority,
+ bool fin,
+ bool unidirectional,
+ const SpdyHeaderBlock& headers) override {
priority_ = priority;
}
- virtual void OnSynReply(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {}
- virtual void OnHeaders(SpdyStreamId stream_id,
- bool fin,
- const SpdyHeaderBlock& headers) override {}
- virtual void OnDataFrameHeader(SpdyStreamId stream_id,
- size_t length,
- bool fin) override {}
- virtual void OnStreamFrameData(SpdyStreamId stream_id,
- const char* data,
- size_t len,
- bool fin) override {}
- virtual void OnSettings(bool clear_persisted) override {}
- virtual void OnSetting(
- SpdySettingsIds id, uint8 flags, uint32 value) override {}
- virtual void OnPing(SpdyPingId unique_id, bool is_ack) override {}
- virtual void OnRstStream(SpdyStreamId stream_id,
- SpdyRstStreamStatus status) override {}
- virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
- SpdyGoAwayStatus status) override {}
- virtual void OnWindowUpdate(SpdyStreamId stream_id,
- uint32 delta_window_size) override {}
- virtual void OnPushPromise(SpdyStreamId stream_id,
- SpdyStreamId promised_stream_id,
- const SpdyHeaderBlock& headers) override {}
- virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
+ void OnSynReply(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {}
+ void OnHeaders(SpdyStreamId stream_id,
+ bool fin,
+ const SpdyHeaderBlock& headers) override {}
+ void OnDataFrameHeader(SpdyStreamId stream_id,
+ size_t length,
+ bool fin) override {}
+ void OnStreamFrameData(SpdyStreamId stream_id,
+ const char* data,
+ size_t len,
+ bool fin) override {}
+ void OnSettings(bool clear_persisted) override {}
+ void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {}
+ void OnPing(SpdyPingId unique_id, bool is_ack) override {}
+ void OnRstStream(SpdyStreamId stream_id,
+ SpdyRstStreamStatus status) override {}
+ void OnGoAway(SpdyStreamId last_accepted_stream_id,
+ SpdyGoAwayStatus status) override {}
+ void OnWindowUpdate(SpdyStreamId stream_id,
+ uint32 delta_window_size) override {}
+ void OnPushPromise(SpdyStreamId stream_id,
+ SpdyStreamId promised_stream_id,
+ const SpdyHeaderBlock& headers) override {}
+ bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
return false;
}
@@ -613,46 +612,46 @@
: MockClientSocket(BoundNetLog()),
read_result_(read_result) {}
- virtual ~FakeSpdySessionClientSocket() {}
+ ~FakeSpdySessionClientSocket() override {}
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return read_result_;
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
// Return kProtoUnknown to use the pool's default protocol.
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
// The functions below are not expected to be called.
- virtual int Connect(const CompletionCallback& callback) override {
+ int Connect(const CompletionCallback& callback) override {
ADD_FAILURE();
return ERR_UNEXPECTED;
}
- virtual bool WasEverUsed() const override {
+ bool WasEverUsed() const override {
ADD_FAILURE();
return false;
}
- virtual bool UsingTCPFastOpen() const override {
+ bool UsingTCPFastOpen() const override {
ADD_FAILURE();
return false;
}
- virtual bool WasNpnNegotiated() const override {
+ bool WasNpnNegotiated() const override {
ADD_FAILURE();
return false;
}
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
+ bool GetSSLInfo(SSLInfo* ssl_info) override {
ADD_FAILURE();
return false;
}
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h
index 897f670..e91800d 100644
--- a/net/spdy/spdy_test_util_common.h
+++ b/net/spdy/spdy_test_util_common.h
@@ -125,7 +125,7 @@
public:
StreamReleaserCallback();
- virtual ~StreamReleaserCallback();
+ ~StreamReleaserCallback() override;
// Returns a callback that releases |request|'s stream.
CompletionCallback MakeCallback(SpdyStreamRequest* request);
@@ -157,11 +157,11 @@
explicit MockECSignatureCreator(crypto::ECPrivateKey* key);
// crypto::ECSignatureCreator
- virtual bool Sign(const uint8* data,
- int data_len,
- std::vector<uint8>* signature) override;
- virtual bool DecodeSignature(const std::vector<uint8>& signature,
- std::vector<uint8>* out_raw_sig) override;
+ bool Sign(const uint8* data,
+ int data_len,
+ std::vector<uint8>* signature) override;
+ bool DecodeSignature(const std::vector<uint8>& signature,
+ std::vector<uint8>* out_raw_sig) override;
private:
crypto::ECPrivateKey* key_;
@@ -173,11 +173,10 @@
class MockECSignatureCreatorFactory : public crypto::ECSignatureCreatorFactory {
public:
MockECSignatureCreatorFactory();
- virtual ~MockECSignatureCreatorFactory();
+ ~MockECSignatureCreatorFactory() override;
// crypto::ECSignatureCreatorFactory
- virtual crypto::ECSignatureCreator* Create(
- crypto::ECPrivateKey* key) override;
+ crypto::ECSignatureCreator* Create(crypto::ECPrivateKey* key) override;
private:
DISALLOW_COPY_AND_ASSIGN(MockECSignatureCreatorFactory);
@@ -232,7 +231,7 @@
SpdyURLRequestContext(NextProto protocol,
bool force_spdy_over_ssl,
bool force_spdy_always);
- virtual ~SpdyURLRequestContext();
+ ~SpdyURLRequestContext() override;
MockClientSocketFactory& socket_factory() { return socket_factory_; }
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 66a89e8..854afbf 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -60,7 +60,7 @@
SpdyWebSocketStream(const base::WeakPtr<SpdySession>& spdy_session,
Delegate* delegate);
- virtual ~SpdyWebSocketStream();
+ ~SpdyWebSocketStream() override;
// Initializes SPDY stream for the WebSocket.
// It might create SPDY stream asynchronously. In this case, this method
@@ -75,12 +75,12 @@
void Close();
// SpdyStream::Delegate
- virtual void OnRequestHeadersSent() override;
- virtual SpdyResponseHeadersStatus OnResponseHeadersUpdated(
+ void OnRequestHeadersSent() override;
+ SpdyResponseHeadersStatus OnResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnDataSent() override;
- virtual void OnClose(int status) override;
+ void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnDataSent() override;
+ void OnClose(int status) override;
private:
friend class SpdyWebSocketStreamTest;
diff --git a/net/spdy/spdy_websocket_stream_unittest.cc b/net/spdy/spdy_websocket_stream_unittest.cc
index 5941bdf..fd94969 100644
--- a/net/spdy/spdy_websocket_stream_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_unittest.cc
@@ -51,7 +51,7 @@
public:
explicit SpdyWebSocketStreamEventRecorder(const CompletionCallback& callback)
: callback_(callback) {}
- virtual ~SpdyWebSocketStreamEventRecorder() {}
+ ~SpdyWebSocketStreamEventRecorder() override {}
typedef base::Callback<void(SpdyWebSocketStreamEvent*)> StreamEventCallback;
@@ -74,7 +74,7 @@
on_close_ = callback;
}
- virtual void OnCreatedSpdyStream(int result) override {
+ void OnCreatedSpdyStream(int result) override {
events_.push_back(
SpdyWebSocketStreamEvent(SpdyWebSocketStreamEvent::EVENT_CREATED,
SpdyHeaderBlock(),
@@ -83,7 +83,7 @@
if (!on_created_.is_null())
on_created_.Run(&events_.back());
}
- virtual void OnSentSpdyHeaders() override {
+ void OnSentSpdyHeaders() override {
events_.push_back(
SpdyWebSocketStreamEvent(SpdyWebSocketStreamEvent::EVENT_SENT_HEADERS,
SpdyHeaderBlock(),
@@ -92,7 +92,7 @@
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnSpdyResponseHeadersUpdated(
+ void OnSpdyResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override {
events_.push_back(
SpdyWebSocketStreamEvent(
@@ -103,7 +103,7 @@
if (!on_received_header_.is_null())
on_received_header_.Run(&events_.back());
}
- virtual void OnSentSpdyData(size_t bytes_sent) override {
+ void OnSentSpdyData(size_t bytes_sent) override {
events_.push_back(
SpdyWebSocketStreamEvent(
SpdyWebSocketStreamEvent::EVENT_SENT_DATA,
@@ -113,7 +113,7 @@
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override {
+ void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override {
std::string buffer_data;
size_t buffer_len = 0;
if (buffer) {
@@ -129,7 +129,7 @@
if (!on_received_data_.is_null())
on_received_data_.Run(&events_.back());
}
- virtual void OnCloseSpdyStream() override {
+ void OnCloseSpdyStream() override {
events_.push_back(
SpdyWebSocketStreamEvent(
SpdyWebSocketStreamEvent::EVENT_CLOSE,
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc
index cb24d12..a2b1435 100644
--- a/net/spdy/spdy_write_queue_unittest.cc
+++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -59,9 +59,7 @@
base::Bind(RequeingBufferProducer::ConsumeCallback, queue));
}
- virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override {
- return buffer_.Pass();
- }
+ scoped_ptr<SpdyBuffer> ProduceBuffer() override { return buffer_.Pass(); }
static void ConsumeCallback(SpdyWriteQueue* queue,
size_t size,
diff --git a/net/ssl/channel_id_service_unittest.cc b/net/ssl/channel_id_service_unittest.cc
index 52083e8..b5fc006 100644
--- a/net/ssl/channel_id_service_unittest.cc
+++ b/net/ssl/channel_id_service_unittest.cc
@@ -35,16 +35,16 @@
public:
FailingTaskRunner() {}
- virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override {
+ bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) override {
return false;
}
- virtual bool RunsTasksOnCurrentThread() const override { return true; }
+ bool RunsTasksOnCurrentThread() const override { return true; }
protected:
- virtual ~FailingTaskRunner() {}
+ ~FailingTaskRunner() override {}
private:
DISALLOW_COPY_AND_ASSIGN(FailingTaskRunner);
@@ -56,21 +56,21 @@
MockChannelIDStoreWithAsyncGet()
: DefaultChannelIDStore(NULL), channel_id_count_(0) {}
- virtual int GetChannelID(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override;
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override;
- virtual void SetChannelID(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override {
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override {
channel_id_count_ = 1;
}
- virtual int GetChannelIDCount() override { return channel_id_count_; }
+ int GetChannelIDCount() override { return channel_id_count_; }
void CallGetChannelIDCallbackWithResult(int err,
base::Time expiration_time,
diff --git a/net/ssl/client_cert_store_mac.h b/net/ssl/client_cert_store_mac.h
index 5c697db..23e3a2f 100644
--- a/net/ssl/client_cert_store_mac.h
+++ b/net/ssl/client_cert_store_mac.h
@@ -17,12 +17,12 @@
class NET_EXPORT ClientCertStoreMac : public ClientCertStore {
public:
ClientCertStoreMac();
- virtual ~ClientCertStoreMac();
+ ~ClientCertStoreMac() override;
// ClientCertStore:
- virtual void GetClientCerts(const SSLCertRequestInfo& cert_request_info,
- CertificateList* selected_certs,
- const base::Closure& callback) override;
+ void GetClientCerts(const SSLCertRequestInfo& cert_request_info,
+ CertificateList* selected_certs,
+ const base::Closure& callback) override;
private:
friend class ClientCertStoreMacTest;
diff --git a/net/ssl/default_channel_id_store.cc b/net/ssl/default_channel_id_store.cc
index 4f43fbc..b71d7b3 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -41,8 +41,8 @@
public:
GetChannelIDTask(const std::string& server_identifier,
const GetChannelIDCallback& callback);
- virtual ~GetChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~GetChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -83,8 +83,8 @@
base::Time expiration_time,
const std::string& private_key,
const std::string& cert);
- virtual ~SetChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~SetChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -123,8 +123,8 @@
public:
DeleteChannelIDTask(const std::string& server_identifier,
const base::Closure& callback);
- virtual ~DeleteChannelIDTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~DeleteChannelIDTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
@@ -158,8 +158,8 @@
DeleteAllCreatedBetweenTask(base::Time delete_begin,
base::Time delete_end,
const base::Closure& callback);
- virtual ~DeleteAllCreatedBetweenTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~DeleteAllCreatedBetweenTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
base::Time delete_begin_;
@@ -194,8 +194,8 @@
: public DefaultChannelIDStore::Task {
public:
explicit GetAllChannelIDsTask(const GetChannelIDListCallback& callback);
- virtual ~GetAllChannelIDsTask();
- virtual void Run(DefaultChannelIDStore* store) override;
+ ~GetAllChannelIDsTask() override;
+ void Run(DefaultChannelIDStore* store) override;
private:
std::string server_identifier_;
diff --git a/net/ssl/default_channel_id_store.h b/net/ssl/default_channel_id_store.h
index 3882c1f..9b98637 100644
--- a/net/ssl/default_channel_id_store.h
+++ b/net/ssl/default_channel_id_store.h
@@ -41,33 +41,28 @@
// backing store will be updated.
explicit DefaultChannelIDStore(PersistentStore* store);
- virtual ~DefaultChannelIDStore();
+ ~DefaultChannelIDStore() override;
// ChannelIDStore implementation.
- virtual int GetChannelID(
- const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetChannelIDCallback& callback) override;
- virtual void SetChannelID(
- const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) override;
- virtual void DeleteChannelID(
- const std::string& server_identifier,
- const base::Closure& callback) override;
- virtual void DeleteAllCreatedBetween(
- base::Time delete_begin,
- base::Time delete_end,
- const base::Closure& callback) override;
- virtual void DeleteAll(const base::Closure& callback) override;
- virtual void GetAllChannelIDs(
- const GetChannelIDListCallback& callback) override;
- virtual int GetChannelIDCount() override;
- virtual void SetForceKeepSessionState() override;
+ int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetChannelIDCallback& callback) override;
+ void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) override;
+ void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& callback) override;
+ void DeleteAllCreatedBetween(base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& callback) override;
+ void DeleteAll(const base::Closure& callback) override;
+ void GetAllChannelIDs(const GetChannelIDListCallback& callback) override;
+ int GetChannelIDCount() override;
+ void SetForceKeepSessionState() override;
private:
class Task;
diff --git a/net/ssl/default_channel_id_store_unittest.cc b/net/ssl/default_channel_id_store_unittest.cc
index 9429753..ae27a19 100644
--- a/net/ssl/default_channel_id_store_unittest.cc
+++ b/net/ssl/default_channel_id_store_unittest.cc
@@ -69,15 +69,15 @@
MockPersistentStore();
// DefaultChannelIDStore::PersistentStore implementation.
- virtual void Load(const LoadedCallback& loaded_callback) override;
- virtual void AddChannelID(
+ void Load(const LoadedCallback& loaded_callback) override;
+ void AddChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void DeleteChannelID(
+ void DeleteChannelID(
const DefaultChannelIDStore::ChannelID& channel_id) override;
- virtual void SetForceKeepSessionState() override;
+ void SetForceKeepSessionState() override;
protected:
- virtual ~MockPersistentStore();
+ ~MockPersistentStore() override;
private:
typedef std::map<std::string, DefaultChannelIDStore::ChannelID>
diff --git a/net/ssl/ssl_client_auth_cache.h b/net/ssl/ssl_client_auth_cache.h
index 4ee47ed..53d5312 100644
--- a/net/ssl/ssl_client_auth_cache.h
+++ b/net/ssl/ssl_client_auth_cache.h
@@ -28,7 +28,7 @@
class NET_EXPORT_PRIVATE SSLClientAuthCache : public CertDatabase::Observer {
public:
SSLClientAuthCache();
- virtual ~SSLClientAuthCache();
+ ~SSLClientAuthCache() override;
// Checks for a client certificate preference for SSL server at |server|.
// Returns true if a preference is found, and sets |*certificate| to the
@@ -48,7 +48,7 @@
void Remove(const HostPortPair& server);
// CertDatabase::Observer methods:
- virtual void OnCertAdded(const X509Certificate* cert) override;
+ void OnCertAdded(const X509Certificate* cert) override;
private:
typedef HostPortPair AuthCacheKey;
diff --git a/net/ssl/ssl_config_service_defaults.h b/net/ssl/ssl_config_service_defaults.h
index ff58029..de867da 100644
--- a/net/ssl/ssl_config_service_defaults.h
+++ b/net/ssl/ssl_config_service_defaults.h
@@ -18,10 +18,10 @@
SSLConfigServiceDefaults();
// Store default SSL config settings in |config|.
- virtual void GetSSLConfig(SSLConfig* config) override;
+ void GetSSLConfig(SSLConfig* config) override;
private:
- virtual ~SSLConfigServiceDefaults();
+ ~SSLConfigServiceDefaults() override;
// Default value of prefs.
const SSLConfig default_config_;
diff --git a/net/ssl/ssl_config_service_unittest.cc b/net/ssl/ssl_config_service_unittest.cc
index 0d9659c..7306c68 100644
--- a/net/ssl/ssl_config_service_unittest.cc
+++ b/net/ssl/ssl_config_service_unittest.cc
@@ -19,9 +19,7 @@
explicit MockSSLConfigService(const SSLConfig& config) : config_(config) {}
// SSLConfigService implementation
- virtual void GetSSLConfig(SSLConfig* config) override {
- *config = config_;
- }
+ void GetSSLConfig(SSLConfig* config) override { *config = config_; }
// Sets the SSLConfig to be returned by GetSSLConfig and processes any
// updates.
@@ -32,7 +30,7 @@
}
private:
- virtual ~MockSSLConfigService() {}
+ ~MockSSLConfigService() override {}
SSLConfig config_;
};
diff --git a/net/test/embedded_test_server/embedded_test_server.cc b/net/test/embedded_test_server/embedded_test_server.cc
index 98f50b6..63d8024 100644
--- a/net/test/embedded_test_server/embedded_test_server.cc
+++ b/net/test/embedded_test_server/embedded_test_server.cc
@@ -32,7 +32,7 @@
: headers_(headers), contents_(contents) {
}
- virtual std::string ToResponseString() const override {
+ std::string ToResponseString() const override {
return headers_ + "\r\n" + contents_;
}
diff --git a/net/test/embedded_test_server/embedded_test_server.h b/net/test/embedded_test_server/embedded_test_server.h
index fc9f554..9123a51 100644
--- a/net/test/embedded_test_server/embedded_test_server.h
+++ b/net/test/embedded_test_server/embedded_test_server.h
@@ -35,7 +35,7 @@
public:
HttpListenSocket(const SocketDescriptor socket_descriptor,
StreamListenSocket::Delegate* delegate);
- virtual ~HttpListenSocket();
+ ~HttpListenSocket() override;
virtual void Listen();
// Listen on the current IO thread. If the IO thread has changed since this
@@ -106,7 +106,7 @@
// Creates a http test server. InitializeAndWaitUntilReady() must be called
// to start the server.
EmbeddedTestServer();
- virtual ~EmbeddedTestServer();
+ ~EmbeddedTestServer() override;
// Initializes and waits until the server is ready to accept requests.
bool InitializeAndWaitUntilReady() WARN_UNUSED_RESULT;
@@ -166,12 +166,12 @@
scoped_ptr<HttpRequest> request);
// StreamListenSocket::Delegate overrides:
- virtual void DidAccept(StreamListenSocket* server,
- scoped_ptr<StreamListenSocket> connection) override;
- virtual void DidRead(StreamListenSocket* connection,
- const char* data,
- int length) override;
- virtual void DidClose(StreamListenSocket* connection) override;
+ void DidAccept(StreamListenSocket* server,
+ scoped_ptr<StreamListenSocket> connection) override;
+ void DidRead(StreamListenSocket* connection,
+ const char* data,
+ int length) override;
+ void DidClose(StreamListenSocket* connection) override;
HttpConnection* FindConnection(StreamListenSocket* socket);
diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc
index 6a1df6e..bbe321b 100644
--- a/net/test/embedded_test_server/embedded_test_server_unittest.cc
+++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc
@@ -66,7 +66,7 @@
}
// URLFetcherDelegate override.
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
++num_responses_received_;
if (num_responses_received_ == num_responses_expected_)
base::MessageLoop::current()->Quit();
@@ -260,7 +260,7 @@
message_loop_present_on_shutdown_(message_loop_present_on_shutdown) {}
// base::PlatformThread::Delegate:
- virtual void ThreadMain() override {
+ void ThreadMain() override {
scoped_refptr<base::SingleThreadTaskRunner> io_thread_runner;
base::Thread io_thread("io_thread");
base::Thread::Options thread_options;
@@ -298,7 +298,7 @@
}
// URLFetcherDelegate override.
- virtual void OnURLFetchComplete(const URLFetcher* source) override {
+ void OnURLFetchComplete(const URLFetcher* source) override {
base::MessageLoop::current()->Quit();
}
diff --git a/net/test/embedded_test_server/http_response.h b/net/test/embedded_test_server/http_response.h
index 2172354..821c027 100644
--- a/net/test/embedded_test_server/http_response.h
+++ b/net/test/embedded_test_server/http_response.h
@@ -32,7 +32,7 @@
class BasicHttpResponse : public HttpResponse {
public:
BasicHttpResponse();
- virtual ~BasicHttpResponse();
+ ~BasicHttpResponse() override;
// The response code.
HttpStatusCode code() const { return code_; }
@@ -54,7 +54,7 @@
}
// Generates and returns a http response string.
- virtual std::string ToResponseString() const override;
+ std::string ToResponseString() const override;
private:
HttpStatusCode code_;
diff --git a/net/test/net_test_suite.h b/net/test/net_test_suite.h
index 1a400d4..e0f601e 100644
--- a/net/test/net_test_suite.h
+++ b/net/test/net_test_suite.h
@@ -21,11 +21,11 @@
class NetTestSuite : public base::TestSuite {
public:
NetTestSuite(int argc, char** argv);
- virtual ~NetTestSuite();
+ ~NetTestSuite() override;
- virtual void Initialize() override;
+ void Initialize() override;
- virtual void Shutdown() override;
+ void Shutdown() override;
protected:
// This constructor is only accessible to specialized net test
diff --git a/net/test/spawned_test_server/local_test_server.h b/net/test/spawned_test_server/local_test_server.h
index a719598..37b1185 100644
--- a/net/test/spawned_test_server/local_test_server.h
+++ b/net/test/spawned_test_server/local_test_server.h
@@ -38,7 +38,7 @@
const SSLOptions& ssl_options,
const base::FilePath& document_root);
- virtual ~LocalTestServer();
+ ~LocalTestServer() override;
// Start the test server and block until it's ready. Returns true on success.
bool Start() WARN_UNUSED_RESULT;
diff --git a/net/test/spawned_test_server/local_test_server_posix.cc b/net/test/spawned_test_server/local_test_server_posix.cc
index 64c9b44..0edbedf 100644
--- a/net/test/spawned_test_server/local_test_server_posix.cc
+++ b/net/test/spawned_test_server/local_test_server_posix.cc
@@ -34,7 +34,7 @@
: path_string_(path_string),
port_string_(port_string) {}
- virtual bool Includes(const base::ProcessEntry& entry) const override {
+ bool Includes(const base::ProcessEntry& entry) const override {
if (entry.parent_pid() != 1)
return false;
bool found_path_string = false;
diff --git a/net/test/url_request/url_request_failed_job.h b/net/test/url_request/url_request_failed_job.h
index ea35116..4307f91 100644
--- a/net/test/url_request/url_request_failed_job.h
+++ b/net/test/url_request/url_request_failed_job.h
@@ -22,7 +22,7 @@
NetworkDelegate* network_delegate,
int net_error);
- virtual void Start() override;
+ void Start() override;
// Adds the testing URLs to the URLRequestFilter.
static void AddUrlHandler();
@@ -42,7 +42,7 @@
const std::string& hostname);
protected:
- virtual ~URLRequestFailedJob();
+ ~URLRequestFailedJob() override;
private:
static URLRequestJob* Factory(URLRequest* request,
diff --git a/net/test/url_request/url_request_mock_http_job.cc b/net/test/url_request/url_request_mock_http_job.cc
index c611f36..5542ac7 100644
--- a/net/test/url_request/url_request_mock_http_job.cc
+++ b/net/test/url_request/url_request_mock_http_job.cc
@@ -37,10 +37,10 @@
: base_path_(base_path),
map_all_requests_to_base_path_(map_all_requests_to_base_path),
worker_pool_(worker_pool) {}
- virtual ~MockJobInterceptor() {}
+ ~MockJobInterceptor() override {}
// net::URLRequestJobFactory::ProtocolHandler implementation
- virtual net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
return new URLRequestMockHTTPJob(
diff --git a/net/test/url_request/url_request_mock_http_job.h b/net/test/url_request/url_request_mock_http_job.h
index eb68a2d..1a01a30 100644
--- a/net/test/url_request/url_request_mock_http_job.h
+++ b/net/test/url_request/url_request_mock_http_job.h
@@ -34,13 +34,12 @@
const base::FilePath& file_path,
const scoped_refptr<base::TaskRunner>& task_runner);
- virtual void Start() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual int GetResponseCode() const override;
- virtual bool GetCharset(std::string* charset) override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
+ void Start() override;
+ bool GetMimeType(std::string* mime_type) const override;
+ int GetResponseCode() const override;
+ bool GetCharset(std::string* charset) override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
// Adds the testing URLs to the URLRequestFilter.
static void AddUrlHandler(
@@ -74,7 +73,7 @@
const scoped_refptr<base::SequencedWorkerPool>& worker_pool);
protected:
- virtual ~URLRequestMockHTTPJob();
+ ~URLRequestMockHTTPJob() override;
private:
void GetResponseInfoConst(HttpResponseInfo* info) const;
diff --git a/net/tools/balsa/balsa_frame.h b/net/tools/balsa/balsa_frame.h
index 73c3dd9..5198dd1 100644
--- a/net/tools/balsa/balsa_frame.h
+++ b/net/tools/balsa/balsa_frame.h
@@ -201,36 +201,35 @@
private:
class DoNothingBalsaVisitor : public BalsaVisitorInterface {
- virtual void ProcessBodyInput(const char *input, size_t size) override {}
- virtual void ProcessBodyData(const char *input, size_t size) override {}
- virtual void ProcessHeaderInput(const char *input, size_t size) override {}
- virtual void ProcessTrailerInput(const char *input, size_t size) override {}
- virtual void ProcessHeaders(const BalsaHeaders& headers) override {}
- virtual void ProcessRequestFirstLine(const char* line_input,
- size_t line_length,
- const char* method_input,
- size_t method_length,
- const char* request_uri_input,
- size_t request_uri_length,
- const char* version_input,
- size_t version_length) override {}
- virtual void ProcessResponseFirstLine(const char *line_input,
- size_t line_length,
- const char *version_input,
- size_t version_length,
- const char *status_input,
- size_t status_length,
- const char *reason_input,
- size_t reason_length) override {}
- virtual void ProcessChunkLength(size_t chunk_length) override {}
- virtual void ProcessChunkExtensions(const char *input,
- size_t size) override {}
- virtual void HeaderDone() override {}
- virtual void MessageDone() override {}
- virtual void HandleHeaderError(BalsaFrame* framer) override {}
- virtual void HandleHeaderWarning(BalsaFrame* framer) override {}
- virtual void HandleChunkingError(BalsaFrame* framer) override {}
- virtual void HandleBodyError(BalsaFrame* framer) override {}
+ void ProcessBodyInput(const char* input, size_t size) override {}
+ void ProcessBodyData(const char* input, size_t size) override {}
+ void ProcessHeaderInput(const char* input, size_t size) override {}
+ void ProcessTrailerInput(const char* input, size_t size) override {}
+ void ProcessHeaders(const BalsaHeaders& headers) override {}
+ void ProcessRequestFirstLine(const char* line_input,
+ size_t line_length,
+ const char* method_input,
+ size_t method_length,
+ const char* request_uri_input,
+ size_t request_uri_length,
+ const char* version_input,
+ size_t version_length) override {}
+ void ProcessResponseFirstLine(const char* line_input,
+ size_t line_length,
+ const char* version_input,
+ size_t version_length,
+ const char* status_input,
+ size_t status_length,
+ const char* reason_input,
+ size_t reason_length) override {}
+ void ProcessChunkLength(size_t chunk_length) override {}
+ void ProcessChunkExtensions(const char* input, size_t size) override {}
+ void HeaderDone() override {}
+ void MessageDone() override {}
+ void HandleHeaderError(BalsaFrame* framer) override {}
+ void HandleHeaderWarning(BalsaFrame* framer) override {}
+ void HandleChunkingError(BalsaFrame* framer) override {}
+ void HandleBodyError(BalsaFrame* framer) override {}
};
bool last_char_was_slash_r_;
diff --git a/net/tools/balsa/simple_buffer.h b/net/tools/balsa/simple_buffer.h
index d58894e..d914ec5 100644
--- a/net/tools/balsa/simple_buffer.h
+++ b/net/tools/balsa/simple_buffer.h
@@ -16,7 +16,7 @@
public:
SimpleBuffer();
explicit SimpleBuffer(int size);
- virtual ~SimpleBuffer();
+ ~SimpleBuffer() override;
std::string str() const;
@@ -32,32 +32,32 @@
// The following functions all override pure virtual functions
// in BufferInterface. See buffer_interface.h for a description
// of what they do.
- virtual int ReadableBytes() const override;
- virtual int BufferSize() const override;
- virtual int BytesFree() const override;
+ int ReadableBytes() const override;
+ int BufferSize() const override;
+ int BytesFree() const override;
- virtual bool Empty() const override;
- virtual bool Full() const override;
+ bool Empty() const override;
+ bool Full() const override;
- virtual int Write(const char* bytes, int size) override;
+ int Write(const char* bytes, int size) override;
- virtual void GetWritablePtr(char **ptr, int* size) const override;
+ void GetWritablePtr(char** ptr, int* size) const override;
- virtual void GetReadablePtr(char **ptr, int* size) const override;
+ void GetReadablePtr(char** ptr, int* size) const override;
- virtual int Read(char* bytes, int size) override;
+ int Read(char* bytes, int size) override;
- virtual void Clear() override;
+ void Clear() override;
// This can be an expensive operation: costing a new/delete, and copying of
// all existing data. Even if the existing buffer does not need to be
// resized, unread data may still need to be non-destructively copied to
// consolidate fragmented free space.
- virtual bool Reserve(int size) override;
+ bool Reserve(int size) override;
- virtual void AdvanceReadablePtr(int amount_to_advance) override;
+ void AdvanceReadablePtr(int amount_to_advance) override;
- virtual void AdvanceWritablePtr(int amount_to_advance) override;
+ void AdvanceWritablePtr(int amount_to_advance) override;
void Swap(SimpleBuffer* other) {
char* tmp = storage_;
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 46c3eec..9b071d7 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -47,13 +47,18 @@
public:
explicit CacheDumper(disk_cache::Backend* cache);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
disk_cache::Backend* cache_;
@@ -64,13 +69,18 @@
public:
explicit DiskDumper(const base::FilePath& path);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
base::FilePath path_;
diff --git a/net/tools/gdig/file_net_log.h b/net/tools/gdig/file_net_log.h
index 005ea31..62ba221 100644
--- a/net/tools/gdig/file_net_log.h
+++ b/net/tools/gdig/file_net_log.h
@@ -20,10 +20,10 @@
class FileNetLogObserver : public NetLog::ThreadSafeObserver {
public:
explicit FileNetLogObserver(FILE* destination);
- virtual ~FileNetLogObserver();
+ ~FileNetLogObserver() override;
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override;
+ void OnAddEntry(const net::NetLog::Entry& entry) override;
private:
FILE* const destination_;
diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc
index 8ad907d..800bb34 100644
--- a/net/tools/get_server_time/get_server_time.cc
+++ b/net/tools/get_server_time/get_server_time.cc
@@ -72,21 +72,22 @@
public:
QuitDelegate() {}
- virtual ~QuitDelegate() {}
+ ~QuitDelegate() override {}
// net::URLFetcherDelegate implementation.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) override {
+ void OnURLFetchComplete(const net::URLFetcher* source) override {
base::MessageLoop::current()->Quit();
}
- virtual void OnURLFetchDownloadProgress(
- const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchDownloadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
- virtual void OnURLFetchUploadProgress(const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchUploadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
@@ -100,13 +101,13 @@
public:
PrintingLogObserver() {}
- virtual ~PrintingLogObserver() {
+ ~PrintingLogObserver() override {
// This is guaranteed to be safe as this program is single threaded.
net_log()->RemoveThreadSafeObserver(this);
}
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override {
+ void OnAddEntry(const net::NetLog::Entry& entry) override {
// The log level of the entry is unknown, so just assume it maps
// to VLOG(1).
if (!VLOG_IS_ON(1))
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index e9b3496..b6cf393 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -88,34 +88,30 @@
public:
NetWatcher() {}
- virtual ~NetWatcher() {}
+ ~NetWatcher() override {}
// net::NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
- LOG(INFO) << "OnIPAddressChanged()";
- }
+ void OnIPAddressChanged() override { LOG(INFO) << "OnIPAddressChanged()"; }
// net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnConnectionTypeChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged() override {
- LOG(INFO) << "OnDNSChanged()";
- }
+ void OnDNSChanged() override { LOG(INFO) << "OnDNSChanged()"; }
// net::NetworkChangeNotifier::NetworkChangeObserver implementation.
- virtual void OnNetworkChanged(
+ void OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnNetworkChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::ProxyConfigService::Observer implementation.
- virtual void OnProxyConfigChanged(
+ void OnProxyConfigChanged(
const net::ProxyConfig& config,
net::ProxyConfigService::ConfigAvailability availability) override {
LOG(INFO) << "OnProxyConfigChanged("
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index f29af96..edcd0ce 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -762,9 +762,6 @@
// an infinite loop in the EpollServer, as the alarm fires and is immediately
// rescheduled.
ASSERT_TRUE(Initialize());
- if (negotiated_version_ < QUIC_VERSION_19) {
- return;
- }
client_->client()->WaitForCryptoHandshakeConfirmed();
// Ensure both stream and connection level are flow control blocked by setting
@@ -857,22 +854,27 @@
}
TEST_P(EndToEndTest, NegotiateMaxOpenStreams) {
+ ValueRestore<bool> old_flag(&FLAGS_quic_allow_more_open_streams, true);
+
// Negotiate 1 max open stream.
client_config_.SetMaxStreamsPerConnection(1, 1);
ASSERT_TRUE(Initialize());
client_->client()->WaitForCryptoHandshakeConfirmed();
// Make the client misbehave after negotiation.
- QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(), 10);
+ const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1;
+ QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(),
+ kServerMaxStreams + 1);
- HTTPMessage request(HttpConstants::HTTP_1_1,
- HttpConstants::POST, "/foo");
+ HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo");
request.AddHeader("content-length", "3");
request.set_has_complete_message(false);
- // Open two simultaneous streams.
- client_->SendMessage(request);
- client_->SendMessage(request);
+ // The server supports a small number of additional streams beyond the
+ // negotiated limit. Open enough streams to go beyond that limit.
+ for (int i = 0; i < kServerMaxStreams + 1; ++i) {
+ client_->SendMessage(request);
+ }
client_->WaitForResponse();
EXPECT_FALSE(client_->connected());
@@ -1245,7 +1247,7 @@
set_server_initial_session_flow_control_receive_window(kServerSessionIFCW);
ASSERT_TRUE(Initialize());
- if (negotiated_version_ <= QUIC_VERSION_19) {
+ if (negotiated_version_ == QUIC_VERSION_19) {
return;
}
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc
index 8a78878..61f8c01 100644
--- a/net/tools/quic/quic_client_session_test.cc
+++ b/net/tools/quic/quic_client_session_test.cc
@@ -111,10 +111,8 @@
EXPECT_EQ(FEC_PROTECT_OPTIONAL, stream->fec_policy());
}
-TEST_P(ToolsQuicClientSessionTest, EmptyPacketReceived) {
- // This test covers broken behavior that empty packets cause QUIC connection
- // broken.
-
+// Regression test for b/17206611.
+TEST_P(ToolsQuicClientSessionTest, InvalidPacketReceived) {
// Create Packet with 0 length.
QuicEncryptedPacket invalid_packet(nullptr, 0, false);
IPEndPoint server_address(TestPeerIPAddress(), kTestPort);
@@ -126,16 +124,12 @@
Invoke(reinterpret_cast<MockConnection*>(session_->connection()),
&MockConnection::ReallyProcessUdpPacket));
- // Expect call to close connection with error QUIC_INVALID_PACKET_HEADER.
- // TODO(b/17206611): Correct behavior: packet should get dropped and
- // connection should remain open.
- EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
- QUIC_INVALID_PACKET_HEADER, _)).Times(1);
+ // Validate that empty packets don't close the connection.
+ EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(_, _)).Times(0);
session_->connection()->ProcessUdpPacket(client_address, server_address,
invalid_packet);
- // Create a packet that causes DecryptPacket failed. The packet will get
- // dropped without closing connection. This is a correct behavior.
+ // Verifiy that small, invalid packets don't close the connection.
char buf[2] = {0x00, 0x01};
QuicEncryptedPacket valid_packet(buf, 2, false);
// Close connection shouldn't be called.
diff --git a/net/tools/quic/quic_server_session.cc b/net/tools/quic/quic_server_session.cc
index 842c6ef..5b073c8 100644
--- a/net/tools/quic/quic_server_session.cc
+++ b/net/tools/quic/quic_server_session.cc
@@ -123,7 +123,7 @@
cached_network_params.set_max_bandwidth_timestamp_seconds(
max_bandwidth_timestamp);
cached_network_params.set_min_rtt_ms(
- sent_packet_manager.GetRttStats()->min_rtt().ToMilliseconds());
+ sent_packet_manager.GetRttStats()->MinRtt().ToMilliseconds());
cached_network_params.set_previous_connection_state(
bandwidth_recorder.EstimateRecordedDuringSlowStart()
? CachedNetworkParameters::SLOW_START
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 72c65a8..0c25f81 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -357,7 +357,7 @@
expected_network_params.set_min_rtt_ms(session_->connection()
->sent_packet_manager()
.GetRttStats()
- ->min_rtt()
+ ->MinRtt()
.ToMilliseconds());
expected_network_params.set_previous_connection_state(
CachedNetworkParameters::CONGESTION_AVOIDANCE);
diff --git a/net/udp/datagram_client_socket.h b/net/udp/datagram_client_socket.h
index 31fc43f..c2c2cba 100644
--- a/net/udp/datagram_client_socket.h
+++ b/net/udp/datagram_client_socket.h
@@ -15,7 +15,7 @@
class NET_EXPORT_PRIVATE DatagramClientSocket : public DatagramSocket,
public Socket {
public:
- virtual ~DatagramClientSocket() {}
+ ~DatagramClientSocket() override {}
// Initialize this socket as a client socket to server at |address|.
// Returns a network error code.
diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
index 4c38cc8..d3796c3 100644
--- a/net/udp/datagram_server_socket.h
+++ b/net/udp/datagram_server_socket.h
@@ -17,7 +17,7 @@
// A UDP Socket.
class NET_EXPORT DatagramServerSocket : public DatagramSocket {
public:
- virtual ~DatagramServerSocket() {}
+ ~DatagramServerSocket() override {}
// Initialize this socket as a server socket listening at |address|.
// Returns a network error code.
diff --git a/net/udp/udp_client_socket.h b/net/udp/udp_client_socket.h
index d689640..427db7e 100644
--- a/net/udp/udp_client_socket.h
+++ b/net/udp/udp_client_socket.h
@@ -21,20 +21,22 @@
const RandIntCallback& rand_int_cb,
net::NetLog* net_log,
const net::NetLog::Source& source);
- virtual ~UDPClientSocket();
+ ~UDPClientSocket() override;
// DatagramClientSocket implementation.
- virtual int Connect(const IPEndPoint& address) override;
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual const BoundNetLog& NetLog() const override;
+ int Connect(const IPEndPoint& address) override;
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ const BoundNetLog& NetLog() const override;
private:
UDPSocket socket_;
diff --git a/net/udp/udp_server_socket.h b/net/udp/udp_server_socket.h
index 9801ff8..77ca86d 100644
--- a/net/udp/udp_server_socket.h
+++ b/net/udp/udp_server_socket.h
@@ -19,33 +19,33 @@
class NET_EXPORT UDPServerSocket : public DatagramServerSocket {
public:
UDPServerSocket(net::NetLog* net_log, const net::NetLog::Source& source);
- virtual ~UDPServerSocket();
+ ~UDPServerSocket() override;
// Implement DatagramServerSocket:
- virtual int Listen(const IPEndPoint& address) override;
- virtual int RecvFrom(IOBuffer* buf,
- int buf_len,
- IPEndPoint* address,
- const CompletionCallback& callback) override;
- virtual int SendTo(IOBuffer* buf,
- int buf_len,
- const IPEndPoint& address,
- const CompletionCallback& callback) override;
- virtual int SetReceiveBufferSize(int32 size) override;
- virtual int SetSendBufferSize(int32 size) override;
- virtual void Close() override;
- virtual int GetPeerAddress(IPEndPoint* address) const override;
- virtual int GetLocalAddress(IPEndPoint* address) const override;
- virtual const BoundNetLog& NetLog() const override;
- virtual void AllowAddressReuse() override;
- virtual void AllowBroadcast() override;
- virtual int JoinGroup(const IPAddressNumber& group_address) const override;
- virtual int LeaveGroup(const IPAddressNumber& group_address) const override;
- virtual int SetMulticastInterface(uint32 interface_index) override;
- virtual int SetMulticastTimeToLive(int time_to_live) override;
- virtual int SetMulticastLoopbackMode(bool loopback) override;
- virtual int SetDiffServCodePoint(DiffServCodePoint dscp) override;
- virtual void DetachFromThread() override;
+ int Listen(const IPEndPoint& address) override;
+ int RecvFrom(IOBuffer* buf,
+ int buf_len,
+ IPEndPoint* address,
+ const CompletionCallback& callback) override;
+ int SendTo(IOBuffer* buf,
+ int buf_len,
+ const IPEndPoint& address,
+ const CompletionCallback& callback) override;
+ int SetReceiveBufferSize(int32 size) override;
+ int SetSendBufferSize(int32 size) override;
+ void Close() override;
+ int GetPeerAddress(IPEndPoint* address) const override;
+ int GetLocalAddress(IPEndPoint* address) const override;
+ const BoundNetLog& NetLog() const override;
+ void AllowAddressReuse() override;
+ void AllowBroadcast() override;
+ int JoinGroup(const IPAddressNumber& group_address) const override;
+ int LeaveGroup(const IPAddressNumber& group_address) const override;
+ int SetMulticastInterface(uint32 interface_index) override;
+ int SetMulticastTimeToLive(int time_to_live) override;
+ int SetMulticastLoopbackMode(bool loopback) override;
+ int SetDiffServCodePoint(DiffServCodePoint dscp) override;
+ void DetachFromThread() override;
private:
UDPSocket socket_;
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 292a42f..2ac564d 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -179,9 +179,9 @@
// MessageLoopForIO::Watcher methods
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override;
+ void OnFileCanReadWithoutBlocking(int /* fd */) override;
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {}
private:
UDPSocketLibevent* const socket_;
@@ -195,9 +195,9 @@
// MessageLoopForIO::Watcher methods
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {}
+ void OnFileCanReadWithoutBlocking(int /* fd */) override {}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override;
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override;
private:
UDPSocketLibevent* const socket_;
diff --git a/net/url_request/data_protocol_handler.h b/net/url_request/data_protocol_handler.h
index 3c2c4d4..cc0f7b8 100644
--- a/net/url_request/data_protocol_handler.h
+++ b/net/url_request/data_protocol_handler.h
@@ -18,9 +18,10 @@
: public URLRequestJobFactory::ProtocolHandler {
public:
DataProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
DISALLOW_COPY_AND_ASSIGN(DataProtocolHandler);
diff --git a/net/url_request/file_protocol_handler.h b/net/url_request/file_protocol_handler.h
index 02b5c9f..4ac81d3 100644
--- a/net/url_request/file_protocol_handler.h
+++ b/net/url_request/file_protocol_handler.h
@@ -28,10 +28,11 @@
public:
explicit FileProtocolHandler(
const scoped_refptr<base::TaskRunner>& file_task_runner);
- virtual ~FileProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ ~FileProtocolHandler() override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
const scoped_refptr<base::TaskRunner> file_task_runner_;
diff --git a/net/url_request/ftp_protocol_handler.h b/net/url_request/ftp_protocol_handler.h
index c3091b9..a951e05 100644
--- a/net/url_request/ftp_protocol_handler.h
+++ b/net/url_request/ftp_protocol_handler.h
@@ -22,9 +22,10 @@
public URLRequestJobFactory::ProtocolHandler {
public:
explicit FtpProtocolHandler(FtpTransactionFactory* ftp_transaction_factory);
- virtual ~FtpProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override;
+ ~FtpProtocolHandler() override;
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override;
private:
friend class FtpTestURLRequestContext;
diff --git a/net/url_request/static_http_user_agent_settings.h b/net/url_request/static_http_user_agent_settings.h
index 4edb948..57bbd07 100644
--- a/net/url_request/static_http_user_agent_settings.h
+++ b/net/url_request/static_http_user_agent_settings.h
@@ -20,11 +20,11 @@
public:
StaticHttpUserAgentSettings(const std::string& accept_language,
const std::string& user_agent);
- virtual ~StaticHttpUserAgentSettings();
+ ~StaticHttpUserAgentSettings() override;
// HttpUserAgentSettings implementation
- virtual std::string GetAcceptLanguage() const override;
- virtual std::string GetUserAgent() const override;
+ std::string GetAcceptLanguage() const override;
+ std::string GetUserAgent() const override;
private:
const std::string accept_language_;
diff --git a/net/url_request/test_url_fetcher_factory.h b/net/url_request/test_url_fetcher_factory.h
index c004ce7..078e8cb 100644
--- a/net/url_request/test_url_fetcher_factory.h
+++ b/net/url_request/test_url_fetcher_factory.h
@@ -84,70 +84,66 @@
TestURLFetcher(int id,
const GURL& url,
URLFetcherDelegate* d);
- virtual ~TestURLFetcher();
+ ~TestURLFetcher() override;
// URLFetcher implementation
- virtual void SetUploadData(const std::string& upload_content_type,
- const std::string& upload_content) override;
- virtual void SetUploadFilePath(
+ void SetUploadData(const std::string& upload_content_type,
+ const std::string& upload_content) override;
+ void SetUploadFilePath(
const std::string& upload_content_type,
const base::FilePath& file_path,
uint64 range_offset,
uint64 range_length,
scoped_refptr<base::TaskRunner> file_task_runner) override;
- virtual void SetChunkedUpload(
- const std::string& upload_content_type) override;
+ void SetChunkedUpload(const std::string& upload_content_type) override;
// Overriden to cache the chunks uploaded. Caller can read back the uploaded
// chunks with the upload_chunks() accessor.
- virtual void AppendChunkToUpload(const std::string& data,
- bool is_last_chunk) override;
- virtual void SetLoadFlags(int load_flags) override;
- virtual int GetLoadFlags() const override;
- virtual void SetReferrer(const std::string& referrer) override;
- virtual void SetReferrerPolicy(
- URLRequest::ReferrerPolicy referrer_policy) override;
- virtual void SetExtraRequestHeaders(
+ void AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) override;
+ void SetLoadFlags(int load_flags) override;
+ int GetLoadFlags() const override;
+ void SetReferrer(const std::string& referrer) override;
+ void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override;
+ void SetExtraRequestHeaders(
const std::string& extra_request_headers) override;
- virtual void AddExtraRequestHeader(const std::string& header_line) override;
- virtual void SetRequestContext(
+ void AddExtraRequestHeader(const std::string& header_line) override;
+ void SetRequestContext(
URLRequestContextGetter* request_context_getter) override;
- virtual void SetFirstPartyForCookies(
- const GURL& first_party_for_cookies) override;
- virtual void SetURLRequestUserData(
+ void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override;
+ void SetURLRequestUserData(
const void* key,
const CreateDataCallback& create_data_callback) override;
- virtual void SetStopOnRedirect(bool stop_on_redirect) override;
- virtual void SetAutomaticallyRetryOn5xx(bool retry) override;
- virtual void SetMaxRetriesOn5xx(int max_retries) override;
- virtual int GetMaxRetriesOn5xx() const override;
- virtual base::TimeDelta GetBackoffDelay() const override;
- virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
- virtual void SaveResponseToFileAtPath(
+ void SetStopOnRedirect(bool stop_on_redirect) override;
+ void SetAutomaticallyRetryOn5xx(bool retry) override;
+ void SetMaxRetriesOn5xx(int max_retries) override;
+ int GetMaxRetriesOn5xx() const override;
+ base::TimeDelta GetBackoffDelay() const override;
+ void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
+ void SaveResponseToFileAtPath(
const base::FilePath& file_path,
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseToTemporaryFile(
+ void SaveResponseToTemporaryFile(
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseWithWriter(
+ void SaveResponseWithWriter(
scoped_ptr<URLFetcherResponseWriter> response_writer) override;
- virtual HttpResponseHeaders* GetResponseHeaders() const override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual bool WasFetchedViaProxy() const override;
- virtual void Start() override;
+ HttpResponseHeaders* GetResponseHeaders() const override;
+ HostPortPair GetSocketAddress() const override;
+ bool WasFetchedViaProxy() const override;
+ void Start() override;
// URL we were created with. Because of how we're using URLFetcher GetURL()
// always returns an empty URL. Chances are you'll want to use
// GetOriginalURL() in your tests.
- virtual const GURL& GetOriginalURL() const override;
- virtual const GURL& GetURL() const override;
- virtual const URLRequestStatus& GetStatus() const override;
- virtual int GetResponseCode() const override;
- virtual const ResponseCookies& GetCookies() const override;
- virtual void ReceivedContentWasMalformed() override;
+ const GURL& GetOriginalURL() const override;
+ const GURL& GetURL() const override;
+ const URLRequestStatus& GetStatus() const override;
+ int GetResponseCode() const override;
+ const ResponseCookies& GetCookies() const override;
+ void ReceivedContentWasMalformed() override;
// Override response access functions to return fake data.
- virtual bool GetResponseAsString(
- std::string* out_response_string) const override;
- virtual bool GetResponseAsFilePath(
- bool take_ownership, base::FilePath* out_response_path) const override;
+ bool GetResponseAsString(std::string* out_response_string) const override;
+ bool GetResponseAsFilePath(bool take_ownership,
+ base::FilePath* out_response_path) const override;
void GetExtraRequestHeaders(HttpRequestHeaders* headers) const;
@@ -241,13 +237,12 @@
public ScopedURLFetcherFactory {
public:
TestURLFetcherFactory();
- virtual ~TestURLFetcherFactory();
+ ~TestURLFetcherFactory() override;
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
TestURLFetcher* GetFetcherByID(int id) const;
void RemoveFetcherFromMap(int id);
void SetDelegateForTests(TestURLFetcherDelegateForTests* delegate_for_tests);
@@ -299,11 +294,11 @@
// Start the request. This will call the given delegate asynchronously
// with the pre-baked response as parameter.
- virtual void Start() override;
+ void Start() override;
- virtual const GURL& GetURL() const override;
+ const GURL& GetURL() const override;
- virtual ~FakeURLFetcher();
+ ~FakeURLFetcher() override;
private:
// This is the method which actually calls the delegate that is passed in the
@@ -396,18 +391,17 @@
FakeURLFetcherFactory(URLFetcherFactory* default_factory,
const FakeURLFetcherCreator& creator);
- virtual ~FakeURLFetcherFactory();
+ ~FakeURLFetcherFactory() override;
// If no fake response is set for the given URL this method will delegate the
// call to |default_factory_| if it is not NULL, or return NULL if it is
// NULL.
// Otherwise, it will return a URLFetcher object which will respond with the
// pre-baked response that the client has set by calling SetFakeResponse().
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
// Sets the fake response for a given URL. The |response_data| may be empty.
// The |response_code| may be any HttpStatusCode. For instance, HTTP_OK will
@@ -453,14 +447,13 @@
class URLFetcherImplFactory : public URLFetcherFactory {
public:
URLFetcherImplFactory();
- virtual ~URLFetcherImplFactory();
+ ~URLFetcherImplFactory() override;
// This method will create a real URLFetcher.
- virtual URLFetcher* CreateURLFetcher(
- int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) override;
+ URLFetcher* CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override;
};
} // namespace net
diff --git a/net/url_request/test_url_request_interceptor.cc b/net/url_request/test_url_request_interceptor.cc
index ec60e08..b0fd315 100644
--- a/net/url_request/test_url_request_interceptor.cc
+++ b/net/url_request/test_url_request_interceptor.cc
@@ -30,10 +30,10 @@
file_path,
worker_task_runner) {}
- virtual int GetResponseCode() const override { return 200; }
+ int GetResponseCode() const override { return 200; }
private:
- virtual ~TestURLRequestJob() {}
+ ~TestURLRequestJob() override {}
DISALLOW_COPY_AND_ASSIGN(TestURLRequestJob);
};
@@ -54,7 +54,7 @@
network_task_runner_(network_task_runner),
worker_task_runner_(worker_task_runner),
hit_count_(0) {}
- virtual ~Delegate() {}
+ ~Delegate() override {}
void Register() {
net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
@@ -91,7 +91,7 @@
typedef std::map<GURL, base::FilePath> ResponseMap;
// When computing matches, this ignores the query parameters of the url.
- virtual net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h
index c064a42..6bf449f 100644
--- a/net/url_request/url_fetcher_core.h
+++ b/net/url_request/url_fetcher_core.h
@@ -122,15 +122,13 @@
base::FilePath* out_response_path);
// Overridden from URLRequest::Delegate:
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override;
- virtual void OnCertificateRequested(
- URLRequest* request,
- SSLCertRequestInfo* cert_request_info) override;
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override;
URLFetcherDelegate* delegate() const { return delegate_; }
static void CancelAll();
@@ -161,7 +159,7 @@
DISALLOW_COPY_AND_ASSIGN(Registry);
};
- virtual ~URLFetcherCore();
+ ~URLFetcherCore() override;
// Wrapper functions that allow us to ensure actions happen on the right
// thread.
diff --git a/net/url_request/url_fetcher_impl.h b/net/url_request/url_fetcher_impl.h
index e534904..29c8bd5 100644
--- a/net/url_request/url_fetcher_impl.h
+++ b/net/url_request/url_fetcher_impl.h
@@ -34,64 +34,59 @@
URLFetcherImpl(const GURL& url,
RequestType request_type,
URLFetcherDelegate* d);
- virtual ~URLFetcherImpl();
+ ~URLFetcherImpl() override;
// URLFetcher implementation:
- virtual void SetUploadData(const std::string& upload_content_type,
- const std::string& upload_content) override;
- virtual void SetUploadFilePath(
+ void SetUploadData(const std::string& upload_content_type,
+ const std::string& upload_content) override;
+ void SetUploadFilePath(
const std::string& upload_content_type,
const base::FilePath& file_path,
uint64 range_offset,
uint64 range_length,
scoped_refptr<base::TaskRunner> file_task_runner) override;
- virtual void SetChunkedUpload(
- const std::string& upload_content_type) override;
- virtual void AppendChunkToUpload(const std::string& data,
- bool is_last_chunk) override;
- virtual void SetLoadFlags(int load_flags) override;
- virtual int GetLoadFlags() const override;
- virtual void SetReferrer(const std::string& referrer) override;
- virtual void SetReferrerPolicy(
- URLRequest::ReferrerPolicy referrer_policy) override;
- virtual void SetExtraRequestHeaders(
+ void SetChunkedUpload(const std::string& upload_content_type) override;
+ void AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) override;
+ void SetLoadFlags(int load_flags) override;
+ int GetLoadFlags() const override;
+ void SetReferrer(const std::string& referrer) override;
+ void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override;
+ void SetExtraRequestHeaders(
const std::string& extra_request_headers) override;
- virtual void AddExtraRequestHeader(const std::string& header_line) override;
- virtual void SetRequestContext(
+ void AddExtraRequestHeader(const std::string& header_line) override;
+ void SetRequestContext(
URLRequestContextGetter* request_context_getter) override;
- virtual void SetFirstPartyForCookies(
- const GURL& first_party_for_cookies) override;
- virtual void SetURLRequestUserData(
+ void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override;
+ void SetURLRequestUserData(
const void* key,
const CreateDataCallback& create_data_callback) override;
- virtual void SetStopOnRedirect(bool stop_on_redirect) override;
- virtual void SetAutomaticallyRetryOn5xx(bool retry) override;
- virtual void SetMaxRetriesOn5xx(int max_retries) override;
- virtual int GetMaxRetriesOn5xx() const override;
- virtual base::TimeDelta GetBackoffDelay() const override;
- virtual void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
- virtual void SaveResponseToFileAtPath(
+ void SetStopOnRedirect(bool stop_on_redirect) override;
+ void SetAutomaticallyRetryOn5xx(bool retry) override;
+ void SetMaxRetriesOn5xx(int max_retries) override;
+ int GetMaxRetriesOn5xx() const override;
+ base::TimeDelta GetBackoffDelay() const override;
+ void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
+ void SaveResponseToFileAtPath(
const base::FilePath& file_path,
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseToTemporaryFile(
+ void SaveResponseToTemporaryFile(
scoped_refptr<base::SequencedTaskRunner> file_task_runner) override;
- virtual void SaveResponseWithWriter(
+ void SaveResponseWithWriter(
scoped_ptr<URLFetcherResponseWriter> response_writer) override;
- virtual HttpResponseHeaders* GetResponseHeaders() const override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual bool WasFetchedViaProxy() const override;
- virtual void Start() override;
- virtual const GURL& GetOriginalURL() const override;
- virtual const GURL& GetURL() const override;
- virtual const URLRequestStatus& GetStatus() const override;
- virtual int GetResponseCode() const override;
- virtual const ResponseCookies& GetCookies() const override;
- virtual void ReceivedContentWasMalformed() override;
- virtual bool GetResponseAsString(
- std::string* out_response_string) const override;
- virtual bool GetResponseAsFilePath(
- bool take_ownership,
- base::FilePath* out_response_path) const override;
+ HttpResponseHeaders* GetResponseHeaders() const override;
+ HostPortPair GetSocketAddress() const override;
+ bool WasFetchedViaProxy() const override;
+ void Start() override;
+ const GURL& GetOriginalURL() const override;
+ const GURL& GetURL() const override;
+ const URLRequestStatus& GetStatus() const override;
+ int GetResponseCode() const override;
+ const ResponseCookies& GetCookies() const override;
+ void ReceivedContentWasMalformed() override;
+ bool GetResponseAsString(std::string* out_response_string) const override;
+ bool GetResponseAsFilePath(bool take_ownership,
+ base::FilePath* out_response_path) const override;
static void CancelAll();
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index 5c97366..cf52773 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -67,12 +67,10 @@
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
- return context_;
- }
+ TestURLRequestContext* GetURLRequestContext() override { return context_; }
protected:
- virtual ~ThrottlingTestURLRequestContextGetter() {}
+ ~ThrottlingTestURLRequestContextGetter() override {}
TestURLRequestContext* const context_;
};
@@ -95,7 +93,7 @@
// Subclasses that override this should either call this function or
// CleanupAfterFetchComplete() at the end of their processing, depending on
// whether they want to check for a non-empty HTTP 200 response or not.
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
// Deletes |fetcher| and terminates the message loop.
void CleanupAfterFetchComplete();
@@ -146,10 +144,10 @@
virtual void SetUp() override;
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
GURL test_url_;
@@ -231,10 +229,10 @@
class URLFetcherPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that does a POST of a file using
@@ -249,10 +247,10 @@
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath path_;
@@ -264,10 +262,10 @@
class URLFetcherEmptyPostTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests download progress reports.
@@ -279,12 +277,12 @@
}
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
protected:
// Download progress returned by the previous callback.
@@ -298,13 +296,14 @@
class URLFetcherDownloadProgressCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchDownloadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
bool cancelled_;
};
@@ -313,12 +312,13 @@
class URLFetcherUploadProgressTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchUploadProgress(const URLFetcher* source,
- int64 current,
- int64 total) override;
+ void OnURLFetchUploadProgress(const URLFetcher* source,
+ int64 current,
+ int64 total) override;
+
protected:
int64 previous_progress_;
std::string chunk_;
@@ -329,14 +329,15 @@
class URLFetcherHeadersTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
};
// Version of URLFetcherTest that tests SocketAddress.
class URLFetcherSocketAddressTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
protected:
std::string expected_host_;
uint16 expected_port_;
@@ -349,10 +350,10 @@
virtual ~URLFetcherStopOnRedirectTest();
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
// The URL we should be redirected to.
@@ -365,10 +366,11 @@
class URLFetcherProtectTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -378,10 +380,11 @@
class URLFetcherProtectTestPassedThrough : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
Time start_time_;
};
@@ -392,7 +395,7 @@
URLFetcherBadHTTPSTest();
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
private:
base::FilePath cert_dir_;
@@ -402,10 +405,10 @@
class URLFetcherCancelTest : public URLFetcherTest {
public:
// URLFetcherTest:
- virtual void CreateFetcher(const GURL& url) override;
+ void CreateFetcher(const GURL& url) override;
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
void CancelRequest();
};
@@ -418,7 +421,7 @@
}
private:
- virtual ~CancelTestURLRequestContext() {
+ ~CancelTestURLRequestContext() override {
// The d'tor should execute in the IO thread. Post the quit task to the
// current thread.
base::MessageLoop::current()->PostTask(FROM_HERE,
@@ -439,7 +442,7 @@
}
// TestURLRequestContextGetter:
- virtual TestURLRequestContext* GetURLRequestContext() override {
+ TestURLRequestContext* GetURLRequestContext() override {
if (!context_.get()) {
context_.reset(new CancelTestURLRequestContext());
DCHECK(context_->throttler_manager());
@@ -474,7 +477,7 @@
}
protected:
- virtual ~CancelTestURLRequestContextGetter() {}
+ ~CancelTestURLRequestContextGetter() override {}
private:
scoped_ptr<TestURLRequestContext> context_;
@@ -487,7 +490,8 @@
class URLFetcherMultipleAttemptTest : public URLFetcherTest {
public:
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
+
private:
std::string data_;
};
@@ -501,7 +505,7 @@
void CreateFetcherForTempFile(const GURL& url);
// URLFetcherDelegate:
- virtual void OnURLFetchComplete(const URLFetcher* source) override;
+ void OnURLFetchComplete(const URLFetcher* source) override;
protected:
base::FilePath expected_file_;
diff --git a/net/url_request/url_fetcher_response_writer.h b/net/url_request/url_fetcher_response_writer.h
index 3321f5c..fb99522 100644
--- a/net/url_request/url_fetcher_response_writer.h
+++ b/net/url_request/url_fetcher_response_writer.h
@@ -60,17 +60,17 @@
class NET_EXPORT URLFetcherStringWriter : public URLFetcherResponseWriter {
public:
URLFetcherStringWriter();
- virtual ~URLFetcherStringWriter();
+ ~URLFetcherStringWriter() override;
const std::string& data() const { return data_; }
// URLFetcherResponseWriter overrides:
- virtual int Initialize(const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buffer,
- int num_bytes,
- const CompletionCallback& callback) override;
- virtual int Finish(const CompletionCallback& callback) override;
- virtual URLFetcherStringWriter* AsStringWriter() override;
+ int Initialize(const CompletionCallback& callback) override;
+ int Write(IOBuffer* buffer,
+ int num_bytes,
+ const CompletionCallback& callback) override;
+ int Finish(const CompletionCallback& callback) override;
+ URLFetcherStringWriter* AsStringWriter() override;
private:
std::string data_;
@@ -86,17 +86,17 @@
URLFetcherFileWriter(
scoped_refptr<base::SequencedTaskRunner> file_task_runner,
const base::FilePath& file_path);
- virtual ~URLFetcherFileWriter();
+ ~URLFetcherFileWriter() override;
const base::FilePath& file_path() const { return file_path_; }
// URLFetcherResponseWriter overrides:
- virtual int Initialize(const CompletionCallback& callback) override;
- virtual int Write(IOBuffer* buffer,
- int num_bytes,
- const CompletionCallback& callback) override;
- virtual int Finish(const CompletionCallback& callback) override;
- virtual URLFetcherFileWriter* AsFileWriter() override;
+ int Initialize(const CompletionCallback& callback) override;
+ int Write(IOBuffer* buffer,
+ int num_bytes,
+ const CompletionCallback& callback) override;
+ int Finish(const CompletionCallback& callback) override;
+ URLFetcherFileWriter* AsFileWriter() override;
// Drops ownership of the file at |file_path_|.
// This class will not delete it or write to it again.
diff --git a/net/url_request/url_range_request_job.h b/net/url_request/url_range_request_job.h
index 190389d..38a6802 100644
--- a/net/url_request/url_range_request_job.h
+++ b/net/url_request/url_range_request_job.h
@@ -24,14 +24,13 @@
URLRangeRequestJob(URLRequest* request,
NetworkDelegate* delegate);
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
const std::vector<HttpByteRange>& ranges() const { return ranges_; }
int range_parse_result() const { return range_parse_result_; }
protected:
- virtual ~URLRangeRequestJob();
+ ~URLRangeRequestJob() override;
private:
std::vector<HttpByteRange> ranges_;
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index a0d5789..3db6c68 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -278,7 +278,7 @@
// If destroyed after Start() has been called but while IO is pending,
// then the request will be effectively canceled and the delegate
// will not have any more of its methods called.
- virtual ~URLRequest();
+ ~URLRequest() override;
// Changes the default cookie policy from allowing all cookies to blocking all
// cookies. Embedders that want to implement a more flexible policy should
diff --git a/net/url_request/url_request_about_job.h b/net/url_request/url_request_about_job.h
index d4b4867..36778b8 100644
--- a/net/url_request/url_request_about_job.h
+++ b/net/url_request/url_request_about_job.h
@@ -18,11 +18,11 @@
URLRequestAboutJob(URLRequest* request, NetworkDelegate* network_delegate);
// URLRequestJob:
- virtual void Start() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
+ void Start() override;
+ bool GetMimeType(std::string* mime_type) const override;
private:
- virtual ~URLRequestAboutJob();
+ ~URLRequestAboutJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 2e2fcc4..666bd03 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -51,25 +51,25 @@
class BasicNetworkDelegate : public NetworkDelegate {
public:
BasicNetworkDelegate() {}
- virtual ~BasicNetworkDelegate() {}
+ ~BasicNetworkDelegate() override {}
private:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
return OK;
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
return OK;
}
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override {}
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override {}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -78,22 +78,21 @@
return OK;
}
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override {}
+ void OnBeforeRedirect(URLRequest* request,
+ const GURL& new_location) override {}
- virtual void OnResponseStarted(URLRequest* request) override {}
+ void OnResponseStarted(URLRequest* request) override {}
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override {}
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override {}
- virtual void OnCompleted(URLRequest* request, bool started) override {}
+ void OnCompleted(URLRequest* request, bool started) override {}
- virtual void OnURLRequestDestroyed(URLRequest* request) override {}
+ void OnURLRequestDestroyed(URLRequest* request) override {}
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override {}
+ void OnPACScriptError(int line_number, const base::string16& error) override {
+ }
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -101,31 +100,30 @@
return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override {
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override {
return true;
}
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return true;
}
- virtual bool OnCanAccessFile(const net::URLRequest& request,
- const base::FilePath& path) const override {
+ bool OnCanAccessFile(const net::URLRequest& request,
+ const base::FilePath& path) const override {
return true;
}
- virtual bool OnCanThrottleRequest(const URLRequest& request) const override {
+ bool OnCanThrottleRequest(const URLRequest& request) const override {
// Returning true will only enable throttling if there's also a
// URLRequestThrottlerManager, which there isn't, by default.
return true;
}
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override {
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override {
return OK;
}
@@ -165,9 +163,7 @@
}
protected:
- virtual ~BasicURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~BasicURLRequestContext() override { AssertNoURLRequests(); }
private:
// Threads should be torn down last.
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index f0f4b82..677023c 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -43,15 +43,15 @@
public:
explicit MockHttpAuthHandlerFactory(int return_code) :
return_code_(return_code) {}
- virtual ~MockHttpAuthHandlerFactory() {}
+ ~MockHttpAuthHandlerFactory() override {}
- virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
- HttpAuth::Target target,
- const GURL& origin,
- CreateReason reason,
- int nonce_count,
- const BoundNetLog& net_log,
- scoped_ptr<HttpAuthHandler>* handler) override {
+ int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
+ HttpAuth::Target target,
+ const GURL& origin,
+ CreateReason reason,
+ int nonce_count,
+ const BoundNetLog& net_log,
+ scoped_ptr<HttpAuthHandler>* handler) override {
handler->reset();
return return_code_;
}
diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
index aa2d64b..17d17bd 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -62,13 +62,13 @@
const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner);
// net::URLRequestContextGetter implementation:
- virtual net::URLRequestContext* GetURLRequestContext() override;
+ net::URLRequestContext* GetURLRequestContext() override;
- virtual scoped_refptr<base::SingleThreadTaskRunner>
- GetNetworkTaskRunner() const override;
+ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+ const override;
private:
- virtual ~TrivialURLRequestContextGetter();
+ ~TrivialURLRequestContextGetter() override;
net::URLRequestContext* context_;
const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
diff --git a/net/url_request/url_request_data_job.h b/net/url_request/url_request_data_job.h
index c39ae8d..0b3c7fa 100644
--- a/net/url_request/url_request_data_job.h
+++ b/net/url_request/url_request_data_job.h
@@ -30,13 +30,13 @@
URLRequestDataJob(URLRequest* request, NetworkDelegate* network_delegate);
// URLRequestSimpleJob
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override;
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override;
private:
- virtual ~URLRequestDataJob();
+ ~URLRequestDataJob() override;
DISALLOW_COPY_AND_ASSIGN(URLRequestDataJob);
};
diff --git a/net/url_request/url_request_error_job.h b/net/url_request/url_request_error_job.h
index 0bb37ec..059db26 100644
--- a/net/url_request/url_request_error_job.h
+++ b/net/url_request/url_request_error_job.h
@@ -20,10 +20,10 @@
NetworkDelegate* network_delegate,
int error);
- virtual void Start() override;
+ void Start() override;
private:
- virtual ~URLRequestErrorJob();
+ ~URLRequestErrorJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_file_dir_job.h b/net/url_request/url_request_file_dir_job.h
index b353697..dfb2d74 100644
--- a/net/url_request/url_request_file_dir_job.h
+++ b/net/url_request/url_request_file_dir_job.h
@@ -27,21 +27,18 @@
virtual void StartAsync();
// Overridden from URLRequestJob:
- virtual void Start() override;
- virtual void Kill() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int* bytes_read) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
+ void Start() override;
+ void Kill() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
// Overridden from DirectoryLister::DirectoryListerDelegate:
- virtual void OnListFile(
- const DirectoryLister::DirectoryListerData& data) override;
- virtual void OnListDone(int error) override;
+ void OnListFile(const DirectoryLister::DirectoryListerData& data) override;
+ void OnListDone(int error) override;
private:
- virtual ~URLRequestFileDirJob();
+ ~URLRequestFileDirJob() override;
void CloseLister();
diff --git a/net/url_request/url_request_file_job.h b/net/url_request/url_request_file_job.h
index 3a5aae7..fe7c6e9 100644
--- a/net/url_request/url_request_file_job.h
+++ b/net/url_request/url_request_file_job.h
@@ -36,24 +36,20 @@
const scoped_refptr<base::TaskRunner>& file_task_runner);
// URLRequestJob:
- virtual void Start() override;
- virtual void Kill() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int* bytes_read) override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
- virtual Filter* SetupFilter() const override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
+ void Start() override;
+ void Kill() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
+ Filter* SetupFilter() const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
// An interface for subclasses who wish to monitor read operations.
virtual void OnSeekComplete(int64 result);
virtual void OnReadComplete(net::IOBuffer* buf, int result);
protected:
- virtual ~URLRequestFileJob();
+ ~URLRequestFileJob() override;
int64 remaining_bytes() const { return remaining_bytes_; }
diff --git a/net/url_request/url_request_file_job_unittest.cc b/net/url_request/url_request_file_job_unittest.cc
index ba87766..f4d7f7a 100644
--- a/net/url_request/url_request_file_job_unittest.cc
+++ b/net/url_request/url_request_file_job_unittest.cc
@@ -39,14 +39,14 @@
const std::vector<std::string>& data_chunks() { return data_chunks_; }
protected:
- virtual ~URLRequestFileJobWithCallbacks() {}
+ ~URLRequestFileJobWithCallbacks() override {}
- virtual void OnSeekComplete(int64 result) override {
+ void OnSeekComplete(int64 result) override {
ASSERT_EQ(seek_position_, 0);
seek_position_ = result;
}
- virtual void OnReadComplete(IOBuffer* buf, int result) override {
+ void OnReadComplete(IOBuffer* buf, int result) override {
data_chunks_.push_back(std::string(buf->data(), result));
}
@@ -67,9 +67,9 @@
: path_(path), observer_(observer) {
}
- virtual ~CallbacksJobFactory() {}
+ ~CallbacksJobFactory() override {}
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override {
@@ -82,15 +82,15 @@
return job;
}
- virtual bool IsHandledProtocol(const std::string& scheme) const override {
+ bool IsHandledProtocol(const std::string& scheme) const override {
return scheme == "file";
}
- virtual bool IsHandledURL(const GURL& url) const override {
+ bool IsHandledURL(const GURL& url) const override {
return IsHandledProtocol(url.scheme());
}
- virtual bool IsSafeRedirectTarget(const GURL& location) const override {
+ bool IsSafeRedirectTarget(const GURL& location) const override {
return false;
}
@@ -116,7 +116,7 @@
class JobObserverImpl : public CallbacksJobFactory::JobObserver {
public:
- virtual void OnJobCreated(URLRequestFileJobWithCallbacks* job) override {
+ void OnJobCreated(URLRequestFileJobWithCallbacks* job) override {
jobs_.push_back(job);
}
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index 04d61cc..eaa3325 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -18,11 +18,12 @@
public:
explicit URLRequestFilterInterceptor(URLRequest::ProtocolFactory* factory)
: factory_(factory) {}
- virtual ~URLRequestFilterInterceptor() {}
+ ~URLRequestFilterInterceptor() override {}
// URLRequestInterceptor implementation.
- virtual URLRequestJob* MaybeInterceptRequest(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeInterceptRequest(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return factory_(request, network_delegate, request->url().scheme());
}
diff --git a/net/url_request/url_request_filter.h b/net/url_request/url_request_filter.h
index 3388d92..4366dbd 100644
--- a/net/url_request/url_request_filter.h
+++ b/net/url_request/url_request_filter.h
@@ -67,7 +67,7 @@
int hit_count() const { return hit_count_; }
// URLRequestInterceptor implementation:
- virtual URLRequestJob* MaybeInterceptRequest(
+ URLRequestJob* MaybeInterceptRequest(
URLRequest* request,
NetworkDelegate* network_delegate) const override;
@@ -79,7 +79,7 @@
typedef base::hash_map<std::string, URLRequestInterceptor*> URLInterceptorMap;
URLRequestFilter();
- virtual ~URLRequestFilter();
+ ~URLRequestFilter() override;
// Maps hostnames to interceptors. Hostnames take priority over URLs.
HostnameInterceptorMap hostname_interceptor_map_;
diff --git a/net/url_request/url_request_filter_unittest.cc b/net/url_request/url_request_filter_unittest.cc
index bd2a782..3d23b7b 100644
--- a/net/url_request/url_request_filter_unittest.cc
+++ b/net/url_request/url_request_filter_unittest.cc
@@ -40,10 +40,11 @@
class TestURLRequestInterceptor : public URLRequestInterceptor {
public:
- virtual ~TestURLRequestInterceptor() {}
+ ~TestURLRequestInterceptor() override {}
- virtual URLRequestJob* MaybeInterceptRequest(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeInterceptRequest(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
job_c = new URLRequestTestJob(request, network_delegate);
return job_c;
}
diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h
index 61d4cff..74caf72 100644
--- a/net/url_request/url_request_ftp_job.h
+++ b/net/url_request/url_request_ftp_job.h
@@ -34,16 +34,16 @@
FtpAuthCache* ftp_auth_cache);
protected:
- virtual ~URLRequestFtpJob();
+ ~URLRequestFtpJob() override;
// Overridden from URLRequestJob:
- virtual bool IsSafeRedirect(const GURL& location) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual void Kill() override;
+ bool IsSafeRedirect(const GURL& location) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ HostPortPair GetSocketAddress() const override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ void Kill() override;
RequestPriority priority() const { return priority_; }
@@ -62,18 +62,16 @@
void LogFtpServerType(char server_type);
// Overridden from URLRequestJob:
- virtual LoadState GetLoadState() const override;
- virtual bool NeedsAuth() override;
- virtual void GetAuthChallengeInfo(
+ LoadState GetLoadState() const override;
+ bool NeedsAuth() override;
+ void GetAuthChallengeInfo(
scoped_refptr<AuthChallengeInfo>* auth_info) override;
- virtual void SetAuth(const AuthCredentials& credentials) override;
- virtual void CancelAuth() override;
+ void SetAuth(const AuthCredentials& credentials) override;
+ void CancelAuth() override;
// TODO(ibrar): Yet to give another look at this function.
- virtual UploadProgress GetUploadProgress() const override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
+ UploadProgress GetUploadProgress() const override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
void HandleAuthNeededResponse();
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index 629613d..5f41edc 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -67,18 +67,15 @@
config_.proxy_rules().ParseFromString("ftp=localhost");
}
- virtual void AddObserver(Observer* observer) override {
- observer_ = observer;
- }
+ void AddObserver(Observer* observer) override { observer_ = observer; }
- virtual void RemoveObserver(Observer* observer) override {
+ void RemoveObserver(Observer* observer) override {
if (observer_ == observer) {
observer_ = NULL;
}
}
- virtual ConfigAvailability GetLatestProxyConfig(
- ProxyConfig* config) override {
+ ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override {
*config = config_;
return CONFIG_VALID;
}
@@ -108,16 +105,14 @@
using URLRequestFtpJob::priority;
protected:
- virtual ~TestURLRequestFtpJob() {}
+ ~TestURLRequestFtpJob() override {}
};
class MockFtpTransactionFactory : public FtpTransactionFactory {
public:
- virtual FtpTransaction* CreateTransaction() override {
- return NULL;
- }
+ FtpTransaction* CreateTransaction() override { return NULL; }
- virtual void Suspend(bool suspend) override {}
+ void Suspend(bool suspend) override {}
};
// Fixture for priority-related tests. Priority matters when there is
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index fc26e94..a53bbab 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -55,20 +55,20 @@
class URLRequestHttpJob::HttpFilterContext : public FilterContext {
public:
explicit HttpFilterContext(URLRequestHttpJob* job);
- virtual ~HttpFilterContext();
+ ~HttpFilterContext() override;
// FilterContext implementation.
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetURL(GURL* gurl) const override;
- virtual bool GetContentDisposition(std::string* disposition) const override;
- virtual base::Time GetRequestTime() const override;
- virtual bool IsCachedContent() const override;
- virtual bool IsDownload() const override;
- virtual bool SdchResponseExpected() const override;
- virtual int64 GetByteReadCount() const override;
- virtual int GetResponseCode() const override;
- virtual const URLRequestContext* GetURLRequestContext() const override;
- virtual void RecordPacketStats(StatisticSelector statistic) const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetURL(GURL* gurl) const override;
+ bool GetContentDisposition(std::string* disposition) const override;
+ base::Time GetRequestTime() const override;
+ bool IsCachedContent() const override;
+ bool IsDownload() const override;
+ bool SdchResponseExpected() const override;
+ int64 GetByteReadCount() const override;
+ int GetResponseCode() const override;
+ const URLRequestContext* GetURLRequestContext() const override;
+ void RecordPacketStats(StatisticSelector statistic) const override;
// Method to allow us to reset filter context for a response that should have
// been SDCH encoded when there is an update due to an explicit HTTP header.
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index 4b0cc67..f4bea7e 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -45,12 +45,12 @@
NetworkDelegate* network_delegate,
const HttpUserAgentSettings* http_user_agent_settings);
- virtual ~URLRequestHttpJob();
+ ~URLRequestHttpJob() override;
// Overridden from URLRequestJob:
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual void Kill() override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ void Kill() override;
RequestPriority priority() const {
return priority_;
@@ -99,44 +99,40 @@
void RestartTransactionWithAuth(const AuthCredentials& credentials);
// Overridden from URLRequestJob:
- virtual void SetUpload(UploadDataStream* upload) override;
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) override;
- virtual LoadState GetLoadState() const override;
- virtual UploadProgress GetUploadProgress() const override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual bool GetResponseCookies(std::vector<std::string>* cookies) override;
- virtual int GetResponseCode() const override;
- virtual Filter* SetupFilter() const override;
- virtual bool CopyFragmentOnRedirect(const GURL& location) const override;
- virtual bool IsSafeRedirect(const GURL& location) override;
- virtual bool NeedsAuth() override;
- virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override;
- virtual void SetAuth(const AuthCredentials& credentials) override;
- virtual void CancelAuth() override;
- virtual void ContinueWithCertificate(X509Certificate* client_cert) override;
- virtual void ContinueDespiteLastError() override;
- virtual void ResumeNetworkStart() override;
- virtual bool ReadRawData(IOBuffer* buf, int buf_size,
- int* bytes_read) override;
- virtual void StopCaching() override;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual void DoneReading() override;
- virtual void DoneReadingRedirectResponse() override;
+ void SetUpload(UploadDataStream* upload) override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ bool GetResponseCookies(std::vector<std::string>* cookies) override;
+ int GetResponseCode() const override;
+ Filter* SetupFilter() const override;
+ bool CopyFragmentOnRedirect(const GURL& location) const override;
+ bool IsSafeRedirect(const GURL& location) override;
+ bool NeedsAuth() override;
+ void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override;
+ void SetAuth(const AuthCredentials& credentials) override;
+ void CancelAuth() override;
+ void ContinueWithCertificate(X509Certificate* client_cert) override;
+ void ContinueDespiteLastError() override;
+ void ResumeNetworkStart() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ void DoneReadingRedirectResponse() override;
- virtual HostPortPair GetSocketAddress() const override;
- virtual void NotifyURLRequestDestroyed() override;
+ HostPortPair GetSocketAddress() const override;
+ void NotifyURLRequestDestroyed() override;
void RecordTimer();
void ResetTimer();
- virtual void UpdatePacketReadTimes() override;
+ void UpdatePacketReadTimes() override;
void RecordPacketStats(FilterContext::StatisticSelector statistic) const;
void RecordCompressionHistograms();
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index c6848d3..b8892c7 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -43,7 +43,7 @@
using URLRequestHttpJob::priority;
protected:
- virtual ~TestURLRequestHttpJob() {}
+ ~TestURLRequestHttpJob() override {}
};
class URLRequestHttpJobTest : public ::testing::Test {
@@ -253,61 +253,59 @@
}
// Fake implementation of HttpStreamBase methods.
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override {
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
initialize_stream_was_called_ = true;
return ERR_IO_PENDING;
}
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override {
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override {
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override {
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual void Close(bool not_reusable) override {}
+ void Close(bool not_reusable) override {}
- virtual bool IsResponseBodyComplete() const override { return false; }
+ bool IsResponseBodyComplete() const override { return false; }
- virtual bool CanFindEndOfResponse() const override { return false; }
+ bool CanFindEndOfResponse() const override { return false; }
- virtual bool IsConnectionReused() const override { return false; }
- virtual void SetConnectionReused() override {}
+ bool IsConnectionReused() const override { return false; }
+ void SetConnectionReused() override {}
- virtual bool IsConnectionReusable() const override { return false; }
+ bool IsConnectionReusable() const override { return false; }
- virtual int64 GetTotalReceivedBytes() const override { return 0; }
+ int64 GetTotalReceivedBytes() const override { return 0; }
- virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
- override {
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
return false;
}
- virtual void GetSSLInfo(SSLInfo* ssl_info) override {}
+ void GetSSLInfo(SSLInfo* ssl_info) override {}
- virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info)
- override {}
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
- virtual bool IsSpdyHttpStream() const override { return false; }
+ bool IsSpdyHttpStream() const override { return false; }
- virtual void Drain(HttpNetworkSession* session) override {}
+ void Drain(HttpNetworkSession* session) override {}
- virtual void SetPriority(RequestPriority priority) override {}
+ void SetPriority(RequestPriority priority) override {}
// Fake implementation of WebSocketHandshakeStreamBase method(s)
- virtual scoped_ptr<WebSocketStream> Upgrade() override {
+ scoped_ptr<WebSocketStream> Upgrade() override {
return scoped_ptr<WebSocketStream>();
}
diff --git a/net/url_request/url_request_intercepting_job_factory.h b/net/url_request/url_request_intercepting_job_factory.h
index 909a25c..857dbf4 100644
--- a/net/url_request/url_request_intercepting_job_factory.h
+++ b/net/url_request/url_request_intercepting_job_factory.h
@@ -35,16 +35,16 @@
URLRequestInterceptingJobFactory(
scoped_ptr<URLRequestJobFactory> job_factory,
scoped_ptr<URLRequestInterceptor> interceptor);
- virtual ~URLRequestInterceptingJobFactory();
+ ~URLRequestInterceptingJobFactory() override;
// URLRequestJobFactory implementation
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override;
- virtual bool IsHandledProtocol(const std::string& scheme) const override;
- virtual bool IsHandledURL(const GURL& url) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ bool IsHandledProtocol(const std::string& scheme) const override;
+ bool IsHandledURL(const GURL& url) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
scoped_ptr<URLRequestJobFactory> job_factory_;
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 5b8760f..e824689 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -219,7 +219,7 @@
// base::PowerObserver methods:
// We invoke URLRequestJob::Kill on suspend (crbug.com/4606).
- virtual void OnSuspend() override;
+ void OnSuspend() override;
// Called after a NetworkDelegate has been informed that the URLRequest
// will be destroyed. This is used to track that no pending callbacks
@@ -229,7 +229,7 @@
protected:
friend class base::RefCounted<URLRequestJob>;
- virtual ~URLRequestJob();
+ ~URLRequestJob() override;
// Notifies the job that a certificate is requested.
void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info);
diff --git a/net/url_request/url_request_job_factory_impl.h b/net/url_request/url_request_job_factory_impl.h
index 94112c1..695661e 100644
--- a/net/url_request/url_request_job_factory_impl.h
+++ b/net/url_request/url_request_job_factory_impl.h
@@ -20,7 +20,7 @@
class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory {
public:
URLRequestJobFactoryImpl();
- virtual ~URLRequestJobFactoryImpl();
+ ~URLRequestJobFactoryImpl() override;
// Sets the ProtocolHandler for a scheme. Returns true on success, false on
// failure (a ProtocolHandler already exists for |scheme|). On success,
@@ -29,13 +29,13 @@
ProtocolHandler* protocol_handler);
// URLRequestJobFactory implementation
- virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const override;
- virtual bool IsHandledProtocol(const std::string& scheme) const override;
- virtual bool IsHandledURL(const GURL& url) const override;
- virtual bool IsSafeRedirectTarget(const GURL& location) const override;
+ bool IsHandledProtocol(const std::string& scheme) const override;
+ bool IsHandledURL(const GURL& url) const override;
+ bool IsSafeRedirectTarget(const GURL& location) const override;
private:
// For testing only.
diff --git a/net/url_request/url_request_job_factory_impl_unittest.cc b/net/url_request/url_request_job_factory_impl_unittest.cc
index 61467f1..2c7b3e2 100644
--- a/net/url_request/url_request_job_factory_impl_unittest.cc
+++ b/net/url_request/url_request_job_factory_impl_unittest.cc
@@ -26,7 +26,7 @@
status_(status),
weak_factory_(this) {}
- virtual void Start() override {
+ void Start() override {
// Start reading asynchronously so that all error reporting and data
// callbacks happen as they would for network requests.
base::MessageLoop::current()->PostTask(
@@ -35,7 +35,7 @@
}
protected:
- virtual ~MockURLRequestJob() {}
+ ~MockURLRequestJob() override {}
private:
void StartAsync() {
@@ -49,8 +49,9 @@
class DummyProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
public:
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return new MockURLRequestJob(
request,
network_delegate,
diff --git a/net/url_request/url_request_redirect_job.h b/net/url_request/url_request_redirect_job.h
index 54bc3f0..ab08399 100644
--- a/net/url_request/url_request_redirect_job.h
+++ b/net/url_request/url_request_redirect_job.h
@@ -42,15 +42,14 @@
const std::string& redirect_reason);
// URLRequestJob implementation:
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual void Start() override;
- virtual bool CopyFragmentOnRedirect(const GURL& location) const override;
- virtual int GetResponseCode() const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void Start() override;
+ bool CopyFragmentOnRedirect(const GURL& location) const override;
+ int GetResponseCode() const override;
private:
- virtual ~URLRequestRedirectJob();
+ ~URLRequestRedirectJob() override;
void StartAsync();
diff --git a/net/url_request/url_request_simple_job.h b/net/url_request/url_request_simple_job.h
index 01bd319..85d8f7e 100644
--- a/net/url_request/url_request_simple_job.h
+++ b/net/url_request/url_request_simple_job.h
@@ -20,15 +20,13 @@
public:
URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate);
- virtual void Start() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual bool GetCharset(std::string* charset) override;
+ void Start() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
protected:
- virtual ~URLRequestSimpleJob();
+ ~URLRequestSimpleJob() override;
// Subclasses must override the way response data is determined.
// The return value should be:
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index b75da80..5ee71b5 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -32,10 +32,10 @@
}
protected:
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const override {
+ int GetData(std::string* mime_type,
+ std::string* charset,
+ std::string* data,
+ const CompletionCallback& callback) const override {
mime_type->assign("text/plain");
charset->assign("US-ASCII");
data->assign(kTestData);
@@ -43,7 +43,7 @@
}
private:
- virtual ~MockSimpleJob() {}
+ ~MockSimpleJob() override {}
std::string data_;
@@ -53,7 +53,7 @@
class SimpleJobProtocolHandler :
public URLRequestJobFactory::ProtocolHandler {
public:
- virtual URLRequestJob* MaybeCreateJob(
+ URLRequestJob* MaybeCreateJob(
URLRequest* request,
NetworkDelegate* network_delegate) const override {
return new MockSimpleJob(request, network_delegate);
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index 3806e25..ecf3943 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -27,8 +27,9 @@
class TestJobProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
public:
// URLRequestJobFactory::ProtocolHandler implementation:
- virtual URLRequestJob* MaybeCreateJob(
- URLRequest* request, NetworkDelegate* network_delegate) const override {
+ URLRequestJob* MaybeCreateJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const override {
return new URLRequestTestJob(request, network_delegate);
}
};
diff --git a/net/url_request/url_request_test_job.h b/net/url_request/url_request_test_job.h
index f0f26fd..fbdbe0f 100644
--- a/net/url_request/url_request_test_job.h
+++ b/net/url_request/url_request_test_job.h
@@ -108,19 +108,15 @@
static URLRequestJobFactory::ProtocolHandler* CreateProtocolHandler();
// Job functions
- virtual void SetPriority(RequestPriority priority) override;
- virtual void Start() override;
- virtual bool ReadRawData(IOBuffer* buf,
- int buf_size,
- int *bytes_read) override;
- virtual void Kill() override;
- virtual bool GetMimeType(std::string* mime_type) const override;
- virtual void GetResponseInfo(HttpResponseInfo* info) override;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const override;
- virtual int GetResponseCode() const override;
- virtual bool IsRedirectResponse(GURL* location,
- int* http_status_code) override;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ void Kill() override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ int GetResponseCode() const override;
+ bool IsRedirectResponse(GURL* location, int* http_status_code) override;
protected:
// Override to specify whether the next read done from this job will
@@ -133,7 +129,7 @@
// When the stage is DONE, this job will not be put on the queue.
enum Stage { WAITING, DATA_AVAILABLE, ALL_DATA, DONE };
- virtual ~URLRequestTestJob();
+ ~URLRequestTestJob() override;
// Call to process the next opeation, usually sending a notification, and
// advancing the stage if necessary. THIS MAY DELETE THE OBJECT.
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index d301154..5784931 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -58,7 +58,7 @@
// URLRequestContext before it is constructed completely. If
// |delay_initialization| is true, Init() needs be be called manually.
explicit TestURLRequestContext(bool delay_initialization);
- virtual ~TestURLRequestContext();
+ ~TestURLRequestContext() override;
void Init();
@@ -108,12 +108,12 @@
scoped_ptr<TestURLRequestContext> context);
// URLRequestContextGetter implementation.
- virtual TestURLRequestContext* GetURLRequestContext() override;
- virtual scoped_refptr<base::SingleThreadTaskRunner>
- GetNetworkTaskRunner() const override;
+ TestURLRequestContext* GetURLRequestContext() override;
+ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+ const override;
protected:
- virtual ~TestURLRequestContextGetter();
+ ~TestURLRequestContextGetter() override;
private:
const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
@@ -125,7 +125,7 @@
class TestDelegate : public URLRequest::Delegate {
public:
TestDelegate();
- virtual ~TestDelegate();
+ ~TestDelegate() override;
void set_cancel_in_received_redirect(bool val) { cancel_in_rr_ = val; }
void set_cancel_in_response_started(bool val) { cancel_in_rs_ = val; }
@@ -169,21 +169,20 @@
void ClearFullRequestHeaders();
// URLRequest::Delegate:
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override;
- virtual void OnBeforeNetworkStart(URLRequest* request, bool* defer) override;
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override;
+ void OnBeforeNetworkStart(URLRequest* request, bool* defer) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
// NOTE: |fatal| causes |certificate_errors_are_fatal_| to be set to true.
// (Unit tests use this as a post-condition.) But for policy, this method
// consults |allow_certificate_errors_|.
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool fatal) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
static const int kBufferSize = 4096;
@@ -229,7 +228,7 @@
};
TestNetworkDelegate();
- virtual ~TestNetworkDelegate();
+ ~TestNetworkDelegate() override;
// Writes the LoadTimingInfo during the most recent call to OnBeforeRedirect.
bool GetLoadTimingInfoBeforeRedirect(
@@ -284,51 +283,45 @@
protected:
// NetworkDelegate:
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override;
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override;
- virtual void OnBeforeSendProxyHeaders(
- net::URLRequest* request,
- const net::ProxyInfo& proxy_info,
- net::HttpRequestHeaders* headers) override;
- virtual void OnSendHeaders(URLRequest* request,
- const HttpRequestHeaders& headers) override;
- virtual int OnHeadersReceived(
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override;
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override;
+ void OnBeforeSendProxyHeaders(net::URLRequest* request,
+ const net::ProxyInfo& proxy_info,
+ net::HttpRequestHeaders* headers) override;
+ void OnSendHeaders(URLRequest* request,
+ const HttpRequestHeaders& headers) override;
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers,
GURL* allowed_unsafe_redirect_url) override;
- virtual void OnBeforeRedirect(URLRequest* request,
- const GURL& new_location) override;
- virtual void OnResponseStarted(URLRequest* request) override;
- virtual void OnRawBytesRead(const URLRequest& request,
- int bytes_read) override;
- virtual void OnCompleted(URLRequest* request, bool started) override;
- virtual void OnURLRequestDestroyed(URLRequest* request) override;
- virtual void OnPACScriptError(int line_number,
- const base::string16& error) override;
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ void OnBeforeRedirect(URLRequest* request, const GURL& new_location) override;
+ void OnResponseStarted(URLRequest* request) override;
+ void OnRawBytesRead(const URLRequest& request, int bytes_read) override;
+ void OnCompleted(URLRequest* request, bool started) override;
+ void OnURLRequestDestroyed(URLRequest* request) override;
+ void OnPACScriptError(int line_number, const base::string16& error) override;
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
AuthCredentials* credentials) override;
- virtual bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override;
- virtual bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
- CookieOptions* options) override;
- virtual bool OnCanAccessFile(const URLRequest& request,
- const base::FilePath& path) const override;
- virtual bool OnCanThrottleRequest(
- const URLRequest& request) const override;
- virtual int OnBeforeSocketStreamConnect(
- SocketStream* stream,
- const CompletionCallback& callback) override;
- virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
+ bool OnCanGetCookies(const URLRequest& request,
+ const CookieList& cookie_list) override;
+ bool OnCanSetCookie(const URLRequest& request,
+ const std::string& cookie_line,
+ CookieOptions* options) override;
+ bool OnCanAccessFile(const URLRequest& request,
+ const base::FilePath& path) const override;
+ bool OnCanThrottleRequest(const URLRequest& request) const override;
+ int OnBeforeSocketStreamConnect(SocketStream* stream,
+ const CompletionCallback& callback) override;
+ bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
const URLRequest& request,
const GURL& target_url,
const GURL& referrer_url) const override;
@@ -406,7 +399,7 @@
public:
TestJobInterceptor();
- virtual URLRequestJob* MaybeCreateJob(
+ URLRequestJob* MaybeCreateJob(
URLRequest* request,
NetworkDelegate* network_delegate) const override;
void set_main_intercept_job(URLRequestJob* job);
diff --git a/net/url_request/url_request_throttler_entry.h b/net/url_request/url_request_throttler_entry.h
index 489eecb..281d0f5 100644
--- a/net/url_request/url_request_throttler_entry.h
+++ b/net/url_request/url_request_throttler_entry.h
@@ -93,19 +93,18 @@
void DetachManager();
// Implementation of URLRequestThrottlerEntryInterface.
- virtual bool ShouldRejectRequest(
- const URLRequest& request,
- NetworkDelegate* network_delegate) const override;
- virtual int64 ReserveSendingTimeForNextRequest(
+ bool ShouldRejectRequest(const URLRequest& request,
+ NetworkDelegate* network_delegate) const override;
+ int64 ReserveSendingTimeForNextRequest(
const base::TimeTicks& earliest_time) override;
- virtual base::TimeTicks GetExponentialBackoffReleaseTime() const override;
- virtual void UpdateWithResponse(
+ base::TimeTicks GetExponentialBackoffReleaseTime() const override;
+ void UpdateWithResponse(
const std::string& host,
const URLRequestThrottlerHeaderInterface* response) override;
- virtual void ReceivedContentWasMalformed(int response_code) override;
+ void ReceivedContentWasMalformed(int response_code) override;
protected:
- virtual ~URLRequestThrottlerEntry();
+ ~URLRequestThrottlerEntry() override;
void Initialize();
diff --git a/net/url_request/url_request_throttler_header_adapter.h b/net/url_request/url_request_throttler_header_adapter.h
index ddf7865..e5fbcd2 100644
--- a/net/url_request/url_request_throttler_header_adapter.h
+++ b/net/url_request/url_request_throttler_header_adapter.h
@@ -20,11 +20,11 @@
: public URLRequestThrottlerHeaderInterface {
public:
explicit URLRequestThrottlerHeaderAdapter(HttpResponseHeaders* headers);
- virtual ~URLRequestThrottlerHeaderAdapter();
+ ~URLRequestThrottlerHeaderAdapter() override;
// Implementation of URLRequestThrottlerHeaderInterface
- virtual std::string GetNormalizedValue(const std::string& key) const override;
- virtual int GetResponseCode() const override;
+ std::string GetNormalizedValue(const std::string& key) const override;
+ int GetResponseCode() const override;
private:
const scoped_refptr<HttpResponseHeaders> response_header_;
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h
index 10c6561..ee2f221 100644
--- a/net/url_request/url_request_throttler_manager.h
+++ b/net/url_request/url_request_throttler_manager.h
@@ -38,7 +38,7 @@
public NetworkChangeNotifier::ConnectionTypeObserver {
public:
URLRequestThrottlerManager();
- virtual ~URLRequestThrottlerManager();
+ ~URLRequestThrottlerManager() override;
// Must be called for every request, returns the URL request throttler entry
// associated with the URL. The caller must inform this entry of some events.
@@ -78,10 +78,10 @@
NetLog* net_log() const;
// IPAddressObserver interface.
- virtual void OnIPAddressChanged() override;
+ void OnIPAddressChanged() override;
// ConnectionTypeObserver interface.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
NetworkChangeNotifier::ConnectionType type) override;
// Method that allows us to transform a URL into an ID that can be used in our
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc
index 129a776..cd18659 100644
--- a/net/url_request/url_request_throttler_simulation_unittest.cc
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc
@@ -135,11 +135,11 @@
end_downtime_ = start_time + duration;
}
- virtual void AdvanceTime(const TimeTicks& absolute_time) override {
+ void AdvanceTime(const TimeTicks& absolute_time) override {
now_ = absolute_time;
}
- virtual void PerformAction() override {
+ void PerformAction() override {
// We are inserted at the end of the actor's list, so all Requester
// instances have already done their bit.
if (num_current_tick_queries_ > max_experienced_queries_per_tick_)
@@ -306,17 +306,13 @@
: URLRequestThrottlerEntry(manager, std::string()),
mock_backoff_entry_(&backoff_policy_) {}
- virtual const BackoffEntry* GetBackoffEntry() const override {
+ const BackoffEntry* GetBackoffEntry() const override {
return &mock_backoff_entry_;
}
- virtual BackoffEntry* GetBackoffEntry() override {
- return &mock_backoff_entry_;
- }
+ BackoffEntry* GetBackoffEntry() override { return &mock_backoff_entry_; }
- virtual TimeTicks ImplGetTimeNow() const override {
- return fake_now_;
- }
+ TimeTicks ImplGetTimeNow() const override { return fake_now_; }
void SetFakeNow(const TimeTicks& fake_time) {
fake_now_ = fake_time;
@@ -328,7 +324,7 @@
}
protected:
- virtual ~MockURLRequestThrottlerEntry() {}
+ ~MockURLRequestThrottlerEntry() override {}
private:
TimeTicks fake_now_;
@@ -414,14 +410,14 @@
DCHECK(server_);
}
- virtual void AdvanceTime(const TimeTicks& absolute_time) override {
+ void AdvanceTime(const TimeTicks& absolute_time) override {
if (time_of_last_success_.is_null())
time_of_last_success_ = absolute_time;
throttler_entry_->SetFakeNow(absolute_time);
}
- virtual void PerformAction() override {
+ void PerformAction() override {
TimeDelta effective_delay = time_between_requests_;
TimeDelta current_jitter = TimeDelta::FromMilliseconds(
request_jitter_.InMilliseconds() * base::RandDouble());
diff --git a/net/url_request/url_request_throttler_test_support.h b/net/url_request/url_request_throttler_test_support.h
index 60a63b2..a710333 100644
--- a/net/url_request/url_request_throttler_test_support.h
+++ b/net/url_request/url_request_throttler_test_support.h
@@ -16,10 +16,10 @@
class MockBackoffEntry : public BackoffEntry {
public:
explicit MockBackoffEntry(const BackoffEntry::Policy* const policy);
- virtual ~MockBackoffEntry();
+ ~MockBackoffEntry() override;
// BackoffEntry overrides.
- virtual base::TimeTicks ImplGetTimeNow() const override;
+ base::TimeTicks ImplGetTimeNow() const override;
void set_fake_now(const base::TimeTicks& now);
@@ -42,11 +42,11 @@
MockURLRequestThrottlerHeaderAdapter(const std::string& retry_value,
const std::string& opt_out_value,
int response_code);
- virtual ~MockURLRequestThrottlerHeaderAdapter();
+ ~MockURLRequestThrottlerHeaderAdapter() override;
// URLRequestThrottlerHeaderInterface overrides.
- virtual std::string GetNormalizedValue(const std::string& key) const override;
- virtual int GetResponseCode() const override;
+ std::string GetNormalizedValue(const std::string& key) const override;
+ int GetResponseCode() const override;
private:
std::string fake_retry_value_;
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc
index 4188b77..5a309b9 100644
--- a/net/url_request/url_request_throttler_unittest.cc
+++ b/net/url_request/url_request_throttler_unittest.cc
@@ -63,13 +63,11 @@
backoff_policy_.num_errors_to_ignore = 0;
}
- virtual const BackoffEntry* GetBackoffEntry() const override {
+ const BackoffEntry* GetBackoffEntry() const override {
return &mock_backoff_entry_;
}
- virtual BackoffEntry* GetBackoffEntry() override {
- return &mock_backoff_entry_;
- }
+ BackoffEntry* GetBackoffEntry() override { return &mock_backoff_entry_; }
static bool ExplicitUserRequest(int load_flags) {
return URLRequestThrottlerEntry::ExplicitUserRequest(load_flags);
@@ -85,7 +83,7 @@
}
// Overridden for tests.
- virtual TimeTicks ImplGetTimeNow() const override { return fake_time_now_; }
+ TimeTicks ImplGetTimeNow() const override { return fake_time_now_; }
void set_exponential_backoff_release_time(
const base::TimeTicks& release_time) {
@@ -106,7 +104,7 @@
MockBackoffEntry mock_backoff_entry_;
protected:
- virtual ~MockURLRequestThrottlerEntry() {}
+ ~MockURLRequestThrottlerEntry() override {}
};
class MockURLRequestThrottlerManager : public URLRequestThrottlerManager {
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 5756801..700b070 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -367,22 +367,22 @@
const AuthCallback& callback);
// TestNetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override;
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override;
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override;
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override;
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
scoped_refptr<HttpResponseHeaders>* override_response_headers,
GURL* allowed_unsafe_redirect_url) override;
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -596,7 +596,7 @@
set_network_delegate(delegate);
Init();
}
- virtual ~TestURLRequestContextWithProxy() {}
+ ~TestURLRequestContextWithProxy() override {}
};
} // namespace
@@ -1105,11 +1105,9 @@
RestartTestJob(URLRequest* request, NetworkDelegate* network_delegate)
: URLRequestTestJob(request, network_delegate, true) {}
protected:
- virtual void StartAsync() override {
- this->NotifyRestartRequired();
- }
+ void StartAsync() override { this->NotifyRestartRequired(); }
private:
- virtual ~RestartTestJob() {}
+ ~RestartTestJob() override {}
};
class CancelTestJob : public URLRequestTestJob {
@@ -1117,11 +1115,9 @@
explicit CancelTestJob(URLRequest* request, NetworkDelegate* network_delegate)
: URLRequestTestJob(request, network_delegate, true) {}
protected:
- virtual void StartAsync() override {
- request_->Cancel();
- }
+ void StartAsync() override { request_->Cancel(); }
private:
- virtual ~CancelTestJob() {}
+ ~CancelTestJob() override {}
};
class CancelThenRestartTestJob : public URLRequestTestJob {
@@ -1131,12 +1127,12 @@
: URLRequestTestJob(request, network_delegate, true) {
}
protected:
- virtual void StartAsync() override {
+ void StartAsync() override {
request_->Cancel();
this->NotifyRestartRequired();
}
private:
- virtual ~CancelThenRestartTestJob() {}
+ ~CancelThenRestartTestJob() override {}
};
// An Interceptor for use with interceptor tests
@@ -1156,13 +1152,12 @@
URLRequest::Deprecated::RegisterRequestInterceptor(this);
}
- virtual ~TestInterceptor() {
+ ~TestInterceptor() override {
URLRequest::Deprecated::UnregisterRequestInterceptor(this);
}
- virtual URLRequestJob* MaybeIntercept(
- URLRequest* request,
- NetworkDelegate* network_delegate) override {
+ URLRequestJob* MaybeIntercept(URLRequest* request,
+ NetworkDelegate* network_delegate) override {
if (restart_main_request_) {
restart_main_request_ = false;
did_restart_main_ = true;
@@ -1197,10 +1192,9 @@
return job;
}
- virtual URLRequestJob* MaybeInterceptRedirect(
- URLRequest* request,
- NetworkDelegate* network_delegate,
- const GURL& location) override {
+ URLRequestJob* MaybeInterceptRedirect(URLRequest* request,
+ NetworkDelegate* network_delegate,
+ const GURL& location) override {
if (cancel_redirect_request_) {
cancel_redirect_request_ = false;
did_cancel_redirect_ = true;
@@ -1217,8 +1211,9 @@
true);
}
- virtual URLRequestJob* MaybeInterceptResponse(
- URLRequest* request, NetworkDelegate* network_delegate) override {
+ URLRequestJob* MaybeInterceptResponse(
+ URLRequest* request,
+ NetworkDelegate* network_delegate) override {
if (cancel_final_request_) {
cancel_final_request_ = false;
did_cancel_final_ = true;
@@ -2396,10 +2391,10 @@
public:
explicit FixedDateNetworkDelegate(const std::string& fixed_date)
: fixed_date_(fixed_date) {}
- virtual ~FixedDateNetworkDelegate() {}
+ ~FixedDateNetworkDelegate() override {}
// NetworkDelegate implementation
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -3991,24 +3986,24 @@
class AsyncLoggingNetworkDelegate : public TestNetworkDelegate {
public:
AsyncLoggingNetworkDelegate() {}
- virtual ~AsyncLoggingNetworkDelegate() {}
+ ~AsyncLoggingNetworkDelegate() override {}
// NetworkDelegate implementation.
- virtual int OnBeforeURLRequest(URLRequest* request,
- const CompletionCallback& callback,
- GURL* new_url) override {
+ int OnBeforeURLRequest(URLRequest* request,
+ const CompletionCallback& callback,
+ GURL* new_url) override {
TestNetworkDelegate::OnBeforeURLRequest(request, callback, new_url);
return RunCallbackAsynchronously(request, callback);
}
- virtual int OnBeforeSendHeaders(URLRequest* request,
- const CompletionCallback& callback,
- HttpRequestHeaders* headers) override {
+ int OnBeforeSendHeaders(URLRequest* request,
+ const CompletionCallback& callback,
+ HttpRequestHeaders* headers) override {
TestNetworkDelegate::OnBeforeSendHeaders(request, callback, headers);
return RunCallbackAsynchronously(request, callback);
}
- virtual int OnHeadersReceived(
+ int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
const HttpResponseHeaders* original_response_headers,
@@ -4022,7 +4017,7 @@
return RunCallbackAsynchronously(request, callback);
}
- virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired(
+ NetworkDelegate::AuthRequiredResponse OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
const AuthCallback& callback,
@@ -4083,12 +4078,12 @@
else if (cancel_stage == CANCEL_ON_READ_COMPLETED)
set_cancel_in_received_data(true);
}
- virtual ~AsyncLoggingUrlRequestDelegate() {}
+ ~AsyncLoggingUrlRequestDelegate() override {}
// URLRequest::Delegate implementation:
- void virtual OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
*defer_redirect = true;
AsyncDelegateLogger::Run(
request,
@@ -4100,7 +4095,7 @@
base::Unretained(this), request, redirect_info));
}
- virtual void OnResponseStarted(URLRequest* request) override {
+ void OnResponseStarted(URLRequest* request) override {
AsyncDelegateLogger::Run(
request,
LOAD_STATE_WAITING_FOR_DELEGATE,
@@ -4111,8 +4106,7 @@
base::Unretained(this), request));
}
- virtual void OnReadCompleted(URLRequest* request,
- int bytes_read) override {
+ void OnReadCompleted(URLRequest* request, int bytes_read) override {
AsyncDelegateLogger::Run(
request,
LOAD_STATE_IDLE,
@@ -4578,9 +4572,9 @@
const char kExtraValue[] = "fubar";
class RedirectWithAdditionalHeadersDelegate : public TestDelegate {
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
TestDelegate::OnReceivedRedirect(request, redirect_info, defer_redirect);
request->SetExtraRequestHeaderByName(kExtraHeader, kExtraValue, false);
}
@@ -4615,9 +4609,9 @@
const char kExtraHeaderToRemove[] = "To-Be-Removed";
class RedirectWithHeaderRemovalDelegate : public TestDelegate {
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
TestDelegate::OnReceivedRedirect(request, redirect_info, defer_redirect);
request->RemoveRequestHeaderByName(kExtraHeaderToRemove);
}
@@ -6811,9 +6805,8 @@
public:
SSLClientAuthTestDelegate() : on_certificate_requested_count_(0) {
}
- virtual void OnCertificateRequested(
- URLRequest* request,
- SSLCertRequestInfo* cert_request_info) override {
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override {
on_certificate_requested_count_++;
base::MessageLoop::current()->Quit();
}
@@ -7092,7 +7085,7 @@
}
// SSLConfigService:
- virtual void GetSSLConfig(SSLConfig* config) override {
+ void GetSSLConfig(SSLConfig* config) override {
*config = SSLConfig();
config->rev_checking_enabled = online_rev_checking_;
config->verify_ev_cert = ev_enabled_;
@@ -7104,7 +7097,7 @@
}
protected:
- virtual ~TestSSLConfigService() {}
+ ~TestSSLConfigService() override {}
private:
const bool ev_enabled_;
@@ -7664,7 +7657,7 @@
class HTTPSHardFailTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(false /* check for EV */,
false /* online revocation checking */,
@@ -7702,7 +7695,7 @@
class HTTPSEVCRLSetTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(true /* check for EV */,
false /* online revocation checking */,
@@ -7887,7 +7880,7 @@
class HTTPSCRLSetTest : public HTTPSOCSPTest {
protected:
- virtual void SetupContext(URLRequestContext* context) override {
+ void SetupContext(URLRequestContext* context) override {
context->set_ssl_config_service(
new TestSSLConfigService(false /* check for EV */,
false /* online revocation checking */,
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index 31ad0ba..097eade 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -21,9 +21,7 @@
public:
TestURLRequestContext();
- virtual ~TestURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~TestURLRequestContext() override { AssertNoURLRequests(); }
// Gets a pointer to the cache backend.
disk_cache::Backend* GetBackend();
diff --git a/net/websockets/websocket_basic_handshake_stream.h b/net/websockets/websocket_basic_handshake_stream.h
index cc8f5bf..98e80a2 100644
--- a/net/websockets/websocket_basic_handshake_stream.h
+++ b/net/websockets/websocket_basic_handshake_stream.h
@@ -36,41 +36,39 @@
std::vector<std::string> requested_extensions,
std::string* failure_message);
- virtual ~WebSocketBasicHandshakeStream();
+ ~WebSocketBasicHandshakeStream() override;
// HttpStreamBase methods
- virtual int InitializeStream(const HttpRequestInfo* request_info,
- RequestPriority priority,
- const BoundNetLog& net_log,
- const CompletionCallback& callback) override;
- virtual int SendRequest(const HttpRequestHeaders& request_headers,
- HttpResponseInfo* response,
- const CompletionCallback& callback) override;
- virtual int ReadResponseHeaders(const CompletionCallback& callback) override;
- virtual int ReadResponseBody(IOBuffer* buf,
- int buf_len,
- const CompletionCallback& callback) override;
- virtual void Close(bool not_reusable) override;
- virtual bool IsResponseBodyComplete() const override;
- virtual bool CanFindEndOfResponse() const override;
- virtual bool IsConnectionReused() const override;
- virtual void SetConnectionReused() override;
- virtual bool IsConnectionReusable() const override;
- virtual int64 GetTotalReceivedBytes() const override;
- virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const
- override;
- virtual void GetSSLInfo(SSLInfo* ssl_info) override;
- virtual void GetSSLCertRequestInfo(
- SSLCertRequestInfo* cert_request_info) override;
- virtual bool IsSpdyHttpStream() const override;
- virtual void Drain(HttpNetworkSession* session) override;
- virtual void SetPriority(RequestPriority priority) override;
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override;
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override;
+ int ReadResponseHeaders(const CompletionCallback& callback) override;
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
+ void Close(bool not_reusable) override;
+ bool IsResponseBodyComplete() const override;
+ bool CanFindEndOfResponse() const override;
+ bool IsConnectionReused() const override;
+ void SetConnectionReused() override;
+ bool IsConnectionReusable() const override;
+ int64 GetTotalReceivedBytes() const override;
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ void GetSSLInfo(SSLInfo* ssl_info) override;
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
+ bool IsSpdyHttpStream() const override;
+ void Drain(HttpNetworkSession* session) override;
+ void SetPriority(RequestPriority priority) override;
// This is called from the top level once correct handshake response headers
// have been received. It creates an appropriate subclass of WebSocketStream
// depending on what extensions were negotiated. This object is unusable after
// Upgrade() has been called and should be disposed of as soon as possible.
- virtual scoped_ptr<WebSocketStream> Upgrade() override;
+ scoped_ptr<WebSocketStream> Upgrade() override;
// Set the value used for the next Sec-WebSocket-Key header
// deterministically. The key is only used once, and then discarded.
diff --git a/net/websockets/websocket_basic_stream.h b/net/websockets/websocket_basic_stream.h
index ed2f195..d456d8d 100644
--- a/net/websockets/websocket_basic_stream.h
+++ b/net/websockets/websocket_basic_stream.h
@@ -40,20 +40,20 @@
// The destructor has to make sure the connection is closed when we finish so
// that it does not get returned to the pool.
- virtual ~WebSocketBasicStream();
+ ~WebSocketBasicStream() override;
// WebSocketStream implementation.
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
- virtual void Close() override;
+ void Close() override;
- virtual std::string GetSubProtocol() const override;
+ std::string GetSubProtocol() const override;
- virtual std::string GetExtensions() const override;
+ std::string GetExtensions() const override;
////////////////////////////////////////////////////////////////////////////
// Methods for testing only.
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc
index a658fcf..92b7d3f 100644
--- a/net/websockets/websocket_basic_stream_test.cc
+++ b/net/websockets/websocket_basic_stream_test.cc
@@ -90,7 +90,7 @@
: StaticSocketDataProvider(reads, reads_count, writes, writes_count),
strict_mode_(strict_mode) {}
- virtual ~StrictStaticSocketDataProvider() {
+ ~StrictStaticSocketDataProvider() override {
if (strict_mode_) {
EXPECT_EQ(read_count(), read_index());
EXPECT_EQ(write_count(), write_index());
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 9585dc2..a6eeb1c 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -153,27 +153,27 @@
public:
explicit ConnectDelegate(WebSocketChannel* creator) : creator_(creator) {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
creator_->OnConnectSuccess(stream.Pass());
// |this| may have been deleted.
}
- virtual void OnFailure(const std::string& message) override {
+ void OnFailure(const std::string& message) override {
creator_->OnConnectFailure(message);
// |this| has been deleted.
}
- virtual void OnStartOpeningHandshake(
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
creator_->OnStartOpeningHandshake(request.Pass());
}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
creator_->OnFinishOpeningHandshake(response.Pass());
}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index c7bfeb0..15163de 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -192,38 +192,35 @@
// This fake EventInterface is for tests which need a WebSocketEventInterface
// implementation but are not verifying how it is used.
class FakeWebSocketEventInterface : public WebSocketEventInterface {
- virtual ChannelState OnAddChannelResponse(
- bool fail,
- const std::string& selected_protocol,
- const std::string& extensions) override {
+ ChannelState OnAddChannelResponse(bool fail,
+ const std::string& selected_protocol,
+ const std::string& extensions) override {
return fail ? CHANNEL_DELETED : CHANNEL_ALIVE;
}
- virtual ChannelState OnDataFrame(bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) override {
+ ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ const std::vector<char>& data) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnFlowControl(int64 quota) override {
- return CHANNEL_ALIVE;
- }
- virtual ChannelState OnClosingHandshake() override { return CHANNEL_ALIVE; }
- virtual ChannelState OnFailChannel(const std::string& message) override {
+ ChannelState OnFlowControl(int64 quota) override { return CHANNEL_ALIVE; }
+ ChannelState OnClosingHandshake() override { return CHANNEL_ALIVE; }
+ ChannelState OnFailChannel(const std::string& message) override {
return CHANNEL_DELETED;
}
- virtual ChannelState OnDropChannel(bool was_clean,
- uint16 code,
- const std::string& reason) override {
+ ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason) override {
return CHANNEL_DELETED;
}
- virtual ChannelState OnStartOpeningHandshake(
+ ChannelState OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnFinishOpeningHandshake(
+ ChannelState OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
return CHANNEL_ALIVE;
}
- virtual ChannelState OnSSLCertificateError(
+ ChannelState OnSSLCertificateError(
scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
const GURL& url,
const SSLInfo& ssl_info,
@@ -245,23 +242,23 @@
const std::string& extensions)
: protocol_(protocol), extensions_(extensions) {}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_IO_PENDING;
}
- virtual void Close() override {}
+ void Close() override {}
// Returns the string passed to the constructor.
- virtual std::string GetSubProtocol() const override { return protocol_; }
+ std::string GetSubProtocol() const override { return protocol_; }
// Returns the string passed to the constructor.
- virtual std::string GetExtensions() const override { return extensions_; }
+ std::string GetExtensions() const override { return extensions_; }
private:
// The string to return from GetSubProtocol().
@@ -456,7 +453,7 @@
ReadableFakeWebSocketStream() : index_(0), read_frames_pending_(false) {}
// Check that all the prepared responses have been consumed.
- virtual ~ReadableFakeWebSocketStream() {
+ ~ReadableFakeWebSocketStream() override {
CHECK(index_ >= responses_.size());
CHECK(!read_frames_pending_);
}
@@ -492,8 +489,8 @@
new Response(async, error, ScopedVector<WebSocketFrame>()));
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
CHECK(!read_frames_pending_);
if (index_ >= responses_.size())
return ERR_IO_PENDING;
@@ -549,8 +546,8 @@
// synchronously.
class WriteableFakeWebSocketStream : public FakeWebSocketStream {
public:
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return OK;
}
};
@@ -558,8 +555,8 @@
// A FakeWebSocketStream where writes always fail.
class UnWriteableFakeWebSocketStream : public FakeWebSocketStream {
public:
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
return ERR_CONNECTION_RESET;
}
};
@@ -574,8 +571,8 @@
public:
EchoeyFakeWebSocketStream() : read_frames_(NULL), done_(false) {}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
// Users of WebSocketStream will not expect the ReadFrames() callback to be
// called from within WriteFrames(), so post it to the message loop instead.
stored_frames_.insert(stored_frames_.end(), frames->begin(), frames->end());
@@ -584,8 +581,8 @@
return OK;
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
read_callback_ = callback;
read_frames_ = frames;
if (done_)
@@ -647,8 +644,8 @@
public:
ResetOnWriteFakeWebSocketStream() : closed_(false), weak_ptr_factory_(this) {}
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ResetOnWriteFakeWebSocketStream::CallCallbackUnlessClosed,
@@ -664,13 +661,13 @@
return ERR_IO_PENDING;
}
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override {
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override {
read_callback_ = callback;
return ERR_IO_PENDING;
}
- virtual void Close() override { closed_ = true; }
+ void Close() override { closed_ = true; }
private:
void CallCallbackUnlessClosed(const CompletionCallback& callback, int value) {
@@ -736,8 +733,8 @@
class FakeSSLErrorCallbacks
: public WebSocketEventInterface::SSLErrorCallbacks {
public:
- virtual void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {}
- virtual void ContinueSSLRequest() override {}
+ void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {}
+ void ContinueSSLRequest() override {}
};
// Base class for all test fixtures.
@@ -847,7 +844,7 @@
EVENT_ON_SSL_CERTIFICATE_ERROR) {}
// Create a ChannelDeletingFakeWebSocketEventInterface. Defined out-of-line to
// avoid circular dependency.
- virtual scoped_ptr<WebSocketEventInterface> CreateEventInterface() override;
+ scoped_ptr<WebSocketEventInterface> CreateEventInterface() override;
// Tests can set deleting_ to a bitmap of EventInterfaceCall members that they
// want to cause Channel deletion. The default is for all calls to cause
@@ -864,46 +861,45 @@
WebSocketChannelDeletingTest* fixture)
: fixture_(fixture) {}
- virtual ChannelState OnAddChannelResponse(
- bool fail,
- const std::string& selected_protocol,
- const std::string& extensions) override {
+ ChannelState OnAddChannelResponse(bool fail,
+ const std::string& selected_protocol,
+ const std::string& extensions) override {
return fixture_->DeleteIfDeleting(EVENT_ON_ADD_CHANNEL_RESPONSE);
}
- virtual ChannelState OnDataFrame(bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) override {
+ ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ const std::vector<char>& data) override {
return fixture_->DeleteIfDeleting(EVENT_ON_DATA_FRAME);
}
- virtual ChannelState OnFlowControl(int64 quota) override {
+ ChannelState OnFlowControl(int64 quota) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FLOW_CONTROL);
}
- virtual ChannelState OnClosingHandshake() override {
+ ChannelState OnClosingHandshake() override {
return fixture_->DeleteIfDeleting(EVENT_ON_CLOSING_HANDSHAKE);
}
- virtual ChannelState OnFailChannel(const std::string& message) override {
+ ChannelState OnFailChannel(const std::string& message) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FAIL_CHANNEL);
}
- virtual ChannelState OnDropChannel(bool was_clean,
- uint16 code,
- const std::string& reason) override {
+ ChannelState OnDropChannel(bool was_clean,
+ uint16 code,
+ const std::string& reason) override {
return fixture_->DeleteIfDeleting(EVENT_ON_DROP_CHANNEL);
}
- virtual ChannelState OnStartOpeningHandshake(
+ ChannelState OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
return fixture_->DeleteIfDeleting(EVENT_ON_START_OPENING_HANDSHAKE);
}
- virtual ChannelState OnFinishOpeningHandshake(
+ ChannelState OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
return fixture_->DeleteIfDeleting(EVENT_ON_FINISH_OPENING_HANDSHAKE);
}
- virtual ChannelState OnSSLCertificateError(
+ ChannelState OnSSLCertificateError(
scoped_ptr<SSLErrorCallbacks> ssl_error_callbacks,
const GURL& url,
const SSLInfo& ssl_info,
@@ -946,7 +942,7 @@
// object before calling CreateChannelAndConnect() or
// CreateChannelAndConnectSuccessfully(). This will only work once per test
// case, but once should be enough.
- virtual scoped_ptr<WebSocketEventInterface> CreateEventInterface() override {
+ scoped_ptr<WebSocketEventInterface> CreateEventInterface() override {
return scoped_ptr<WebSocketEventInterface>(event_interface_.release());
}
@@ -960,7 +956,7 @@
WebSocketChannelStreamTest()
: mock_stream_(new StrictMock<MockWebSocketStream>) {}
- virtual void CreateChannelAndConnectSuccessfully() override {
+ void CreateChannelAndConnectSuccessfully() override {
set_stream(mock_stream_.Pass());
WebSocketChannelTest::CreateChannelAndConnectSuccessfully();
}
@@ -3314,7 +3310,7 @@
protected:
WebSocketChannelStreamTimeoutTest() {}
- virtual void CreateChannelAndConnectSuccessfully() override {
+ void CreateChannelAndConnectSuccessfully() override {
set_stream(mock_stream_.Pass());
CreateChannelAndConnect();
channel_->SendFlowControl(kPlentyOfQuota);
diff --git a/net/websockets/websocket_deflate_predictor_impl.h b/net/websockets/websocket_deflate_predictor_impl.h
index d6b52c4..680ec56 100644
--- a/net/websockets/websocket_deflate_predictor_impl.h
+++ b/net/websockets/websocket_deflate_predictor_impl.h
@@ -18,12 +18,12 @@
class NET_EXPORT_PRIVATE WebSocketDeflatePredictorImpl
: public WebSocketDeflatePredictor {
public:
- virtual ~WebSocketDeflatePredictorImpl() {}
+ ~WebSocketDeflatePredictorImpl() override {}
- virtual Result Predict(const ScopedVector<WebSocketFrame>& frames,
- size_t frame_index) override;
- virtual void RecordInputDataFrame(const WebSocketFrame* frame) override;
- virtual void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
+ Result Predict(const ScopedVector<WebSocketFrame>& frames,
+ size_t frame_index) override;
+ void RecordInputDataFrame(const WebSocketFrame* frame) override;
+ void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
};
} // namespace net
diff --git a/net/websockets/websocket_deflate_stream.h b/net/websockets/websocket_deflate_stream.h
index 8f939ec..1426bfc 100644
--- a/net/websockets/websocket_deflate_stream.h
+++ b/net/websockets/websocket_deflate_stream.h
@@ -43,16 +43,16 @@
WebSocketDeflater::ContextTakeOverMode mode,
int client_window_bits,
scoped_ptr<WebSocketDeflatePredictor> predictor);
- virtual ~WebSocketDeflateStream();
+ ~WebSocketDeflateStream() override;
// WebSocketStream functions.
- virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
- virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames,
- const CompletionCallback& callback) override;
- virtual void Close() override;
- virtual std::string GetSubProtocol() const override;
- virtual std::string GetExtensions() const override;
+ int ReadFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
+ int WriteFrames(ScopedVector<WebSocketFrame>* frames,
+ const CompletionCallback& callback) override;
+ void Close() override;
+ std::string GetSubProtocol() const override;
+ std::string GetExtensions() const override;
private:
enum ReadingState {
diff --git a/net/websockets/websocket_deflate_stream_test.cc b/net/websockets/websocket_deflate_stream_test.cc
index 4f1c418..1b0d123 100644
--- a/net/websockets/websocket_deflate_stream_test.cc
+++ b/net/websockets/websocket_deflate_stream_test.cc
@@ -111,7 +111,7 @@
class WebSocketDeflatePredictorMock : public WebSocketDeflatePredictor {
public:
WebSocketDeflatePredictorMock() : result_(DEFLATE) {}
- virtual ~WebSocketDeflatePredictorMock() {
+ ~WebSocketDeflatePredictorMock() override {
// Verify whether all expectaions are consumed.
if (!frames_to_be_input_.empty()) {
ADD_FAILURE() << "There are missing frames to be input.";
@@ -124,11 +124,11 @@
}
// WebSocketDeflatePredictor functions.
- virtual Result Predict(const ScopedVector<WebSocketFrame>& frames,
- size_t frame_index) override {
+ Result Predict(const ScopedVector<WebSocketFrame>& frames,
+ size_t frame_index) override {
return result_;
}
- virtual void RecordInputDataFrame(const WebSocketFrame* frame) override {
+ void RecordInputDataFrame(const WebSocketFrame* frame) override {
if (!WebSocketFrameHeader::IsKnownDataOpCode(frame->header.opcode)) {
ADD_FAILURE() << "Control frames should not be recorded.";
return;
@@ -147,7 +147,7 @@
}
frames_to_be_input_.pop_front();
}
- virtual void RecordWrittenDataFrame(const WebSocketFrame* frame) override {
+ void RecordWrittenDataFrame(const WebSocketFrame* frame) override {
if (!WebSocketFrameHeader::IsKnownDataOpCode(frame->header.opcode)) {
ADD_FAILURE() << "Control frames should not be recorded.";
return;
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h
index 8208c0e..6ad0f6b 100644
--- a/net/websockets/websocket_handshake_stream_base.h
+++ b/net/websockets/websocket_handshake_stream_base.h
@@ -40,7 +40,7 @@
// URLRequest::SetUserData().
static const void* DataKey() { return kWebSocketHandshakeUserDataKey; }
- virtual ~CreateHelper() {}
+ ~CreateHelper() override {}
// Create a WebSocketBasicHandshakeStream. This is called after the
// underlying connection has been established but before any handshake data
@@ -58,7 +58,7 @@
// This has to have an inline implementation so that the net/url_request/
// tests do not fail on iOS.
- virtual ~WebSocketHandshakeStreamBase() {}
+ ~WebSocketHandshakeStreamBase() override {}
// After the handshake has completed, this method creates a WebSocketStream
// (of the appropriate type) from the WebSocketHandshakeStreamBase object.
diff --git a/net/websockets/websocket_handshake_stream_create_helper.h b/net/websockets/websocket_handshake_stream_create_helper.h
index aad2644..83bb1ac 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.h
+++ b/net/websockets/websocket_handshake_stream_create_helper.h
@@ -31,17 +31,17 @@
WebSocketStream::ConnectDelegate* connect_delegate,
const std::vector<std::string>& requested_subprotocols);
- virtual ~WebSocketHandshakeStreamCreateHelper();
+ ~WebSocketHandshakeStreamCreateHelper() override;
// WebSocketHandshakeStreamBase::CreateHelper methods
// Create a WebSocketBasicHandshakeStream.
- virtual WebSocketHandshakeStreamBase* CreateBasicStream(
+ WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override;
// Unimplemented as of November 2013.
- virtual WebSocketHandshakeStreamBase* CreateSpdyStream(
+ WebSocketHandshakeStreamBase* CreateSpdyStream(
const base::WeakPtr<SpdySession>& session,
bool use_relative_url) override;
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index a776acd..5dff5cf 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -59,15 +59,15 @@
class TestConnectDelegate : public WebSocketStream::ConnectDelegate {
public:
- virtual ~TestConnectDelegate() {}
+ ~TestConnectDelegate() override {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {}
- virtual void OnFailure(const std::string& failure_message) override {}
- virtual void OnStartOpeningHandshake(
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {}
+ void OnFailure(const std::string& failure_message) override {}
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_inflater.cc b/net/websockets/websocket_inflater.cc
index 6f46822..1d6122b 100644
--- a/net/websockets/websocket_inflater.cc
+++ b/net/websockets/websocket_inflater.cc
@@ -27,7 +27,7 @@
}
private:
- virtual ~ShrinkableIOBufferWithSize() {}
+ ~ShrinkableIOBufferWithSize() override {}
};
} // namespace
diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h
index 924fdd0..bad06cf 100644
--- a/net/websockets/websocket_job.h
+++ b/net/websockets/websocket_job.h
@@ -50,42 +50,39 @@
static void EnsureInit();
State state() const { return state_; }
- virtual void Connect() override;
- virtual bool SendData(const char* data, int len) override;
- virtual void Close() override;
- virtual void RestartWithAuth(const AuthCredentials& credentials) override;
- virtual void DetachDelegate() override;
+ void Connect() override;
+ bool SendData(const char* data, int len) override;
+ void Close() override;
+ void RestartWithAuth(const AuthCredentials& credentials) override;
+ void DetachDelegate() override;
// SocketStream::Delegate methods.
- virtual int OnStartOpenConnection(
- SocketStream* socket, const CompletionCallback& callback) override;
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override;
- virtual void OnSentData(SocketStream* socket, int amount_sent) override;
- virtual void OnReceivedData(SocketStream* socket,
- const char* data,
- int len) override;
- virtual void OnClose(SocketStream* socket) override;
- virtual void OnAuthRequired(
- SocketStream* socket, AuthChallengeInfo* auth_info) override;
- virtual void OnSSLCertificateError(SocketStream* socket,
- const SSLInfo& ssl_info,
- bool fatal) override;
- virtual void OnError(const SocketStream* socket, int error) override;
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override;
+ void OnConnected(SocketStream* socket, int max_pending_send_allowed) override;
+ void OnSentData(SocketStream* socket, int amount_sent) override;
+ void OnReceivedData(SocketStream* socket, const char* data, int len) override;
+ void OnClose(SocketStream* socket) override;
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override;
+ void OnSSLCertificateError(SocketStream* socket,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
+ void OnError(const SocketStream* socket, int error) override;
// SpdyWebSocketStream::Delegate methods.
- virtual void OnCreatedSpdyStream(int status) override;
- virtual void OnSentSpdyHeaders() override;
- virtual void OnSpdyResponseHeadersUpdated(
+ void OnCreatedSpdyStream(int status) override;
+ void OnSentSpdyHeaders() override;
+ void OnSpdyResponseHeadersUpdated(
const SpdyHeaderBlock& response_headers) override;
- virtual void OnSentSpdyData(size_t bytes_sent) override;
- virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override;
- virtual void OnCloseSpdyStream() override;
+ void OnSentSpdyData(size_t bytes_sent) override;
+ void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) override;
+ void OnCloseSpdyStream() override;
private:
friend class WebSocketThrottle;
friend class WebSocketJobTest;
- virtual ~WebSocketJob();
+ ~WebSocketJob() override;
bool SendHandshakeRequest(const char* data, int len);
void AddCookieHeaderAndSend();
diff --git a/net/websockets/websocket_job_test.cc b/net/websockets/websocket_job_test.cc
index 9cf3144..3faf809 100644
--- a/net/websockets/websocket_job_test.cc
+++ b/net/websockets/websocket_job_test.cc
@@ -45,27 +45,23 @@
URLRequestContext* context, CookieStore* cookie_store)
: SocketStream(url, delegate, context, cookie_store) {}
- virtual void Connect() override {}
- virtual bool SendData(const char* data, int len) override {
+ void Connect() override {}
+ bool SendData(const char* data, int len) override {
sent_data_ += std::string(data, len);
return true;
}
- virtual void Close() override {}
- virtual void RestartWithAuth(
- const AuthCredentials& credentials) override {
- }
+ void Close() override {}
+ void RestartWithAuth(const AuthCredentials& credentials) override {}
- virtual void DetachDelegate() override {
- delegate_ = NULL;
- }
+ void DetachDelegate() override { delegate_ = NULL; }
const std::string& sent_data() const {
return sent_data_;
}
protected:
- virtual ~MockSocketStream() {}
+ ~MockSocketStream() override {}
private:
std::string sent_data_;
@@ -78,7 +74,7 @@
void set_allow_all_cookies(bool allow_all_cookies) {
allow_all_cookies_ = allow_all_cookies;
}
- virtual ~MockSocketStreamDelegate() {}
+ ~MockSocketStreamDelegate() override {}
void SetOnStartOpenConnection(const base::Closure& callback) {
on_start_open_connection_ = callback;
@@ -96,42 +92,40 @@
on_close_ = callback;
}
- virtual int OnStartOpenConnection(
- SocketStream* socket,
- const CompletionCallback& callback) override {
+ int OnStartOpenConnection(SocketStream* socket,
+ const CompletionCallback& callback) override {
if (!on_start_open_connection_.is_null())
on_start_open_connection_.Run();
return OK;
}
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
if (!on_connected_.is_null())
on_connected_.Run();
}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
amount_sent_ += amount_sent;
if (!on_sent_data_.is_null())
on_sent_data_.Run();
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
received_data_ += std::string(data, len);
if (!on_received_data_.is_null())
on_received_data_.Run();
}
- virtual void OnClose(SocketStream* socket) override {
+ void OnClose(SocketStream* socket) override {
if (!on_close_.is_null())
on_close_.Run();
}
- virtual bool CanGetCookies(SocketStream* socket,
- const GURL& url) override {
+ bool CanGetCookies(SocketStream* socket, const GURL& url) override {
return allow_all_cookies_;
}
- virtual bool CanSetCookie(SocketStream* request,
- const GURL& url,
- const std::string& cookie_line,
- CookieOptions* options) override {
+ bool CanSetCookie(SocketStream* request,
+ const GURL& url,
+ const std::string& cookie_line,
+ CookieOptions* options) override {
return allow_all_cookies_;
}
@@ -186,44 +180,41 @@
}
// CookieStore:
- virtual void SetCookieWithOptionsAsync(
- const GURL& url,
- const std::string& cookie_line,
- const CookieOptions& options,
- const SetCookiesCallback& callback) override {
+ void SetCookieWithOptionsAsync(const GURL& url,
+ const std::string& cookie_line,
+ const CookieOptions& options,
+ const SetCookiesCallback& callback) override {
bool result = SetCookieWithOptions(url, cookie_line, options);
if (!callback.is_null())
callback.Run(result);
}
- virtual void GetCookiesWithOptionsAsync(
- const GURL& url,
- const CookieOptions& options,
- const GetCookiesCallback& callback) override {
+ void GetCookiesWithOptionsAsync(const GURL& url,
+ const CookieOptions& options,
+ const GetCookiesCallback& callback) override {
if (!callback.is_null())
callback.Run(GetCookiesWithOptions(url, options));
}
- virtual void GetAllCookiesForURLAsync(
+ void GetAllCookiesForURLAsync(
const GURL& url,
const GetCookieListCallback& callback) override {
ADD_FAILURE();
}
- virtual void DeleteCookieAsync(const GURL& url,
- const std::string& cookie_name,
- const base::Closure& callback) override {
+ void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) override {
ADD_FAILURE();
}
- virtual void DeleteAllCreatedBetweenAsync(
- const base::Time& delete_begin,
- const base::Time& delete_end,
- const DeleteCallback& callback) override {
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const DeleteCallback& callback) override {
ADD_FAILURE();
}
- virtual void DeleteAllCreatedBetweenForHostAsync(
+ void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin,
const base::Time delete_end,
const GURL& url,
@@ -231,27 +222,27 @@
ADD_FAILURE();
}
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override {
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override {
ADD_FAILURE();
}
- virtual CookieMonster* GetCookieMonster() override { return NULL; }
+ CookieMonster* GetCookieMonster() override { return NULL; }
const std::vector<Entry>& entries() const { return entries_; }
private:
friend class base::RefCountedThreadSafe<MockCookieStore>;
- virtual ~MockCookieStore() {}
+ ~MockCookieStore() override {}
std::vector<Entry> entries_;
};
class MockSSLConfigService : public SSLConfigService {
public:
- virtual void GetSSLConfig(SSLConfig* config) override {}
+ void GetSSLConfig(SSLConfig* config) override {}
protected:
- virtual ~MockSSLConfigService() {}
+ ~MockSSLConfigService() override {}
};
class MockURLRequestContext : public URLRequestContext {
@@ -266,9 +257,7 @@
include_subdomains);
}
- virtual ~MockURLRequestContext() {
- AssertNoURLRequests();
- }
+ ~MockURLRequestContext() override { AssertNoURLRequests(); }
private:
TransportSecurityState transport_security_state_;
@@ -296,21 +285,18 @@
http_session_, spdy_session_key_, BoundNetLog());
}
- virtual int CreateTransaction(
- RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) override {
+ int CreateTransaction(RequestPriority priority,
+ scoped_ptr<HttpTransaction>* trans) override {
NOTREACHED();
return ERR_UNEXPECTED;
}
- virtual HttpCache* GetCache() override {
+ HttpCache* GetCache() override {
NOTREACHED();
return NULL;
}
- virtual HttpNetworkSession* GetSession() override {
- return http_session_.get();
- }
+ HttpNetworkSession* GetSession() override { return http_session_.get(); }
private:
OrderedSocketData* data_;
@@ -349,35 +335,35 @@
// OnStartOpenConnection() is not implemented by SocketStreamDispatcherHost
- virtual void OnConnected(SocketStream* socket,
- int max_pending_send_allowed) override {
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {
DeleteJobMaybe();
}
- virtual void OnSentData(SocketStream* socket, int amount_sent) override {
+ void OnSentData(SocketStream* socket, int amount_sent) override {
DeleteJobMaybe();
}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data,
- int len) override {
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {
DeleteJobMaybe();
}
- virtual void OnClose(SocketStream* socket) override { DeleteJobMaybe(); }
+ void OnClose(SocketStream* socket) override { DeleteJobMaybe(); }
- virtual void OnAuthRequired(SocketStream* socket,
- AuthChallengeInfo* auth_info) override {
+ void OnAuthRequired(SocketStream* socket,
+ AuthChallengeInfo* auth_info) override {
DeleteJobMaybe();
}
- virtual void OnSSLCertificateError(SocketStream* socket,
- const SSLInfo& ssl_info,
- bool fatal) override {
+ void OnSSLCertificateError(SocketStream* socket,
+ const SSLInfo& ssl_info,
+ bool fatal) override {
DeleteJobMaybe();
}
- virtual void OnError(const SocketStream* socket, int error) override {
+ void OnError(const SocketStream* socket, int error) override {
DeleteJobMaybe();
}
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index 04beb26..005b6c5 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -48,15 +48,15 @@
explicit Delegate(StreamRequestImpl* owner)
: owner_(owner), result_(INCOMPLETE) {}
- virtual ~Delegate() {
+ ~Delegate() override {
UMA_HISTOGRAM_ENUMERATION(
"Net.WebSocket.HandshakeResult", result_, NUM_HANDSHAKE_RESULT_TYPES);
}
// Implementation of URLRequest::Delegate methods.
- virtual void OnReceivedRedirect(URLRequest* request,
- const RedirectInfo& redirect_info,
- bool* defer_redirect) override {
+ void OnReceivedRedirect(URLRequest* request,
+ const RedirectInfo& redirect_info,
+ bool* defer_redirect) override {
// HTTP status codes returned by HttpStreamParser are filtered by
// WebSocketBasicHandshakeStream, and only 101, 401 and 407 are permitted
// back up the stack to HttpNetworkTransaction. In particular, redirect
@@ -65,20 +65,19 @@
NOTREACHED();
}
- virtual void OnResponseStarted(URLRequest* request) override;
+ void OnResponseStarted(URLRequest* request) override;
- virtual void OnAuthRequired(URLRequest* request,
- AuthChallengeInfo* auth_info) override;
+ void OnAuthRequired(URLRequest* request,
+ AuthChallengeInfo* auth_info) override;
- virtual void OnCertificateRequested(URLRequest* request,
- SSLCertRequestInfo* cert_request_info)
- override;
+ void OnCertificateRequested(URLRequest* request,
+ SSLCertRequestInfo* cert_request_info) override;
- virtual void OnSSLCertificateError(URLRequest* request,
- const SSLInfo& ssl_info,
- bool fatal) override;
+ void OnSSLCertificateError(URLRequest* request,
+ const SSLInfo& ssl_info,
+ bool fatal) override;
- virtual void OnReadCompleted(URLRequest* request, int bytes_read) override;
+ void OnReadCompleted(URLRequest* request, int bytes_read) override;
private:
StreamRequestImpl* owner_;
@@ -118,7 +117,7 @@
// Destroying this object destroys the URLRequest, which cancels the request
// and so terminates the handshake if it is incomplete.
- virtual ~StreamRequestImpl() {}
+ ~StreamRequestImpl() override {}
void Start(scoped_ptr<base::Timer> timer) {
DCHECK(timer);
@@ -206,7 +205,7 @@
explicit SSLErrorCallbacks(URLRequest* url_request)
: url_request_(url_request) {}
- virtual void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {
+ void CancelSSLRequest(int error, const SSLInfo* ssl_info) override {
if (ssl_info) {
url_request_->CancelWithSSLError(error, *ssl_info);
} else {
@@ -214,7 +213,7 @@
}
}
- virtual void ContinueSSLRequest() override {
+ void ContinueSSLRequest() override {
url_request_->ContinueDespiteLastError();
}
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 2fd9891..5ce3331 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -99,7 +99,7 @@
: WebSocketHandshakeStreamCreateHelper(connect_delegate,
requested_subprotocols) {}
- virtual void OnStreamCreated(WebSocketBasicHandshakeStream* stream) override {
+ void OnStreamCreated(WebSocketBasicHandshakeStream* stream) override {
stream->SetWebSocketKeyForTesting("dGhlIHNhbXBsZSBub25jZQ==");
}
};
@@ -201,28 +201,28 @@
explicit TestConnectDelegate(WebSocketStreamCreateTest* owner)
: owner_(owner) {}
- virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
+ void OnSuccess(scoped_ptr<WebSocketStream> stream) override {
stream.swap(owner_->stream_);
}
- virtual void OnFailure(const std::string& message) override {
+ void OnFailure(const std::string& message) override {
owner_->has_failed_ = true;
owner_->failure_message_ = message;
}
- virtual void OnStartOpeningHandshake(
+ void OnStartOpeningHandshake(
scoped_ptr<WebSocketHandshakeRequestInfo> request) override {
// Can be called multiple times (in the case of HTTP auth). Last call
// wins.
owner_->request_info_ = request.Pass();
}
- virtual void OnFinishOpeningHandshake(
+ void OnFinishOpeningHandshake(
scoped_ptr<WebSocketHandshakeResponseInfo> response) override {
if (owner_->response_info_)
ADD_FAILURE();
owner_->response_info_ = response.Pass();
}
- virtual void OnSSLCertificateError(
+ void OnSSLCertificateError(
scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
ssl_error_callbacks,
const SSLInfo& ssl_info,
diff --git a/net/websockets/websocket_throttle_test.cc b/net/websockets/websocket_throttle_test.cc
index a743e93..4e27c83 100644
--- a/net/websockets/websocket_throttle_test.cc
+++ b/net/websockets/websocket_throttle_test.cc
@@ -23,14 +23,14 @@
class DummySocketStreamDelegate : public SocketStream::Delegate {
public:
DummySocketStreamDelegate() {}
- virtual ~DummySocketStreamDelegate() {}
- virtual void OnConnected(
- SocketStream* socket, int max_pending_send_allowed) override {}
- virtual void OnSentData(SocketStream* socket,
- int amount_sent) override {}
- virtual void OnReceivedData(SocketStream* socket,
- const char* data, int len) override {}
- virtual void OnClose(SocketStream* socket) override {}
+ ~DummySocketStreamDelegate() override {}
+ void OnConnected(SocketStream* socket,
+ int max_pending_send_allowed) override {}
+ void OnSentData(SocketStream* socket, int amount_sent) override {}
+ void OnReceivedData(SocketStream* socket,
+ const char* data,
+ int len) override {}
+ void OnClose(SocketStream* socket) override {}
};
class WebSocketThrottleTestContext : public TestURLRequestContext {
diff --git a/testing/android/java/AndroidManifest.xml b/testing/android/java/AndroidManifest.xml
index 97d916b..c704cc4 100644
--- a/testing/android/java/AndroidManifest.xml
+++ b/testing/android/java/AndroidManifest.xml
@@ -10,7 +10,7 @@
android:versionCode="1"
android:versionName="1.0">
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="20" />
+ <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<application android:label="ChromeNativeTests"
android:name="org.chromium.base.BaseChromiumApplication">
diff --git a/tools/lsan/PRESUBMIT.py b/tools/lsan/PRESUBMIT.py
index e7891ff..94b455a 100644
--- a/tools/lsan/PRESUBMIT.py
+++ b/tools/lsan/PRESUBMIT.py
@@ -31,13 +31,3 @@
def CheckChangeOnCommit(input_api, output_api):
return CheckChange(input_api, output_api)
-
-def GetPreferredTryMasters(project, change):
- return {
- 'tryserver.chromium.linux': {
- 'linux_asan': set(['compile']),
- },
- 'tryserver.chromium.mac': {
- 'mac_asan': set(['compile']),
- }
- }
diff --git a/ui/accessibility/ax_serializable_tree.cc b/ui/accessibility/ax_serializable_tree.cc
index 3198b61..750b3b0 100644
--- a/ui/accessibility/ax_serializable_tree.cc
+++ b/ui/accessibility/ax_serializable_tree.cc
@@ -17,47 +17,34 @@
class AX_EXPORT AXTreeSourceAdapter : public AXTreeSource<const AXNode*> {
public:
AXTreeSourceAdapter(AXTree* tree) : tree_(tree) {}
- virtual ~AXTreeSourceAdapter() {}
+ ~AXTreeSourceAdapter() override {}
// AXTreeSource implementation.
- virtual AXNode* GetRoot() const override {
- return tree_->GetRoot();
- }
+ AXNode* GetRoot() const override { return tree_->GetRoot(); }
- virtual AXNode* GetFromId(int32 id) const override {
- return tree_->GetFromId(id);
- }
+ AXNode* GetFromId(int32 id) const override { return tree_->GetFromId(id); }
- virtual int32 GetId(const AXNode* node) const override {
- return node->id();
- }
+ int32 GetId(const AXNode* node) const override { return node->id(); }
- virtual void GetChildren(
- const AXNode* node,
- std::vector<const AXNode*>* out_children) const override {
+ void GetChildren(const AXNode* node,
+ std::vector<const AXNode*>* out_children) const override {
for (int i = 0; i < node->child_count(); ++i)
out_children->push_back(node->ChildAtIndex(i));
}
- virtual AXNode* GetParent(const AXNode* node) const override {
+ AXNode* GetParent(const AXNode* node) const override {
return node->parent();
}
- virtual bool IsValid(const AXNode* node) const override {
- return node != NULL;
- }
+ bool IsValid(const AXNode* node) const override { return node != NULL; }
- virtual bool IsEqual(const AXNode* node1,
- const AXNode* node2) const override {
+ bool IsEqual(const AXNode* node1, const AXNode* node2) const override {
return node1 == node2;
}
- virtual const AXNode* GetNull() const override {
- return NULL;
- }
+ const AXNode* GetNull() const override { return NULL; }
- virtual void SerializeNode(
- const AXNode* node, AXNodeData* out_data) const override {
+ void SerializeNode(const AXNode* node, AXNodeData* out_data) const override {
*out_data = node->data();
}
diff --git a/ui/accessibility/ax_serializable_tree.h b/ui/accessibility/ax_serializable_tree.h
index 994be7d..dfbdf8e 100644
--- a/ui/accessibility/ax_serializable_tree.h
+++ b/ui/accessibility/ax_serializable_tree.h
@@ -14,7 +14,7 @@
public:
AXSerializableTree();
explicit AXSerializableTree(const AXTreeUpdate& initial_state);
- virtual ~AXSerializableTree();
+ ~AXSerializableTree() override;
// Create a TreeSource adapter for this tree. The client gets ownership
// of the return value and should delete it when done.
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
index 3edd308..6c5d885 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -16,27 +16,27 @@
class FakeAXTreeDelegate : public AXTreeDelegate {
public:
- virtual void OnNodeWillBeDeleted(AXNode* node) override {
+ void OnNodeWillBeDeleted(AXNode* node) override {
deleted_ids_.push_back(node->id());
}
- virtual void OnNodeCreated(AXNode* node) override {
+ void OnNodeCreated(AXNode* node) override {
created_ids_.push_back(node->id());
}
- virtual void OnNodeChanged(AXNode* node) override {
+ void OnNodeChanged(AXNode* node) override {
changed_ids_.push_back(node->id());
}
- virtual void OnNodeCreationFinished(AXNode* node) override {
+ void OnNodeCreationFinished(AXNode* node) override {
creation_finished_ids_.push_back(node->id());
}
- virtual void OnNodeChangeFinished(AXNode* node) override {
+ void OnNodeChangeFinished(AXNode* node) override {
change_finished_ids_.push_back(node->id());
}
- virtual void OnRootChanged(AXNode* new_root) override {
+ void OnRootChanged(AXNode* new_root) override {
new_root_ids_.push_back(new_root->id());
}
diff --git a/ui/accessibility/platform/ax_platform_node_base.h b/ui/accessibility/platform/ax_platform_node_base.h
index 437b158..fcc0f5c 100644
--- a/ui/accessibility/platform/ax_platform_node_base.h
+++ b/ui/accessibility/platform/ax_platform_node_base.h
@@ -26,12 +26,12 @@
gfx::NativeViewAccessible ChildAtIndex(int index);
// AXPlatformNode
- virtual void Destroy() override;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ void Destroy() override;
+ gfx::NativeViewAccessible GetNativeViewAccessible() override;
protected:
AXPlatformNodeBase();
- virtual ~AXPlatformNodeBase();
+ ~AXPlatformNodeBase() override;
AXPlatformNodeDelegate* delegate_; // Weak. Owns this.
diff --git a/ui/accessibility/platform/ax_platform_node_mac.h b/ui/accessibility/platform/ax_platform_node_mac.h
index 2f15120..f39a94d 100644
--- a/ui/accessibility/platform/ax_platform_node_mac.h
+++ b/ui/accessibility/platform/ax_platform_node_mac.h
@@ -18,11 +18,11 @@
AXPlatformNodeMac();
// AXPlatformNode.
- virtual void Destroy() override;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ void Destroy() override;
+ gfx::NativeViewAccessible GetNativeViewAccessible() override;
private:
- virtual ~AXPlatformNodeMac();
+ ~AXPlatformNodeMac() override;
base::scoped_nsobject<AXPlatformNodeCocoa> native_node_;
diff --git a/ui/app_list/app_list_folder_item.cc b/ui/app_list/app_list_folder_item.cc
index 3c5634d..120d48e 100644
--- a/ui/app_list/app_list_folder_item.cc
+++ b/ui/app_list/app_list_folder_item.cc
@@ -29,7 +29,7 @@
DCHECK(icons.size() <= kNumFolderTopItems);
}
- virtual ~FolderImageSource() {}
+ ~FolderImageSource() override {}
private:
void DrawIcon(gfx::Canvas* canvas,
@@ -47,7 +47,7 @@
}
// gfx::CanvasImageSource overrides:
- virtual void Draw(gfx::Canvas* canvas) override {
+ void Draw(gfx::Canvas* canvas) override {
// Draw folder circle.
gfx::Point center = gfx::Point(size().width() / 2 , size().height() / 2);
SkPaint paint;
diff --git a/ui/app_list/app_list_folder_item.h b/ui/app_list/app_list_folder_item.h
index bfcb86e..9b51d4b 100644
--- a/ui/app_list/app_list_folder_item.h
+++ b/ui/app_list/app_list_folder_item.h
@@ -36,7 +36,7 @@
static const char kItemType[];
AppListFolderItem(const std::string& id, FolderType folder_type);
- virtual ~AppListFolderItem();
+ ~AppListFolderItem() override;
// Updates the folder's icon.
void UpdateIcon();
@@ -59,13 +59,13 @@
FolderType folder_type() const { return folder_type_; }
// AppListItem
- virtual void Activate(int event_flags) override;
- virtual const char* GetItemType() const override;
- virtual ui::MenuModel* GetContextMenuModel() override;
- virtual AppListItem* FindChildItem(const std::string& id) override;
- virtual size_t ChildItemCount() const override;
- virtual void OnExtensionPreferenceChanged() override;
- virtual bool CompareForTest(const AppListItem* other) const override;
+ void Activate(int event_flags) override;
+ const char* GetItemType() const override;
+ ui::MenuModel* GetContextMenuModel() override;
+ AppListItem* FindChildItem(const std::string& id) override;
+ size_t ChildItemCount() const override;
+ void OnExtensionPreferenceChanged() override;
+ bool CompareForTest(const AppListItem* other) const override;
// Calculates the top item icons' bounds inside |folder_icon_bounds|.
// Returns the bounds of top item icons in sequence of top left, top right,
@@ -77,15 +77,15 @@
private:
// AppListItemObserver
- virtual void ItemIconChanged() override;
+ void ItemIconChanged() override;
// AppListItemListObserver
- virtual void OnListItemAdded(size_t index, AppListItem* item) override;
- virtual void OnListItemRemoved(size_t index,
- AppListItem* item) override;;
- virtual void OnListItemMoved(size_t from_index,
- size_t to_index,
- AppListItem* item) override;
+ void OnListItemAdded(size_t index, AppListItem* item) override;
+ void OnListItemRemoved(size_t index, AppListItem* item) override;
+ ;
+ void OnListItemMoved(size_t from_index,
+ size_t to_index,
+ AppListItem* item) override;
void UpdateTopItems();
diff --git a/ui/app_list/app_list_item_list_unittest.cc b/ui/app_list/app_list_item_list_unittest.cc
index 9b68ea4..dbdeed0 100644
--- a/ui/app_list/app_list_item_list_unittest.cc
+++ b/ui/app_list/app_list_item_list_unittest.cc
@@ -19,21 +19,20 @@
public:
TestObserver() : items_added_(0), items_removed_(0), items_moved_(0) {}
- virtual ~TestObserver() {
- }
+ ~TestObserver() override {}
// AppListItemListObserver overriden:
- virtual void OnListItemAdded(size_t index, AppListItem* item) override {
+ void OnListItemAdded(size_t index, AppListItem* item) override {
++items_added_;
}
- virtual void OnListItemRemoved(size_t index, AppListItem* item) override {
+ void OnListItemRemoved(size_t index, AppListItem* item) override {
++items_removed_;
}
- virtual void OnListItemMoved(size_t from_index,
- size_t to_index,
- AppListItem* item) override {
+ void OnListItemMoved(size_t from_index,
+ size_t to_index,
+ AppListItem* item) override {
++items_moved_;
}
diff --git a/ui/app_list/app_list_menu.h b/ui/app_list/app_list_menu.h
index 738ab1e..5dc5a2d 100644
--- a/ui/app_list/app_list_menu.h
+++ b/ui/app_list/app_list_menu.h
@@ -25,19 +25,18 @@
};
explicit AppListMenu(AppListViewDelegate* delegate);
- virtual ~AppListMenu();
+ ~AppListMenu() override;
ui::SimpleMenuModel* menu_model() { return &menu_model_; }
private:
void InitMenu();
- virtual bool IsCommandIdChecked(int command_id) const override;
- virtual bool IsCommandIdEnabled(int command_id) const override;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) override;
- virtual void ExecuteCommand(int command_id, int event_flags) override;
+ bool IsCommandIdChecked(int command_id) const override;
+ bool IsCommandIdEnabled(int command_id) const override;
+ bool GetAcceleratorForCommandId(int command_id,
+ ui::Accelerator* accelerator) override;
+ void ExecuteCommand(int command_id, int event_flags) override;
ui::SimpleMenuModel menu_model_;
AppListViewDelegate* delegate_;
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h
index 81c9854..fb18d85 100644
--- a/ui/app_list/app_list_model.h
+++ b/ui/app_list/app_list_model.h
@@ -42,7 +42,7 @@
typedef ui::ListModel<SearchResult> SearchResults;
AppListModel();
- virtual ~AppListModel();
+ ~AppListModel() override;
void AddObserver(AppListModelObserver* observer);
void RemoveObserver(AppListModelObserver* observer);
@@ -133,9 +133,9 @@
private:
// AppListItemListObserver
- virtual void OnListItemMoved(size_t from_index,
- size_t to_index,
- AppListItem* item) override;
+ void OnListItemMoved(size_t from_index,
+ size_t to_index,
+ AppListItem* item) override;
// Returns an existing folder matching |folder_id| or creates a new folder.
AppListFolderItem* FindOrCreateFolderItem(const std::string& folder_id);
diff --git a/ui/app_list/app_list_model_unittest.cc b/ui/app_list/app_list_model_unittest.cc
index 91d744e..c113eca 100644
--- a/ui/app_list/app_list_model_unittest.cc
+++ b/ui/app_list/app_list_model_unittest.cc
@@ -29,25 +29,18 @@
items_removed_(0),
items_updated_(0) {
}
- virtual ~TestObserver() {
- }
+ ~TestObserver() override {}
// AppListModelObserver
- virtual void OnAppListModelStatusChanged() override {
- ++status_changed_count_;
- }
+ void OnAppListModelStatusChanged() override { ++status_changed_count_; }
- virtual void OnAppListItemAdded(AppListItem* item) override {
- items_added_++;
- }
+ void OnAppListItemAdded(AppListItem* item) override { items_added_++; }
- virtual void OnAppListItemWillBeDeleted(AppListItem* item) override {
+ void OnAppListItemWillBeDeleted(AppListItem* item) override {
items_removed_++;
}
- virtual void OnAppListItemUpdated(AppListItem* item) override {
- items_updated_++;
- }
+ void OnAppListItemUpdated(AppListItem* item) override { items_updated_++; }
int status_changed_count() const { return status_changed_count_; }
size_t items_added() { return items_added_; }
diff --git a/ui/app_list/cocoa/app_list_view_controller.mm b/ui/app_list/cocoa/app_list_view_controller.mm
index c55576a..f4de6a1 100644
--- a/ui/app_list/cocoa/app_list_view_controller.mm
+++ b/ui/app_list/cocoa/app_list_view_controller.mm
@@ -83,12 +83,12 @@
class AppListModelObserverBridge : public AppListViewDelegateObserver {
public:
AppListModelObserverBridge(AppListViewController* parent);
- virtual ~AppListModelObserverBridge();
+ ~AppListModelObserverBridge() override;
private:
// Overridden from app_list::AppListViewDelegateObserver:
- virtual void OnProfilesChanged() override;
- virtual void OnShutdown() override;
+ void OnProfilesChanged() override;
+ void OnShutdown() override;
AppListViewController* parent_; // Weak. Owns us.
diff --git a/ui/app_list/cocoa/apps_grid_controller.mm b/ui/app_list/cocoa/apps_grid_controller.mm
index e9cec7a..d9f5e7b 100644
--- a/ui/app_list/cocoa/apps_grid_controller.mm
+++ b/ui/app_list/cocoa/apps_grid_controller.mm
@@ -98,20 +98,20 @@
private:
// Overridden from AppListItemListObserver:
- virtual void OnListItemAdded(size_t index, AppListItem* item) override {
+ void OnListItemAdded(size_t index, AppListItem* item) override {
[parent_ listItemAdded:index
item:item];
}
- virtual void OnListItemRemoved(size_t index, AppListItem* item) override {
+ void OnListItemRemoved(size_t index, AppListItem* item) override {
[parent_ listItemRemoved:index];
}
- virtual void OnListItemMoved(size_t from_index,
- size_t to_index,
- AppListItem* item) override {
+ void OnListItemMoved(size_t from_index,
+ size_t to_index,
+ AppListItem* item) override {
[parent_ listItemMovedFromIndex:from_index
toModelIndex:to_index];
}
- virtual void OnAppListItemHighlight(size_t index, bool highlight) override {
+ void OnAppListItemHighlight(size_t index, bool highlight) override {
// NSCollectionView (or -[AppsGridController scrollToPage]) ensures only one
// item is highlighted, so clearing a highlight isn't necessary.
if (!highlight)
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index 2723143..f580fd7 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -145,7 +145,7 @@
menu_ready_ = ready;
}
- virtual ui::MenuModel* GetContextMenuModel() override {
+ ui::MenuModel* GetContextMenuModel() override {
if (!menu_ready_)
return NULL;
diff --git a/ui/app_list/cocoa/apps_grid_view_item.mm b/ui/app_list/cocoa/apps_grid_view_item.mm
index d78e08e..1cc2784 100644
--- a/ui/app_list/cocoa/apps_grid_view_item.mm
+++ b/ui/app_list/cocoa/apps_grid_view_item.mm
@@ -64,15 +64,15 @@
class ItemModelObserverBridge : public app_list::AppListItemObserver {
public:
ItemModelObserverBridge(AppsGridViewItem* parent, AppListItem* model);
- virtual ~ItemModelObserverBridge();
+ ~ItemModelObserverBridge() override;
AppListItem* model() { return model_; }
NSMenu* GetContextMenu();
- virtual void ItemIconChanged() override;
- virtual void ItemNameChanged() override;
- virtual void ItemIsInstallingChanged() override;
- virtual void ItemPercentDownloadedChanged() override;
+ void ItemIconChanged() override;
+ void ItemNameChanged() override;
+ void ItemIsInstallingChanged() override;
+ void ItemPercentDownloadedChanged() override;
private:
AppsGridViewItem* parent_; // Weak. Owns us.
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 81d7c44..00a3fa6 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -48,15 +48,15 @@
class SearchBoxModelObserverBridge : public SearchBoxModelObserver {
public:
SearchBoxModelObserverBridge(AppsSearchBoxController* parent);
- virtual ~SearchBoxModelObserverBridge();
+ ~SearchBoxModelObserverBridge() override;
void SetSearchText(const base::string16& text);
- virtual void IconChanged() override;
- virtual void SpeechRecognitionButtonPropChanged() override;
- virtual void HintTextChanged() override;
- virtual void SelectionModelChanged() override;
- virtual void TextChanged() override;
+ void IconChanged() override;
+ void SpeechRecognitionButtonPropChanged() override;
+ void HintTextChanged() override;
+ void SelectionModelChanged() override;
+ void TextChanged() override;
private:
SearchBoxModel* GetModel();
diff --git a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
index bc6d4fc..ed840b5 100644
--- a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
@@ -74,7 +74,7 @@
menu_ready_ = ready;
}
- virtual ui::MenuModel* GetContextMenuModel() override {
+ ui::MenuModel* GetContextMenuModel() override {
if (!menu_ready_)
return NULL;
diff --git a/ui/app_list/cocoa/apps_search_results_model_bridge.h b/ui/app_list/cocoa/apps_search_results_model_bridge.h
index 70e66b7..0fe8478 100644
--- a/ui/app_list/cocoa/apps_search_results_model_bridge.h
+++ b/ui/app_list/cocoa/apps_search_results_model_bridge.h
@@ -20,7 +20,7 @@
public:
explicit AppsSearchResultsModelBridge(
AppsSearchResultsController* results_controller);
- virtual ~AppsSearchResultsModelBridge();
+ ~AppsSearchResultsModelBridge() override;
// Returns the context menu for the item at |index| in the search results
// model. A menu will be generated if it hasn't been previously requested.
@@ -34,10 +34,10 @@
void ReloadDataForItems(size_t start, size_t count) const;
// Overridden from ui::ListModelObserver:
- virtual void ListItemsAdded(size_t start, size_t count) override;
- virtual void ListItemsRemoved(size_t start, size_t count) override;
- virtual void ListItemMoved(size_t index, size_t target_index) override;
- virtual void ListItemsChanged(size_t start, size_t count) override;
+ void ListItemsAdded(size_t start, size_t count) override;
+ void ListItemsRemoved(size_t start, size_t count) override;
+ void ListItemMoved(size_t index, size_t target_index) override;
+ void ListItemsChanged(size_t start, size_t count) override;
AppsSearchResultsController* parent_; // Weak. Owns us.
ScopedVector<ItemObserver> item_observers_;
diff --git a/ui/app_list/cocoa/apps_search_results_model_bridge.mm b/ui/app_list/cocoa/apps_search_results_model_bridge.mm
index 26e8091..3712318 100644
--- a/ui/app_list/cocoa/apps_search_results_model_bridge.mm
+++ b/ui/app_list/cocoa/apps_search_results_model_bridge.mm
@@ -25,9 +25,7 @@
result_->AddObserver(this);
}
- virtual ~ItemObserver() {
- result_->RemoveObserver(this);
- }
+ ~ItemObserver() override { result_->RemoveObserver(this); }
NSMenu* GetContextMenu() {
if (!context_menu_controller_) {
@@ -43,14 +41,14 @@
}
// SearchResultObserver overrides:
- virtual void OnIconChanged() override {
+ void OnIconChanged() override {
bridge_->ReloadDataForItems(row_in_view_, 1);
}
- virtual void OnActionsChanged() override {}
- virtual void OnIsInstallingChanged() override {}
- virtual void OnPercentDownloadedChanged() override {}
- virtual void OnItemInstalled() override {}
- virtual void OnItemUninstalled() override;
+ void OnActionsChanged() override {}
+ void OnIsInstallingChanged() override {}
+ void OnPercentDownloadedChanged() override {}
+ void OnItemInstalled() override {}
+ void OnItemUninstalled() override;
private:
AppsSearchResultsModelBridge* bridge_; // Weak. Owns us.
diff --git a/ui/app_list/pagination_model.h b/ui/app_list/pagination_model.h
index 1447559..13c47ab 100644
--- a/ui/app_list/pagination_model.h
+++ b/ui/app_list/pagination_model.h
@@ -49,7 +49,7 @@
};
PaginationModel();
- virtual ~PaginationModel();
+ ~PaginationModel() override;
void SetTotalPages(int total_pages);
@@ -122,8 +122,8 @@
void ResetTransitionAnimation();
// gfx::AnimationDelegate overrides:
- virtual void AnimationProgressed(const gfx::Animation* animation) override;
- virtual void AnimationEnded(const gfx::Animation* animation) override;
+ void AnimationProgressed(const gfx::Animation* animation) override;
+ void AnimationEnded(const gfx::Animation* animation) override;
int total_pages_;
int selected_page_;
diff --git a/ui/app_list/pagination_model_unittest.cc b/ui/app_list/pagination_model_unittest.cc
index ad437cf..3c9b5a4 100644
--- a/ui/app_list/pagination_model_unittest.cc
+++ b/ui/app_list/pagination_model_unittest.cc
@@ -26,7 +26,7 @@
transition_page_(-1) {
Reset();
}
- virtual ~TestPaginationModelObserver() {}
+ ~TestPaginationModelObserver() override {}
void Reset() {
selection_count_ = 0;
@@ -61,9 +61,8 @@
}
// PaginationModelObserver overrides:
- virtual void TotalPagesChanged() override {}
- virtual void SelectedPageChanged(int old_selected,
- int new_selected) override {
+ void TotalPagesChanged() override {}
+ void SelectedPageChanged(int old_selected, int new_selected) override {
AppendSelectedPage(new_selected);
++selection_count_;
if (expected_page_selection_ &&
@@ -72,10 +71,9 @@
}
}
- virtual void TransitionStarted() override {
- }
+ void TransitionStarted() override {}
- virtual void TransitionChanged() override {
+ void TransitionChanged() override {
if (transition_page_ == -1 ||
model_->transition().target_page == transition_page_) {
if (model_->transition().progress == 0)
diff --git a/ui/app_list/search/dictionary_data_store.h b/ui/app_list/search/dictionary_data_store.h
index 6ebe1bf..1a882c1 100644
--- a/ui/app_list/search/dictionary_data_store.h
+++ b/ui/app_list/search/dictionary_data_store.h
@@ -54,13 +54,13 @@
private:
friend class base::RefCountedThreadSafe<DictionaryDataStore>;
- virtual ~DictionaryDataStore();
+ ~DictionaryDataStore() override;
// Reads data from backing file.
scoped_ptr<base::DictionaryValue> LoadOnBlockingPool();
// ImportantFileWriter::DataSerializer overrides:
- virtual bool SerializeData(std::string* data) override;
+ bool SerializeData(std::string* data) override;
base::FilePath data_file_;
scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
diff --git a/ui/app_list/search/history.h b/ui/app_list/search/history.h
index 2a87813..4026ec1 100644
--- a/ui/app_list/search/history.h
+++ b/ui/app_list/search/history.h
@@ -35,7 +35,7 @@
public HistoryDataObserver {
public:
explicit History(scoped_refptr<HistoryDataStore> store);
- virtual ~History();
+ ~History() override;
// Returns true if the service is ready.
bool IsReady() const;
@@ -51,7 +51,7 @@
friend class app_list::test::SearchHistoryTest;
// HistoryDataObserver overrides:
- virtual void OnHistoryDataLoadedFromStore() override;
+ void OnHistoryDataLoadedFromStore() override;
scoped_ptr<HistoryData> data_;
scoped_refptr<HistoryDataStore> store_;
diff --git a/ui/app_list/search/mixer_unittest.cc b/ui/app_list/search/mixer_unittest.cc
index 542c98d..70163a2 100644
--- a/ui/app_list/search/mixer_unittest.cc
+++ b/ui/app_list/search/mixer_unittest.cc
@@ -26,12 +26,12 @@
set_title(base::UTF8ToUTF16(id));
set_relevance(relevance);
}
- virtual ~TestSearchResult() {}
+ ~TestSearchResult() override {}
// SearchResult overrides:
- virtual void Open(int event_flags) override {}
- virtual void InvokeAction(int action_index, int event_flags) override {}
- virtual scoped_ptr<SearchResult> Duplicate() override {
+ void Open(int event_flags) override {}
+ void InvokeAction(int action_index, int event_flags) override {}
+ scoped_ptr<SearchResult> Duplicate() override {
return scoped_ptr<SearchResult>(new TestSearchResult(id(), relevance()));
}
@@ -55,10 +55,10 @@
public:
explicit TestSearchProvider(const std::string& prefix)
: prefix_(prefix), count_(0) {}
- virtual ~TestSearchProvider() {}
+ ~TestSearchProvider() override {}
// SearchProvider overrides:
- virtual void Start(const base::string16& query) override {
+ void Start(const base::string16& query) override {
ClearResults();
for (size_t i = 0; i < count_; ++i) {
const std::string id =
@@ -67,7 +67,7 @@
Add(scoped_ptr<SearchResult>(new TestSearchResult(id, relevance)).Pass());
}
}
- virtual void Stop() override {}
+ void Stop() override {}
void set_prefix(const std::string& prefix) { prefix_ = prefix; }
void set_count(size_t count) { count_ = count; }
diff --git a/ui/app_list/test/app_list_test_model.h b/ui/app_list/test/app_list_test_model.h
index d2a1845..43a79ab 100644
--- a/ui/app_list/test/app_list_test_model.h
+++ b/ui/app_list/test/app_list_test_model.h
@@ -21,9 +21,9 @@
class AppListTestItem : public AppListItem {
public:
AppListTestItem(const std::string& id, AppListTestModel* model);
- virtual ~AppListTestItem();
- virtual void Activate(int event_flags) override;
- virtual const char* GetItemType() const override;
+ ~AppListTestItem() override;
+ void Activate(int event_flags) override;
+ const char* GetItemType() const override;
void SetPosition(const syncer::StringOrdinal& new_position);
diff --git a/ui/app_list/test/app_list_test_view_delegate.h b/ui/app_list/test/app_list_test_view_delegate.h
index 2e307a6..2eb1853 100644
--- a/ui/app_list/test/app_list_test_view_delegate.h
+++ b/ui/app_list/test/app_list_test_view_delegate.h
@@ -24,7 +24,7 @@
class AppListTestViewDelegate : public AppListViewDelegate {
public:
AppListTestViewDelegate();
- virtual ~AppListTestViewDelegate();
+ ~AppListTestViewDelegate() override;
int dismiss_count() { return dismiss_count_; }
int open_search_result_count() { return open_search_result_count_; }
@@ -48,43 +48,42 @@
int GetToggleSpeechRecognitionCountAndReset();
// AppListViewDelegate overrides:
- virtual bool ForceNativeDesktop() const override;
- virtual void SetProfileByPath(const base::FilePath& profile_path) override;
- virtual AppListModel* GetModel() override;
- virtual SpeechUIModel* GetSpeechUI() override;
- virtual void GetShortcutPathForApp(
+ bool ForceNativeDesktop() const override;
+ void SetProfileByPath(const base::FilePath& profile_path) override;
+ AppListModel* GetModel() override;
+ SpeechUIModel* GetSpeechUI() override;
+ void GetShortcutPathForApp(
const std::string& app_id,
const base::Callback<void(const base::FilePath&)>& callback) override;
- virtual void StartSearch() override {}
- virtual void StopSearch() override {}
- virtual void OpenSearchResult(SearchResult* result,
- bool auto_launch,
- int event_flags) override;
- virtual void InvokeSearchResultAction(SearchResult* result,
- int action_index,
- int event_flags) override {}
- virtual base::TimeDelta GetAutoLaunchTimeout() override;
- virtual void AutoLaunchCanceled() override;
- virtual void ViewInitialized() override {}
- virtual void Dismiss() override;
- virtual void ViewClosing() override {}
- virtual gfx::ImageSkia GetWindowIcon() override;
- virtual void OpenSettings() override {}
- virtual void OpenHelp() override {}
- virtual void OpenFeedback() override {}
- virtual void ToggleSpeechRecognition() override;
- virtual void ShowForProfileByPath(
- const base::FilePath& profile_path) override {}
+ void StartSearch() override {}
+ void StopSearch() override {}
+ void OpenSearchResult(SearchResult* result,
+ bool auto_launch,
+ int event_flags) override;
+ void InvokeSearchResultAction(SearchResult* result,
+ int action_index,
+ int event_flags) override {}
+ base::TimeDelta GetAutoLaunchTimeout() override;
+ void AutoLaunchCanceled() override;
+ void ViewInitialized() override {}
+ void Dismiss() override;
+ void ViewClosing() override {}
+ gfx::ImageSkia GetWindowIcon() override;
+ void OpenSettings() override {}
+ void OpenHelp() override {}
+ void OpenFeedback() override {}
+ void ToggleSpeechRecognition() override;
+ void ShowForProfileByPath(const base::FilePath& profile_path) override {}
#if defined(TOOLKIT_VIEWS)
virtual views::View* CreateStartPageWebView(const gfx::Size& size) override;
virtual std::vector<views::View*> CreateCustomPageWebViews(
const gfx::Size& size) override;
#endif
- virtual bool IsSpeechRecognitionEnabled() override;
- virtual const Users& GetUsers() const override;
- virtual bool ShouldCenterWindow() const override;
- virtual void AddObserver(AppListViewDelegateObserver* observer) override;
- virtual void RemoveObserver(AppListViewDelegateObserver* observer) override;
+ bool IsSpeechRecognitionEnabled() override;
+ const Users& GetUsers() const override;
+ bool ShouldCenterWindow() const override;
+ void AddObserver(AppListViewDelegateObserver* observer) override;
+ void RemoveObserver(AppListViewDelegateObserver* observer) override;
// Do a bulk replacement of the items in the model.
void ReplaceTestModel(int item_count);
diff --git a/ui/app_list/test/run_all_unittests.cc b/ui/app_list/test/run_all_unittests.cc
index bd03d4f..b730cfb 100644
--- a/ui/app_list/test/run_all_unittests.cc
+++ b/ui/app_list/test/run_all_unittests.cc
@@ -25,7 +25,7 @@
AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() override {
+ void Initialize() override {
#if defined(OS_MACOSX)
mock_cr_app::RegisterMockCrApp();
#else
@@ -39,7 +39,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() override {
+ void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/app_list/test/test_search_result.h b/ui/app_list/test/test_search_result.h
index b54908d..dc54f93 100644
--- a/ui/app_list/test/test_search_result.h
+++ b/ui/app_list/test/test_search_result.h
@@ -13,10 +13,10 @@
class TestSearchResult : public SearchResult {
public:
TestSearchResult();
- virtual ~TestSearchResult();
+ ~TestSearchResult() override;
// SearchResult:
- virtual scoped_ptr<SearchResult> Duplicate() override;
+ scoped_ptr<SearchResult> Duplicate() override;
private:
DISALLOW_COPY_AND_ASSIGN(TestSearchResult);
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 1a2721a..95f6e7d 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -73,7 +73,7 @@
typedef std::vector<Window*> Windows;
explicit Window(WindowDelegate* delegate);
- virtual ~Window();
+ ~Window() override;
// Initializes the window. This creates the window's layer.
void Init(WindowLayerType layer_type);
@@ -312,7 +312,7 @@
typedef void (*PropertyDeallocator)(int64 value);
// Overridden from ui::LayerDelegate:
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ void OnDeviceScaleFactorChanged(float device_scale_factor) override;
#if !defined(NDEBUG)
// These methods are useful when debugging.
@@ -455,18 +455,17 @@
void OnWindowBoundsChanged(const gfx::Rect& old_bounds);
// Overridden from ui::LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) override;
- virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) override;
- virtual base::Closure PrepareForLayerBoundsChange() override;
+ void OnPaintLayer(gfx::Canvas* canvas) override;
+ void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
+ base::Closure PrepareForLayerBoundsChange() override;
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) override;
- virtual EventTarget* GetParentTarget() override;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
- virtual ui::EventTargeter* GetEventTargeter() override;
- virtual void ConvertEventToTarget(ui::EventTarget* target,
- ui::LocatedEvent* event) override;
+ bool CanAcceptEvent(const ui::Event& event) override;
+ EventTarget* GetParentTarget() override;
+ scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ ui::EventTargeter* GetEventTargeter() override;
+ void ConvertEventToTarget(ui::EventTarget* target,
+ ui::LocatedEvent* event) override;
// Updates the layer name based on the window's name and id.
void UpdateLayerName();
diff --git a/ui/aura/window_event_dispatcher_unittest.cc b/ui/aura/window_event_dispatcher_unittest.cc
index 4ef4cae..6822101 100644
--- a/ui/aura/window_event_dispatcher_unittest.cc
+++ b/ui/aura/window_event_dispatcher_unittest.cc
@@ -342,14 +342,14 @@
w3->parent()->RemoveChild(w3.get());
}
-TEST_F(WindowEventDispatcherTest, IgnoreUnknownKeys) {
+TEST_F(WindowEventDispatcherTest, DontIgnoreUnknownKeys) {
ConsumeKeyHandler handler;
root_window()->AddPreTargetHandler(&handler);
ui::KeyEvent unknown_event(ui::ET_KEY_PRESSED, ui::VKEY_UNKNOWN, ui::EF_NONE);
DispatchEventUsingWindowDispatcher(&unknown_event);
- EXPECT_FALSE(unknown_event.handled());
- EXPECT_EQ(0, handler.num_key_events());
+ EXPECT_TRUE(unknown_event.handled());
+ EXPECT_EQ(1, handler.num_key_events());
handler.Reset();
ui::KeyEvent known_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE);
diff --git a/ui/aura/window_targeter.cc b/ui/aura/window_targeter.cc
index afe079d..7303e22 100644
--- a/ui/aura/window_targeter.cc
+++ b/ui/aura/window_targeter.cc
@@ -104,10 +104,6 @@
Window* WindowTargeter::FindTargetForKeyEvent(Window* window,
const ui::KeyEvent& key) {
Window* root_window = window->GetRootWindow();
- if (key.key_code() == ui::VKEY_UNKNOWN &&
- (key.flags() & ui::EF_IME_FABRICATED_KEY) == 0 &&
- key.GetCharacter() == 0)
- return NULL;
client::FocusClient* focus_client = client::GetFocusClient(root_window);
Window* focused_window = focus_client->GetFocusedWindow();
if (!focused_window)
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 4627e88..b4a8cc6 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -189,7 +189,7 @@
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
if (key_code_ >= '0' && key_code_ <= '9')
- key = key_code_;
+ key = static_cast<wchar_t>(key_code_);
else
key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
shortcut += key;
diff --git a/ui/base/accelerators/accelerator_manager_unittest.cc b/ui/base/accelerators/accelerator_manager_unittest.cc
index 979ff4a..ec5a47b 100644
--- a/ui/base/accelerators/accelerator_manager_unittest.cc
+++ b/ui/base/accelerators/accelerator_manager_unittest.cc
@@ -17,7 +17,7 @@
class TestTarget : public AcceleratorTarget {
public:
TestTarget() : accelerator_pressed_count_(0) {}
- virtual ~TestTarget() {}
+ ~TestTarget() override {}
int accelerator_pressed_count() const {
return accelerator_pressed_count_;
@@ -28,8 +28,8 @@
}
// Overridden from AcceleratorTarget:
- virtual bool AcceleratorPressed(const Accelerator& accelerator) override;
- virtual bool CanHandleAccelerators() const override;
+ bool AcceleratorPressed(const Accelerator& accelerator) override;
+ bool CanHandleAccelerators() const override;
private:
int accelerator_pressed_count_;
diff --git a/ui/base/accelerators/platform_accelerator_cocoa.h b/ui/base/accelerators/platform_accelerator_cocoa.h
index f14bc4d..c6fed1d 100644
--- a/ui/base/accelerators/platform_accelerator_cocoa.h
+++ b/ui/base/accelerators/platform_accelerator_cocoa.h
@@ -17,11 +17,11 @@
public:
PlatformAcceleratorCocoa();
PlatformAcceleratorCocoa(NSString* key_code, NSUInteger modifier_mask);
- virtual ~PlatformAcceleratorCocoa();
+ ~PlatformAcceleratorCocoa() override;
// PlatformAccelerator:
- virtual scoped_ptr<PlatformAccelerator> CreateCopy() const override;
- virtual bool Equals(const PlatformAccelerator& rhs) const override;
+ scoped_ptr<PlatformAccelerator> CreateCopy() const override;
+ bool Equals(const PlatformAccelerator& rhs) const override;
// The keyEquivalent of the NSMenuItem associated with the accelerator.
NSString* characters() const { return characters_.get(); }
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index b269351..f37f077 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -192,7 +192,7 @@
Clipboard::FormatType::FormatType(UINT native_format) : data_() {
// There's no good way to actually initialize this in the constructor in
// C++03.
- data_.cfFormat = native_format;
+ data_.cfFormat = static_cast<CLIPFORMAT>(native_format);
data_.dwAspect = DVASPECT_CONTENT;
data_.lindex = -1;
data_.tymed = TYMED_HGLOBAL;
@@ -201,7 +201,7 @@
Clipboard::FormatType::FormatType(UINT native_format, LONG index) : data_() {
// There's no good way to actually initialize this in the constructor in
// C++03.
- data_.cfFormat = native_format;
+ data_.cfFormat = static_cast<CLIPFORMAT>(native_format);
data_.dwAspect = DVASPECT_CONTENT;
data_.lindex = index;
data_.tymed = TYMED_HGLOBAL;
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm
index 161bf28..36b0e13 100644
--- a/ui/base/cocoa/menu_controller_unittest.mm
+++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -39,21 +39,20 @@
did_close_(false) {
}
- virtual bool IsCommandIdChecked(int command_id) const override {
- return false;
- }
- virtual bool IsCommandIdEnabled(int command_id) const override {
+ bool IsCommandIdChecked(int command_id) const override { return false; }
+ bool IsCommandIdEnabled(int command_id) const override {
++enable_count_;
return true;
}
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- Accelerator* accelerator) override { return false; }
- virtual void ExecuteCommand(int command_id, int event_flags) override {
+ bool GetAcceleratorForCommandId(int command_id,
+ Accelerator* accelerator) override {
+ return false;
+ }
+ void ExecuteCommand(int command_id, int event_flags) override {
++execute_count_;
}
- virtual void MenuWillShow(SimpleMenuModel* /*source*/) override {
+ void MenuWillShow(SimpleMenuModel* /*source*/) override {
EXPECT_FALSE(did_show_);
EXPECT_FALSE(did_close_);
did_show_ = true;
@@ -66,7 +65,7 @@
inModes:modes];
}
- virtual void MenuClosed(SimpleMenuModel* /*source*/) override {
+ void MenuClosed(SimpleMenuModel* /*source*/) override {
EXPECT_TRUE(did_show_);
EXPECT_FALSE(did_close_);
did_close_ = true;
@@ -86,15 +85,11 @@
class DynamicDelegate : public Delegate {
public:
DynamicDelegate() {}
- virtual bool IsItemForCommandIdDynamic(int command_id) const override {
- return true;
- }
- virtual base::string16 GetLabelForCommandId(int command_id) const override {
+ bool IsItemForCommandIdDynamic(int command_id) const override { return true; }
+ base::string16 GetLabelForCommandId(int command_id) const override {
return label_;
}
- virtual bool GetIconForCommandId(
- int command_id,
- gfx::Image* icon) const override {
+ bool GetIconForCommandId(int command_id, gfx::Image* icon) const override {
if (icon_.IsEmpty()) {
return false;
} else {
@@ -120,8 +115,8 @@
font_list_(font_list),
index_(index) {
}
- virtual ~FontListMenuModel() {}
- virtual const gfx::FontList* GetLabelFontListAt(int index) const override {
+ ~FontListMenuModel() override {}
+ const gfx::FontList* GetLabelFontListAt(int index) const override {
return (index == index_) ? font_list_ : NULL;
}
diff --git a/ui/base/default_theme_provider.h b/ui/base/default_theme_provider.h
index 0fe64d1..173442d 100644
--- a/ui/base/default_theme_provider.h
+++ b/ui/base/default_theme_provider.h
@@ -21,25 +21,24 @@
class UI_BASE_EXPORT DefaultThemeProvider : public ThemeProvider {
public:
DefaultThemeProvider();
- virtual ~DefaultThemeProvider();
+ ~DefaultThemeProvider() override;
// Overridden from ui::ThemeProvider:
- virtual bool UsingSystemTheme() const override;
- virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const override;
- virtual SkColor GetColor(int id) const override;
- virtual int GetDisplayProperty(int id) const override;
- virtual bool ShouldUseNativeFrame() const override;
- virtual bool HasCustomImage(int id) const override;
- virtual base::RefCountedMemory* GetRawData(
- int id,
- ui::ScaleFactor scale_factor) const override;
+ bool UsingSystemTheme() const override;
+ gfx::ImageSkia* GetImageSkiaNamed(int id) const override;
+ SkColor GetColor(int id) const override;
+ int GetDisplayProperty(int id) const override;
+ bool ShouldUseNativeFrame() const override;
+ bool HasCustomImage(int id) const override;
+ base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor)
+ const override;
#if defined(OS_MACOSX)
- virtual NSImage* GetNSImageNamed(int id) const override;
- virtual NSColor* GetNSImageColorNamed(int id) const override;
- virtual NSColor* GetNSColor(int id) const override;
- virtual NSColor* GetNSColorTint(int id) const override;
- virtual NSGradient* GetNSGradient(int id) const override;
+ NSImage* GetNSImageNamed(int id) const override;
+ NSColor* GetNSImageColorNamed(int id) const override;
+ NSColor* GetNSColor(int id) const override;
+ NSColor* GetNSColorTint(int id) const override;
+ NSGradient* GetNSGradient(int id) const override;
#endif
private:
diff --git a/ui/base/dragdrop/os_exchange_data_provider_mac.h b/ui/base/dragdrop/os_exchange_data_provider_mac.h
index 911973e..3488c25 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_mac.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_mac.h
@@ -18,31 +18,30 @@
public:
OSExchangeDataProviderMac();
explicit OSExchangeDataProviderMac(NSPasteboard* pasteboard);
- virtual ~OSExchangeDataProviderMac();
+ ~OSExchangeDataProviderMac() override;
// Overridden from OSExchangeData::Provider:
- virtual Provider* Clone() const override;
- virtual void MarkOriginatedFromRenderer() override;
- virtual bool DidOriginateFromRenderer() const override;
- virtual void SetString(const base::string16& data) override;
- virtual void SetURL(const GURL& url, const base::string16& title) override;
- virtual void SetFilename(const base::FilePath& path) override;
- virtual void SetFilenames(const std::vector<FileInfo>& filenames) override;
- virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
- const Pickle& data) override;
- virtual bool GetString(base::string16* data) const override;
- virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
- GURL* url,
- base::string16* title) const override;
- virtual bool GetFilename(base::FilePath* path) const override;
- virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override;
- virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
- Pickle* data) const override;
- virtual bool HasString() const override;
- virtual bool HasURL(
- OSExchangeData::FilenameToURLPolicy policy) const override;
- virtual bool HasFile() const override;
- virtual bool HasCustomFormat(
+ Provider* Clone() const override;
+ void MarkOriginatedFromRenderer() override;
+ bool DidOriginateFromRenderer() const override;
+ void SetString(const base::string16& data) override;
+ void SetURL(const GURL& url, const base::string16& title) override;
+ void SetFilename(const base::FilePath& path) override;
+ void SetFilenames(const std::vector<FileInfo>& filenames) override;
+ void SetPickledData(const OSExchangeData::CustomFormat& format,
+ const Pickle& data) override;
+ bool GetString(base::string16* data) const override;
+ bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
+ GURL* url,
+ base::string16* title) const override;
+ bool GetFilename(base::FilePath* path) const override;
+ bool GetFilenames(std::vector<FileInfo>* filenames) const override;
+ bool GetPickledData(const OSExchangeData::CustomFormat& format,
+ Pickle* data) const override;
+ bool HasString() const override;
+ bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override;
+ bool HasFile() const override;
+ bool HasCustomFormat(
const OSExchangeData::CustomFormat& format) const override;
private:
diff --git a/ui/base/ime/dummy_input_method.h b/ui/base/ime/dummy_input_method.h
index a0037f5..20a019b 100644
--- a/ui/base/ime/dummy_input_method.h
+++ b/ui/base/ime/dummy_input_method.h
@@ -14,34 +14,33 @@
class DummyInputMethod : public InputMethod {
public:
DummyInputMethod();
- virtual ~DummyInputMethod();
+ ~DummyInputMethod() override;
// InputMethod overrides:
- virtual void SetDelegate(
- internal::InputMethodDelegate* delegate) override;
- virtual void Init(bool focused) override;
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual bool OnUntranslatedIMEMessage(
- const base::NativeEvent& event, NativeEventResult* result) override;
- virtual void SetFocusedTextInputClient(TextInputClient* client) override;
- virtual void DetachTextInputClient(TextInputClient* client) override;
- virtual TextInputClient* GetTextInputClient() const override;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
- virtual void CancelComposition(const TextInputClient* client) override;
- virtual void OnInputLocaleChanged() override;
- virtual std::string GetInputLocale() override;
- virtual bool IsActive() override;
- virtual TextInputType GetTextInputType() const override;
- virtual TextInputMode GetTextInputMode() const override;
- virtual bool CanComposeInline() const override;
- virtual bool IsCandidatePopupOpen() const override;
- virtual void ShowImeIfNeeded() override;
+ void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ void Init(bool focused) override;
+ void OnFocus() override;
+ void OnBlur() override;
+ bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
+ NativeEventResult* result) override;
+ void SetFocusedTextInputClient(TextInputClient* client) override;
+ void DetachTextInputClient(TextInputClient* client) override;
+ TextInputClient* GetTextInputClient() const override;
+ bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ void OnTextInputTypeChanged(const TextInputClient* client) override;
+ void OnCaretBoundsChanged(const TextInputClient* client) override;
+ void CancelComposition(const TextInputClient* client) override;
+ void OnInputLocaleChanged() override;
+ std::string GetInputLocale() override;
+ bool IsActive() override;
+ TextInputType GetTextInputType() const override;
+ TextInputMode GetTextInputMode() const override;
+ bool CanComposeInline() const override;
+ bool IsCandidatePopupOpen() const override;
+ void ShowImeIfNeeded() override;
- virtual void AddObserver(InputMethodObserver* observer) override;
- virtual void RemoveObserver(InputMethodObserver* observer) override;
+ void AddObserver(InputMethodObserver* observer) override;
+ void RemoveObserver(InputMethodObserver* observer) override;
private:
DISALLOW_COPY_AND_ASSIGN(DummyInputMethod);
diff --git a/ui/base/ime/dummy_input_method_delegate.h b/ui/base/ime/dummy_input_method_delegate.h
index 5055500..db5a5e3 100644
--- a/ui/base/ime/dummy_input_method_delegate.h
+++ b/ui/base/ime/dummy_input_method_delegate.h
@@ -15,10 +15,10 @@
class UI_BASE_EXPORT DummyInputMethodDelegate : public InputMethodDelegate {
public:
DummyInputMethodDelegate();
- virtual ~DummyInputMethodDelegate();
+ ~DummyInputMethodDelegate() override;
// Overridden from InputMethodDelegate:
- virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) override;
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& key_event) override;
private:
DISALLOW_COPY_AND_ASSIGN(DummyInputMethodDelegate);
diff --git a/ui/base/ime/dummy_text_input_client.h b/ui/base/ime/dummy_text_input_client.h
index 92705cb..898ffa2 100644
--- a/ui/base/ime/dummy_text_input_client.h
+++ b/ui/base/ime/dummy_text_input_client.h
@@ -14,39 +14,39 @@
public:
DummyTextInputClient();
explicit DummyTextInputClient(TextInputType text_input_type);
- virtual ~DummyTextInputClient();
+ ~DummyTextInputClient() override;
// Overriden from TextInputClient.
- virtual void SetCompositionText(const CompositionText& composition) override;
- virtual void ConfirmCompositionText() override;
- virtual void ClearCompositionText() override;
- virtual void InsertText(const base::string16& text) override;
- virtual void InsertChar(base::char16 ch, int flags) override;
- virtual gfx::NativeWindow GetAttachedWindow() const override;
- virtual TextInputType GetTextInputType() const override;
- virtual TextInputMode GetTextInputMode() const override;
- virtual bool CanComposeInline() const override;
- virtual gfx::Rect GetCaretBounds() const override;
- virtual bool GetCompositionCharacterBounds(uint32 index,
- gfx::Rect* rect) const override;
- virtual bool HasCompositionText() const override;
- virtual bool GetTextRange(gfx::Range* range) const override;
- virtual bool GetCompositionTextRange(gfx::Range* range) const override;
- virtual bool GetSelectionRange(gfx::Range* range) const override;
- virtual bool SetSelectionRange(const gfx::Range& range) override;
- virtual bool DeleteRange(const gfx::Range& range) override;
- virtual bool GetTextFromRange(const gfx::Range& range,
- base::string16* text) const override;
- virtual void OnInputMethodChanged() override;
- virtual bool ChangeTextDirectionAndLayoutAlignment(
+ void SetCompositionText(const CompositionText& composition) override;
+ void ConfirmCompositionText() override;
+ void ClearCompositionText() override;
+ void InsertText(const base::string16& text) override;
+ void InsertChar(base::char16 ch, int flags) override;
+ gfx::NativeWindow GetAttachedWindow() const override;
+ TextInputType GetTextInputType() const override;
+ TextInputMode GetTextInputMode() const override;
+ bool CanComposeInline() const override;
+ gfx::Rect GetCaretBounds() const override;
+ bool GetCompositionCharacterBounds(uint32 index,
+ gfx::Rect* rect) const override;
+ bool HasCompositionText() const override;
+ bool GetTextRange(gfx::Range* range) const override;
+ bool GetCompositionTextRange(gfx::Range* range) const override;
+ bool GetSelectionRange(gfx::Range* range) const override;
+ bool SetSelectionRange(const gfx::Range& range) override;
+ bool DeleteRange(const gfx::Range& range) override;
+ bool GetTextFromRange(const gfx::Range& range,
+ base::string16* text) const override;
+ void OnInputMethodChanged() override;
+ bool ChangeTextDirectionAndLayoutAlignment(
base::i18n::TextDirection direction) override;
- virtual void ExtendSelectionAndDelete(size_t before, size_t after) override;
- virtual void EnsureCaretInRect(const gfx::Rect& rect) override;
- virtual void OnCandidateWindowShown() override;
- virtual void OnCandidateWindowUpdated() override;
- virtual void OnCandidateWindowHidden() override;
- virtual bool IsEditingCommandEnabled(int command_id) override;
- virtual void ExecuteEditingCommand(int command_id) override;
+ void ExtendSelectionAndDelete(size_t before, size_t after) override;
+ void EnsureCaretInRect(const gfx::Rect& rect) override;
+ void OnCandidateWindowShown() override;
+ void OnCandidateWindowUpdated() override;
+ void OnCandidateWindowHidden() override;
+ bool IsEditingCommandEnabled(int command_id) override;
+ void ExecuteEditingCommand(int command_id) override;
TextInputType text_input_type_;
diff --git a/ui/base/ime/input_method_base.h b/ui/base/ime/input_method_base.h
index 76260e6..8c6dd25 100644
--- a/ui/base/ime/input_method_base.h
+++ b/ui/base/ime/input_method_base.h
@@ -29,31 +29,31 @@
public base::SupportsWeakPtr<InputMethodBase> {
public:
InputMethodBase();
- virtual ~InputMethodBase();
+ ~InputMethodBase() override;
// Overriden from InputMethod.
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
- virtual void Init(bool focused) override;
+ void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ void Init(bool focused) override;
// If a derived class overrides OnFocus()/OnBlur(), it should call parent's
// implementation first, to make sure |system_toplevel_window_focused_| flag
// can be updated correctly.
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual void SetFocusedTextInputClient(TextInputClient* client) override;
- virtual void DetachTextInputClient(TextInputClient* client) override;
- virtual TextInputClient* GetTextInputClient() const override;
+ void OnFocus() override;
+ void OnBlur() override;
+ void SetFocusedTextInputClient(TextInputClient* client) override;
+ void DetachTextInputClient(TextInputClient* client) override;
+ TextInputClient* GetTextInputClient() const override;
// If a derived class overrides this method, it should call parent's
// implementation.
- virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
+ void OnTextInputTypeChanged(const TextInputClient* client) override;
- virtual TextInputType GetTextInputType() const override;
- virtual TextInputMode GetTextInputMode() const override;
- virtual bool CanComposeInline() const override;
- virtual void ShowImeIfNeeded() override;
+ TextInputType GetTextInputType() const override;
+ TextInputMode GetTextInputMode() const override;
+ bool CanComposeInline() const override;
+ void ShowImeIfNeeded() override;
- virtual void AddObserver(InputMethodObserver* observer) override;
- virtual void RemoveObserver(InputMethodObserver* observer) override;
+ void AddObserver(InputMethodObserver* observer) override;
+ void RemoveObserver(InputMethodObserver* observer) override;
protected:
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
diff --git a/ui/base/ime/input_method_base_unittest.cc b/ui/base/ime/input_method_base_unittest.cc
index 797d88e..48d0c09 100644
--- a/ui/base/ime/input_method_base_unittest.cc
+++ b/ui/base/ime/input_method_base_unittest.cc
@@ -147,42 +147,30 @@
// Note: this class does not take the ownership of |verifier|.
MockInputMethodBase(ClientChangeVerifier* verifier) : verifier_(verifier) {
}
- virtual ~MockInputMethodBase() {
- }
+ ~MockInputMethodBase() override {}
private:
// Overriden from InputMethod.
- virtual bool OnUntranslatedIMEMessage(
+ bool OnUntranslatedIMEMessage(
const base::NativeEvent& event,
InputMethod::NativeEventResult* result) override {
return false;
}
- virtual bool DispatchKeyEvent(const ui::KeyEvent&) override {
- return false;
- }
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
- }
- virtual void CancelComposition(const TextInputClient* client) override {
- }
- virtual void OnInputLocaleChanged() override {
- }
- virtual std::string GetInputLocale() override{
- return "";
- }
- virtual bool IsActive() override {
- return false;
- }
- virtual bool IsCandidatePopupOpen() const override {
- return false;
- }
+ bool DispatchKeyEvent(const ui::KeyEvent&) override { return false; }
+ void OnCaretBoundsChanged(const TextInputClient* client) override {}
+ void CancelComposition(const TextInputClient* client) override {}
+ void OnInputLocaleChanged() override {}
+ std::string GetInputLocale() override { return ""; }
+ bool IsActive() override { return false; }
+ bool IsCandidatePopupOpen() const override { return false; }
// Overriden from InputMethodBase.
- virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) override {
+ void OnWillChangeFocusedClient(TextInputClient* focused_before,
+ TextInputClient* focused) override {
verifier_->OnWillChangeFocusedClient(focused_before, focused);
}
- virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
- TextInputClient* focused) override {
+ void OnDidChangeFocusedClient(TextInputClient* focused_before,
+ TextInputClient* focused) override {
verifier_->OnDidChangeFocusedClient(focused_before, focused);
}
@@ -198,25 +186,18 @@
explicit MockInputMethodObserver(ClientChangeVerifier* verifier)
: verifier_(verifier) {
}
- virtual ~MockInputMethodObserver() {
- }
+ ~MockInputMethodObserver() override {}
private:
- virtual void OnTextInputTypeChanged(const TextInputClient* client) override {
- }
- virtual void OnFocus() override {
- }
- virtual void OnBlur() override {
- }
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override {
- }
- virtual void OnTextInputStateChanged(const TextInputClient* client) override {
+ void OnTextInputTypeChanged(const TextInputClient* client) override {}
+ void OnFocus() override {}
+ void OnBlur() override {}
+ void OnCaretBoundsChanged(const TextInputClient* client) override {}
+ void OnTextInputStateChanged(const TextInputClient* client) override {
verifier_->OnTextInputStateChanged(client);
}
- virtual void OnShowImeIfNeeded() override {
- }
- virtual void OnInputMethodDestroyed(const InputMethod* client) override {
- }
+ void OnShowImeIfNeeded() override {}
+ void OnInputMethodDestroyed(const InputMethod* client) override {}
ClientChangeVerifier* verifier_;
DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver);
@@ -227,18 +208,11 @@
MockTextInputClient()
: shown_event_count_(0), updated_event_count_(0), hidden_event_count_(0) {
}
- virtual ~MockTextInputClient() {
- }
+ ~MockTextInputClient() override {}
- virtual void OnCandidateWindowShown() override {
- ++shown_event_count_;
- }
- virtual void OnCandidateWindowUpdated() override {
- ++updated_event_count_;
- }
- virtual void OnCandidateWindowHidden() override {
- ++hidden_event_count_;
- }
+ void OnCandidateWindowShown() override { ++shown_event_count_; }
+ void OnCandidateWindowUpdated() override { ++updated_event_count_; }
+ void OnCandidateWindowHidden() override { ++hidden_event_count_; }
int shown_event_count() const { return shown_event_count_; }
int updated_event_count() const { return updated_event_count_; }
diff --git a/ui/base/ime/input_method_mac.h b/ui/base/ime/input_method_mac.h
index 95d3cee..d910fa1 100644
--- a/ui/base/ime/input_method_mac.h
+++ b/ui/base/ime/input_method_mac.h
@@ -16,18 +16,18 @@
class UI_BASE_EXPORT InputMethodMac : public InputMethodBase {
public:
explicit InputMethodMac(internal::InputMethodDelegate* delegate);
- virtual ~InputMethodMac();
+ ~InputMethodMac() override;
// Overriden from InputMethod.
- virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) override;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
- virtual void CancelComposition(const TextInputClient* client) override;
- virtual void OnInputLocaleChanged() override;
- virtual std::string GetInputLocale() override;
- virtual bool IsActive() override;
- virtual bool IsCandidatePopupOpen() const override;
+ bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
+ NativeEventResult* result) override;
+ bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ void OnCaretBoundsChanged(const TextInputClient* client) override;
+ void CancelComposition(const TextInputClient* client) override;
+ void OnInputLocaleChanged() override;
+ std::string GetInputLocale() override;
+ bool IsActive() override;
+ bool IsCandidatePopupOpen() const override;
private:
DISALLOW_COPY_AND_ASSIGN(InputMethodMac);
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index 33e3ca6..f6bc4c0 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -569,8 +569,9 @@
bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) {
if (event.is_char()) {
if (GetTextInputClient()) {
- GetTextInputClient()->InsertChar(event.key_code(),
- ui::GetModifiersFromKeyState());
+ GetTextInputClient()->InsertChar(
+ static_cast<base::char16>(event.key_code()),
+ ui::GetModifiersFromKeyState());
return true;
}
}
diff --git a/ui/base/ime/mock_input_method.h b/ui/base/ime/mock_input_method.h
index e61c6fb..67a2029 100644
--- a/ui/base/ime/mock_input_method.h
+++ b/ui/base/ime/mock_input_method.h
@@ -26,32 +26,32 @@
class UI_BASE_EXPORT MockInputMethod : NON_EXPORTED_BASE(public InputMethod) {
public:
explicit MockInputMethod(internal::InputMethodDelegate* delegate);
- virtual ~MockInputMethod();
+ ~MockInputMethod() override;
// Overriden from InputMethod.
- virtual void SetDelegate(internal::InputMethodDelegate* delegate) override;
- virtual void Init(bool focused) override;
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
- NativeEventResult* result) override;
- virtual void SetFocusedTextInputClient(TextInputClient* client) override;
- virtual void DetachTextInputClient(TextInputClient* client) override;
- virtual TextInputClient* GetTextInputClient() const override;
- virtual bool DispatchKeyEvent(const ui::KeyEvent& event) override;
- virtual void OnTextInputTypeChanged(const TextInputClient* client) override;
- virtual void OnCaretBoundsChanged(const TextInputClient* client) override;
- virtual void CancelComposition(const TextInputClient* client) override;
- virtual void OnInputLocaleChanged() override;
- virtual std::string GetInputLocale() override;
- virtual bool IsActive() override;
- virtual TextInputType GetTextInputType() const override;
- virtual TextInputMode GetTextInputMode() const override;
- virtual bool CanComposeInline() const override;
- virtual bool IsCandidatePopupOpen() const override;
- virtual void ShowImeIfNeeded() override;
- virtual void AddObserver(InputMethodObserver* observer) override;
- virtual void RemoveObserver(InputMethodObserver* observer) override;
+ void SetDelegate(internal::InputMethodDelegate* delegate) override;
+ void Init(bool focused) override;
+ void OnFocus() override;
+ void OnBlur() override;
+ bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
+ NativeEventResult* result) override;
+ void SetFocusedTextInputClient(TextInputClient* client) override;
+ void DetachTextInputClient(TextInputClient* client) override;
+ TextInputClient* GetTextInputClient() const override;
+ bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+ void OnTextInputTypeChanged(const TextInputClient* client) override;
+ void OnCaretBoundsChanged(const TextInputClient* client) override;
+ void CancelComposition(const TextInputClient* client) override;
+ void OnInputLocaleChanged() override;
+ std::string GetInputLocale() override;
+ bool IsActive() override;
+ TextInputType GetTextInputType() const override;
+ TextInputMode GetTextInputMode() const override;
+ bool CanComposeInline() const override;
+ bool IsCandidatePopupOpen() const override;
+ void ShowImeIfNeeded() override;
+ void AddObserver(InputMethodObserver* observer) override;
+ void RemoveObserver(InputMethodObserver* observer) override;
private:
TextInputClient* text_input_client_;
diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc
index 0b75c07..f74dcde 100644
--- a/ui/base/ime/remote_input_method_win.cc
+++ b/ui/base/ime/remote_input_method_win.cc
@@ -199,8 +199,9 @@
if (event.is_char()) {
if (text_input_client_) {
- text_input_client_->InsertChar(event.key_code(),
- ui::GetModifiersFromKeyState());
+ text_input_client_->InsertChar(
+ static_cast<base::char16>(event.key_code()),
+ ui::GetModifiersFromKeyState());
}
return true;
}
diff --git a/ui/base/l10n/l10n_util_win.cc b/ui/base/l10n/l10n_util_win.cc
index c86b14a..4e2f7f4 100644
--- a/ui/base/l10n/l10n_util_win.cc
+++ b/ui/base/l10n/l10n_util_win.cc
@@ -54,14 +54,13 @@
HDC dc = GetDC(0);
HGDIOBJ oldFont = static_cast<HFONT>(SelectObject(dc, hfont));
WCHAR actual_font_name[LF_FACESIZE];
- DWORD size_ret = GetTextFace(dc, LF_FACESIZE, actual_font_name);
- actual_font_name[LF_FACESIZE - 1] = 0;
+ int size_ret = GetTextFace(dc, LF_FACESIZE, actual_font_name);
SelectObject(dc, oldFont);
DeleteObject(hfont);
ReleaseDC(0, dc);
// We don't have to worry about East Asian fonts with locale-dependent
// names here.
- return wcscmp(font_name, actual_font_name) == 0;
+ return (size_ret != 0) && wcscmp(font_name, actual_font_name) == 0;
}
class OverrideLocaleHolder {
@@ -154,10 +153,10 @@
}
void AdjustUIFont(LOGFONT* logfont) {
- double dpi_scale = gfx::GetDPIScale();
+ float dpi_scale = gfx::GetDPIScale();
if (gfx::Display::HasForceDeviceScaleFactor()) {
// If the scale is forced, we don't need to adjust it here.
- dpi_scale = 1.0;
+ dpi_scale = 1.0f;
}
AdjustUIFontForDIP(dpi_scale, logfont);
}
diff --git a/ui/base/models/list_model_unittest.cc b/ui/base/models/list_model_unittest.cc
index 8422a12..8075a4a 100644
--- a/ui/base/models/list_model_unittest.cc
+++ b/ui/base/models/list_model_unittest.cc
@@ -47,16 +47,16 @@
}
// ListModelObserver implementation:
- virtual void ListItemsAdded(size_t start, size_t count) override {
+ void ListItemsAdded(size_t start, size_t count) override {
added_count_ += count;
}
- virtual void ListItemsRemoved(size_t start, size_t count) override {
+ void ListItemsRemoved(size_t start, size_t count) override {
removed_count_ += count;
}
- virtual void ListItemMoved(size_t index, size_t target_index) override {
+ void ListItemMoved(size_t index, size_t target_index) override {
++moved_count_;
}
- virtual void ListItemsChanged(size_t start, size_t count) override {
+ void ListItemsChanged(size_t start, size_t count) override {
changed_count_ += count;
}
diff --git a/ui/base/models/simple_combobox_model.h b/ui/base/models/simple_combobox_model.h
index 4aa28c3..beaa04a 100644
--- a/ui/base/models/simple_combobox_model.h
+++ b/ui/base/models/simple_combobox_model.h
@@ -16,13 +16,13 @@
class UI_BASE_EXPORT SimpleComboboxModel : public ComboboxModel {
public:
explicit SimpleComboboxModel(const std::vector<base::string16>& items);
- virtual ~SimpleComboboxModel();
+ ~SimpleComboboxModel() override;
// ui::ComboboxModel:
- virtual int GetItemCount() const override;
- virtual base::string16 GetItemAt(int index) override;
- virtual bool IsItemSeparatorAt(int index) override;
- virtual int GetDefaultIndex() const override;
+ int GetItemCount() const override;
+ base::string16 GetItemAt(int index) override;
+ bool IsItemSeparatorAt(int index) override;
+ int GetDefaultIndex() const override;
private:
const std::vector<base::string16> items_;
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index f1238dd..49403aa 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -70,7 +70,7 @@
// The Delegate can be NULL, though if it is items can't be checked or
// disabled.
explicit SimpleMenuModel(Delegate* delegate);
- virtual ~SimpleMenuModel();
+ ~SimpleMenuModel() override;
// Methods for adding items to the model.
void AddItem(int command_id, const base::string16& label);
@@ -140,33 +140,31 @@
int GetIndexOfCommandId(int command_id);
// Overridden from MenuModel:
- virtual bool HasIcons() const override;
- virtual int GetItemCount() const override;
- virtual ItemType GetTypeAt(int index) const override;
- virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
- virtual int GetCommandIdAt(int index) const override;
- virtual base::string16 GetLabelAt(int index) const override;
- virtual base::string16 GetSublabelAt(int index) const override;
- virtual base::string16 GetMinorTextAt(int index) const override;
- virtual bool IsItemDynamicAt(int index) const override;
- virtual bool GetAcceleratorAt(int index,
- ui::Accelerator* accelerator) const override;
- virtual bool IsItemCheckedAt(int index) const override;
- virtual int GetGroupIdAt(int index) const override;
- virtual bool GetIconAt(int index, gfx::Image* icon) override;
- virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(
- int index) const override;
- virtual bool IsEnabledAt(int index) const override;
- virtual bool IsVisibleAt(int index) const override;
- virtual void HighlightChangedTo(int index) override;
- virtual void ActivatedAt(int index) override;
- virtual void ActivatedAt(int index, int event_flags) override;
- virtual MenuModel* GetSubmenuModelAt(int index) const override;
- virtual void MenuWillShow() override;
- virtual void MenuClosed() override;
- virtual void SetMenuModelDelegate(
+ bool HasIcons() const override;
+ int GetItemCount() const override;
+ ItemType GetTypeAt(int index) const override;
+ ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
+ int GetCommandIdAt(int index) const override;
+ base::string16 GetLabelAt(int index) const override;
+ base::string16 GetSublabelAt(int index) const override;
+ base::string16 GetMinorTextAt(int index) const override;
+ bool IsItemDynamicAt(int index) const override;
+ bool GetAcceleratorAt(int index, ui::Accelerator* accelerator) const override;
+ bool IsItemCheckedAt(int index) const override;
+ int GetGroupIdAt(int index) const override;
+ bool GetIconAt(int index, gfx::Image* icon) override;
+ ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const override;
+ bool IsEnabledAt(int index) const override;
+ bool IsVisibleAt(int index) const override;
+ void HighlightChangedTo(int index) override;
+ void ActivatedAt(int index) override;
+ void ActivatedAt(int index, int event_flags) override;
+ MenuModel* GetSubmenuModelAt(int index) const override;
+ void MenuWillShow() override;
+ void MenuClosed() override;
+ void SetMenuModelDelegate(
ui::MenuModelDelegate* menu_model_delegate) override;
- virtual MenuModelDelegate* GetMenuModelDelegate() const override;
+ MenuModelDelegate* GetMenuModelDelegate() const override;
protected:
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
diff --git a/ui/base/models/tree_node_model_unittest.cc b/ui/base/models/tree_node_model_unittest.cc
index d1a5c88..ba923aa 100644
--- a/ui/base/models/tree_node_model_unittest.cc
+++ b/ui/base/models/tree_node_model_unittest.cc
@@ -34,19 +34,19 @@
private:
// Overridden from TreeModelObserver:
- virtual void TreeNodesAdded(TreeModel* model,
- TreeModelNode* parent,
- int start,
- int count) override {
+ void TreeNodesAdded(TreeModel* model,
+ TreeModelNode* parent,
+ int start,
+ int count) override {
added_count_++;
}
- virtual void TreeNodesRemoved(TreeModel* model,
- TreeModelNode* parent,
- int start,
- int count) override {
+ void TreeNodesRemoved(TreeModel* model,
+ TreeModelNode* parent,
+ int start,
+ int count) override {
removed_count_++;
}
- virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) override {
+ void TreeNodeChanged(TreeModel* model, TreeModelNode* node) override {
changed_count_++;
}
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc
index f4a9e47..70841b6 100644
--- a/ui/base/resource/data_pack.cc
+++ b/ui/base/resource/data_pack.cc
@@ -262,7 +262,7 @@
return false;
}
- uint8 write_buffer = textEncodingType;
+ uint8 write_buffer = static_cast<uint8>(textEncodingType);
if (fwrite(&write_buffer, sizeof(uint8), 1, file) != 1) {
LOG(ERROR) << "Failed to write file text resources encoding";
base::CloseFile(file);
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 70cf242..928c855 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -30,7 +30,7 @@
class UI_BASE_EXPORT DataPack : public ResourceHandle {
public:
DataPack(ui::ScaleFactor scale_factor);
- virtual ~DataPack();
+ ~DataPack() override;
// Load a pack file from |path|, returning false on error.
bool LoadFromPath(const base::FilePath& path);
@@ -51,13 +51,13 @@
TextEncodingType textEncodingType);
// ResourceHandle implementation:
- virtual bool HasResource(uint16 resource_id) const override;
- virtual bool GetStringPiece(uint16 resource_id,
- base::StringPiece* data) const override;
- virtual base::RefCountedStaticMemory* GetStaticMemory(
+ bool HasResource(uint16 resource_id) const override;
+ bool GetStringPiece(uint16 resource_id,
+ base::StringPiece* data) const override;
+ base::RefCountedStaticMemory* GetStaticMemory(
uint16 resource_id) const override;
- virtual TextEncodingType GetTextEncodingType() const override;
- virtual ui::ScaleFactor GetScaleFactor() const override;
+ TextEncodingType GetTextEncodingType() const override;
+ ui::ScaleFactor GetScaleFactor() const override;
private:
// Does the actual loading of a pack file. Called by Load and LoadFromFile.
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 37f6c77..c4d70b2 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -124,10 +124,10 @@
public:
ResourceBundleImageSource(ResourceBundle* rb, int resource_id)
: rb_(rb), resource_id_(resource_id) {}
- virtual ~ResourceBundleImageSource() {}
+ ~ResourceBundleImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) override {
+ gfx::ImageSkiaRep GetImageForScale(float scale) override {
SkBitmap image;
bool fell_back_to_1x = false;
ScaleFactor scale_factor = GetSupportedScaleFactor(scale);
@@ -462,7 +462,8 @@
if (scale_factor != ui::SCALE_FACTOR_100P) {
for (size_t i = 0; i < data_packs_.size(); i++) {
if (data_packs_[i]->GetScaleFactor() == scale_factor &&
- data_packs_[i]->GetStringPiece(resource_id, &data))
+ data_packs_[i]->GetStringPiece(static_cast<uint16>(resource_id),
+ &data))
return data;
}
}
@@ -470,7 +471,8 @@
if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) &&
- data_packs_[i]->GetStringPiece(resource_id, &data))
+ data_packs_[i]->GetStringPiece(static_cast<uint16>(resource_id),
+ &data))
return data;
}
@@ -499,7 +501,8 @@
}
base::StringPiece data;
- if (!locale_resources_data_->GetStringPiece(message_id, &data)) {
+ if (!locale_resources_data_->GetStringPiece(static_cast<uint16>(message_id),
+ &data)) {
// Fall back on the main data pack (shouldn't be any strings here except in
// unittests).
data = GetRawDataResource(message_id);
@@ -763,7 +766,7 @@
bool* fell_back_to_1x) const {
DCHECK(fell_back_to_1x);
scoped_refptr<base::RefCountedMemory> memory(
- data_handle.GetStaticMemory(resource_id));
+ data_handle.GetStaticMemory(static_cast<uint16>(resource_id)));
if (!memory.get())
return false;
diff --git a/ui/base/test/run_all_unittests.cc b/ui/base/test/run_all_unittests.cc
index 7e14b52..cb2067a 100644
--- a/ui/base/test/run_all_unittests.cc
+++ b/ui/base/test/run_all_unittests.cc
@@ -34,8 +34,8 @@
protected:
// base::TestSuite:
- virtual void Initialize() override;
- virtual void Shutdown() override;
+ void Initialize() override;
+ void Shutdown() override;
private:
DISALLOW_COPY_AND_ASSIGN(UIBaseTestSuite);
diff --git a/ui/base/touch/touch_editing_controller.h b/ui/base/touch/touch_editing_controller.h
index 9c0298e..00d8d49 100644
--- a/ui/base/touch/touch_editing_controller.h
+++ b/ui/base/touch/touch_editing_controller.h
@@ -60,7 +60,7 @@
virtual void DestroyTouchSelection() = 0;
protected:
- virtual ~TouchEditable() {}
+ ~TouchEditable() override {}
};
// This defines the callback interface for other code to be notified of changes
diff --git a/ui/base/webui/web_ui_util.cc b/ui/base/webui/web_ui_util.cc
index 1785d6f..c67e23e 100644
--- a/ui/base/webui/web_ui_util.cc
+++ b/ui/base/webui/web_ui_util.cc
@@ -95,7 +95,7 @@
LOG(WARNING) << "Invalid scale factor format: " << identifier;
return false;
}
- *scale_factor = scale;
+ *scale_factor = static_cast<float>(scale);
return true;
}
diff --git a/ui/compositor/closure_animation_observer.h b/ui/compositor/closure_animation_observer.h
index 638960a..1fd1cdf 100644
--- a/ui/compositor/closure_animation_observer.h
+++ b/ui/compositor/closure_animation_observer.h
@@ -20,10 +20,10 @@
explicit ClosureAnimationObserver(const base::Closure& closure);
private:
- virtual ~ClosureAnimationObserver();
+ ~ClosureAnimationObserver() override;
// ImplicitAnimationObserver:
- virtual void OnImplicitAnimationsCompleted() override;
+ void OnImplicitAnimationsCompleted() override;
const base::Closure closure_;
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 04763a6..c9ad475 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -74,15 +74,15 @@
explicit SatisfySwapPromise(uint32_t id) : id_(id) {}
private:
- virtual void DidSwap(cc::CompositorFrameMetadata* metadata) override {
+ void DidSwap(cc::CompositorFrameMetadata* metadata) override {
metadata->satisfies_sequences.push_back(id_);
}
- virtual void DidNotSwap(DidNotSwapReason reason) override {
+ void DidNotSwap(DidNotSwapReason reason) override {
// TODO(jbauman): Send to the SurfaceManager immediately.
DCHECK(false);
}
- virtual int64 TraceId() const override { return 0; }
+ int64 TraceId() const override { return 0; }
uint32_t id_;
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 471cfa7..d666303 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -143,7 +143,7 @@
Compositor(gfx::AcceleratedWidget widget,
ui::ContextFactory* context_factory,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
- virtual ~Compositor();
+ ~Compositor() override;
ui::ContextFactory* context_factory() { return context_factory_; }
@@ -237,31 +237,29 @@
void OnSwapBuffersAborted();
// LayerTreeHostClient implementation.
- virtual void WillBeginMainFrame(int frame_id) override {}
- virtual void DidBeginMainFrame() override {}
- virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override;
- virtual void Layout() override;
- virtual void ApplyViewportDeltas(
- const gfx::Vector2d& inner_delta,
- const gfx::Vector2d& outer_delta,
- float page_scale,
- float top_controls_delta) override {}
- virtual void ApplyViewportDeltas(
- const gfx::Vector2d& scroll_delta,
- float page_scale,
- float top_controls_delta) override {}
- virtual void RequestNewOutputSurface(bool fallback) override;
- virtual void DidInitializeOutputSurface() override {}
- virtual void WillCommit() override {}
- virtual void DidCommit() override;
- virtual void DidCommitAndDrawFrame() override;
- virtual void DidCompleteSwapBuffers() override;
+ void WillBeginMainFrame(int frame_id) override {}
+ void DidBeginMainFrame() override {}
+ void BeginMainFrame(const cc::BeginFrameArgs& args) override;
+ void Layout() override;
+ void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
+ const gfx::Vector2d& outer_delta,
+ float page_scale,
+ float top_controls_delta) override {}
+ void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
+ float page_scale,
+ float top_controls_delta) override {}
+ void RequestNewOutputSurface(bool fallback) override;
+ void DidInitializeOutputSurface() override {}
+ void WillCommit() override {}
+ void DidCommit() override;
+ void DidCommitAndDrawFrame() override;
+ void DidCompleteSwapBuffers() override;
// cc::LayerTreeHostSingleThreadClient implementation.
- virtual void ScheduleComposite() override;
- virtual void ScheduleAnimation() override;
- virtual void DidPostSwapBuffers() override;
- virtual void DidAbortSwapBuffers() override;
+ void ScheduleComposite() override;
+ void ScheduleAnimation() override;
+ void DidPostSwapBuffers() override;
+ void DidAbortSwapBuffers() override;
int last_started_frame() { return last_started_frame_; }
int last_ended_frame() { return last_ended_frame_; }
diff --git a/ui/compositor/float_animation_curve_adapter.h b/ui/compositor/float_animation_curve_adapter.h
index 84a9992..1c7b8b3 100644
--- a/ui/compositor/float_animation_curve_adapter.h
+++ b/ui/compositor/float_animation_curve_adapter.h
@@ -18,12 +18,12 @@
float target_value,
base::TimeDelta duration);
- virtual ~FloatAnimationCurveAdapter() { }
+ ~FloatAnimationCurveAdapter() override {}
// FloatAnimationCurve implementation.
- virtual double Duration() const override;
- virtual scoped_ptr<cc::AnimationCurve> Clone() const override;
- virtual float GetValue(double t) const override;
+ double Duration() const override;
+ scoped_ptr<cc::AnimationCurve> Clone() const override;
+ float GetValue(double t) const override;
private:
gfx::Tween::Type tween_type_;
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index dd0de44..7a2caf4 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -742,14 +742,14 @@
class LayerDebugInfo : public base::debug::ConvertableToTraceFormat {
public:
explicit LayerDebugInfo(std::string name) : name_(name) { }
- virtual void AppendAsTraceFormat(std::string* out) const override {
+ void AppendAsTraceFormat(std::string* out) const override {
base::DictionaryValue dictionary;
dictionary.SetString("layer_name", name_);
base::JSONWriter::Write(&dictionary, out);
}
private:
- virtual ~LayerDebugInfo() { }
+ ~LayerDebugInfo() override {}
std::string name_;
};
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index ed75ff5..16a2578 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -71,7 +71,7 @@
public:
Layer();
explicit Layer(LayerType type);
- virtual ~Layer();
+ ~Layer() override;
static bool UsingPictureLayer();
@@ -325,17 +325,17 @@
void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request);
// ContentLayerClient
- virtual void PaintContents(
+ void PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
ContentLayerClient::GraphicsContextStatus gc_status) override;
- virtual void DidChangeLayerCanUseLCDText() override {}
- virtual bool FillsBoundsCompletely() const override;
+ void DidChangeLayerCanUseLCDText() override {}
+ bool FillsBoundsCompletely() const override;
cc::Layer* cc_layer() { return cc_layer_; }
// TextureLayerClient
- virtual bool PrepareTextureMailbox(
+ bool PrepareTextureMailbox(
cc::TextureMailbox* mailbox,
scoped_ptr<cc::SingleReleaseCallback>* release_callback,
bool use_shared_memory) override;
@@ -348,11 +348,10 @@
bool force_render_surface() const { return force_render_surface_; }
// LayerClient
- virtual scoped_refptr<base::debug::ConvertableToTraceFormat>
- TakeDebugInfo() override;
+ scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() override;
// LayerAnimationEventObserver
- virtual void OnAnimationStarted(const cc::AnimationEvent& event) override;
+ void OnAnimationStarted(const cc::AnimationEvent& event) override;
// Whether this layer has animations waiting to get sent to its cc::Layer.
bool HasPendingThreadedAnimations() {
@@ -375,27 +374,25 @@
bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
// Implementation of LayerAnimatorDelegate
- virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
- virtual void SetTransformFromAnimation(
- const gfx::Transform& transform) override;
- virtual void SetOpacityFromAnimation(float opacity) override;
- virtual void SetVisibilityFromAnimation(bool visibility) override;
- virtual void SetBrightnessFromAnimation(float brightness) override;
- virtual void SetGrayscaleFromAnimation(float grayscale) override;
- virtual void SetColorFromAnimation(SkColor color) override;
- virtual void ScheduleDrawForAnimation() override;
- virtual const gfx::Rect& GetBoundsForAnimation() const override;
- virtual gfx::Transform GetTransformForAnimation() const override;
- virtual float GetOpacityForAnimation() const override;
- virtual bool GetVisibilityForAnimation() const override;
- virtual float GetBrightnessForAnimation() const override;
- virtual float GetGrayscaleForAnimation() const override;
- virtual SkColor GetColorForAnimation() const override;
- virtual float GetDeviceScaleFactor() const override;
- virtual void AddThreadedAnimation(
- scoped_ptr<cc::Animation> animation) override;
- virtual void RemoveThreadedAnimation(int animation_id) override;
- virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override;
+ void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
+ void SetTransformFromAnimation(const gfx::Transform& transform) override;
+ void SetOpacityFromAnimation(float opacity) override;
+ void SetVisibilityFromAnimation(bool visibility) override;
+ void SetBrightnessFromAnimation(float brightness) override;
+ void SetGrayscaleFromAnimation(float grayscale) override;
+ void SetColorFromAnimation(SkColor color) override;
+ void ScheduleDrawForAnimation() override;
+ const gfx::Rect& GetBoundsForAnimation() const override;
+ gfx::Transform GetTransformForAnimation() const override;
+ float GetOpacityForAnimation() const override;
+ bool GetVisibilityForAnimation() const override;
+ float GetBrightnessForAnimation() const override;
+ float GetGrayscaleForAnimation() const override;
+ SkColor GetColorForAnimation() const override;
+ float GetDeviceScaleFactor() const override;
+ void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override;
+ void RemoveThreadedAnimation(int animation_id) override;
+ LayerAnimatorCollection* GetLayerAnimatorCollection() override;
// Creates a corresponding composited layer for |type_|.
void CreateCcLayer();
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index b74aebc..3e667df 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -32,16 +32,15 @@
Pause(AnimatableProperties properties, base::TimeDelta duration)
: LayerAnimationElement(properties, duration) {
}
- virtual ~Pause() {}
+ ~Pause() override {}
private:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {}
- virtual bool OnProgress(double t,
- LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {}
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
return false;
}
- virtual void OnGetTarget(TargetValue* target) const override {}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnGetTarget(TargetValue* target) const override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
DISALLOW_COPY_AND_ASSIGN(Pause);
};
@@ -54,24 +53,24 @@
: LayerAnimationElement(TRANSFORM, duration),
target_(target) {
}
- virtual ~TransformTransition() {}
+ ~TransformTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetTransformForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(
gfx::Tween::TransformValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->transform = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
gfx::Transform start_;
@@ -89,23 +88,22 @@
: LayerAnimationElement(TRANSFORM, duration),
interpolated_transform_(interpolated_transform) {
}
- virtual ~InterpolatedTransformTransition() {}
+ ~InterpolatedTransformTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
- }
+ void OnStart(LayerAnimationDelegate* delegate) override {}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(
interpolated_transform_->Interpolate(static_cast<float>(t)));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->transform = interpolated_transform_->Interpolate(1.0f);
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
scoped_ptr<InterpolatedTransform> interpolated_transform_;
@@ -121,24 +119,24 @@
: LayerAnimationElement(BOUNDS, duration),
target_(target) {
}
- virtual ~BoundsTransition() {}
+ ~BoundsTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetBoundsForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetBoundsFromAnimation(
gfx::Tween::RectValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->bounds = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
gfx::Rect start_;
@@ -156,24 +154,24 @@
start_(0.0f),
target_(target) {
}
- virtual ~OpacityTransition() {}
+ ~OpacityTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetOpacityForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetOpacityFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->opacity = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -191,23 +189,23 @@
start_(false),
target_(target) {
}
- virtual ~VisibilityTransition() {}
+ ~VisibilityTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetVisibilityForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetVisibilityFromAnimation(t == 1.0 ? target_ : start_);
return t == 1.0;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->visibility = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
bool start_;
@@ -225,24 +223,24 @@
start_(0.0f),
target_(target) {
}
- virtual ~BrightnessTransition() {}
+ ~BrightnessTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetBrightnessForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetBrightnessFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->brightness = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -260,24 +258,24 @@
start_(0.0f),
target_(target) {
}
- virtual ~GrayscaleTransition() {}
+ ~GrayscaleTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetGrayscaleForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetGrayscaleFromAnimation(
gfx::Tween::FloatValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->grayscale = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
float start_;
@@ -295,24 +293,24 @@
start_(SK_ColorBLACK),
target_(target) {
}
- virtual ~ColorTransition() {}
+ ~ColorTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetColorForAnimation();
}
- virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
delegate->SetColorFromAnimation(
gfx::Tween::ColorValueBetween(t, start_, target_));
return true;
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->color = target_;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {}
+ void OnAbort(LayerAnimationDelegate* delegate) override {}
private:
SkColor start_;
@@ -329,19 +327,16 @@
base::TimeDelta duration)
: LayerAnimationElement(properties, duration) {
}
- virtual ~ThreadedLayerAnimationElement() {}
+ ~ThreadedLayerAnimationElement() override {}
- virtual bool IsThreaded() const override {
- return (duration() != base::TimeDelta());
- }
+ bool IsThreaded() const override { return (duration() != base::TimeDelta()); }
protected:
explicit ThreadedLayerAnimationElement(const LayerAnimationElement& element)
: LayerAnimationElement(element) {
}
- virtual bool OnProgress(double t,
- LayerAnimationDelegate* delegate) override {
+ bool OnProgress(double t, LayerAnimationDelegate* delegate) override {
if (t < 1.0)
return false;
@@ -353,14 +348,13 @@
return true;
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {
+ void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
delegate->RemoveThreadedAnimation(animation_id());
}
}
- virtual void RequestEffectiveStart(
- LayerAnimationDelegate* delegate) override {
+ void RequestEffectiveStart(LayerAnimationDelegate* delegate) override {
DCHECK(animation_group_id());
if (duration() == base::TimeDelta()) {
set_effective_start_time(requested_start_time());
@@ -389,14 +383,14 @@
start_(0.0f),
target_(target) {
}
- virtual ~ThreadedOpacityTransition() {}
+ ~ThreadedOpacityTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetOpacityForAnimation();
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {
+ void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetOpacityFromAnimation(gfx::Tween::FloatValueBetween(
@@ -406,11 +400,11 @@
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) override {
+ void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetOpacityFromAnimation(target_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
+ scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::AnimationCurve> animation_curve(
new FloatAnimationCurveAdapter(tween_type(),
start_,
@@ -424,7 +418,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->opacity = target_;
}
@@ -444,14 +438,14 @@
: ThreadedLayerAnimationElement(TRANSFORM, duration),
target_(target) {
}
- virtual ~ThreadedTransformTransition() {}
+ ~ThreadedTransformTransition() override {}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
start_ = delegate->GetTransformForAnimation();
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {
+ void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetTransformFromAnimation(gfx::Tween::TransformValueBetween(
@@ -461,11 +455,11 @@
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) override {
+ void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(target_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
+ scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::AnimationCurve> animation_curve(
new TransformAnimationCurveAdapter(tween_type(),
start_,
@@ -479,7 +473,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->transform = target_;
}
@@ -502,7 +496,7 @@
CheckAndCast<const ThreadedTransformTransition*>(
uninverted_transition)) {
}
- virtual ~InverseTransformTransition() {}
+ ~InverseTransformTransition() override {}
static InverseTransformTransition* Clone(const LayerAnimationElement* other) {
const InverseTransformTransition* other_inverse =
@@ -512,7 +506,7 @@
}
protected:
- virtual void OnStart(LayerAnimationDelegate* delegate) override {
+ void OnStart(LayerAnimationDelegate* delegate) override {
gfx::Transform start(delegate->GetTransformForAnimation());
effective_start_ = base_transform_ * start;
@@ -533,18 +527,18 @@
base_target_);
}
- virtual void OnAbort(LayerAnimationDelegate* delegate) override {
+ void OnAbort(LayerAnimationDelegate* delegate) override {
if (delegate && Started()) {
ThreadedLayerAnimationElement::OnAbort(delegate);
delegate->SetTransformFromAnimation(ComputeCurrentTransform());
}
}
- virtual void OnEnd(LayerAnimationDelegate* delegate) override {
+ void OnEnd(LayerAnimationDelegate* delegate) override {
delegate->SetTransformFromAnimation(computed_target_transform_);
}
- virtual scoped_ptr<cc::Animation> CreateCCAnimation() override {
+ scoped_ptr<cc::Animation> CreateCCAnimation() override {
scoped_ptr<cc::Animation> animation(
cc::Animation::Create(animation_curve_->Clone(),
animation_id(),
@@ -553,7 +547,7 @@
return animation.Pass();
}
- virtual void OnGetTarget(TargetValue* target) const override {
+ void OnGetTarget(TargetValue* target) const override {
target->transform = computed_target_transform_;
}
diff --git a/ui/compositor/layer_animation_observer.h b/ui/compositor/layer_animation_observer.h
index 8db5a4a..35253d3 100644
--- a/ui/compositor/layer_animation_observer.h
+++ b/ui/compositor/layer_animation_observer.h
@@ -82,7 +82,7 @@
: public LayerAnimationObserver {
public:
ImplicitAnimationObserver();
- virtual ~ImplicitAnimationObserver();
+ ~ImplicitAnimationObserver() override;
// Called when the first animation sequence has started.
virtual void OnImplicitAnimationsScheduled() {}
@@ -116,16 +116,11 @@
friend class ScopedLayerAnimationSettings;
// LayerAnimationObserver implementation
- virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) override;
- virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) override;
- virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) override;
- virtual void OnAttachedToSequence(
- LayerAnimationSequence* sequence) override;
- virtual void OnDetachedFromSequence(
- LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationEnded(LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationAborted(LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationScheduled(LayerAnimationSequence* sequence) override;
+ void OnAttachedToSequence(LayerAnimationSequence* sequence) override;
+ void OnDetachedFromSequence(LayerAnimationSequence* sequence) override;
// OnImplicitAnimationsCompleted is not fired unless the observer is active.
bool active() const { return active_; }
diff --git a/ui/compositor/layer_animator_collection.h b/ui/compositor/layer_animator_collection.h
index b7bfe2e..1e6ebeb 100644
--- a/ui/compositor/layer_animator_collection.h
+++ b/ui/compositor/layer_animator_collection.h
@@ -24,7 +24,7 @@
: public CompositorAnimationObserver {
public:
explicit LayerAnimatorCollection(Compositor* compositor);
- virtual ~LayerAnimatorCollection();
+ ~LayerAnimatorCollection() override;
void StartAnimator(scoped_refptr<LayerAnimator> animator);
void StopAnimator(scoped_refptr<LayerAnimator> animator);
@@ -34,7 +34,7 @@
base::TimeTicks last_tick_time() const { return last_tick_time_; }
// CompositorAnimationObserver:
- virtual void OnAnimationStep(base::TimeTicks timestamp) override;
+ void OnAnimationStep(base::TimeTicks timestamp) override;
private:
Compositor* compositor_;
diff --git a/ui/compositor/scoped_layer_animation_settings.cc b/ui/compositor/scoped_layer_animation_settings.cc
index 462f537..7a593ca 100644
--- a/ui/compositor/scoped_layer_animation_settings.cc
+++ b/ui/compositor/scoped_layer_animation_settings.cc
@@ -24,7 +24,7 @@
: base_layer_(NULL) {
}
- virtual ~InvertingObserver() {}
+ ~InvertingObserver() override {}
void SetLayer(Layer* base_layer) { base_layer_ = base_layer; }
@@ -34,10 +34,9 @@
inverse_layers_.push_back(inverse_layer);
}
- virtual void OnImplicitAnimationsCompleted() override {}
+ void OnImplicitAnimationsCompleted() override {}
- virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) override {
+ void OnLayerAnimationScheduled(LayerAnimationSequence* sequence) override {
DCHECK(base_layer_ != NULL)
<< "Must set base layer with ScopedLayerAnimationSettings::"
<< "SetInverslyAnimatedBaseLayer";
diff --git a/ui/compositor/test/draw_waiter_for_test.h b/ui/compositor/test/draw_waiter_for_test.h
index 9d8c169..55ca2ff 100644
--- a/ui/compositor/test/draw_waiter_for_test.h
+++ b/ui/compositor/test/draw_waiter_for_test.h
@@ -27,17 +27,17 @@
private:
DrawWaiterForTest();
- virtual ~DrawWaiterForTest();
+ ~DrawWaiterForTest() override;
void WaitImpl(Compositor* compositor);
// CompositorObserver implementation.
- virtual void OnCompositingDidCommit(Compositor* compositor) override;
- virtual void OnCompositingStarted(Compositor* compositor,
- base::TimeTicks start_time) override;
- virtual void OnCompositingEnded(Compositor* compositor) override;
- virtual void OnCompositingAborted(Compositor* compositor) override;
- virtual void OnCompositingLockStateChanged(Compositor* compositor) override;
+ void OnCompositingDidCommit(Compositor* compositor) override;
+ void OnCompositingStarted(Compositor* compositor,
+ base::TimeTicks start_time) override;
+ void OnCompositingEnded(Compositor* compositor) override;
+ void OnCompositingAborted(Compositor* compositor) override;
+ void OnCompositingLockStateChanged(Compositor* compositor) override;
scoped_ptr<base::RunLoop> wait_run_loop_;
diff --git a/ui/compositor/test/in_process_context_factory.h b/ui/compositor/test/in_process_context_factory.h
index 70d7214..4e5b3e8 100644
--- a/ui/compositor/test/in_process_context_factory.h
+++ b/ui/compositor/test/in_process_context_factory.h
@@ -24,27 +24,24 @@
class InProcessContextFactory : public ContextFactory {
public:
InProcessContextFactory();
- virtual ~InProcessContextFactory();
+ ~InProcessContextFactory() override;
// ContextFactory implementation
- virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
+ scoped_ptr<cc::OutputSurface> CreateOutputSurface(
Compositor* compositor,
bool software_fallback) override;
- virtual scoped_refptr<Reflector> CreateReflector(
- Compositor* mirrored_compositor,
- Layer* mirroring_layer) override;
- virtual void RemoveReflector(scoped_refptr<Reflector> reflector) override;
+ scoped_refptr<Reflector> CreateReflector(Compositor* mirrored_compositor,
+ Layer* mirroring_layer) override;
+ void RemoveReflector(scoped_refptr<Reflector> reflector) override;
- virtual scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider()
- override;
- virtual void RemoveCompositor(Compositor* compositor) override;
- virtual bool DoesCreateTestContexts() override;
- virtual cc::SharedBitmapManager* GetSharedBitmapManager() override;
- virtual cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
- virtual base::MessageLoopProxy* GetCompositorMessageLoop() override;
- virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator()
- override;
+ scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
+ void RemoveCompositor(Compositor* compositor) override;
+ bool DoesCreateTestContexts() override;
+ cc::SharedBitmapManager* GetSharedBitmapManager() override;
+ cc::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
+ base::MessageLoopProxy* GetCompositorMessageLoop() override;
+ scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override;
private:
scoped_ptr<base::Thread> compositor_thread_;
diff --git a/ui/compositor/test/test_compositor_host_mac.mm b/ui/compositor/test/test_compositor_host_mac.mm
index da3a8c2..b262a21 100644
--- a/ui/compositor/test/test_compositor_host_mac.mm
+++ b/ui/compositor/test/test_compositor_host_mac.mm
@@ -71,8 +71,7 @@
AppKitHost() {
[NSApplication sharedApplication];
}
- virtual ~AppKitHost() {
- }
+ ~AppKitHost() override {}
private:
DISALLOW_COPY_AND_ASSIGN(AppKitHost);
};
@@ -84,12 +83,12 @@
public:
TestCompositorHostMac(const gfx::Rect& bounds,
ui::ContextFactory* context_factory);
- virtual ~TestCompositorHostMac();
+ ~TestCompositorHostMac() override;
private:
// TestCompositorHost:
- virtual void Show() override;
- virtual ui::Compositor* GetCompositor() override;
+ void Show() override;
+ ui::Compositor* GetCompositor() override;
gfx::Rect bounds_;
diff --git a/ui/compositor/test/test_layer_animation_delegate.h b/ui/compositor/test/test_layer_animation_delegate.h
index 3ccb108..4b1f817 100644
--- a/ui/compositor/test/test_layer_animation_delegate.h
+++ b/ui/compositor/test/test_layer_animation_delegate.h
@@ -16,30 +16,28 @@
public:
TestLayerAnimationDelegate();
explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other);
- virtual ~TestLayerAnimationDelegate();
+ ~TestLayerAnimationDelegate() override;
// Implementation of LayerAnimationDelegate
- virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
- virtual void SetTransformFromAnimation(
- const gfx::Transform& transform) override;
- virtual void SetOpacityFromAnimation(float opacity) override;
- virtual void SetVisibilityFromAnimation(bool visibility) override;
- virtual void SetBrightnessFromAnimation(float brightness) override;
- virtual void SetGrayscaleFromAnimation(float grayscale) override;
- virtual void SetColorFromAnimation(SkColor color) override;
- virtual void ScheduleDrawForAnimation() override;
- virtual const gfx::Rect& GetBoundsForAnimation() const override;
- virtual gfx::Transform GetTransformForAnimation() const override;
- virtual float GetOpacityForAnimation() const override;
- virtual bool GetVisibilityForAnimation() const override;
- virtual float GetBrightnessForAnimation() const override;
- virtual float GetGrayscaleForAnimation() const override;
- virtual SkColor GetColorForAnimation() const override;
- virtual float GetDeviceScaleFactor() const override;
- virtual void AddThreadedAnimation(
- scoped_ptr<cc::Animation> animation) override;
- virtual void RemoveThreadedAnimation(int animation_id) override;
- virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override;
+ void SetBoundsFromAnimation(const gfx::Rect& bounds) override;
+ void SetTransformFromAnimation(const gfx::Transform& transform) override;
+ void SetOpacityFromAnimation(float opacity) override;
+ void SetVisibilityFromAnimation(bool visibility) override;
+ void SetBrightnessFromAnimation(float brightness) override;
+ void SetGrayscaleFromAnimation(float grayscale) override;
+ void SetColorFromAnimation(SkColor color) override;
+ void ScheduleDrawForAnimation() override;
+ const gfx::Rect& GetBoundsForAnimation() const override;
+ gfx::Transform GetTransformForAnimation() const override;
+ float GetOpacityForAnimation() const override;
+ bool GetVisibilityForAnimation() const override;
+ float GetBrightnessForAnimation() const override;
+ float GetGrayscaleForAnimation() const override;
+ SkColor GetColorForAnimation() const override;
+ float GetDeviceScaleFactor() const override;
+ void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override;
+ void RemoveThreadedAnimation(int animation_id) override;
+ LayerAnimatorCollection* GetLayerAnimatorCollection() override;
private:
gfx::Rect bounds_;
diff --git a/ui/compositor/test/test_layer_animation_observer.h b/ui/compositor/test/test_layer_animation_observer.h
index bfdcd28..0f0a18e 100644
--- a/ui/compositor/test/test_layer_animation_observer.h
+++ b/ui/compositor/test/test_layer_animation_observer.h
@@ -17,18 +17,15 @@
class TestLayerAnimationObserver : public LayerAnimationObserver {
public:
TestLayerAnimationObserver();
- virtual ~TestLayerAnimationObserver();
+ ~TestLayerAnimationObserver() override;
- virtual void OnLayerAnimationEnded(
- LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationEnded(LayerAnimationSequence* sequence) override;
- virtual void OnLayerAnimationAborted(
- LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationAborted(LayerAnimationSequence* sequence) override;
- virtual void OnLayerAnimationScheduled(
- LayerAnimationSequence* sequence) override;
+ void OnLayerAnimationScheduled(LayerAnimationSequence* sequence) override;
- virtual bool RequiresNotificationWhenAnimatorDestroyed() const override;
+ bool RequiresNotificationWhenAnimatorDestroyed() const override;
const LayerAnimationSequence* last_ended_sequence() const {
return last_ended_sequence_;
diff --git a/ui/compositor/test/test_suite.h b/ui/compositor/test/test_suite.h
index 3daf439..5cbefe7 100644
--- a/ui/compositor/test/test_suite.h
+++ b/ui/compositor/test/test_suite.h
@@ -20,12 +20,12 @@
class CompositorTestSuite : public base::TestSuite {
public:
CompositorTestSuite(int argc, char** argv);
- virtual ~CompositorTestSuite();
+ ~CompositorTestSuite() override;
protected:
// Overridden from base::TestSuite:
- virtual void Initialize() override;
- virtual void Shutdown() override;
+ void Initialize() override;
+ void Shutdown() override;
private:
scoped_ptr<base::MessageLoop> message_loop_;
diff --git a/ui/compositor/transform_animation_curve_adapter.h b/ui/compositor/transform_animation_curve_adapter.h
index 6c63ba1..7aa318e 100644
--- a/ui/compositor/transform_animation_curve_adapter.h
+++ b/ui/compositor/transform_animation_curve_adapter.h
@@ -22,18 +22,18 @@
gfx::Transform target_value,
base::TimeDelta duration);
- virtual ~TransformAnimationCurveAdapter();
+ ~TransformAnimationCurveAdapter() override;
// TransformAnimationCurve implementation.
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
- virtual gfx::Transform GetValue(double t) const override;
- virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const override;
- virtual bool AffectsScale() const override;
- virtual bool IsTranslation() const override;
- virtual bool MaximumTargetScale(bool forward_direction,
- float* max_scale) const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
+ gfx::Transform GetValue(double t) const override;
+ bool AnimatedBoundsForBox(const gfx::BoxF& box,
+ gfx::BoxF* bounds) const override;
+ bool AffectsScale() const override;
+ bool IsTranslation() const override;
+ bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
private:
gfx::Tween::Type tween_type_;
@@ -53,17 +53,17 @@
gfx::Transform initial_value,
base::TimeDelta duration);
- virtual ~InverseTransformCurveAdapter();
+ ~InverseTransformCurveAdapter() override;
- virtual double Duration() const override;
- virtual scoped_ptr<AnimationCurve> Clone() const override;
- virtual gfx::Transform GetValue(double t) const override;
- virtual bool AnimatedBoundsForBox(const gfx::BoxF& box,
- gfx::BoxF* bounds) const override;
- virtual bool AffectsScale() const override;
- virtual bool IsTranslation() const override;
- virtual bool MaximumTargetScale(bool forward_direction,
- float* max_scale) const override;
+ double Duration() const override;
+ scoped_ptr<AnimationCurve> Clone() const override;
+ gfx::Transform GetValue(double t) const override;
+ bool AnimatedBoundsForBox(const gfx::BoxF& box,
+ gfx::BoxF* bounds) const override;
+ bool AffectsScale() const override;
+ bool IsTranslation() const override;
+ bool MaximumTargetScale(bool forward_direction,
+ float* max_scale) const override;
private:
TransformAnimationCurveAdapter base_curve_;
diff --git a/ui/display/util/display_util.cc b/ui/display/util/display_util.cc
index aa23ec6..5d7bbb7 100644
--- a/ui/display/util/display_util.cc
+++ b/ui/display/util/display_util.cc
@@ -60,8 +60,8 @@
if (IsDisplaySizeBlackListed(physical_size_in_mm))
return 1.0f;
- const unsigned int dpi = (kInchInMm * screen_size_in_pixels.width() /
- physical_size_in_mm.width());
+ const unsigned int dpi = static_cast<unsigned int>(
+ kInchInMm * screen_size_in_pixels.width() / physical_size_in_mm.width());
const unsigned int threshold =
(physical_size_in_mm.width() >= kLargeDisplayWidthThresholdMM) ?
kHighDensityDPIThresholdLarge : kHighDensityDPIThresholdSmall;
diff --git a/ui/events/device_data_manager.h b/ui/events/device_data_manager.h
index 54c139b..87e3bd4 100644
--- a/ui/events/device_data_manager.h
+++ b/ui/events/device_data_manager.h
@@ -24,7 +24,7 @@
// Keeps track of device mappings and event transformations.
class EVENTS_BASE_EXPORT DeviceDataManager : public DeviceHotplugEventObserver {
public:
- virtual ~DeviceDataManager();
+ ~DeviceDataManager() override;
static void CreateInstance();
static DeviceDataManager* GetInstance();
@@ -60,7 +60,7 @@
bool IsTouchDeviceIdValid(int touch_device_id) const;
// DeviceHotplugEventObserver:
- virtual void OnTouchscreenDevicesUpdated(
+ void OnTouchscreenDevicesUpdated(
const std::vector<TouchscreenDevice>& devices) override;
double touch_radius_scale_map_[kMaxDeviceNum];
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 72e3bd6..fa6dbac 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -17,6 +17,7 @@
#include "base/strings/stringprintf.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
+#include "ui/gfx/geometry/safe_integer_conversions.h"
#include "ui/gfx/point3_f.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/transform.h"
@@ -214,8 +215,10 @@
base::TimeDelta delta = EventTimeForNow() - time_stamp_;
if (type_ < ET_LAST)
name_ = EventTypeName(type_);
- UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.Browser",
- delta.InMicroseconds(), 1, 1000000, 100);
+ base::HistogramBase::Sample delta_sample =
+ static_cast<base::HistogramBase::Sample>(delta.InMicroseconds());
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.Browser", delta_sample, 1, 1000000,
+ 100);
std::string name_for_event =
base::StringPrintf("Event.Latency.Browser.%s", name_.c_str());
base::HistogramBase* counter_for_type =
@@ -225,7 +228,7 @@
1000000,
100,
base::HistogramBase::kUmaTargetedHistogramFlag);
- counter_for_type->Add(delta.InMicroseconds());
+ counter_for_type->Add(delta_sample);
#if defined(USE_X11)
if (native_event->type == GenericEvent) {
@@ -450,7 +453,8 @@
MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event)
: MouseEvent(scroll_event),
- offset_(scroll_event.x_offset(), scroll_event.y_offset()){
+ offset_(gfx::ToRoundedInt(scroll_event.x_offset()),
+ gfx::ToRoundedInt(scroll_event.y_offset())) {
SetType(ET_MOUSEWHEEL);
}
@@ -492,10 +496,14 @@
gfx::DecomposedTransform decomp;
bool success = gfx::DecomposeTransform(&decomp, inverted_root_transform);
DCHECK(success);
- if (decomp.scale[0])
- offset_.set_x(offset_.x() * decomp.scale[0]);
- if (decomp.scale[1])
- offset_.set_y(offset_.y() * decomp.scale[1]);
+ if (decomp.scale[0]) {
+ offset_.set_x(
+ gfx::ToRoundedInt(SkMScalarToFloat(offset_.x() * decomp.scale[0])));
+ }
+ if (decomp.scale[1]) {
+ offset_.set_y(
+ gfx::ToRoundedInt(SkMScalarToFloat(offset_.y() * decomp.scale[1])));
+ }
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/ui/events/event.h b/ui/events/event.h
index e970826..d774897 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -256,12 +256,12 @@
class EVENTS_EXPORT CancelModeEvent : public Event {
public:
CancelModeEvent();
- virtual ~CancelModeEvent();
+ ~CancelModeEvent() override;
};
class EVENTS_EXPORT LocatedEvent : public Event {
public:
- virtual ~LocatedEvent();
+ ~LocatedEvent() override;
float x() const { return location_.x(); }
float y() const { return location_.y(); }
@@ -469,7 +469,7 @@
const gfx::Vector2d& offset() const { return offset_; }
// Overridden from LocatedEvent.
- virtual void UpdateForRootTransform(
+ void UpdateForRootTransform(
const gfx::Transform& inverted_root_transform) override;
private:
@@ -508,7 +508,7 @@
float angle,
float force);
- virtual ~TouchEvent();
+ ~TouchEvent() override;
int touch_id() const { return touch_id_; }
float radius_x() const { return radius_x_; }
@@ -521,7 +521,7 @@
void set_radius_y(const float r) { radius_y_ = r; }
// Overridden from LocatedEvent.
- virtual void UpdateForRootTransform(
+ void UpdateForRootTransform(
const gfx::Transform& inverted_root_transform) override;
protected:
@@ -615,7 +615,7 @@
KeyEvent& operator=(const KeyEvent& rhs);
- virtual ~KeyEvent();
+ ~KeyEvent() override;
// TODO(erg): While we transition to mojo, we have to hack around a mismatch
// in our event types. Our ui::Events don't really have all the data we need
@@ -802,7 +802,7 @@
details_(model.details_) {
}
- virtual ~GestureEvent();
+ ~GestureEvent() override;
const GestureEventDetails& details() const { return details_; }
diff --git a/ui/events/event_processor.h b/ui/events/event_processor.h
index 676d920..8e63051 100644
--- a/ui/events/event_processor.h
+++ b/ui/events/event_processor.h
@@ -14,7 +14,7 @@
// tree of EventTargets.
class EVENTS_EXPORT EventProcessor : public EventDispatcherDelegate {
public:
- virtual ~EventProcessor() {}
+ ~EventProcessor() override {}
// Returns the root of the tree this event processor owns.
virtual EventTarget* GetRootTarget() = 0;
diff --git a/ui/events/event_target.h b/ui/events/event_target.h
index cf8ff8a..e8b14a6 100644
--- a/ui/events/event_target.h
+++ b/ui/events/event_target.h
@@ -38,7 +38,7 @@
};
EventTarget();
- virtual ~EventTarget();
+ ~EventTarget() override;
virtual bool CanAcceptEvent(const Event& event) = 0;
@@ -85,12 +85,12 @@
EventHandler* target_handler() { return target_handler_; }
// Overridden from EventHandler:
- virtual void OnEvent(Event* event) override;
- virtual void OnKeyEvent(KeyEvent* event) override;
- virtual void OnMouseEvent(MouseEvent* event) override;
- virtual void OnScrollEvent(ScrollEvent* event) override;
- virtual void OnTouchEvent(TouchEvent* event) override;
- virtual void OnGestureEvent(GestureEvent* event) override;
+ void OnEvent(Event* event) override;
+ void OnKeyEvent(KeyEvent* event) override;
+ void OnMouseEvent(MouseEvent* event) override;
+ void OnScrollEvent(ScrollEvent* event) override;
+ void OnTouchEvent(TouchEvent* event) override;
+ void OnGestureEvent(GestureEvent* event) override;
private:
friend class EventDispatcher;
diff --git a/ui/events/gesture_detection/filtered_gesture_provider.h b/ui/events/gesture_detection/filtered_gesture_provider.h
index a2ac7fc..231e62b 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider.h
+++ b/ui/events/gesture_detection/filtered_gesture_provider.h
@@ -40,10 +40,10 @@
private:
// GestureProviderClient implementation.
- virtual void OnGestureEvent(const ui::GestureEventData& event) override;
+ void OnGestureEvent(const ui::GestureEventData& event) override;
// TouchDispositionGestureFilterClient implementation.
- virtual void ForwardGestureEvent(const ui::GestureEventData& event) override;
+ void ForwardGestureEvent(const ui::GestureEventData& event) override;
GestureProviderClient* const client_;
diff --git a/ui/events/gesture_detection/gesture_listeners.h b/ui/events/gesture_detection/gesture_listeners.h
index 1d62347..61f5418 100644
--- a/ui/events/gesture_detection/gesture_listeners.h
+++ b/ui/events/gesture_detection/gesture_listeners.h
@@ -53,29 +53,28 @@
public DoubleTapListener {
public:
// GestureListener implementation.
- virtual bool OnDown(const MotionEvent& e) override;
- virtual void OnShowPress(const MotionEvent& e) override;
- virtual bool OnSingleTapUp(const MotionEvent& e) override;
- virtual void OnLongPress(const MotionEvent& e) override;
- virtual bool OnScroll(const MotionEvent& e1,
- const MotionEvent& e2,
- float distance_x,
- float distance_y) override;
- virtual bool OnFling(const MotionEvent& e1,
- const MotionEvent& e2,
- float velocity_x,
- float velocity_y) override;
- virtual bool OnSwipe(const MotionEvent& e1,
- const MotionEvent& e2,
- float velocity_x,
- float velocity_y) override;
- virtual bool OnTwoFingerTap(const MotionEvent& e1,
- const MotionEvent& e2) override;
+ bool OnDown(const MotionEvent& e) override;
+ void OnShowPress(const MotionEvent& e) override;
+ bool OnSingleTapUp(const MotionEvent& e) override;
+ void OnLongPress(const MotionEvent& e) override;
+ bool OnScroll(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float distance_x,
+ float distance_y) override;
+ bool OnFling(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float velocity_x,
+ float velocity_y) override;
+ bool OnSwipe(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float velocity_x,
+ float velocity_y) override;
+ bool OnTwoFingerTap(const MotionEvent& e1, const MotionEvent& e2) override;
// DoubleTapListener implementation.
- virtual bool OnSingleTapConfirmed(const MotionEvent& e) override;
- virtual bool OnDoubleTap(const MotionEvent& e) override;
- virtual bool OnDoubleTapEvent(const MotionEvent& e) override;
+ bool OnSingleTapConfirmed(const MotionEvent& e) override;
+ bool OnDoubleTap(const MotionEvent& e) override;
+ bool OnDoubleTapEvent(const MotionEvent& e) override;
};
} // namespace ui
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index 6925c6c..116b744 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -194,22 +194,22 @@
}
// ScaleGestureListener implementation.
- virtual bool OnScaleBegin(const ScaleGestureDetector& detector,
- const MotionEvent& e) override {
+ bool OnScaleBegin(const ScaleGestureDetector& detector,
+ const MotionEvent& e) override {
if (ignore_multitouch_zoom_events_ && !detector.InDoubleTapMode())
return false;
return true;
}
- virtual void OnScaleEnd(const ScaleGestureDetector& detector,
- const MotionEvent& e) override {
+ void OnScaleEnd(const ScaleGestureDetector& detector,
+ const MotionEvent& e) override {
if (!pinch_event_sent_)
return;
Send(CreateGesture(ET_GESTURE_PINCH_END, e));
}
- virtual bool OnScale(const ScaleGestureDetector& detector,
- const MotionEvent& e) override {
+ bool OnScale(const ScaleGestureDetector& detector,
+ const MotionEvent& e) override {
if (ignore_multitouch_zoom_events_ && !detector.InDoubleTapMode())
return false;
if (!pinch_event_sent_) {
@@ -264,7 +264,7 @@
}
// GestureListener implementation.
- virtual bool OnDown(const MotionEvent& e) override {
+ bool OnDown(const MotionEvent& e) override {
GestureEventDetails tap_details(ET_GESTURE_TAP_DOWN);
Send(CreateGesture(tap_details, e));
@@ -272,21 +272,21 @@
return true;
}
- virtual bool OnScroll(const MotionEvent& e1,
- const MotionEvent& e2,
- float raw_distance_x,
- float raw_distance_y) override {
+ bool OnScroll(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float raw_distance_x,
+ float raw_distance_y) override {
float distance_x = raw_distance_x;
float distance_y = raw_distance_y;
if (!scroll_event_sent_) {
// Remove the touch slop region from the first scroll event to avoid a
// jump.
- double distance =
+ float distance =
std::sqrt(distance_x * distance_x + distance_y * distance_y);
- double epsilon = 1e-3;
+ float epsilon = 1e-3f;
if (distance > epsilon) {
- double ratio =
- std::max(0.,
+ float ratio =
+ std::max(0.f,
distance - config_.gesture_detector_config.touch_slop) /
distance;
distance_x *= ratio;
@@ -345,10 +345,10 @@
return true;
}
- virtual bool OnFling(const MotionEvent& e1,
- const MotionEvent& e2,
- float velocity_x,
- float velocity_y) override {
+ bool OnFling(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float velocity_x,
+ float velocity_y) override {
if (snap_scroll_controller_.IsSnappingScrolls()) {
if (snap_scroll_controller_.IsSnapHorizontal()) {
velocity_y = 0;
@@ -375,17 +375,16 @@
return true;
}
- virtual bool OnSwipe(const MotionEvent& e1,
- const MotionEvent& e2,
- float velocity_x,
- float velocity_y) override {
+ bool OnSwipe(const MotionEvent& e1,
+ const MotionEvent& e2,
+ float velocity_x,
+ float velocity_y) override {
GestureEventDetails swipe_details(ET_GESTURE_SWIPE, velocity_x, velocity_y);
Send(CreateGesture(swipe_details, e2));
return true;
}
- virtual bool OnTwoFingerTap(const MotionEvent& e1,
- const MotionEvent& e2) override {
+ bool OnTwoFingerTap(const MotionEvent& e1, const MotionEvent& e2) override {
// The location of the two finger tap event should be the location of the
// primary pointer.
GestureEventDetails two_finger_tap_details(
@@ -404,13 +403,13 @@
return true;
}
- virtual void OnShowPress(const MotionEvent& e) override {
+ void OnShowPress(const MotionEvent& e) override {
GestureEventDetails show_press_details(ET_GESTURE_SHOW_PRESS);
show_press_event_sent_ = true;
Send(CreateGesture(show_press_details, e));
}
- virtual bool OnSingleTapUp(const MotionEvent& e) override {
+ bool OnSingleTapUp(const MotionEvent& e) override {
// This is a hack to address the issue where user hovers
// over a link for longer than double_tap_timeout_, then
// OnSingleTapConfirmed() is not triggered. But we still
@@ -444,7 +443,7 @@
}
// DoubleTapListener implementation.
- virtual bool OnSingleTapConfirmed(const MotionEvent& e) override {
+ bool OnSingleTapConfirmed(const MotionEvent& e) override {
// Long taps in the edges of the screen have their events delayed by
// ContentViewHolder for tab swipe operations. As a consequence of the delay
// this method might be called after receiving the up event.
@@ -458,11 +457,11 @@
return true;
}
- virtual bool OnDoubleTap(const MotionEvent& e) override {
+ bool OnDoubleTap(const MotionEvent& e) override {
return scale_gesture_detector_.OnDoubleTap(e);
}
- virtual bool OnDoubleTapEvent(const MotionEvent& e) override {
+ bool OnDoubleTapEvent(const MotionEvent& e) override {
switch (e.GetAction()) {
case MotionEvent::ACTION_DOWN:
gesture_detector_.set_longpress_enabled(false);
@@ -481,7 +480,7 @@
return false;
}
- virtual void OnLongPress(const MotionEvent& e) override {
+ void OnLongPress(const MotionEvent& e) override {
DCHECK(!IsDoubleTapInProgress());
SetIgnoreSingleTap(true);
GestureEventDetails long_press_details(ET_GESTURE_LONG_PRESS);
diff --git a/ui/events/gesture_detection/motion_event_buffer.cc b/ui/events/gesture_detection/motion_event_buffer.cc
index 26fc5ba..89690d6 100644
--- a/ui/events/gesture_detection/motion_event_buffer.cc
+++ b/ui/events/gesture_detection/motion_event_buffer.cc
@@ -173,98 +173,91 @@
: events_(events.Pass()) {
DCHECK_GE(events_.size(), 1U);
}
- virtual ~CompoundMotionEvent() {}
+ ~CompoundMotionEvent() override {}
- virtual int GetId() const override { return latest().GetId(); }
+ int GetId() const override { return latest().GetId(); }
- virtual Action GetAction() const override { return latest().GetAction(); }
+ Action GetAction() const override { return latest().GetAction(); }
- virtual int GetActionIndex() const override {
- return latest().GetActionIndex();
- }
+ int GetActionIndex() const override { return latest().GetActionIndex(); }
- virtual size_t GetPointerCount() const override {
- return latest().GetPointerCount();
- }
+ size_t GetPointerCount() const override { return latest().GetPointerCount(); }
- virtual int GetPointerId(size_t pointer_index) const override {
+ int GetPointerId(size_t pointer_index) const override {
return latest().GetPointerId(pointer_index);
}
- virtual float GetX(size_t pointer_index) const override {
+ float GetX(size_t pointer_index) const override {
return latest().GetX(pointer_index);
}
- virtual float GetY(size_t pointer_index) const override {
+ float GetY(size_t pointer_index) const override {
return latest().GetY(pointer_index);
}
- virtual float GetRawX(size_t pointer_index) const override {
+ float GetRawX(size_t pointer_index) const override {
return latest().GetRawX(pointer_index);
}
- virtual float GetRawY(size_t pointer_index) const override {
+ float GetRawY(size_t pointer_index) const override {
return latest().GetRawY(pointer_index);
}
- virtual float GetTouchMajor(size_t pointer_index) const override {
+ float GetTouchMajor(size_t pointer_index) const override {
return latest().GetTouchMajor(pointer_index);
}
- virtual float GetTouchMinor(size_t pointer_index) const override {
+ float GetTouchMinor(size_t pointer_index) const override {
return latest().GetTouchMinor(pointer_index);
}
- virtual float GetOrientation(size_t pointer_index) const override {
+ float GetOrientation(size_t pointer_index) const override {
return latest().GetOrientation(pointer_index);
}
- virtual float GetPressure(size_t pointer_index) const override {
+ float GetPressure(size_t pointer_index) const override {
return latest().GetPressure(pointer_index);
}
- virtual ToolType GetToolType(size_t pointer_index) const override {
+ ToolType GetToolType(size_t pointer_index) const override {
return latest().GetToolType(pointer_index);
}
- virtual int GetButtonState() const override {
- return latest().GetButtonState();
- }
+ int GetButtonState() const override { return latest().GetButtonState(); }
- virtual int GetFlags() const override { return latest().GetFlags(); }
+ int GetFlags() const override { return latest().GetFlags(); }
- virtual base::TimeTicks GetEventTime() const override {
+ base::TimeTicks GetEventTime() const override {
return latest().GetEventTime();
}
- virtual size_t GetHistorySize() const override { return events_.size() - 1; }
+ size_t GetHistorySize() const override { return events_.size() - 1; }
- virtual base::TimeTicks GetHistoricalEventTime(
+ base::TimeTicks GetHistoricalEventTime(
size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetEventTime();
}
- virtual float GetHistoricalTouchMajor(
- size_t pointer_index,
- size_t historical_index) const override {
+ float GetHistoricalTouchMajor(size_t pointer_index,
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetTouchMajor();
}
- virtual float GetHistoricalX(size_t pointer_index,
- size_t historical_index) const override {
+ float GetHistoricalX(size_t pointer_index,
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetX(pointer_index);
}
- virtual float GetHistoricalY(size_t pointer_index,
- size_t historical_index) const override {
+ float GetHistoricalY(size_t pointer_index,
+ size_t historical_index) const override {
DCHECK_LT(historical_index, GetHistorySize());
return events_[historical_index]->GetY(pointer_index);
}
- virtual scoped_ptr<MotionEvent> Clone() const override {
+ scoped_ptr<MotionEvent> Clone() const override {
MotionEventVector cloned_events;
cloned_events.reserve(events_.size());
for (size_t i = 0; i < events_.size(); ++i)
@@ -273,9 +266,7 @@
new CompoundMotionEvent(cloned_events.Pass()));
}
- virtual scoped_ptr<MotionEvent> Cancel() const override {
- return latest().Cancel();
- }
+ scoped_ptr<MotionEvent> Cancel() const override { return latest().Cancel(); }
// Returns the new, resampled event, or NULL if none was created.
// TODO(jdduke): Revisit resampling to handle cases where alternating frames
diff --git a/ui/events/gesture_detection/motion_event_generic.h b/ui/events/gesture_detection/motion_event_generic.h
index 41911c1..17109cb 100644
--- a/ui/events/gesture_detection/motion_event_generic.h
+++ b/ui/events/gesture_detection/motion_event_generic.h
@@ -36,28 +36,28 @@
const PointerProperties& pointer);
MotionEventGeneric(const MotionEventGeneric& other);
- virtual ~MotionEventGeneric();
+ ~MotionEventGeneric() override;
// MotionEvent implementation.
- virtual int GetId() const override;
- virtual Action GetAction() const override;
- virtual int GetActionIndex() const override;
- virtual size_t GetPointerCount() const override;
- virtual int GetPointerId(size_t pointer_index) const override;
- virtual float GetX(size_t pointer_index) const override;
- virtual float GetY(size_t pointer_index) const override;
- virtual float GetRawX(size_t pointer_index) const override;
- virtual float GetRawY(size_t pointer_index) const override;
- virtual float GetTouchMajor(size_t pointer_index) const override;
- virtual float GetTouchMinor(size_t pointer_index) const override;
- virtual float GetOrientation(size_t pointer_index) const override;
- virtual float GetPressure(size_t pointer_index) const override;
- virtual ToolType GetToolType(size_t pointer_index) const override;
- virtual int GetButtonState() const override;
- virtual int GetFlags() const override;
- virtual base::TimeTicks GetEventTime() const override;
- virtual scoped_ptr<MotionEvent> Clone() const override;
- virtual scoped_ptr<MotionEvent> Cancel() const override;
+ int GetId() const override;
+ Action GetAction() const override;
+ int GetActionIndex() const override;
+ size_t GetPointerCount() const override;
+ int GetPointerId(size_t pointer_index) const override;
+ float GetX(size_t pointer_index) const override;
+ float GetY(size_t pointer_index) const override;
+ float GetRawX(size_t pointer_index) const override;
+ float GetRawY(size_t pointer_index) const override;
+ float GetTouchMajor(size_t pointer_index) const override;
+ float GetTouchMinor(size_t pointer_index) const override;
+ float GetOrientation(size_t pointer_index) const override;
+ float GetPressure(size_t pointer_index) const override;
+ ToolType GetToolType(size_t pointer_index) const override;
+ int GetButtonState() const override;
+ int GetFlags() const override;
+ base::TimeTicks GetEventTime() const override;
+ scoped_ptr<MotionEvent> Clone() const override;
+ scoped_ptr<MotionEvent> Cancel() const override;
void PushPointer(const PointerProperties& pointer);
diff --git a/ui/events/gesture_detection/scale_gesture_listeners.h b/ui/events/gesture_detection/scale_gesture_listeners.h
index 583ef7e..a976f47 100644
--- a/ui/events/gesture_detection/scale_gesture_listeners.h
+++ b/ui/events/gesture_detection/scale_gesture_listeners.h
@@ -34,12 +34,9 @@
: public ScaleGestureListener {
public:
// ScaleGestureListener implementation.
- virtual bool OnScale(const ScaleGestureDetector&,
- const MotionEvent&) override;
- virtual bool OnScaleBegin(const ScaleGestureDetector&,
- const MotionEvent&) override;
- virtual void OnScaleEnd(const ScaleGestureDetector&,
- const MotionEvent&) override;
+ bool OnScale(const ScaleGestureDetector&, const MotionEvent&) override;
+ bool OnScaleBegin(const ScaleGestureDetector&, const MotionEvent&) override;
+ void OnScaleEnd(const ScaleGestureDetector&, const MotionEvent&) override;
};
} // namespace ui
diff --git a/ui/events/gesture_detection/velocity_tracker.cc b/ui/events/gesture_detection/velocity_tracker.cc
index a3fd83e..46f87d4 100644
--- a/ui/events/gesture_detection/velocity_tracker.cc
+++ b/ui/events/gesture_detection/velocity_tracker.cc
@@ -51,13 +51,13 @@
};
struct Estimator {
- enum { MAX_DEGREE = 4 };
+ static const uint8_t kMaxDegree = 4;
// Estimator time base.
TimeTicks time;
// Polynomial coefficients describing motion in X and Y.
- float xcoeff[MAX_DEGREE + 1], ycoeff[MAX_DEGREE + 1];
+ float xcoeff[kMaxDegree + 1], ycoeff[kMaxDegree + 1];
// Polynomial degree (number of coefficients), or zero if no information is
// available.
@@ -71,7 +71,7 @@
time = TimeTicks();
degree = 0;
confidence = 0;
- for (size_t i = 0; i <= MAX_DEGREE; i++) {
+ for (size_t i = 0; i <= kMaxDegree; i++) {
xcoeff[i] = 0;
ycoeff[i] = 0;
}
@@ -114,26 +114,25 @@
};
// Number of samples to keep.
- enum { HISTORY_SIZE = 20 };
+ static const uint8_t kHistorySize = 20;
- // Degree must be no greater than Estimator::MAX_DEGREE.
+ // Degree must be no greater than Estimator::kMaxDegree.
LeastSquaresVelocityTrackerStrategy(uint32_t degree,
Weighting weighting = WEIGHTING_NONE);
- virtual ~LeastSquaresVelocityTrackerStrategy();
+ ~LeastSquaresVelocityTrackerStrategy() override;
- virtual void Clear() override;
- virtual void ClearPointers(BitSet32 id_bits) override;
- virtual void AddMovement(const TimeTicks& event_time,
- BitSet32 id_bits,
- const Position* positions) override;
- virtual bool GetEstimator(uint32_t id,
- Estimator* out_estimator) const override;
+ void Clear() override;
+ void ClearPointers(BitSet32 id_bits) override;
+ void AddMovement(const TimeTicks& event_time,
+ BitSet32 id_bits,
+ const Position* positions) override;
+ bool GetEstimator(uint32_t id, Estimator* out_estimator) const override;
private:
// Sample horizon.
// We don't use too much history by default since we want to react to quick
// changes in direction.
- enum { HORIZON_MS = 100 };
+ static const uint8_t kHorizonMS = 100;
struct Movement {
TimeTicks event_time;
@@ -150,7 +149,7 @@
const uint32_t degree_;
const Weighting weighting_;
uint32_t index_;
- Movement movements_[HISTORY_SIZE];
+ Movement movements_[kHistorySize];
};
// Velocity tracker algorithm that uses an IIR filter.
@@ -158,15 +157,14 @@
public:
// Degree must be 1 or 2.
explicit IntegratingVelocityTrackerStrategy(uint32_t degree);
- virtual ~IntegratingVelocityTrackerStrategy();
+ ~IntegratingVelocityTrackerStrategy() override;
- virtual void Clear() override;
- virtual void ClearPointers(BitSet32 id_bits) override;
- virtual void AddMovement(const TimeTicks& event_time,
- BitSet32 id_bits,
- const Position* positions) override;
- virtual bool GetEstimator(uint32_t id,
- Estimator* out_estimator) const override;
+ void Clear() override;
+ void ClearPointers(BitSet32 id_bits) override;
+ void AddMovement(const TimeTicks& event_time,
+ BitSet32 id_bits,
+ const Position* positions) override;
+ bool GetEstimator(uint32_t id, Estimator* out_estimator) const override;
private:
// Current state estimate for a particular pointer.
@@ -371,7 +369,7 @@
const TimeTicks& event_time,
BitSet32 id_bits,
const Position* positions) {
- if (++index_ == HISTORY_SIZE) {
+ if (++index_ == kHistorySize) {
index_ = 0;
}
@@ -395,7 +393,7 @@
uint32_t degree,
Weighting weighting)
: degree_(degree), weighting_(weighting) {
- DCHECK_LT(degree_, static_cast<uint32_t>(Estimator::MAX_DEGREE));
+ DCHECK_LT(degree_, static_cast<uint32_t>(Estimator::kMaxDegree));
Clear();
}
@@ -469,12 +467,11 @@
// MSVC does not support variable-length arrays (used by the original Android
// implementation of this function).
#if defined(COMPILER_MSVC)
- enum {
- M_ARRAY_LENGTH = LeastSquaresVelocityTrackerStrategy::HISTORY_SIZE,
- N_ARRAY_LENGTH = Estimator::MAX_DEGREE
- };
- DCHECK_LE(m, static_cast<uint32_t>(M_ARRAY_LENGTH));
- DCHECK_LE(n, static_cast<uint32_t>(N_ARRAY_LENGTH));
+ const uint32_t M_ARRAY_LENGTH =
+ LeastSquaresVelocityTrackerStrategy::kHistorySize;
+ const uint32_t N_ARRAY_LENGTH = Estimator::kMaxDegree;
+ DCHECK_LE(m, M_ARRAY_LENGTH);
+ DCHECK_LE(n, N_ARRAY_LENGTH);
#else
const uint32_t M_ARRAY_LENGTH = m;
const uint32_t N_ARRAY_LENGTH = n;
@@ -573,13 +570,13 @@
out_estimator->Clear();
// Iterate over movement samples in reverse time order and collect samples.
- float x[HISTORY_SIZE];
- float y[HISTORY_SIZE];
- float w[HISTORY_SIZE];
- float time[HISTORY_SIZE];
+ float x[kHistorySize];
+ float y[kHistorySize];
+ float w[kHistorySize];
+ float time[kHistorySize];
uint32_t m = 0;
uint32_t index = index_;
- const base::TimeDelta horizon = base::TimeDelta::FromMilliseconds(HORIZON_MS);
+ const base::TimeDelta horizon = base::TimeDelta::FromMilliseconds(kHorizonMS);
const Movement& newest_movement = movements_[index_];
do {
const Movement& movement = movements_[index];
@@ -594,9 +591,9 @@
x[m] = position.x;
y[m] = position.y;
w[m] = ChooseWeight(index);
- time[m] = -age.InSecondsF();
- index = (index == 0 ? HISTORY_SIZE : index) - 1;
- } while (++m < HISTORY_SIZE);
+ time[m] = -static_cast<float>(age.InSecondsF());
+ index = (index == 0 ? kHistorySize : index) - 1;
+ } while (++m < kHistorySize);
if (m == 0)
return false; // no data
@@ -638,14 +635,14 @@
if (index == index_) {
return 1.0f;
}
- uint32_t next_index = (index + 1) % HISTORY_SIZE;
+ uint32_t next_index = (index + 1) % kHistorySize;
float delta_millis =
static_cast<float>((movements_[next_index].event_time -
movements_[index].event_time).InMillisecondsF());
if (delta_millis < 0)
return 0.5f;
if (delta_millis < 10)
- return 0.5f + delta_millis * 0.05;
+ return 0.5f + delta_millis * 0.05f;
return 1.0f;
}
@@ -663,11 +660,11 @@
if (age_millis < 0)
return 0.5f;
if (age_millis < 10)
- return 0.5f + age_millis * 0.05;
+ return 0.5f + age_millis * 0.05f;
if (age_millis < 50)
return 1.0f;
if (age_millis < 60)
- return 0.5f + (60 - age_millis) * 0.05;
+ return 0.5f + (60 - age_millis) * 0.05f;
return 0.5f;
}
@@ -700,7 +697,7 @@
IntegratingVelocityTrackerStrategy::IntegratingVelocityTrackerStrategy(
uint32_t degree)
: degree_(degree) {
- DCHECK_LT(degree_, static_cast<uint32_t>(Estimator::MAX_DEGREE));
+ DCHECK_LT(degree_, static_cast<uint32_t>(Estimator::kMaxDegree));
}
IntegratingVelocityTrackerStrategy::~IntegratingVelocityTrackerStrategy() {}
diff --git a/ui/events/gestures/fling_curve.h b/ui/events/gestures/fling_curve.h
index bebf6ab..edf0910 100644
--- a/ui/events/gestures/fling_curve.h
+++ b/ui/events/gestures/fling_curve.h
@@ -18,12 +18,12 @@
class EVENTS_BASE_EXPORT FlingCurve : public GestureCurve {
public:
FlingCurve(const gfx::Vector2dF& velocity, base::TimeTicks start_timestamp);
- virtual ~FlingCurve();
+ ~FlingCurve() override;
// GestureCurve implementation.
- virtual bool ComputeScrollOffset(base::TimeTicks time,
- gfx::Vector2dF* offset,
- gfx::Vector2dF* velocity) override;
+ bool ComputeScrollOffset(base::TimeTicks time,
+ gfx::Vector2dF* offset,
+ gfx::Vector2dF* velocity) override;
// In contrast to |ComputeScrollOffset()|, this method is stateful and
// returns the *change* in scroll offset between successive calls.
diff --git a/ui/events/gestures/gesture_recognizer_impl_mac.cc b/ui/events/gestures/gesture_recognizer_impl_mac.cc
index b123593..a0d4ba4 100644
--- a/ui/events/gestures/gesture_recognizer_impl_mac.cc
+++ b/ui/events/gestures/gesture_recognizer_impl_mac.cc
@@ -14,53 +14,47 @@
class GestureRecognizerImplMac : public GestureRecognizer {
public:
GestureRecognizerImplMac() {}
- virtual ~GestureRecognizerImplMac() {}
+ ~GestureRecognizerImplMac() override {}
private:
- virtual bool ProcessTouchEventPreDispatch(
- const TouchEvent& event,
- GestureConsumer* consumer) override {
+ bool ProcessTouchEventPreDispatch(const TouchEvent& event,
+ GestureConsumer* consumer) override {
return false;
}
- virtual Gestures* ProcessTouchEventPostDispatch(
- const TouchEvent& event,
- ui::EventResult result,
- GestureConsumer* consumer) override {
+ Gestures* ProcessTouchEventPostDispatch(const TouchEvent& event,
+ ui::EventResult result,
+ GestureConsumer* consumer) override {
return NULL;
}
- virtual Gestures* ProcessTouchEventOnAsyncAck(
- const TouchEvent& event,
- ui::EventResult result,
- GestureConsumer* consumer) override {
+ Gestures* ProcessTouchEventOnAsyncAck(const TouchEvent& event,
+ ui::EventResult result,
+ GestureConsumer* consumer) override {
return NULL;
};
- virtual bool CleanupStateForConsumer(GestureConsumer* consumer) override {
+ bool CleanupStateForConsumer(GestureConsumer* consumer) override {
return false;
}
- virtual GestureConsumer* GetTouchLockedTarget(
- const TouchEvent& event) override {
+ GestureConsumer* GetTouchLockedTarget(const TouchEvent& event) override {
return NULL;
}
- virtual GestureConsumer* GetTargetForGestureEvent(
+ GestureConsumer* GetTargetForGestureEvent(
const GestureEvent& event) override {
return NULL;
}
- virtual GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
- int source_device_id) override {
+ GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
+ int source_device_id) override {
return NULL;
}
- virtual void TransferEventsTo(GestureConsumer* current_consumer,
- GestureConsumer* new_consumer) override {}
- virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
- gfx::PointF* point) override {
+ void TransferEventsTo(GestureConsumer* current_consumer,
+ GestureConsumer* new_consumer) override {}
+ bool GetLastTouchPointForTarget(GestureConsumer* consumer,
+ gfx::PointF* point) override {
return false;
}
- virtual bool CancelActiveTouches(GestureConsumer* consumer) override {
- return false;
- }
- virtual void AddGestureEventHelper(GestureEventHelper* helper) override {}
- virtual void RemoveGestureEventHelper(GestureEventHelper* helper) override {}
+ bool CancelActiveTouches(GestureConsumer* consumer) override { return false; }
+ void AddGestureEventHelper(GestureEventHelper* helper) override {}
+ void RemoveGestureEventHelper(GestureEventHelper* helper) override {}
DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac);
};
diff --git a/ui/events/keycodes/dom4/keycode_converter.cc b/ui/events/keycodes/dom4/keycode_converter.cc
index b7958dd..63689f0 100644
--- a/ui/events/keycodes/dom4/keycode_converter.cc
+++ b/ui/events/keycodes/dom4/keycode_converter.cc
@@ -77,7 +77,7 @@
// static
uint16_t KeycodeConverter::InvalidUsbKeycode() {
- return usb_keycode_map[0].usb_keycode;
+ return static_cast<uint16_t>(usb_keycode_map[0].usb_keycode);
}
// static
diff --git a/ui/events/keycodes/keyboard_code_conversion.cc b/ui/events/keycodes/keyboard_code_conversion.cc
index a812b51..e7b067c 100644
--- a/ui/events/keycodes/keyboard_code_conversion.cc
+++ b/ui/events/keycodes/keyboard_code_conversion.cc
@@ -14,8 +14,10 @@
const bool upper = shift ^ ((flags & EF_CAPS_LOCK_DOWN) != 0);
// Following Windows behavior to map ctrl-a ~ ctrl-z to \x01 ~ \x1A.
- if (key_code >= VKEY_A && key_code <= VKEY_Z)
- return key_code - VKEY_A + (ctrl ? 1 : (upper ? 'A' : 'a'));
+ if (key_code >= VKEY_A && key_code <= VKEY_Z) {
+ return static_cast<uint16>
+ (key_code - VKEY_A + (ctrl ? 1 : (upper ? 'A' : 'a')));
+ }
// Other ctrl characters
if (ctrl) {
@@ -65,7 +67,7 @@
return shift ? ")!@#$%^&*("[key_code - VKEY_0] :
static_cast<uint16>(key_code);
} else if (key_code >= VKEY_NUMPAD0 && key_code <= VKEY_NUMPAD9) {
- return key_code - VKEY_NUMPAD0 + '0';
+ return static_cast<uint16>(key_code - VKEY_NUMPAD0 + '0');
}
switch (key_code) {
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 9987908..9b186a8 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -76,11 +76,11 @@
static scoped_refptr<ConvertableToTraceFormat> FromValue(
scoped_ptr<base::Value> value);
- virtual void AppendAsTraceFormat(std::string* out) const override;
+ void AppendAsTraceFormat(std::string* out) const override;
private:
explicit LatencyInfoTracedValue(base::Value* value);
- virtual ~LatencyInfoTracedValue();
+ ~LatencyInfoTracedValue() override;
scoped_ptr<base::Value> value_;
@@ -114,12 +114,13 @@
latency.latency_components.begin();
it != latency.latency_components.end(); ++it) {
base::DictionaryValue* component_info = new base::DictionaryValue();
- component_info->SetDouble("comp_id", it->first.second);
- component_info->SetDouble("time", it->second.event_time.ToInternalValue());
+ component_info->SetDouble("comp_id", static_cast<double>(it->first.second));
+ component_info->SetDouble(
+ "time", static_cast<double>(it->second.event_time.ToInternalValue()));
component_info->SetDouble("count", it->second.event_count);
record_data->Set(GetComponentName(it->first.first), component_info);
}
- record_data->SetDouble("trace_id", latency.trace_id);
+ record_data->SetDouble("trace_id", static_cast<double>(latency.trace_id));
scoped_ptr<base::ListValue> coordinates(new base::ListValue());
for (size_t i = 0; i < latency.input_coordinates_size; i++) {
diff --git a/ui/events/ozone/evdev/event_dispatch_callback.h b/ui/events/ozone/evdev/event_dispatch_callback.h
index 1974d51..ae07817 100644
--- a/ui/events/ozone/evdev/event_dispatch_callback.h
+++ b/ui/events/ozone/evdev/event_dispatch_callback.h
@@ -11,7 +11,7 @@
class Event;
-typedef base::Callback<void(Event*)> EventDispatchCallback;
+typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback;
} // namspace ui
diff --git a/ui/events/ozone/evdev/event_factory_evdev.cc b/ui/events/ozone/evdev/event_factory_evdev.cc
index e87acbf..170d3a6 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -23,6 +23,7 @@
#if defined(USE_EVDEV_GESTURES)
#include "ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.h"
#include "ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h"
+#include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
#endif
#ifndef EVIOCSCLOCKID
@@ -50,6 +51,9 @@
EventModifiersEvdev* modifiers;
KeyboardEvdev* keyboard;
CursorDelegateEvdev* cursor;
+#if defined(USE_EVDEV_GESTURES)
+ GesturePropertyProvider* gesture_property_provider;
+#endif
};
#if defined(USE_EVDEV_GESTURES)
@@ -73,9 +77,11 @@
// EventReaderLibevdevCros -> GestureInterpreterLibevdevCros -> DispatchEvent
if (UseGesturesLibraryForDevice(devinfo)) {
scoped_ptr<GestureInterpreterLibevdevCros> gesture_interp = make_scoped_ptr(
- new GestureInterpreterLibevdevCros(params.modifiers,
+ new GestureInterpreterLibevdevCros(params.id,
+ params.modifiers,
params.cursor,
params.keyboard,
+ params.gesture_property_provider,
params.dispatch_callback));
return make_scoped_ptr(new EventReaderLibevdevCros(
fd, params.path, params.id, gesture_interp.Pass()));
@@ -150,18 +156,28 @@
: last_device_id_(0),
device_manager_(device_manager),
dispatch_callback_(
- base::Bind(base::IgnoreResult(&EventFactoryEvdev::DispatchUiEvent),
- base::Unretained(this))),
+ base::Bind(&EventFactoryEvdev::PostUiEvent, base::Unretained(this))),
keyboard_(&modifiers_, dispatch_callback_),
cursor_(cursor),
+#if defined(USE_EVDEV_GESTURES)
+ gesture_property_provider_(new GesturePropertyProvider),
+#endif
weak_ptr_factory_(this) {
DCHECK(device_manager_);
}
EventFactoryEvdev::~EventFactoryEvdev() { STLDeleteValues(&converters_); }
-void EventFactoryEvdev::DispatchUiEvent(Event* event) {
- DispatchEvent(event);
+void EventFactoryEvdev::PostUiEvent(scoped_ptr<Event> event) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(&EventFactoryEvdev::DispatchUiEventTask,
+ weak_ptr_factory_.GetWeakPtr(),
+ base::Passed(&event)));
+}
+
+void EventFactoryEvdev::DispatchUiEventTask(scoped_ptr<Event> event) {
+ DispatchEvent(event.get());
}
void EventFactoryEvdev::AttachInputDevice(
@@ -199,6 +215,9 @@
params->modifiers = &modifiers_;
params->keyboard = &keyboard_;
params->cursor = cursor_;
+#if defined(USE_EVDEV_GESTURES)
+ params->gesture_property_provider = gesture_property_provider_.get();
+#endif
OpenInputDeviceReplyCallback reply_callback =
base::Bind(&EventFactoryEvdev::AttachInputDevice,
@@ -257,12 +276,11 @@
const gfx::PointF& location) {
if (cursor_) {
cursor_->MoveCursorTo(widget, location);
- MouseEvent mouse_event(ET_MOUSE_MOVED,
- cursor_->location(),
- cursor_->location(),
- modifiers_.GetModifierFlags(),
- /* changed_button_flags */ 0);
- DispatchEvent(&mouse_event);
+ PostUiEvent(make_scoped_ptr(new MouseEvent(ET_MOUSE_MOVED,
+ cursor_->location(),
+ cursor_->location(),
+ modifiers_.GetModifierFlags(),
+ /* changed_button_flags */ 0)));
}
}
diff --git a/ui/events/ozone/evdev/event_factory_evdev.h b/ui/events/ozone/evdev/event_factory_evdev.h
index c1998a6..74585fc 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.h
+++ b/ui/events/ozone/evdev/event_factory_evdev.h
@@ -27,6 +27,10 @@
class CursorDelegateEvdev;
class DeviceManager;
+#if defined(USE_EVDEV_GESTURES)
+class GesturePropertyProvider;
+#endif
+
// Ozone events implementation for the Linux input subsystem ("evdev").
class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
public PlatformEventSource {
@@ -35,12 +39,16 @@
DeviceManager* device_manager);
virtual ~EventFactoryEvdev();
- void DispatchUiEvent(Event* event);
-
void WarpCursorTo(gfx::AcceleratedWidget widget,
const gfx::PointF& location);
private:
+ // Post a task to dispatch an event.
+ void PostUiEvent(scoped_ptr<Event> event);
+
+ // Dispatch event via PlatformEventSource.
+ void DispatchUiEventTask(scoped_ptr<Event> event);
+
// Open device at path & starting processing events (on UI thread).
void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
@@ -83,6 +91,11 @@
// Cursor movement.
CursorDelegateEvdev* cursor_;
+#if defined(USE_EVDEV_GESTURES)
+ // Gesture library property provider (used by touchpads/mice).
+ scoped_ptr<GesturePropertyProvider> gesture_property_provider_;
+#endif
+
// Support weak pointers for attach & detach callbacks.
base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
diff --git a/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
index fb5a90a..f78925c 100644
--- a/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/key_event_converter_evdev_unittest.cc
@@ -72,13 +72,14 @@
unsigned size() { return dispatched_events_.size(); }
ui::KeyEvent* dispatched_event(unsigned index) {
DCHECK_GT(dispatched_events_.size(), index);
- return dispatched_events_[index];
+ ui::Event* ev = dispatched_events_[index];
+ DCHECK(ev->IsKeyEvent());
+ return static_cast<ui::KeyEvent*>(ev);
}
private:
- void DispatchEventForTest(ui::Event* event) {
- dispatched_events_.push_back(
- new ui::KeyEvent(*static_cast<ui::KeyEvent*>(event)));
+ void DispatchEventForTest(scoped_ptr<ui::Event> event) {
+ dispatched_events_.push_back(event.release());
}
base::MessageLoopForUI ui_loop_;
@@ -87,7 +88,7 @@
scoped_ptr<ui::KeyboardEvdev> keyboard_;
scoped_ptr<ui::MockKeyEventConverterEvdev> device_;
- ScopedVector<ui::KeyEvent> dispatched_events_;
+ ScopedVector<ui::Event> dispatched_events_;
int events_out_;
int events_in_;
diff --git a/ui/events/ozone/evdev/keyboard_evdev.cc b/ui/events/ozone/evdev/keyboard_evdev.cc
index 6e5266f..468f0fd 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -228,12 +228,11 @@
ui::KeyboardCode code = KeyboardCodeFromEvdevKey(key);
int flags = modifiers_->GetModifierFlags();
- KeyEvent key_event(
+ callback_.Run(make_scoped_ptr(new KeyEvent(
down ? ET_KEY_PRESSED : ET_KEY_RELEASED,
code,
KeycodeConverter::NativeKeycodeToCode(key + kXkbKeycodeOffset),
- flags);
- callback_.Run(&key_event);
+ flags)));
}
} // namespace ui
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
index 073514d..9bc7c8e 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
@@ -14,6 +14,7 @@
#include "ui/events/ozone/evdev/event_device_util.h"
#include "ui/events/ozone/evdev/event_modifiers_evdev.h"
#include "ui/events/ozone/evdev/keyboard_evdev.h"
+#include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
#include "ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.h"
#include "ui/gfx/geometry/point_f.h"
@@ -38,18 +39,20 @@
}
// Convert libevdev state to libgestures hardware properties.
-HardwareProperties GestureHardwareProperties(Evdev* evdev) {
+HardwareProperties GestureHardwareProperties(
+ Evdev* evdev,
+ const GestureDeviceProperties* props) {
HardwareProperties hwprops;
- hwprops.left = Event_Get_Left(evdev);
- hwprops.top = Event_Get_Top(evdev);
- hwprops.right = Event_Get_Right(evdev);
- hwprops.bottom = Event_Get_Bottom(evdev);
- hwprops.res_x = Event_Get_Res_X(evdev);
- hwprops.res_y = Event_Get_Res_Y(evdev);
+ hwprops.left = props->area_left;
+ hwprops.top = props->area_top;
+ hwprops.right = props->area_right;
+ hwprops.bottom = props->area_bottom;
+ hwprops.res_x = props->res_x;
+ hwprops.res_y = props->res_y;
hwprops.screen_x_dpi = 133;
hwprops.screen_y_dpi = 133;
- hwprops.orientation_minimum = Event_Get_Orientation_Minimum(evdev);
- hwprops.orientation_maximum = Event_Get_Orientation_Maximum(evdev);
+ hwprops.orientation_minimum = props->orientation_minimum;
+ hwprops.orientation_maximum = props->orientation_maximum;
hwprops.max_finger_cnt = Event_Get_Slot_Count(evdev);
hwprops.max_touch_cnt = Event_Get_Touch_Count_Max(evdev);
hwprops.supports_t5r2 = Event_Get_T5R2(evdev);
@@ -81,23 +84,41 @@
} // namespace
GestureInterpreterLibevdevCros::GestureInterpreterLibevdevCros(
+ int id,
EventModifiersEvdev* modifiers,
CursorDelegateEvdev* cursor,
KeyboardEvdev* keyboard,
+ GesturePropertyProvider* property_provider,
const EventDispatchCallback& callback)
- : modifiers_(modifiers),
+ : id_(id),
+ modifiers_(modifiers),
cursor_(cursor),
keyboard_(keyboard),
+ property_provider_(property_provider),
dispatch_callback_(callback),
- interpreter_(NULL) {
+ interpreter_(NULL),
+ evdev_(NULL),
+ device_properties_(new GestureDeviceProperties) {
memset(&prev_key_state_, 0, sizeof(prev_key_state_));
}
GestureInterpreterLibevdevCros::~GestureInterpreterLibevdevCros() {
+ // Note that this destructor got called after the evdev device node has been
+ // closed. Therefore, all clean-up codes here shouldn't depend on the device
+ // information (except for the pointer address itself).
+
+ // Clean-up if the gesture interpreter has been successfully created.
if (interpreter_) {
+ // Unset callbacks.
+ GestureInterpreterSetCallback(interpreter_, NULL, NULL);
+ GestureInterpreterSetPropProvider(interpreter_, NULL, NULL);
+ GestureInterpreterSetTimerProvider(interpreter_, NULL, NULL);
DeleteGestureInterpreter(interpreter_);
interpreter_ = NULL;
}
+
+ // Unregister device from the gesture property provider.
+ GesturesPropFunctionsWrapper::UnregisterDevice(this);
}
void GestureInterpreterLibevdevCros::OnLibEvdevCrosOpen(
@@ -106,12 +127,21 @@
DCHECK(evdev->info.is_monotonic) << "libevdev must use monotonic timestamps";
VLOG(9) << "HACK DO NOT REMOVE OR LINK WILL FAIL" << (void*)gestures_log;
- HardwareProperties hwprops = GestureHardwareProperties(evdev);
+ // Set device pointer and initialize properties.
+ evdev_ = evdev;
+ GesturesPropFunctionsWrapper::InitializeDeviceProperties(
+ this, device_properties_.get());
+ HardwareProperties hwprops =
+ GestureHardwareProperties(evdev, device_properties_.get());
GestureInterpreterDeviceClass devclass = GestureDeviceClass(evdev);
// Create & initialize GestureInterpreter.
DCHECK(!interpreter_);
interpreter_ = NewGestureInterpreter();
+ GestureInterpreterSetPropProvider(
+ interpreter_,
+ const_cast<GesturesPropProvider*>(&kGesturePropProvider),
+ this);
GestureInterpreterInitialize(interpreter_, devclass);
GestureInterpreterSetHardwareProperties(interpreter_, &hwprops);
GestureInterpreterSetTimerProvider(
@@ -220,12 +250,11 @@
cursor_->MoveCursor(gfx::Vector2dF(move->dx, move->dy));
// TODO(spang): Use move->ordinal_dx, move->ordinal_dy
// TODO(spang): Use move->start_time, move->end_time
- MouseEvent event(ET_MOUSE_MOVED,
- cursor_->location(),
- cursor_->location(),
- modifiers_->GetModifierFlags(),
- /* changed_button_flags */ 0);
- Dispatch(&event);
+ Dispatch(make_scoped_ptr(new MouseEvent(ET_MOUSE_MOVED,
+ cursor_->location(),
+ cursor_->location(),
+ modifiers_->GetModifierFlags(),
+ /* changed_button_flags */ 0)));
}
void GestureInterpreterLibevdevCros::OnGestureScroll(
@@ -241,16 +270,15 @@
// TODO(spang): Support SetNaturalScroll
// TODO(spang): Use scroll->start_time
- ScrollEvent event(ET_SCROLL,
- cursor_->location(),
- StimeToTimedelta(gesture->end_time),
- modifiers_->GetModifierFlags(),
- scroll->dx,
- scroll->dy,
- scroll->ordinal_dx,
- scroll->ordinal_dy,
- kGestureScrollFingerCount);
- Dispatch(&event);
+ Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL,
+ cursor_->location(),
+ StimeToTimedelta(gesture->end_time),
+ modifiers_->GetModifierFlags(),
+ scroll->dx,
+ scroll->dy,
+ scroll->ordinal_dx,
+ scroll->ordinal_dy,
+ kGestureScrollFingerCount)));
}
void GestureInterpreterLibevdevCros::OnGestureButtonsChange(
@@ -309,16 +337,15 @@
: ET_SCROLL_FLING_CANCEL);
// Fling is like 2-finger scrolling but with velocity instead of displacement.
- ScrollEvent event(type,
- cursor_->location(),
- StimeToTimedelta(gesture->end_time),
- modifiers_->GetModifierFlags(),
- fling->vx,
- fling->vy,
- fling->ordinal_vx,
- fling->ordinal_vy,
- kGestureScrollFingerCount);
- Dispatch(&event);
+ Dispatch(make_scoped_ptr(new ScrollEvent(type,
+ cursor_->location(),
+ StimeToTimedelta(gesture->end_time),
+ modifiers_->GetModifierFlags(),
+ fling->vx,
+ fling->vy,
+ fling->ordinal_vx,
+ fling->ordinal_vy,
+ kGestureScrollFingerCount)));
}
void GestureInterpreterLibevdevCros::OnGestureSwipe(const Gesture* gesture,
@@ -333,16 +360,15 @@
return; // No cursor!
// Swipe is 3-finger scrolling.
- ScrollEvent event(ET_SCROLL,
- cursor_->location(),
- StimeToTimedelta(gesture->end_time),
- modifiers_->GetModifierFlags(),
- swipe->dx,
- swipe->dy,
- swipe->ordinal_dx,
- swipe->ordinal_dy,
- kGestureSwipeFingerCount);
- Dispatch(&event);
+ Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL,
+ cursor_->location(),
+ StimeToTimedelta(gesture->end_time),
+ modifiers_->GetModifierFlags(),
+ swipe->dx,
+ swipe->dy,
+ swipe->ordinal_dx,
+ swipe->ordinal_dy,
+ kGestureSwipeFingerCount)));
}
void GestureInterpreterLibevdevCros::OnGestureSwipeLift(
@@ -356,17 +382,15 @@
// Turn a swipe lift into a fling start.
// TODO(spang): Figure out why and put it in this comment.
- ScrollEvent event(ET_SCROLL_FLING_START,
- cursor_->location(),
- StimeToTimedelta(gesture->end_time),
- modifiers_->GetModifierFlags(),
- /* x_offset */ 0,
- /* y_offset */ 0,
- /* x_offset_ordinal */ 0,
- /* y_offset_ordinal */ 0,
- kGestureScrollFingerCount);
- Dispatch(&event);
-
+ Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL_FLING_START,
+ cursor_->location(),
+ StimeToTimedelta(gesture->end_time),
+ modifiers_->GetModifierFlags(),
+ /* x_offset */ 0,
+ /* y_offset */ 0,
+ /* x_offset_ordinal */ 0,
+ /* y_offset_ordinal */ 0,
+ kGestureScrollFingerCount)));
}
void GestureInterpreterLibevdevCros::OnGesturePinch(const Gesture* gesture,
@@ -390,8 +414,8 @@
NOTIMPLEMENTED();
}
-void GestureInterpreterLibevdevCros::Dispatch(Event* event) {
- dispatch_callback_.Run(event);
+void GestureInterpreterLibevdevCros::Dispatch(scoped_ptr<Event> event) {
+ dispatch_callback_.Run(event.Pass());
}
void GestureInterpreterLibevdevCros::DispatchMouseButton(unsigned int modifier,
@@ -400,8 +424,8 @@
int flag = modifiers_->GetEventFlagFromModifier(modifier);
EventType type = (down ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED);
modifiers_->UpdateModifier(modifier, down);
- MouseEvent event(type, loc, loc, modifiers_->GetModifierFlags() | flag, flag);
- Dispatch(&event);
+ Dispatch(make_scoped_ptr(new MouseEvent(
+ type, loc, loc, modifiers_->GetModifierFlags() | flag, flag)));
}
void GestureInterpreterLibevdevCros::DispatchChangedKeys(Evdev* evdev,
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
index a0863bf..9d89d0a 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
@@ -22,6 +22,8 @@
class EventModifiersEvdev;
class CursorDelegateEvdev;
class KeyboardEvdev;
+class GestureDeviceProperties;
+class GesturePropertyProvider;
// Convert libevdev-cros events to ui::Events using libgestures.
//
@@ -39,9 +41,11 @@
class EVENTS_OZONE_EVDEV_EXPORT GestureInterpreterLibevdevCros
: public EventReaderLibevdevCros::Delegate {
public:
- GestureInterpreterLibevdevCros(EventModifiersEvdev* modifiers,
+ GestureInterpreterLibevdevCros(int id,
+ EventModifiersEvdev* modifiers,
CursorDelegateEvdev* cursor,
KeyboardEvdev* keyboard,
+ GesturePropertyProvider* property_provider,
const EventDispatchCallback& callback);
virtual ~GestureInterpreterLibevdevCros();
@@ -55,6 +59,11 @@
// Handler for gesture events generated from libgestures.
void OnGestureReady(const Gesture* gesture);
+ // Accessors.
+ int id() { return id_; }
+ GesturePropertyProvider* property_provider() { return property_provider_; }
+ Evdev* evdev() { return evdev_; }
+
private:
void OnGestureMove(const Gesture* gesture, const GestureMove* move);
void OnGestureScroll(const Gesture* gesture, const GestureScroll* move);
@@ -68,10 +77,13 @@
void OnGesturePinch(const Gesture* gesture, const GesturePinch* pinch);
void OnGestureMetrics(const Gesture* gesture, const GestureMetrics* metrics);
- void Dispatch(Event* event);
+ void Dispatch(scoped_ptr<Event> event);
void DispatchMouseButton(unsigned int modifier, bool down);
void DispatchChangedKeys(Evdev* evdev, const timeval& time);
+ // The unique device id.
+ int id_;
+
// Shared modifier state.
EventModifiersEvdev* modifiers_;
@@ -81,6 +93,9 @@
// Shared keyboard state.
KeyboardEvdev* keyboard_;
+ // Shared gesture property provider.
+ GesturePropertyProvider* property_provider_;
+
// Callback for dispatching events.
EventDispatchCallback dispatch_callback_;
@@ -90,6 +105,12 @@
// Last key state from libevdev.
unsigned long prev_key_state_[EVDEV_BITS_TO_LONGS(KEY_CNT)];
+ // Device pointer.
+ Evdev* evdev_;
+
+ // Gesture lib device properties.
+ scoped_ptr<GestureDeviceProperties> device_properties_;
+
DISALLOW_COPY_AND_ASSIGN(GestureInterpreterLibevdevCros);
};
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
new file mode 100644
index 0000000..1c2a1aa
--- /dev/null
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
@@ -0,0 +1,1525 @@
+// Copyright 2014 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 "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
+
+#include <gestures/gestures.h>
+#include <libevdev/libevdev.h>
+
+#include <fnmatch.h>
+#include <stdint.h>
+#include <string.h>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
+#include "base/files/file_enumerator.h"
+#include "base/files/file_util.h"
+#include "base/logging.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
+#include "base/strings/string_tokenizer.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringize_macros.h"
+#include "base/strings/stringprintf.h"
+#include "ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h"
+
+// Severity level for general info logging purpose.
+#define GPROP_LOG DVLOG
+#define INFO_SEVERITY 1
+
+/* Implementation of GesturesProp declared in gestures.h
+ *
+ * libgestures requires that this be in the top level namespace.
+ * */
+class GesturesProp {
+ public:
+ typedef ui::GesturePropertyProvider::PropertyType PropertyType;
+
+ GesturesProp(const std::string& name,
+ const PropertyType type,
+ const size_t count)
+ : name_(name),
+ type_(type),
+ count_(count),
+ get_(NULL),
+ set_(NULL),
+ handler_data_(NULL) {}
+ virtual ~GesturesProp() {}
+
+ // Variant-ish interfaces for accessing the property value. Each type of
+ // property should override the corresponding interfaces for it.
+ virtual std::vector<int> GetIntValue() const {
+ NOTREACHED();
+ return std::vector<int>();
+ }
+ virtual bool SetIntValue(const std::vector<int>& value) {
+ NOTREACHED();
+ return false;
+ }
+ virtual std::vector<int16_t> GetShortValue() const {
+ NOTREACHED();
+ return std::vector<int16_t>();
+ }
+ virtual bool SetShortValue(const std::vector<int16_t>& value) {
+ NOTREACHED();
+ return false;
+ }
+ virtual std::vector<bool> GetBoolValue() const {
+ NOTREACHED();
+ return std::vector<bool>();
+ }
+ virtual bool SetBoolValue(const std::vector<bool>& value) {
+ NOTREACHED();
+ return false;
+ }
+ virtual std::string GetStringValue() const {
+ NOTREACHED();
+ return std::string();
+ }
+ virtual bool SetStringValue(const std::string& value) {
+ NOTREACHED();
+ return false;
+ }
+ virtual std::vector<double> GetDoubleValue() const {
+ NOTREACHED();
+ return std::vector<double>();
+ }
+ virtual bool SetDoubleValue(const std::vector<double>& value) {
+ NOTREACHED();
+ return false;
+ }
+
+ // Set property access handlers.
+ void SetHandlers(GesturesPropGetHandler get,
+ GesturesPropSetHandler set,
+ void* data) {
+ get_ = get;
+ set_ = set;
+ handler_data_ = data;
+ }
+
+ // Accessors.
+ const std::string& name() const { return name_; }
+ PropertyType type() const { return type_; }
+ size_t count() const { return count_; }
+ virtual bool IsReadOnly() const = 0;
+
+ protected:
+ void OnGet() const {
+ // We don't have the X server now so there is currently nothing to do when
+ // the get handler returns true.
+ // TODO(sheckylin): Re-visit this if we use handlers that modifies the
+ // property.
+ if (get_)
+ get_(handler_data_);
+ }
+
+ void OnSet() const {
+ // Call the property set handler if available.
+ if (set_)
+ set_(handler_data_);
+ }
+
+ private:
+ // For logging purpose.
+ friend std::ostream& operator<<(std::ostream& os,
+ const GesturesProp& property);
+
+ // Interfaces for getting internal pointers and stuff.
+ virtual const char** GetStringWritebackPtr() const {
+ NOTREACHED();
+ return NULL;
+ }
+ virtual bool IsAllocated() const {
+ NOTREACHED();
+ return false;
+ }
+
+ // Property name, type and number of elements.
+ std::string name_;
+ PropertyType type_;
+ size_t count_;
+
+ // Handler function pointers and the data to be passed to them when the
+ // property is accessed.
+ GesturesPropGetHandler get_;
+ GesturesPropSetHandler set_;
+ void* handler_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(GesturesProp);
+};
+
+template <typename T>
+class TypedGesturesProp : public GesturesProp {
+ public:
+ TypedGesturesProp(const std::string& name,
+ const PropertyType type,
+ const size_t count,
+ T* value)
+ : GesturesProp(name, type, count),
+ value_(value),
+ is_read_only_(false),
+ is_allocated_(false) {
+ Init();
+ }
+ virtual ~TypedGesturesProp() override {
+ if (is_allocated_)
+ delete[] value_;
+ }
+
+ // Accessors.
+ virtual bool IsReadOnly() const override { return is_read_only_; }
+
+ protected:
+ // Functions for setting/getting numerical properties.
+ //
+ // These two functions calls the set/get handler and should only be used in
+ // Get*Value/Set*Value functions.
+ template <typename U>
+ std::vector<U> GetNumericalPropertyValue() const {
+ // Nothing should be modified so it is OK to call the get handler first.
+ OnGet();
+ return this->template GetNumericalValue<U>();
+ }
+
+ template <typename U>
+ bool SetNumericalPropertyValue(const std::vector<U>& value) {
+ // Set the value only if not read-only and the vector size matches.
+ //
+ // As per the legacy guideline, all read-only properties (created with NULL)
+ // can't be modified. If we want to change this in the future, re-think
+ // about the different cases here (e.g., should we allow setting an array
+ // value of different size?).
+ if (is_read_only_ || value.size() != count())
+ return false;
+ bool ret = this->template SetNumericalValue(value);
+ OnSet();
+ return ret;
+ }
+
+ // Initialize a numerical property's value. Note that a (numerical) default
+ // property's value is always stored in double.
+ void InitializeNumericalProperty(const T* init,
+ const GesturesProp* default_property) {
+ if (IsDefaultPropertyUsable(default_property)) {
+ GPROP_LOG(INFO_SEVERITY) << "Default property found. Using its value ...";
+ this->template SetNumericalValue(default_property->GetDoubleValue());
+ } else {
+ // To work with the interface exposed by the gesture lib, we have no
+ // choice but to trust that the init array has sufficient size.
+ std::vector<T> temp(init, init + count());
+ this->template SetNumericalValue(temp);
+ }
+ }
+
+ // Data pointer.
+ T* value_;
+
+ // If the flag is on, it means the GesturesProp is created by passing a NULL
+ // data pointer to the creator functions. We define the property as a
+ // read-only one and that no value change will be allowed for it. Note that
+ // the flag is different from is_allocated in that StringProperty will always
+ // allocate no matter it is created with NULL or not.
+ bool is_read_only_;
+
+ private:
+ // Initialize the object.
+ void Init() {
+ // If no external data pointer is passed, we have to create our own.
+ if (!value_) {
+ value_ = new T[GesturesProp::count()];
+ is_read_only_ = true;
+ is_allocated_ = true;
+ }
+ }
+
+ // Low-level functions for setting/getting numerical properties.
+ template <typename U>
+ std::vector<U> GetNumericalValue() const {
+ // We do type-casting because the numerical types may not totally match.
+ // For example, we store bool as GesturesPropBool to be compatible with the
+ // gesture library. Also, all parsed xorg-conf property values are stored
+ // as double because we can't identify their original type lexically.
+ // TODO(sheckylin): Handle value out-of-range (e.g., double to int).
+ std::vector<U> result(count());
+ for (size_t i = 0; i < count(); ++i)
+ result[i] = static_cast<U>(value_[i]);
+ return result;
+ }
+
+ template <typename U>
+ bool SetNumericalValue(const std::vector<U>& value) {
+ for (size_t i = 0; i < count(); ++i)
+ value_[i] = static_cast<T>(value[i]);
+ return true;
+ }
+
+ // Check if a default property usable for (numerical) initialization.
+ bool IsDefaultPropertyUsable(const GesturesProp* default_property) const {
+ // We currently assumed that we won't specify any array property in the
+ // configuration files. The code needs to be updated if the assumption
+ // becomes invalid in the future.
+ return (count() == 1 && default_property &&
+ default_property->type() != PropertyType::PT_STRING);
+ }
+
+ // Accessors.
+ virtual bool IsAllocated() const override { return is_allocated_; }
+
+ // If the flag is on, it means the memory that the data pointer points to is
+ // allocated here. We will need to free the memory by ourselves when the
+ // GesturesProp is destroyed.
+ bool is_allocated_;
+};
+
+class GesturesIntProp : public TypedGesturesProp<int> {
+ public:
+ GesturesIntProp(const std::string& name,
+ const size_t count,
+ int* value,
+ const int* init,
+ const GesturesProp* default_property)
+ : TypedGesturesProp<int>(name, PropertyType::PT_INT, count, value) {
+ InitializeNumericalProperty(init, default_property);
+ }
+ virtual std::vector<int> GetIntValue() const override {
+ return this->template GetNumericalPropertyValue<int>();
+ }
+ virtual bool SetIntValue(const std::vector<int>& value) override {
+ return this->template SetNumericalPropertyValue(value);
+ }
+};
+
+class GesturesShortProp : public TypedGesturesProp<short> {
+ public:
+ GesturesShortProp(const std::string& name,
+ const size_t count,
+ short* value,
+ const short* init,
+ const GesturesProp* default_property)
+ : TypedGesturesProp<short>(name, PropertyType::PT_SHORT, count, value) {
+ InitializeNumericalProperty(init, default_property);
+ }
+ virtual std::vector<int16_t> GetShortValue() const override {
+ return this->template GetNumericalPropertyValue<int16_t>();
+ }
+ virtual bool SetShortValue(const std::vector<int16_t>& value) override {
+ return this->template SetNumericalPropertyValue(value);
+ }
+};
+
+class GesturesBoolProp : public TypedGesturesProp<GesturesPropBool> {
+ public:
+ GesturesBoolProp(const std::string& name,
+ const size_t count,
+ GesturesPropBool* value,
+ const GesturesPropBool* init,
+ const GesturesProp* default_property)
+ : TypedGesturesProp<GesturesPropBool>(name,
+ PropertyType::PT_BOOL,
+ count,
+ value) {
+ InitializeNumericalProperty(init, default_property);
+ }
+ virtual std::vector<bool> GetBoolValue() const override {
+ return this->template GetNumericalPropertyValue<bool>();
+ }
+ virtual bool SetBoolValue(const std::vector<bool>& value) override {
+ return this->template SetNumericalPropertyValue(value);
+ }
+};
+
+class GesturesDoubleProp : public TypedGesturesProp<double> {
+ public:
+ GesturesDoubleProp(const std::string& name,
+ const size_t count,
+ double* value,
+ const double* init,
+ const GesturesProp* default_property)
+ : TypedGesturesProp<double>(name, PropertyType::PT_REAL, count, value) {
+ InitializeNumericalProperty(init, default_property);
+ }
+ virtual std::vector<double> GetDoubleValue() const override {
+ return this->template GetNumericalPropertyValue<double>();
+ }
+ virtual bool SetDoubleValue(const std::vector<double>& value) override {
+ return this->template SetNumericalPropertyValue(value);
+ }
+};
+
+class GesturesStringProp : public TypedGesturesProp<std::string> {
+ public:
+ // StringProperty's memory is always allocated on this side instead of
+ // externally in the gesture lib as the original one will be destroyed right
+ // after the constructor call (check the design of StringProperty). To do
+ // this, we call the TypedGesturesProp constructor with NULL pointer so that
+ // it always allocates.
+ GesturesStringProp(const std::string& name,
+ const char** value,
+ const char* init,
+ const GesturesProp* default_property)
+ : TypedGesturesProp<std::string>(name, PropertyType::PT_STRING, 1, NULL),
+ write_back_(NULL) {
+ InitializeStringProperty(value, init, default_property);
+ }
+ virtual std::string GetStringValue() const override {
+ OnGet();
+ return *value_;
+ }
+ virtual bool SetStringValue(const std::string& value) override {
+ if (is_read_only_)
+ return false;
+ *value_ = value;
+
+ // Write back the pointer in case it may change (e.g., string
+ // re-allocation).
+ if (write_back_)
+ *(write_back_) = value_->c_str();
+ OnSet();
+ return true;
+ }
+
+ private:
+ // Initialize the object.
+ void InitializeStringProperty(const char** value,
+ const char* init,
+ const GesturesProp* default_property) {
+ // Initialize the property value similar to the numerical types.
+ if (IsDefaultPropertyUsable(default_property)) {
+ GPROP_LOG(INFO_SEVERITY) << "Default property found. Using its value ...";
+ *value_ = default_property->GetStringValue();
+ } else {
+ *value_ = init;
+ }
+
+ // If the provided pointer is not NULL, replace its content
+ // (val_ of StringProperty) with the address of our allocated string.
+ // Note that we don't have to do this for the other data types as they will
+ // use the original data pointer if possible and it is unnecessary to do so
+ // if the pointer is NULL.
+ if (value) {
+ *value = value_->c_str();
+ write_back_ = value;
+ // Set the read-only flag back to false.
+ is_read_only_ = false;
+ }
+ }
+
+ // Re-write the function with different criteria as we want string properties
+ // now.
+ bool IsDefaultPropertyUsable(const GesturesProp* default_property) const {
+ return (default_property &&
+ default_property->type() == PropertyType::PT_STRING);
+ }
+
+ virtual const char** GetStringWritebackPtr() const override {
+ return write_back_;
+ }
+
+ // In some cases, we don't directly use the data pointer provided by the
+ // creators due to its limitation and instead use our own types (e.g., in
+ // the case of string). We thus need to store the write back pointer so that
+ // we can update the value in the gesture lib if the property value gets
+ // changed.
+ const char** write_back_;
+};
+
+// Anonymous namespace for utility functions and internal constants.
+namespace {
+
+// The path that we will look for conf files.
+const char kConfigurationFilePath[] = "/etc/gesture";
+
+// We support only match types that have already been used. One should change
+// this if we start using new types in the future. Note that most unsupported
+// match types are either useless in CrOS or inapplicable to the non-X
+// environment.
+const char* kSupportedMatchTypes[] = {"MatchProduct",
+ "MatchDevicePath",
+ "MatchUSBID",
+ "MatchIsPointer",
+ "MatchIsTouchpad",
+ "MatchIsTouchscreen"};
+const char* kUnsupportedMatchTypes[] = {"MatchVendor",
+ "MatchOS",
+ "MatchPnPID",
+ "MatchDriver",
+ "MatchTag",
+ "MatchLayout",
+ "MatchIsKeyboard",
+ "MatchIsJoystick",
+ "MatchIsTablet"};
+
+// Special keywords for boolean values.
+const char* kTrue[] = {"on", "true", "yes"};
+const char* kFalse[] = {"off", "false", "no"};
+
+// Check if a device falls into one device type category.
+bool IsDeviceOfType(const ui::GesturePropertyProvider::DevicePtr device,
+ const ui::GesturePropertyProvider::DeviceType type) {
+ EvdevClass evdev_class = device->info.evdev_class;
+ switch (type) {
+ case ui::GesturePropertyProvider::DT_MOUSE:
+ return (evdev_class == EvdevClassMouse ||
+ evdev_class == EvdevClassMultitouchMouse);
+ break;
+ case ui::GesturePropertyProvider::DT_TOUCHPAD:
+ // Note that the behavior here is different from the inputcontrol script
+ // which actually returns touchscreen devices as well.
+ return (evdev_class == EvdevClassTouchpad);
+ break;
+ case ui::GesturePropertyProvider::DT_TOUCHSCREEN:
+ return (evdev_class == EvdevClassTouchscreen);
+ break;
+ case ui::GesturePropertyProvider::DT_MULTITOUCH:
+ return (evdev_class == EvdevClassTouchpad ||
+ evdev_class == EvdevClassTouchscreen ||
+ evdev_class == EvdevClassMultitouchMouse);
+ break;
+ case ui::GesturePropertyProvider::DT_MULTITOUCH_MOUSE:
+ return (evdev_class == EvdevClassMultitouchMouse);
+ break;
+ case ui::GesturePropertyProvider::DT_ALL:
+ return true;
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+ return false;
+}
+
+// Trick to get the device path from a file descriptor.
+std::string GetDeviceNodePath(
+ const ui::GesturePropertyProvider::DevicePtr device) {
+ std::string proc_symlink = "/proc/self/fd/" + base::IntToString(device->fd);
+ base::FilePath path;
+ if (!base::ReadSymbolicLink(base::FilePath(proc_symlink), &path))
+ return std::string();
+ return path.value();
+}
+
+// Check if a match criteria is currently implemented. Note that we didn't
+// implemented all of them as some are inapplicable in the non-X world.
+bool IsMatchTypeSupported(const std::string& match_type) {
+ for (size_t i = 0; i < arraysize(kSupportedMatchTypes); ++i)
+ if (match_type == kSupportedMatchTypes[i])
+ return true;
+ for (size_t i = 0; i < arraysize(kUnsupportedMatchTypes); ++i) {
+ if (match_type == kUnsupportedMatchTypes[i]) {
+ LOG(ERROR) << "Unsupported gestures input class match type: "
+ << match_type;
+ return false;
+ }
+ }
+ return false;
+}
+
+// Check if a match criteria is a device type one.
+bool IsMatchDeviceType(const std::string& match_type) {
+ return StartsWithASCII(match_type, "MatchIs", true);
+}
+
+// Parse a boolean value keyword (e.g., on/off, true/false).
+int ParseBooleanKeyword(const std::string& value) {
+ for (size_t i = 0; i < arraysize(kTrue); ++i)
+ if (LowerCaseEqualsASCII(value, kTrue[i]))
+ return 1;
+ for (size_t i = 0; i < arraysize(kFalse); ++i)
+ if (LowerCaseEqualsASCII(value, kFalse[i]))
+ return -1;
+ return 0;
+}
+
+// Log the value of an array property.
+template <typename T>
+void LogArrayProperty(std::ostream& os, const std::vector<T>& value) {
+ os << "(";
+ for (size_t i = 0; i < value.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << value[i];
+ }
+ os << ")";
+}
+
+// Property type logging function.
+std::ostream& operator<<(std::ostream& out,
+ const ui::GesturePropertyProvider::PropertyType type) {
+ std::string s;
+#define TYPE_CASE(TYPE) \
+ case (ui::GesturePropertyProvider::TYPE): \
+ s = #TYPE; \
+ break;
+ switch (type) {
+ TYPE_CASE(PT_INT);
+ TYPE_CASE(PT_SHORT);
+ TYPE_CASE(PT_BOOL);
+ TYPE_CASE(PT_STRING);
+ TYPE_CASE(PT_REAL);
+ default:
+ NOTREACHED();
+ break;
+ }
+#undef TYPE_CASE
+ return out << s;
+}
+
+} // namespace
+
+// GesturesProp logging function.
+std::ostream& operator<<(std::ostream& os, const GesturesProp& prop) {
+ const GesturesProp* property = ∝
+
+ // Output the property content.
+ os << "\"" << property->name() << "\", " << property->type() << ", "
+ << property->count() << ", (" << property->IsAllocated() << ", "
+ << property->IsReadOnly() << "), ";
+
+ // Only the string property has the write back pointer.
+ if (property->type() == ui::GesturePropertyProvider::PT_STRING)
+ os << property->GetStringWritebackPtr();
+ else
+ os << "NULL";
+
+ // Output the property values.
+ os << ", ";
+ switch (property->type()) {
+ case ui::GesturePropertyProvider::PT_INT:
+ LogArrayProperty(os, property->GetIntValue());
+ break;
+ case ui::GesturePropertyProvider::PT_SHORT:
+ LogArrayProperty(os, property->GetShortValue());
+ break;
+ case ui::GesturePropertyProvider::PT_BOOL:
+ LogArrayProperty(os, property->GetBoolValue());
+ break;
+ case ui::GesturePropertyProvider::PT_STRING:
+ os << "\"" << property->GetStringValue() << "\"";
+ break;
+ case ui::GesturePropertyProvider::PT_REAL:
+ LogArrayProperty(os, property->GetDoubleValue());
+ break;
+ default:
+ LOG(ERROR) << "Unknown gesture property type: " << property->type();
+ NOTREACHED();
+ break;
+ }
+ return os;
+}
+
+namespace ui {
+namespace internal {
+
+// Mapping table from a property name to its corresponding GesturesProp
+// object pointer.
+typedef base::hash_map<std::string, GesturesProp*> PropertiesMap;
+typedef base::ScopedPtrHashMap<std::string, GesturesProp> ScopedPropertiesMap;
+
+// Struct holding properties of a device.
+//
+// Note that we can't define it in GesturePropertyProvider as a nested class
+// because ScopedPtrHashMap will require us to expose the GestureProp's
+// destructor so that it can instantiate the object. This is something we
+// don't want to do.
+struct GestureDevicePropertyData {
+ GestureDevicePropertyData() {}
+
+ // Properties owned and being used by the device.
+ ScopedPropertiesMap properties;
+
+ // Unowned default properties (owned by the configuration file). Their values
+ // will be applied when a property of the same name is created. These are
+ // usually only a small portion of all properties in use.
+ PropertiesMap default_properties;
+};
+
+// Base class for device match criterias in conf files.
+// Check the xorg-conf spec for more detailed information.
+class MatchCriteria {
+ public:
+ typedef ui::GesturePropertyProvider::DevicePtr DevicePtr;
+ explicit MatchCriteria(const std::string& arg);
+ virtual ~MatchCriteria() {}
+ virtual bool Match(const DevicePtr device) = 0;
+
+ protected:
+ std::vector<std::string> args_;
+};
+
+// Match a device based on its evdev name string.
+class MatchProduct : public MatchCriteria {
+ public:
+ explicit MatchProduct(const std::string& arg);
+ virtual ~MatchProduct() {}
+ virtual bool Match(const DevicePtr device);
+};
+
+// Math a device based on its device node path.
+class MatchDevicePath : public MatchCriteria {
+ public:
+ explicit MatchDevicePath(const std::string& arg);
+ virtual ~MatchDevicePath() {}
+ virtual bool Match(const DevicePtr device);
+};
+
+// Math a USB device based on its USB vid and pid.
+// Mostly used for external mice and touchpads.
+class MatchUSBID : public MatchCriteria {
+ public:
+ explicit MatchUSBID(const std::string& arg);
+ virtual ~MatchUSBID() {}
+ virtual bool Match(const DevicePtr device);
+
+ private:
+ bool IsValidPattern(const std::string& pattern);
+ std::vector<std::string> vid_patterns_;
+ std::vector<std::string> pid_patterns_;
+};
+
+// Generic base class for device type math criteria.
+class MatchDeviceType : public MatchCriteria {
+ public:
+ explicit MatchDeviceType(const std::string& arg);
+ virtual ~MatchDeviceType() {}
+ virtual bool Match(const DevicePtr device) = 0;
+
+ protected:
+ bool value_;
+ bool is_valid_;
+};
+
+// Check if a device is a pointer device.
+class MatchIsPointer : public MatchDeviceType {
+ public:
+ explicit MatchIsPointer(const std::string& arg);
+ virtual ~MatchIsPointer() {}
+ virtual bool Match(const DevicePtr device);
+};
+
+// Check if a device is a touchpad.
+class MatchIsTouchpad : public MatchDeviceType {
+ public:
+ explicit MatchIsTouchpad(const std::string& arg);
+ virtual ~MatchIsTouchpad() {}
+ virtual bool Match(const DevicePtr device);
+};
+
+// Check if a device is a touchscreen.
+class MatchIsTouchscreen : public MatchDeviceType {
+ public:
+ explicit MatchIsTouchscreen(const std::string& arg);
+ virtual ~MatchIsTouchscreen() {}
+ virtual bool Match(const DevicePtr device);
+};
+
+// Struct for sections in xorg conf files.
+struct ConfigurationSection {
+ typedef ui::GesturePropertyProvider::DevicePtr DevicePtr;
+ ConfigurationSection() {}
+ bool Match(const DevicePtr device);
+ std::string identifier;
+ ScopedVector<MatchCriteria> criterias;
+ ScopedVector<GesturesProp> properties;
+};
+
+MatchCriteria::MatchCriteria(const std::string& arg) {
+ // TODO(sheckylin): Should we trim all tokens here?
+ Tokenize(arg, "|", &args_);
+ if (args_.empty()) {
+ LOG(ERROR) << "Empty match pattern found, will evaluate to the default "
+ "value (true): \"" << arg << "\"";
+ }
+}
+
+MatchProduct::MatchProduct(const std::string& arg) : MatchCriteria(arg) {
+}
+
+bool MatchProduct::Match(const DevicePtr device) {
+ if (args_.empty())
+ return true;
+ std::string name(device->info.name);
+ for (size_t i = 0; i < args_.size(); ++i)
+ if (name.find(args_[i]) != std::string::npos)
+ return true;
+ return false;
+}
+
+MatchDevicePath::MatchDevicePath(const std::string& arg) : MatchCriteria(arg) {
+}
+
+bool MatchDevicePath::Match(const DevicePtr device) {
+ if (args_.empty())
+ return true;
+
+ // Check if the device path matches any pattern.
+ std::string path = GetDeviceNodePath(device);
+ if (path.empty())
+ return false;
+ for (size_t i = 0; i < args_.size(); ++i)
+ if (fnmatch(args_[i].c_str(), path.c_str(), FNM_NOESCAPE) == 0)
+ return true;
+ return false;
+}
+
+MatchUSBID::MatchUSBID(const std::string& arg) : MatchCriteria(arg) {
+ // Check each pattern and split valid ones into vids and pids.
+ for (size_t i = 0; i < args_.size(); ++i) {
+ if (!IsValidPattern(args_[i])) {
+ LOG(ERROR) << "Invalid USB ID: " << args_[i];
+ continue;
+ }
+ std::vector<std::string> tokens;
+ base::SplitString(args_[i], ':', &tokens);
+ vid_patterns_.push_back(base::StringToLowerASCII(tokens[0]));
+ pid_patterns_.push_back(base::StringToLowerASCII(tokens[1]));
+ }
+ if (vid_patterns_.empty()) {
+ LOG(ERROR) << "No valid USB ID pattern found, will be ignored: \"" << arg
+ << "\"";
+ }
+}
+
+bool MatchUSBID::Match(const DevicePtr device) {
+ if (vid_patterns_.empty())
+ return true;
+ std::string vid = base::StringPrintf("%04x", device->info.id.vendor);
+ std::string pid = base::StringPrintf("%04x", device->info.id.product);
+ for (size_t i = 0; i < vid_patterns_.size(); ++i) {
+ if (fnmatch(vid_patterns_[i].c_str(), vid.c_str(), FNM_NOESCAPE) == 0 &&
+ fnmatch(pid_patterns_[i].c_str(), pid.c_str(), FNM_NOESCAPE) == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool MatchUSBID::IsValidPattern(const std::string& pattern) {
+ // Each USB id should be in the lsusb format, i.e., xxxx:xxxx. We choose to do
+ // a lazy check here: if the pattern contains wrong characters not in the hex
+ // number range, it won't be matched anyway.
+ int number_of_colons = 0;
+ size_t pos_of_colon = 0;
+ for (size_t i = 0; i < pattern.size(); ++i)
+ if (pattern[i] == ':')
+ ++number_of_colons, pos_of_colon = i;
+ return (number_of_colons == 1) && (pos_of_colon != 0) &&
+ (pos_of_colon != pattern.size() - 1);
+}
+
+MatchDeviceType::MatchDeviceType(const std::string& arg)
+ : MatchCriteria(arg), value_(true), is_valid_(false) {
+ // Default value of a match criteria is true.
+ if (args_.empty())
+ args_.push_back("on");
+
+ // We care only about the first argument.
+ int value = ParseBooleanKeyword(args_[0]);
+ if (value) {
+ is_valid_ = true;
+ value_ = value > 0;
+ }
+ if (!is_valid_) {
+ LOG(ERROR)
+ << "No valid device class boolean keyword found, will be ignored: \""
+ << arg << "\"";
+ }
+}
+
+MatchIsPointer::MatchIsPointer(const std::string& arg) : MatchDeviceType(arg) {
+}
+
+bool MatchIsPointer::Match(const DevicePtr device) {
+ if (!is_valid_)
+ return true;
+ return (value_ == (device->info.evdev_class == EvdevClassMouse ||
+ device->info.evdev_class == EvdevClassMultitouchMouse));
+}
+
+MatchIsTouchpad::MatchIsTouchpad(const std::string& arg)
+ : MatchDeviceType(arg) {
+}
+
+bool MatchIsTouchpad::Match(const DevicePtr device) {
+ if (!is_valid_)
+ return true;
+ return (value_ == (device->info.evdev_class == EvdevClassTouchpad));
+}
+
+MatchIsTouchscreen::MatchIsTouchscreen(const std::string& arg)
+ : MatchDeviceType(arg) {
+}
+
+bool MatchIsTouchscreen::Match(const DevicePtr device) {
+ if (!is_valid_)
+ return true;
+ return (value_ == (device->info.evdev_class == EvdevClassTouchscreen));
+}
+
+bool ConfigurationSection::Match(DevicePtr device) {
+ for (size_t i = 0; i < criterias.size(); ++i)
+ if (!criterias[i]->Match(device))
+ return false;
+ return true;
+}
+
+} // namespace internal
+
+GesturePropertyProvider::GesturePropertyProvider() {
+ LoadDeviceConfigurations();
+}
+
+GesturePropertyProvider::~GesturePropertyProvider() {
+}
+
+void GesturePropertyProvider::GetDeviceIdsByType(
+ const DeviceType type,
+ std::vector<DeviceId>* device_ids) {
+ device_ids->clear();
+ DeviceMap::const_iterator it = device_map_.begin();
+ for (; it != device_map_.end(); ++it)
+ if (IsDeviceOfType(it->second, type))
+ device_ids->push_back(it->first);
+}
+
+GesturesProp* GesturePropertyProvider::GetProperty(const DeviceId device_id,
+ const std::string& name) {
+ return FindProperty(device_id, name);
+}
+
+void GesturePropertyProvider::RegisterDevice(const DeviceId id,
+ const DevicePtr device) {
+ DeviceMap::const_iterator it = device_map_.find(id);
+ if (it != device_map_.end())
+ return;
+
+ // Setup data-structures.
+ device_map_[id] = device;
+ device_data_map_.set(id,
+ scoped_ptr<internal::GestureDevicePropertyData>(
+ new internal::GestureDevicePropertyData));
+
+ // Gather default property values for the device from the parsed conf files.
+ SetupDefaultProperties(id, device);
+ return;
+}
+
+void GesturePropertyProvider::UnregisterDevice(const DeviceId id) {
+ DeviceMap::const_iterator it = device_map_.find(id);
+ if (it == device_map_.end())
+ return;
+ device_data_map_.erase(id);
+ device_map_.erase(it);
+}
+
+void GesturePropertyProvider::AddProperty(const DeviceId device_id,
+ const std::string& name,
+ GesturesProp* property) {
+ // The look-up should never fail because ideally a property can only be
+ // created with GesturesPropCreate* functions from the gesture lib side.
+ // Therefore, we simply return on failure.
+ internal::GestureDevicePropertyData* device_data =
+ device_data_map_.get(device_id);
+ if (device_data)
+ device_data->properties.set(name, scoped_ptr<GesturesProp>(property));
+}
+
+void GesturePropertyProvider::DeleteProperty(const DeviceId device_id,
+ const std::string& name) {
+ internal::GestureDevicePropertyData* device_data =
+ device_data_map_.get(device_id);
+ if (device_data)
+ device_data->properties.erase(name);
+}
+
+GesturesProp* GesturePropertyProvider::FindProperty(const DeviceId device_id,
+ const std::string& name) {
+ internal::GestureDevicePropertyData* device_data =
+ device_data_map_.get(device_id);
+ if (!device_data)
+ return NULL;
+ return device_data->properties.get(name);
+}
+
+GesturesProp* GesturePropertyProvider::GetDefaultProperty(
+ const DeviceId device_id,
+ const std::string& name) {
+ internal::GestureDevicePropertyData* device_data =
+ device_data_map_.get(device_id);
+ if (!device_data)
+ return NULL;
+ internal::PropertiesMap::const_iterator ib =
+ device_data->default_properties.find(name);
+ if (ib == device_data->default_properties.end())
+ return NULL;
+ return ib->second;
+}
+
+void GesturePropertyProvider::LoadDeviceConfigurations() {
+ // Enumerate conf files and sort them lexicographically.
+ std::set<base::FilePath> files;
+ base::FileEnumerator file_enum(base::FilePath(kConfigurationFilePath),
+ false,
+ base::FileEnumerator::FILES,
+ "*.conf");
+ for (base::FilePath path = file_enum.Next(); !path.empty();
+ path = file_enum.Next()) {
+ files.insert(path);
+ }
+ GPROP_LOG(INFO_SEVERITY) << files.size() << " conf files were found";
+
+ // Parse conf files one-by-one.
+ for (std::set<base::FilePath>::iterator file_iter = files.begin();
+ file_iter != files.end();
+ ++file_iter) {
+ GPROP_LOG(INFO_SEVERITY) << "Parsing conf file: " << (*file_iter).value();
+ std::string content;
+ if (!base::ReadFileToString(*file_iter, &content)) {
+ LOG(ERROR) << "Can't loading gestures conf file: "
+ << (*file_iter).value();
+ continue;
+ }
+ ParseXorgConfFile(content);
+ }
+}
+
+void GesturePropertyProvider::ParseXorgConfFile(const std::string& content) {
+ // To simplify the parsing work, we made some assumption about the conf file
+ // format which doesn't exist in the original xorg-conf spec. Most important
+ // ones are:
+ // 1. All keywords and names are now case-sensitive. Also, underscores are not
+ // ignored.
+ // 2. Each entry takes up one and exactly one line in the file.
+ // 3. No negation of the option value even if the option name is prefixed with
+ // "No" as it may cause problems for option names that does start with "No"
+ // (e.g., "Non-linearity").
+
+ // Break the content into sections, lines and then pieces.
+ // Sections are delimited by the "EndSection" keyword.
+ // Lines are delimited by "\n".
+ // Pieces are delimited by all white-spaces.
+ std::vector<std::string> sections;
+ base::SplitStringUsingSubstr(content, "EndSection", §ions);
+ for (size_t i = 0; i < sections.size(); ++i) {
+ // Create a new configuration section.
+ configurations_.push_back(new internal::ConfigurationSection());
+ internal::ConfigurationSection* config = configurations_.back();
+
+ // Break the section into lines.
+ base::StringTokenizer lines(sections[i], "\n");
+ bool is_input_class_section = true;
+ bool has_checked_section_type = false;
+ while (is_input_class_section && lines.GetNext()) {
+ // Parse the line w.r.t. the xorg-conf format.
+ std::string line(lines.token());
+
+ // Skip empty lines.
+ if (line.empty())
+ continue;
+
+ // Treat all whitespaces as delimiters.
+ base::StringTokenizer pieces(line, base::kWhitespaceASCII);
+ pieces.set_quote_chars("\"");
+ bool is_parsing = false;
+ bool has_error = false;
+ bool next_is_section_type = false;
+ bool next_is_option_name = false;
+ bool next_is_option_value = false;
+ bool next_is_match_criteria = false;
+ bool next_is_identifier = false;
+ std::string match_type, option_name;
+ while (pieces.GetNext()) {
+ std::string piece(pieces.token());
+
+ // Skip empty pieces.
+ if (piece.empty())
+ continue;
+
+ // See if we are currently parsing an entry or are still looking for
+ // one.
+ if (is_parsing) {
+ // Stop parsing the current line if the format is wrong.
+ if (piece.size() <= 2 || piece[0] != '\"' ||
+ piece[piece.size() - 1] != '\"') {
+ LOG(ERROR) << "Error parsing line: " << lines.token();
+ has_error = true;
+ if (next_is_section_type)
+ is_input_class_section = false;
+ break;
+ }
+
+ // Parse the arguments. Note that we don't break even if a whitespace
+ // string is passed. It will just be handled in various ways based on
+ // the entry type.
+ std::string arg;
+ base::TrimWhitespaceASCII(
+ piece.substr(1, piece.size() - 2), base::TRIM_ALL, &arg);
+ if (next_is_section_type) {
+ // We only care about InputClass sections.
+ if (arg != "InputClass") {
+ has_error = true;
+ is_input_class_section = false;
+ } else {
+ GPROP_LOG(INFO_SEVERITY) << "New InputClass section found";
+ has_checked_section_type = true;
+ }
+ break;
+ } else if (next_is_identifier) {
+ GPROP_LOG(INFO_SEVERITY) << "Identifier: " << arg;
+ config->identifier = arg;
+ next_is_identifier = false;
+ break;
+ } else if (next_is_option_name) {
+ // TODO(sheckylin): Support option "Ignore".
+ option_name = arg;
+ next_is_option_value = true;
+ next_is_option_name = false;
+ } else if (next_is_option_value) {
+ GesturesProp* property = CreateDefaultProperty(option_name, arg);
+ if (property)
+ config->properties.push_back(property);
+ next_is_option_value = false;
+ break;
+ } else if (next_is_match_criteria) {
+ // Skip all match types that are not supported.
+ if (IsMatchTypeSupported(match_type)) {
+ internal::MatchCriteria* criteria =
+ CreateMatchCriteria(match_type, arg);
+ if (criteria)
+ config->criterias.push_back(criteria);
+ }
+ next_is_match_criteria = false;
+ break;
+ }
+ } else {
+ // If the section type hasn't been decided yet, look for it.
+ // Otherwise, look for valid entries according to the spec.
+ if (has_checked_section_type) {
+ if (piece == "Driver") {
+ // TODO(sheckylin): Support "Driver" so that we can force a device
+ // not to use the gesture lib.
+ NOTIMPLEMENTED();
+ break;
+ } else if (piece == "Identifier") {
+ is_parsing = true;
+ next_is_identifier = true;
+ continue;
+ } else if (piece == "Option") {
+ is_parsing = true;
+ next_is_option_name = true;
+ continue;
+ } else if (piece.size() > 5 && piece.compare(0, 5, "Match") == 0) {
+ match_type = piece;
+ is_parsing = true;
+ next_is_match_criteria = true;
+ continue;
+ }
+ } else if (piece == "Section") {
+ is_parsing = true;
+ next_is_section_type = true;
+ continue;
+ }
+
+ // If none of the above is found, check if the current piece starts a
+ // comment.
+ if (piece.empty() || piece[0] != '#') {
+ LOG(ERROR) << "Error parsing line: " << lines.token();
+ has_error = true;
+ }
+ break;
+ }
+ }
+
+ // The value of a boolean option is skipped (default is true).
+ if (!has_error && (next_is_option_value || next_is_match_criteria)) {
+ if (next_is_option_value) {
+ GesturesProp* property = CreateDefaultProperty(option_name, "on");
+ if (property)
+ config->properties.push_back(property);
+ } else if (IsMatchTypeSupported(match_type) &&
+ IsMatchDeviceType(match_type)) {
+ internal::MatchCriteria* criteria =
+ CreateMatchCriteria(match_type, "on");
+ if (criteria)
+ config->criterias.push_back(criteria);
+ }
+ }
+ }
+
+ // Remove useless config sections.
+ if (!is_input_class_section ||
+ (config->criterias.empty() && config->properties.empty())) {
+ configurations_.pop_back();
+ }
+ }
+}
+
+internal::MatchCriteria* GesturePropertyProvider::CreateMatchCriteria(
+ const std::string& match_type,
+ const std::string& arg) {
+ GPROP_LOG(INFO_SEVERITY) << "Creating match criteria: (" << match_type << ", "
+ << arg << ")";
+ if (match_type == "MatchProduct")
+ return new internal::MatchProduct(arg);
+ if (match_type == "MatchDevicePath")
+ return new internal::MatchDevicePath(arg);
+ if (match_type == "MatchUSBID")
+ return new internal::MatchUSBID(arg);
+ if (match_type == "MatchIsPointer")
+ return new internal::MatchIsPointer(arg);
+ if (match_type == "MatchIsTouchpad")
+ return new internal::MatchIsTouchpad(arg);
+ if (match_type == "MatchIsTouchscreen")
+ return new internal::MatchIsTouchscreen(arg);
+ NOTREACHED();
+ return NULL;
+}
+
+GesturesProp* GesturePropertyProvider::CreateDefaultProperty(
+ const std::string& name,
+ const std::string& value) {
+ // Our parsing rule:
+ // 1. No hex or oct number is accepted.
+ // 2. All numbers will be stored as double.
+ // 3. Array elements can be separated by both white-spaces or commas.
+ // 4. A token is treated as numeric either if it is one of the special
+ // keywords for boolean values (on, true, yes, off, false, no) or if
+ // base::StringToDouble succeeds.
+ // 5. The property is treated as numeric if and only if all of its elements
+ // (if any) are numerics. Otherwise, it will be treated as a string.
+ // 6. A string property will be trimmed before storing its value.
+ GPROP_LOG(INFO_SEVERITY) << "Creating default property: (" << name << ", "
+ << value << ")";
+
+ // Parse elements one-by-one.
+ std::string delimiters(base::kWhitespaceASCII);
+ delimiters.append(",");
+ base::StringTokenizer tokens(value, delimiters);
+ bool is_all_numeric = true;
+ std::vector<double> numbers;
+ while (tokens.GetNext()) {
+ // Skip empty tokens.
+ std::string token(tokens.token());
+ if (token.empty())
+ continue;
+
+ // Check if it is a boolean keyword.
+ int bool_result = ParseBooleanKeyword(token);
+ if (bool_result) {
+ numbers.push_back(bool_result > 0);
+ continue;
+ }
+
+ // Check if it is a number.
+ double real_result;
+ bool success = base::StringToDouble(token, &real_result);
+ if (!success) {
+ is_all_numeric = false;
+ break;
+ }
+ numbers.push_back(real_result);
+ }
+
+ // Create the GesturesProp. Array properties need to contain at least one
+ // number and may contain numbers only.
+ GesturesProp* property = NULL;
+ if (is_all_numeric && numbers.size()) {
+ property = new GesturesDoubleProp(
+ name, numbers.size(), NULL, numbers.data(), NULL);
+ } else {
+ property = new GesturesStringProp(name, NULL, value.c_str(), NULL);
+ }
+
+ GPROP_LOG(INFO_SEVERITY) << "Prop: " << *property;
+ // The function will always succeed for now but it may change later if we
+ // specify some name or args as invalid.
+ return property;
+}
+
+void GesturePropertyProvider::SetupDefaultProperties(const DeviceId device_id,
+ const DevicePtr device) {
+ GPROP_LOG(INFO_SEVERITY) << "Setting up default properties for (" << device
+ << ", " << device_id << ", " << device->info.name
+ << ")";
+
+ // Go through all parsed sections.
+ internal::PropertiesMap& property_map =
+ device_data_map_.get(device_id)->default_properties;
+ for (size_t i = 0; i < configurations_.size(); ++i) {
+ if (configurations_[i]->Match(device)) {
+ GPROP_LOG(INFO_SEVERITY) << "Conf section \""
+ << configurations_[i]->identifier
+ << "\" is matched";
+ for (size_t j = 0; j < configurations_[i]->properties.size(); j++) {
+ GesturesProp* property = configurations_[i]->properties[j];
+ // We can't use insert here because a property may be set for several
+ // times along the way.
+ property_map[property->name()] = property;
+ }
+ }
+ }
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateInt(void* device_data,
+ const char* name,
+ int* value,
+ size_t count,
+ const int* init) {
+ return CreateProperty<int, GesturesIntProp>(
+ device_data, name, value, count, init);
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateShort(void* device_data,
+ const char* name,
+ short* value,
+ size_t count,
+ const short* init) {
+ return CreateProperty<short, GesturesShortProp>(
+ device_data, name, value, count, init);
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateBool(
+ void* device_data,
+ const char* name,
+ GesturesPropBool* value,
+ size_t count,
+ const GesturesPropBool* init) {
+ return CreateProperty<GesturesPropBool, GesturesBoolProp>(
+ device_data, name, value, count, init);
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateReal(void* device_data,
+ const char* name,
+ double* value,
+ size_t count,
+ const double* init) {
+ return CreateProperty<double, GesturesDoubleProp>(
+ device_data, name, value, count, init);
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateString(void* device_data,
+ const char* name,
+ const char** value,
+ const char* init) {
+ GesturesProp* default_property = NULL;
+ if (!PreCreateProperty(device_data, name, &default_property))
+ return NULL;
+ GesturesProp* property =
+ new GesturesStringProp(name, value, init, default_property);
+
+ PostCreateProperty(device_data, name, property);
+ return property;
+}
+
+void GesturesPropFunctionsWrapper::RegisterHandlers(
+ void* device_data,
+ GesturesProp* property,
+ void* handler_data,
+ GesturesPropGetHandler get,
+ GesturesPropSetHandler set) {
+ // Sanity checks
+ if (!device_data || !property)
+ return;
+
+ property->SetHandlers(get, set, handler_data);
+}
+
+void GesturesPropFunctionsWrapper::Free(void* device_data,
+ GesturesProp* property) {
+ if (!property)
+ return;
+ GesturePropertyProvider* provider = GetPropertyProvider(device_data);
+
+ // No need to manually delete the prop pointer as it is implicitly handled
+ // with scoped ptr.
+ GPROP_LOG(3) << "Freeing Property: \"" << property->name() << "\"";
+ provider->DeleteProperty(GetDeviceId(device_data), property->name());
+}
+
+bool GesturesPropFunctionsWrapper::InitializeDeviceProperties(
+ void* device_data,
+ GestureDeviceProperties* properties) {
+ if (!device_data)
+ return false;
+ GesturePropertyProvider::DevicePtr device = GetDevicePointer(device_data);
+
+ /* Create Device Properties */
+
+ // Read Only properties.
+ CreateString(
+ device_data, "Device Node", NULL, GetDeviceNodePath(device).c_str());
+ short vid = static_cast<short>(device->info.id.vendor);
+ CreateShort(device_data, "Device Vendor ID", NULL, 1, &vid);
+ short pid = static_cast<short>(device->info.id.product);
+ CreateShort(device_data, "Device Product ID", NULL, 1, &pid);
+
+ // Useable trackpad area. If not configured in .conf file,
+ // use x/y valuator min/max as reported by kernel driver.
+ CreateIntSingle(device_data,
+ "Active Area Left",
+ &properties->area_left,
+ Event_Get_Left(device));
+ CreateIntSingle(device_data,
+ "Active Area Right",
+ &properties->area_right,
+ Event_Get_Right(device));
+ CreateIntSingle(device_data,
+ "Active Area Top",
+ &properties->area_top,
+ Event_Get_Top(device));
+ CreateIntSingle(device_data,
+ "Active Area Bottom",
+ &properties->area_bottom,
+ Event_Get_Bottom(device));
+
+ // Trackpad resolution (pixels/mm). If not configured in .conf file,
+ // use x/y resolution as reported by kernel driver.
+ CreateIntSingle(device_data,
+ "Vertical Resolution",
+ &properties->res_y,
+ Event_Get_Res_Y(device));
+ CreateIntSingle(device_data,
+ "Horizontal Resolution",
+ &properties->res_x,
+ Event_Get_Res_X(device));
+
+ // Trackpad orientation minimum/maximum. If not configured in .conf file,
+ // use min/max as reported by kernel driver.
+ CreateIntSingle(device_data,
+ "Orientation Minimum",
+ &properties->orientation_minimum,
+ Event_Get_Orientation_Minimum(device));
+ CreateIntSingle(device_data,
+ "Orientation Maximum",
+ &properties->orientation_maximum,
+ Event_Get_Orientation_Maximum(device));
+
+ // Log dump property. Will call Event_Dump_Debug_Log when its value is being
+ // set.
+ GesturesProp* dump_debug_log_prop = CreateBoolSingle(
+ device_data, "Dump Debug Log", &properties->dump_debug_log, false);
+ RegisterHandlers(
+ device_data, dump_debug_log_prop, device, NULL, Event_Dump_Debug_Log);
+
+ // Whether to do the gesture recognition or just passing the multi-touch data
+ // to upper layers.
+ CreateBoolSingle(device_data,
+ "Raw Touch Passthrough",
+ &properties->raw_passthrough,
+ false);
+ return true;
+}
+
+void GesturesPropFunctionsWrapper::UnregisterDevice(void* device_data) {
+ GesturePropertyProvider* provider = GetPropertyProvider(device_data);
+ provider->UnregisterDevice(GetDeviceId(device_data));
+}
+
+template <typename T, class PROPTYPE>
+GesturesProp* GesturesPropFunctionsWrapper::CreateProperty(void* device_data,
+ const char* name,
+ T* value,
+ size_t count,
+ const T* init) {
+ // Create the property. Use the default property value if possible.
+ GesturesProp* default_property = NULL;
+ if (!PreCreateProperty(device_data, name, &default_property))
+ return NULL;
+ GesturesProp* property =
+ new PROPTYPE(name, count, value, init, default_property);
+
+ // Start tracking the property in the provider.
+ PostCreateProperty(device_data, name, property);
+ return property;
+}
+
+bool GesturesPropFunctionsWrapper::PreCreateProperty(
+ void* device_data,
+ const char* name,
+ GesturesProp** default_property) {
+ GesturePropertyProvider* provider = GetPropertyProvider(device_data);
+ GesturePropertyProvider::DeviceId device_id = GetDeviceId(device_data);
+
+ // Register the device in the property provider if not yet.
+ provider->RegisterDevice(device_id, GetDevicePointer(device_data));
+
+ // First, see if the GesturesProp already exists.
+ GPROP_LOG(3) << "Creating Property: \"" << name << "\"";
+ GesturesProp* property = provider->FindProperty(device_id, name);
+
+ // If so, delete it as we can't reuse the data structure (newly-created
+ // property may have different data type and count, which are fixed upon
+ // creation via the template mechanism).
+ if (property) {
+ LOG(WARNING) << "Gesture property \"" << name
+ << "\" re-created. This shouldn't happen at the normal usage.";
+ Free(device_data, property);
+ }
+
+ // Return the found default property from conf files (could be NULL).
+ *default_property = provider->GetDefaultProperty(device_id, name);
+ return true;
+}
+
+void GesturesPropFunctionsWrapper::PostCreateProperty(void* device_data,
+ const char* name,
+ GesturesProp* property) {
+ // Add the property to the gesture property provider. The gesture property
+ // provider will own it from now on.
+ GesturePropertyProvider* provider = GetPropertyProvider(device_data);
+ provider->AddProperty(GetDeviceId(device_data), name, property);
+
+ // Log the creation.
+ GPROP_LOG(INFO_SEVERITY) << "Created active prop: " << *property;
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateIntSingle(void* device_data,
+ const char* name,
+ int* value,
+ int init) {
+ return CreateInt(device_data, name, value, 1, &init);
+}
+
+GesturesProp* GesturesPropFunctionsWrapper::CreateBoolSingle(
+ void* device_data,
+ const char* name,
+ GesturesPropBool* value,
+ GesturesPropBool init) {
+ return CreateBool(device_data, name, value, 1, &init);
+}
+
+GesturePropertyProvider* GesturesPropFunctionsWrapper::GetPropertyProvider(
+ void* device_data) {
+ return static_cast<GestureInterpreterLibevdevCros*>(device_data)
+ ->property_provider();
+}
+
+GesturePropertyProvider::DevicePtr
+GesturesPropFunctionsWrapper::GetDevicePointer(void* device_data) {
+ return static_cast<GestureInterpreterLibevdevCros*>(device_data)->evdev();
+}
+
+GesturePropertyProvider::DeviceId GesturesPropFunctionsWrapper::GetDeviceId(
+ void* device_data) {
+ return static_cast<GestureInterpreterLibevdevCros*>(device_data)->id();
+}
+
+/* Global GesturesPropProvider
+ *
+ * Used by PropRegistry in GestureInterpreter to forward property value
+ * creations from there.
+ * */
+const GesturesPropProvider kGesturePropProvider = {
+ GesturesPropFunctionsWrapper::CreateInt,
+ GesturesPropFunctionsWrapper::CreateShort,
+ GesturesPropFunctionsWrapper::CreateBool,
+ GesturesPropFunctionsWrapper::CreateString,
+ GesturesPropFunctionsWrapper::CreateReal,
+ GesturesPropFunctionsWrapper::RegisterHandlers,
+ GesturesPropFunctionsWrapper::Free};
+
+} // namespace ui
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h
new file mode 100644
index 0000000..dd7afb2
--- /dev/null
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h
@@ -0,0 +1,263 @@
+// Copyright 2014 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.
+
+#ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_
+#define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_
+
+#include <gestures/gestures.h>
+#include <libevdev/libevdev.h>
+
+#include <map>
+#include <string>
+
+#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/memory/scoped_vector.h"
+#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
+
+namespace ui {
+
+class GesturesPropFunctionsWrapper;
+class GestureInterpreterLibevdevCros;
+
+// Not for public consumption, so we wrap it in namespace internal.
+namespace internal {
+struct GestureDevicePropertyData;
+class MatchCriteria;
+struct ConfigurationSection;
+}
+
+// A struct holding device properties that are useful when interacting with
+// the gestures lib.
+struct GestureDeviceProperties {
+ int area_left;
+ int area_right;
+ int area_top;
+ int area_bottom;
+ int res_y;
+ int res_x;
+ int orientation_minimum;
+ int orientation_maximum;
+ GesturesPropBool raw_passthrough;
+ GesturesPropBool dump_debug_log;
+};
+
+// Provide the interface to access the CrOS gesture library properties.
+// It maintains the property data for all input devices that runs with
+// the gesture library.
+//
+// The class also parses the configuration files on the system to
+// initialize the specified property values. The configuration files are
+// currently in the xorg-conf format so that they can be shared with non-Ozone
+// builds.
+class EVENTS_OZONE_EVDEV_EXPORT GesturePropertyProvider {
+ public:
+ // Device types.
+ enum DeviceType {
+ DT_MOUSE,
+ DT_TOUCHPAD,
+ DT_TOUCHSCREEN,
+ DT_MULTITOUCH,
+ DT_MULTITOUCH_MOUSE,
+ DT_ALL,
+ };
+
+ // Property types.
+ enum PropertyType {
+ PT_INT,
+ PT_SHORT,
+ PT_BOOL,
+ PT_STRING,
+ PT_REAL,
+ };
+
+ // Pointer that leads to the device info.
+ typedef Evdev* DevicePtr;
+
+ // The device ids are only maintained by EventFactoryEvdev to identify the
+ // input devices and are not to be confused with the Evdev input node id, for
+ // example.
+ typedef int DeviceId;
+
+ GesturePropertyProvider();
+ ~GesturePropertyProvider();
+
+ // Get a list of device ids that matches a device type.
+ void GetDeviceIdsByType(const DeviceType type,
+ std::vector<DeviceId>* device_ids);
+
+ // Get the GesturesProp object. Returns NULL if not found.
+ //
+ // The user may use the object returned to set/get the property value in the
+ // gesture library's memory. Note that the values in preferences are not
+ // synced with the ones here in realtime - they are only applied from the
+ // preference side in a single way once appropriate (e.g., when the user
+ // clicked "OK").
+ GesturesProp* GetProperty(const DeviceId device_id, const std::string& name);
+
+ private:
+ friend class GesturesPropFunctionsWrapper;
+
+ // Mapping table from a device id to its device pointer.
+ typedef std::map<DeviceId, DevicePtr> DeviceMap;
+
+ // Mapping table from a device id to its property data.
+ // GestureDevicePropertyData contains both properties in use and default
+ // properties whose values will be applied upon the device attachment.
+ typedef base::ScopedPtrHashMap<DeviceId, internal::GestureDevicePropertyData>
+ ScopedDeviceDataMap;
+
+ // Register a device. Setup data-structures and the device's default
+ // properties.
+ void RegisterDevice(const DeviceId id, const DevicePtr device);
+
+ // Unregister a device. Remove all of its properties being tracked.
+ void UnregisterDevice(const DeviceId id);
+
+ // Called by functions in GesturesPropFunctionsWrapper to manipulate
+ // properties. Note these functions do not new/delete the GesturesProp
+ // pointers. It is caller's responsibility to manage them.
+ void AddProperty(const DeviceId device_id,
+ const std::string& name,
+ GesturesProp* property);
+ void DeleteProperty(const DeviceId device_id, const std::string& name);
+
+ // Check if a property exists for a device. Return if it is found.
+ GesturesProp* FindProperty(const DeviceId device_id, const std::string& name);
+
+ // Get the default value of a property based on the configuration files.
+ GesturesProp* GetDefaultProperty(const DeviceId device_id,
+ const std::string& name);
+
+ // The device configuration files are parsed and stored in the memory upon
+ // Chrome starts. The default property values are then applied to each device
+ // when it is attached/detected.
+ void LoadDeviceConfigurations();
+
+ // Parse a xorg-conf file. We ignore all sections other than InputClass.
+ // Check the xorg-conf spec for more infomation about its format.
+ void ParseXorgConfFile(const std::string& content);
+
+ // Create a match criteria.
+ internal::MatchCriteria* CreateMatchCriteria(const std::string& match_type,
+ const std::string& arg);
+
+ // Create a property that comes from the conf files.
+ GesturesProp* CreateDefaultProperty(const std::string& name,
+ const std::string& value);
+
+ // Setup default property values for a newly found device.
+ void SetupDefaultProperties(const DeviceId device_id, const DevicePtr device);
+
+ // Map from device ids to device pointers.
+ DeviceMap device_map_;
+
+ // GestureDevicePropertyData indexed by their respective device ids. Owns the
+ // objects.
+ ScopedDeviceDataMap device_data_map_;
+
+ // A vector of parsed sections in configuration files. Owns MatchCriterias,
+ // GesturesProps and ConfigurationSections in it.
+ ScopedVector<internal::ConfigurationSection> configurations_;
+
+ DISALLOW_COPY_AND_ASSIGN(GesturePropertyProvider);
+};
+
+// Wrapper of GesturesProp related functions. We group them together so that we
+// can friend them all at once.
+class GesturesPropFunctionsWrapper {
+ public:
+ // Property provider interface implementation.
+ //
+ // These functions will create a GesturesProp object that can link back to the
+ // memory that holds the real value, which is often declared in the gesture
+ // lib.
+ static GesturesProp* CreateInt(void* device_data,
+ const char* name,
+ int* value,
+ size_t count,
+ const int* init);
+ static GesturesProp* CreateShort(void* device_data,
+ const char* name,
+ short* value,
+ size_t count,
+ const short* init);
+ static GesturesProp* CreateBool(void* device_data,
+ const char* name,
+ GesturesPropBool* value,
+ size_t count,
+ const GesturesPropBool* init);
+
+ // String GestureProps needs special care due to the use of const char* in the
+ // gesture lib. Its argument list is also different from numeric properties'.
+ static GesturesProp* CreateString(void* device_data,
+ const char* name,
+ const char** value,
+ const char* init);
+
+ static GesturesProp* CreateReal(void* device_data,
+ const char* name,
+ double* value,
+ size_t count,
+ const double* init);
+
+ // Set the handlers to call when a property is accessed.
+ static void RegisterHandlers(void* device_data,
+ GesturesProp* property,
+ void* handler_data,
+ GesturesPropGetHandler get,
+ GesturesPropSetHandler set);
+
+ // Free a property.
+ static void Free(void* device_data, GesturesProp* property);
+
+ // Initialize hardware-related device properties which will be used in the
+ // gesture lib.
+ static bool InitializeDeviceProperties(void* device_data,
+ GestureDeviceProperties* properties);
+
+ // Unregister device from the gesture property provider.
+ static void UnregisterDevice(void* device_data);
+
+ private:
+ // Property helper functions.
+ // Core template function for creating GestureProps. Used by numerical types.
+ template <typename T, class PROPTYPE>
+ static GesturesProp* CreateProperty(void* device_data,
+ const char* name,
+ T* value,
+ size_t count,
+ const T* init);
+
+ // Do things that should happen BEFORE we create the property.
+ static bool PreCreateProperty(void* device_data,
+ const char* name,
+ GesturesProp** default_property);
+
+ // Do things that should happen AFTER we create the property.
+ static void PostCreateProperty(void* device_data,
+ const char* name,
+ GesturesProp* property);
+
+ // Some other utility functions used in InitializeDeviceProperties.
+ static GesturesProp* CreateIntSingle(void* device_data,
+ const char* name,
+ int* value,
+ int init);
+ static GesturesProp* CreateBoolSingle(void* device_data,
+ const char* name,
+ GesturesPropBool* value,
+ GesturesPropBool init);
+
+ // Routines to extract information from the GestureInterpreterLibevdevCros
+ // pointer.
+ static GesturePropertyProvider* GetPropertyProvider(void* device_data);
+ static GesturePropertyProvider::DevicePtr GetDevicePointer(void* device_data);
+ static GesturePropertyProvider::DeviceId GetDeviceId(void* device_data);
+};
+
+extern const GesturesPropProvider kGesturePropProvider;
+
+} // namspace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 7b666e0..c3fc7e2 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -280,16 +280,16 @@
for (int i = 0; i < MAX_FINGERS; i++) {
if (altered_slots_[i]) {
// TODO(rikroege): Support elliptical finger regions.
- TouchEvent evt(events_[i].type_,
- gfx::PointF(events_[i].x_, events_[i].y_),
- /* flags */ 0,
- /* touch_id */ i,
- delta,
- /* radius_x */ events_[i].radius_x_,
- /* radius_y */ events_[i].radius_y_,
- /* angle */ 0.,
- events_[i].pressure_);
- callback_.Run(&evt);
+ callback_.Run(make_scoped_ptr(
+ new TouchEvent(events_[i].type_,
+ gfx::PointF(events_[i].x_, events_[i].y_),
+ /* flags */ 0,
+ /* touch_id */ i,
+ delta,
+ /* radius_x */ events_[i].radius_x_,
+ /* radius_y */ events_[i].radius_y_,
+ /* angle */ 0.,
+ events_[i].pressure_)));
// Subsequent events for this finger will be touch-move until it
// is released.
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
index 3e76476..6a8494b 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
@@ -46,7 +46,12 @@
long queue_index);
unsigned size() { return dispatched_events_.size(); }
- TouchEvent* event(unsigned index) { return dispatched_events_[index]; }
+ TouchEvent* event(unsigned index) {
+ DCHECK_GT(dispatched_events_.size(), index);
+ Event* ev = dispatched_events_[index];
+ DCHECK(ev->IsTouchEvent());
+ return static_cast<TouchEvent*>(ev);
+ }
// Actually dispatch the event reader code.
void ReadNow() {
@@ -54,9 +59,8 @@
base::RunLoop().RunUntilIdle();
}
- void DispatchCallback(Event* event) {
- dispatched_events_.push_back(
- new TouchEvent(*static_cast<TouchEvent*>(event)));
+ void DispatchCallback(scoped_ptr<Event> event) {
+ dispatched_events_.push_back(event.release());
}
virtual bool Reinitialize() override { return true; }
@@ -65,7 +69,7 @@
int read_pipe_;
int write_pipe_;
- ScopedVector<TouchEvent> dispatched_events_;
+ ScopedVector<Event> dispatched_events_;
DISALLOW_COPY_AND_ASSIGN(MockTouchEventConverterEvdev);
};
diff --git a/ui/events/ozone/events_ozone.gyp b/ui/events/ozone/events_ozone.gyp
index 905e0fd..c74263a 100644
--- a/ui/events/ozone/events_ozone.gyp
+++ b/ui/events/ozone/events_ozone.gyp
@@ -60,6 +60,8 @@
'evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h',
'evdev/libgestures_glue/gesture_logging.cc',
'evdev/libgestures_glue/gesture_logging.h',
+ 'evdev/libgestures_glue/gesture_property_provider.cc',
+ 'evdev/libgestures_glue/gesture_property_provider.h',
'evdev/libgestures_glue/gesture_timer_provider.cc',
'evdev/libgestures_glue/gesture_timer_provider.h',
'evdev/event_converter_evdev.cc',
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index ad9d597..8fae713 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -301,9 +301,9 @@
callback.Run(ui::ET_GESTURE_SCROLL_BEGIN, gfx::Vector2dF());
- int dx = (end.x() - start.x()) / steps;
- int dy = (end.y() - start.y()) / steps;
- gfx::Point location = start;
+ float dx = static_cast<float>(end.x() - start.x()) / steps;
+ float dy = static_cast<float>(end.y() - start.y()) / steps;
+ gfx::PointF location = start;
for (int i = 0; i < steps; ++i) {
location.Offset(dx, dy);
timestamp += step_delay;
@@ -436,7 +436,7 @@
void EventGenerator::ScrollSequence(const gfx::Point& start,
const base::TimeDelta& step_delay,
- const std::vector<gfx::Point>& offsets,
+ const std::vector<gfx::PointF>& offsets,
int num_fingers) {
size_t steps = offsets.size();
base::TimeDelta timestamp = Now();
diff --git a/ui/events/test/event_generator.h b/ui/events/test/event_generator.h
index bc243b9..4f978ed 100644
--- a/ui/events/test/event_generator.h
+++ b/ui/events/test/event_generator.h
@@ -315,7 +315,7 @@
// scrolls of each of the values in |offsets|.
void ScrollSequence(const gfx::Point& start,
const base::TimeDelta& step_delay,
- const std::vector<gfx::Point>& offsets,
+ const std::vector<gfx::PointF>& offsets,
int num_fingers);
// Generates a key press event. On platforms except Windows and X11, a key
diff --git a/ui/events/test/events_test_utils.h b/ui/events/test/events_test_utils.h
index 3ed6fa3..d4b704a 100644
--- a/ui/events/test/events_test_utils.h
+++ b/ui/events/test/events_test_utils.h
@@ -37,7 +37,7 @@
class LocatedEventTestApi : public EventTestApi {
public:
explicit LocatedEventTestApi(LocatedEvent* located_event);
- virtual ~LocatedEventTestApi();
+ ~LocatedEventTestApi() override;
void set_location(const gfx::Point& location) {
located_event_->location_ = location;
@@ -54,7 +54,7 @@
class KeyEventTestApi : public EventTestApi {
public:
explicit KeyEventTestApi(KeyEvent* key_event);
- virtual ~KeyEventTestApi();
+ ~KeyEventTestApi() override;
void set_is_char(bool is_char) {
key_event_->set_is_char(is_char);
diff --git a/ui/events/test/mock_motion_event.h b/ui/events/test/mock_motion_event.h
index 5c34b71..d04d715 100644
--- a/ui/events/test/mock_motion_event.h
+++ b/ui/events/test/mock_motion_event.h
@@ -37,11 +37,11 @@
const std::vector<gfx::PointF>& positions);
MockMotionEvent(const MockMotionEvent& other);
- virtual ~MockMotionEvent();
+ ~MockMotionEvent() override;
// MotionEvent methods.
- virtual scoped_ptr<MotionEvent> Clone() const override;
- virtual scoped_ptr<MotionEvent> Cancel() const override;
+ scoped_ptr<MotionEvent> Clone() const override;
+ scoped_ptr<MotionEvent> Cancel() const override;
// Utility methods.
void PressPoint(float x, float y);
diff --git a/ui/events/test/platform_event_waiter.h b/ui/events/test/platform_event_waiter.h
index 647a011..bdab29e 100644
--- a/ui/events/test/platform_event_waiter.h
+++ b/ui/events/test/platform_event_waiter.h
@@ -20,11 +20,11 @@
private:
PlatformEventWaiter(const base::Closure& success_callback,
const PlatformEventMatcher& event_matcher);
- virtual ~PlatformEventWaiter();
+ ~PlatformEventWaiter() override;
// PlatformEventObserver:
- virtual void WillProcessEvent(const PlatformEvent& event) override;
- virtual void DidProcessEvent(const PlatformEvent& event) override;
+ void WillProcessEvent(const PlatformEvent& event) override;
+ void DidProcessEvent(const PlatformEvent& event) override;
base::Closure success_callback_;
PlatformEventMatcher event_matcher_;
diff --git a/ui/events/test/test_event_handler.h b/ui/events/test/test_event_handler.h
index d501233..64759c7 100644
--- a/ui/events/test/test_event_handler.h
+++ b/ui/events/test/test_event_handler.h
@@ -22,7 +22,7 @@
class TestEventHandler : public EventHandler {
public:
TestEventHandler();
- virtual ~TestEventHandler();
+ ~TestEventHandler() override;
int num_key_events() const { return num_key_events_; }
int num_mouse_events() const { return num_mouse_events_; }
@@ -40,11 +40,11 @@
}
// EventHandler overrides:
- virtual void OnKeyEvent(KeyEvent* event) override;
- virtual void OnMouseEvent(MouseEvent* event) override;
- virtual void OnScrollEvent(ScrollEvent* event) override;
- virtual void OnTouchEvent(TouchEvent* event) override;
- virtual void OnGestureEvent(GestureEvent* event) override;
+ void OnKeyEvent(KeyEvent* event) override;
+ void OnMouseEvent(MouseEvent* event) override;
+ void OnScrollEvent(ScrollEvent* event) override;
+ void OnTouchEvent(TouchEvent* event) override;
+ void OnGestureEvent(GestureEvent* event) override;
private:
// How many events have been received of each type?
diff --git a/ui/events/test/test_event_processor.h b/ui/events/test/test_event_processor.h
index 1e42aa1..569670e 100644
--- a/ui/events/test/test_event_processor.h
+++ b/ui/events/test/test_event_processor.h
@@ -14,7 +14,7 @@
class TestEventProcessor : public EventProcessor {
public:
TestEventProcessor();
- virtual ~TestEventProcessor();
+ ~TestEventProcessor() override;
int num_times_processing_started() const {
return num_times_processing_started_;
@@ -32,11 +32,11 @@
void Reset();
// EventProcessor:
- virtual bool CanDispatchToTarget(EventTarget* target) override;
- virtual EventTarget* GetRootTarget() override;
- virtual EventDispatchDetails OnEventFromSource(Event* event) override;
- virtual void OnEventProcessingStarted(Event* event) override;
- virtual void OnEventProcessingFinished(Event* event) override;
+ bool CanDispatchToTarget(EventTarget* target) override;
+ EventTarget* GetRootTarget() override;
+ EventDispatchDetails OnEventFromSource(Event* event) override;
+ void OnEventProcessingStarted(Event* event) override;
+ void OnEventProcessingFinished(Event* event) override;
private:
scoped_ptr<EventTarget> root_;
diff --git a/ui/events/test/test_event_target.h b/ui/events/test/test_event_target.h
index cadcfa9..17969be 100644
--- a/ui/events/test/test_event_target.h
+++ b/ui/events/test/test_event_target.h
@@ -24,7 +24,7 @@
class TestEventTarget : public EventTarget {
public:
TestEventTarget();
- virtual ~TestEventTarget();
+ ~TestEventTarget() override;
void AddChild(scoped_ptr<TestEventTarget> child);
scoped_ptr<TestEventTarget> RemoveChild(TestEventTarget* child);
@@ -54,13 +54,13 @@
bool Contains(TestEventTarget* target) const;
// EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) override;
- virtual EventTarget* GetParentTarget() override;
- virtual scoped_ptr<EventTargetIterator> GetChildIterator() const override;
- virtual EventTargeter* GetEventTargeter() override;
+ bool CanAcceptEvent(const ui::Event& event) override;
+ EventTarget* GetParentTarget() override;
+ scoped_ptr<EventTargetIterator> GetChildIterator() const override;
+ EventTargeter* GetEventTargeter() override;
// EventHandler:
- virtual void OnEvent(Event* event) override;
+ void OnEvent(Event* event) override;
private:
void set_parent(TestEventTarget* parent) { parent_ = parent; }
diff --git a/ui/events/win/events_win.cc b/ui/events/win/events_win.cc
index 9434b2b..ae9d403 100644
--- a/ui/events/win/events_win.cc
+++ b/ui/events/win/events_win.cc
@@ -252,7 +252,7 @@
}
KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
- return KeyboardCodeForWindowsKeyCode(native_event.wParam);
+ return KeyboardCodeForWindowsKeyCode(static_cast<WORD>(native_event.wParam));
}
const char* CodeFromNative(const base::NativeEvent& native_event) {
diff --git a/ui/file_manager/file_manager/background/js/background.js b/ui/file_manager/file_manager/background/js/background.js
index 6c16493..e21cf51 100644
--- a/ui/file_manager/file_manager/background/js/background.js
+++ b/ui/file_manager/file_manager/background/js/background.js
@@ -202,7 +202,7 @@
* @param {string} devicePath Device path to a volume to be opened.
* @private
*/
-FileBrowserBackground.prototype.navigateToVolume = function(devicePath) {
+FileBrowserBackground.prototype.navigateToVolume_ = function(devicePath) {
VolumeManager.getInstance().then(function(volumeManager) {
var volumeInfoList = volumeManager.volumeInfoList;
for (var i = 0; i < volumeInfoList.length; i++) {
diff --git a/ui/file_manager/file_manager/background/js/drive_sync_handler.js b/ui/file_manager/file_manager/background/js/drive_sync_handler.js
index 55a277d..505f926 100644
--- a/ui/file_manager/file_manager/background/js/drive_sync_handler.js
+++ b/ui/file_manager/file_manager/background/js/drive_sync_handler.js
@@ -154,7 +154,7 @@
*/
DriveSyncHandler.prototype.requestCancel_ = function(entry) {
// Cancel all jobs.
- chrome.fileManagerPrivate.cancelFileTransfers(function() {});
+ chrome.fileManagerPrivate.cancelFileTransfers();
};
/**
diff --git a/ui/file_manager/file_manager/background/js/file_operation_manager.js b/ui/file_manager/file_manager/background/js/file_operation_manager.js
index 7bed2f3..67b81be 100644
--- a/ui/file_manager/file_manager/background/js/file_operation_manager.js
+++ b/ui/file_manager/file_manager/background/js/file_operation_manager.js
@@ -1465,7 +1465,7 @@
dirEntry, selectionEntries) {
var zipTask = new FileOperationManager.ZipTask(
selectionEntries, dirEntry, dirEntry);
- zipTask.taskId = this.generateTaskId(this.copyTasks_);
+ zipTask.taskId = this.generateTaskId();
zipTask.zip = true;
this.eventRouter_.sendProgressEvent('BEGIN',
zipTask.getStatus(),
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index e6dbe42..0262022 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -460,7 +460,7 @@
if (map.hasOwnProperty(key))
keys.push(key);
}
- keys.sort(function(a, b) { return map[a].expire > map[b].expire; });
+ keys.sort(function(a, b) { return map[a].expire - map[b].expire; });
var cutoff = Date.now();
@@ -495,7 +495,9 @@
image,
opt_options || {},
function() {},
- function() { image.onerror(); },
+ function() {
+ image.onerror(new Event('load-error'));
+ },
opt_isValid);
};
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index ac3751d..1f94353 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -175,7 +175,7 @@
// If the change is deletion of currentDir, move up to its parent directory.
directoryEntry.getDirectory(directoryEntry.fullPath, {create: false},
- null,
+ function() {},
function() {
var volumeInfo = this.volumeManager_.getVolumeInfo(directoryEntry);
if (volumeInfo) {
diff --git a/ui/file_manager/file_manager/foreground/js/file_tasks.js b/ui/file_manager/file_manager/foreground/js/file_tasks.js
index 3f7c5da..fcf383a 100644
--- a/ui/file_manager/file_manager/foreground/js/file_tasks.js
+++ b/ui/file_manager/file_manager/foreground/js/file_tasks.js
@@ -378,7 +378,7 @@
var onViewFiles = function(result) {
switch (result) {
case 'opened':
- callback(success, entries);
+ callback(true, entries);
break;
case 'message_sent':
util.isTeleported(window).then(function(teleported) {
@@ -387,10 +387,10 @@
this.fileManager_.ui.alertDialog, entries);
}
}.bind(this));
- callback(success, entries);
+ callback(true, entries);
break;
case 'empty':
- callback(success, entries);
+ callback(true, entries);
break;
case 'failed':
onViewFilesFailure();
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index ce3df96..f37baeb 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -193,7 +193,7 @@
dataTransfer.effectAllowed = effectAllowed;
dataTransfer.setData('fs/effectallowed', effectAllowed);
dataTransfer.setData('fs/missingFileContents',
- !this.isAllSelectedFilesAvailable_());
+ (!this.isAllSelectedFilesAvailable_()).toString());
for (var i = 0; i < this.selectedFileObjects_.length; i++) {
dataTransfer.items.add(this.selectedFileObjects_[i]);
@@ -398,7 +398,7 @@
dialogResult,
function() {
// TODO(hirono): Check chrome.runtime.lastError here.
- fulfill();
+ fulfill(null);
});
}).then(requestDriveShare.bind(null, index + 1));
};
@@ -449,7 +449,7 @@
var imagePromise = metadataPromise.then(function(metadata) {
return new Promise(function(fulfill, reject) {
var loader = new ThumbnailLoader(
- entry, ThumbnailLoader.LoaderType.Image, metadata);
+ entry, ThumbnailLoader.LoaderType.IMAGE, metadata);
loader.loadDetachedImage(function(result) {
if (result)
fulfill(loader.getImage());
@@ -557,8 +557,8 @@
}
var dt = event.dataTransfer;
- var canCopy = this.canCopyOrDrag_(dt);
- var canCut = this.canCutOrDrag_(dt);
+ var canCopy = this.canCopyOrDrag_();
+ var canCut = this.canCutOrDrag_();
if (canCopy || canCut) {
if (canCopy && canCut) {
this.cutOrCopy_(dt, 'all');
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/byte_reader.js b/ui/file_manager/file_manager/foreground/js/metadata/byte_reader.js
index e3fbfb2..e422bf5 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/byte_reader.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata/byte_reader.js
@@ -305,7 +305,7 @@
if (typeof opt_end == 'undefined')
opt_end = this.view_.byteLength;
- ByteReader.validateRead(this.view_, this.pos_, size, opt_end);
+ ByteReader.validateRead(this.pos_, size, opt_end);
};
/**
@@ -439,7 +439,7 @@
var arrayConstructor = opt_arrayConstructor || Uint8Array;
var slice = new arrayConstructor(
- this.view_.buffer, this.view_.byteOffset + this.pos, size);
+ this.view_.buffer, this.view_.byteOffset + this.pos_, size);
this.pos_ += size;
return slice;
diff --git a/ui/file_manager/file_manager/foreground/js/share_client.js b/ui/file_manager/file_manager/foreground/js/share_client.js
index a0276af..36033cc 100644
--- a/ui/file_manager/file_manager/foreground/js/share_client.js
+++ b/ui/file_manager/file_manager/foreground/js/share_client.js
@@ -44,7 +44,7 @@
/**
* Notifies when the the embedded dialog failed to load.
*/
-ShareClient.Observer.prototype.onLoadingFailed = function() {
+ShareClient.Observer.prototype.onLoadFailed = function() {
};
/**
diff --git a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
index 1f01e9e..49b1035 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
@@ -524,7 +524,11 @@
entries.push(this.volumeInfo.fakeEntries[key]);
}
// This list is sorted by URL on purpose.
- entries.sort(function(a, b) { return a.toURL() < b.toURL(); });
+ entries.sort(function(a, b) {
+ if (a.toURL() === b.toURL())
+ return 0;
+ return b.toURL() > a.toURL() ? 1 : -1;
+ });
for (var i = 0; i < entries.length; i++) {
var item = new DirectoryItem(
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
index d1398d9..005a54b 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
@@ -230,7 +230,7 @@
// TODO(mtomasz): Pass the metadata cache and the volume manager directly
// instead of accessing private members of grid.
FileGrid.decorateThumbnail(
- li, entry, grid.metadataCache_, grid.volumeManager_, true);
+ li, entry, grid.metadataCache_, grid.volumeManager_);
// Override the default role 'listitem' to 'option' to match the parent's
// role (listbox).
@@ -297,7 +297,7 @@
var horizontalEndIndex = Math.min(this.columns, this.getHitIndex_(
right, itemMetrics.width, itemMetrics.marginLeft));
var verticalStartIndex = this.getHitIndex_(
- y, itemMetrics.height, itemMetrics.height - itemMetrics.bottom);
+ y, itemMetrics.height, itemMetrics.height - itemMetrics.marginBottom);
var verticalEndIndex = this.getHitIndex_(
bottom, itemMetrics.height, itemMetrics.marginTop);
for (var verticalIndex = verticalStartIndex;
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index 59b7c83..b06b473 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -177,7 +177,7 @@
break;
default:
- throw new Error('Unknown dialog type: ' + this.dialogType);
+ throw new Error('Unknown dialog type: ' + this.dialogType_);
}
this.okButton.textContent = okLabel;
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_table.js b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
index 263ba49..13491d5 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_table.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
@@ -422,10 +422,10 @@
* @param {boolean} use12hourClock True if 12 hours clock, False if 24 hours.
*/
FileTable.prototype.setDateTimeFormat = function(use12hourClock) {
- this.timeFormatter_ = Intl.DateTimeFormat(
+ this.timeFormatter_ = new Intl.DateTimeFormat(
[] /* default locale */,
{hour: 'numeric', minute: 'numeric', hour12: use12hourClock});
- this.dateFormatter_ = Intl.DateTimeFormat(
+ this.dateFormatter_ = new Intl.DateTimeFormat(
[] /* default locale */,
{
year: 'numeric', month: 'short', day: 'numeric',
diff --git a/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js b/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
index 6f1da8c..fc42c1c 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js
@@ -257,7 +257,7 @@
if (!show) {
console.error('SuggestAppsDialog can\'t be shown');
this.state_ = SuggestAppsDialog.State.UNINITIALIZED;
- this.onHide();
+ this.onHide_();
return;
}
@@ -331,7 +331,7 @@
* @private
*/
SuggestAppsDialog.prototype.onWidgetLoadFailed_ = function(event) {
- SuggestAppsDialog.Metrics.recordLoad(SuggestAppsDialog.Metrics.LOAD.FAILURE);
+ SuggestAppsDialog.Metrics.recordLoad(SuggestAppsDialog.Metrics.LOAD.FAILED);
this.frame_.classList.remove('show-spinner');
this.state_ = SuggestAppsDialog.State.INITIALIZE_FAILED_CLOSING;
@@ -388,7 +388,7 @@
switch (result) {
case AppInstaller.Result.SUCCESS:
SuggestAppsDialog.Metrics.recordInstall(
- SuggestAppsDialog.Metrics.INSTALL.SUCCESS);
+ SuggestAppsDialog.Metrics.INSTALL.SUCCEEDED);
this.hide();
break;
case AppInstaller.Result.CANCELLED:
@@ -477,12 +477,12 @@
case SuggestAppsDialog.State.CANCELED_CLOSING:
result = SuggestAppsDialog.Result.USER_CANCELL;
SuggestAppsDialog.Metrics.recordCloseDialog(
- SuggestAppsDialog.Metrics.CLOSE_DIALOG.USER_CANCELL);
+ SuggestAppsDialog.Metrics.CLOSE_DIALOG.USER_CANCELLED);
break;
case SuggestAppsDialog.State.OPENING_WEBSTORE_CLOSING:
result = SuggestAppsDialog.Result.WEBSTORE_LINK_OPENED;
SuggestAppsDialog.Metrics.recordCloseDialog(
- SuggestAppsDialog.Metrics.CLOSE_DIALOG.WEB_STORE_LINK);
+ SuggestAppsDialog.Metrics.CLOSE_DIALOG.WEBSTORE_LINK_OPENED);
break;
default:
result = SuggestAppsDialog.Result.USER_CANCELL;
@@ -515,7 +515,7 @@
* @const
*/
SuggestAppsDialog.Metrics.CLOSE_DIALOG = {
- UNKOWN_ERROR: 0,
+ UNKNOWN_ERROR: 0,
ITEM_INSTALLED: 1,
USER_CANCELLED: 2,
WEBSTORE_LINK_OPENED: 3,
diff --git a/ui/gfx/animation/animation.h b/ui/gfx/animation/animation.h
index e98f506..81e8e2b 100644
--- a/ui/gfx/animation/animation.h
+++ b/ui/gfx/animation/animation.h
@@ -28,7 +28,7 @@
class GFX_EXPORT Animation : public AnimationContainerElement {
public:
explicit Animation(base::TimeDelta timer_interval);
- virtual ~Animation();
+ ~Animation() override;
// Starts the animation. Does nothing if the animation is already running.
void Start();
@@ -81,9 +81,9 @@
AnimationDelegate* delegate() { return delegate_; }
// AnimationContainer::Element overrides
- virtual void SetStartTime(base::TimeTicks start_time) override;
+ void SetStartTime(base::TimeTicks start_time) override;
virtual void Step(base::TimeTicks time_now) = 0;
- virtual base::TimeDelta GetTimerInterval() const override;
+ base::TimeDelta GetTimerInterval() const override;
private:
// Interval for the animation.
diff --git a/ui/gfx/animation/animation_container_unittest.cc b/ui/gfx/animation/animation_container_unittest.cc
index ba8e2c9..c97485a 100644
--- a/ui/gfx/animation/animation_container_unittest.cc
+++ b/ui/gfx/animation/animation_container_unittest.cc
@@ -25,13 +25,12 @@
bool empty() const { return empty_; }
private:
- virtual void AnimationContainerProgressed(
- AnimationContainer* container) override {
+ void AnimationContainerProgressed(AnimationContainer* container) override {
progressed_count_++;
}
// Invoked when no more animations are being managed by this container.
- virtual void AnimationContainerEmpty(AnimationContainer* container) override {
+ void AnimationContainerEmpty(AnimationContainer* container) override {
empty_ = true;
}
@@ -47,8 +46,7 @@
: LinearAnimation(20, 20, delegate) {
}
- virtual void AnimateToState(double state) override {
- }
+ void AnimateToState(double state) override {}
private:
DISALLOW_COPY_AND_ASSIGN(TestAnimation);
diff --git a/ui/gfx/animation/animation_unittest.cc b/ui/gfx/animation/animation_unittest.cc
index d86f87a..779e3ec 100644
--- a/ui/gfx/animation/animation_unittest.cc
+++ b/ui/gfx/animation/animation_unittest.cc
@@ -29,7 +29,7 @@
: LinearAnimation(frame_rate, delegate) {
}
- virtual void AnimateToState(double state) override {
+ void AnimateToState(double state) override {
EXPECT_LE(0.0, state);
EXPECT_GE(1.0, state);
}
@@ -44,7 +44,7 @@
: LinearAnimation(duration, frame_rate, delegate) {
}
- virtual void AnimateToState(double state) override {
+ void AnimateToState(double state) override {
if (state >= 0.5)
Stop();
}
@@ -59,7 +59,7 @@
: LinearAnimation(duration, frame_rate, delegate) {
}
- virtual void AnimateToState(double state) override {
+ void AnimateToState(double state) override {
if (state >= 0.5)
End();
}
@@ -71,7 +71,7 @@
// AnimationDelegate implementation that deletes the animation in ended.
class DeletingAnimationDelegate : public AnimationDelegate {
public:
- virtual void AnimationEnded(const Animation* animation) override {
+ void AnimationEnded(const Animation* animation) override {
delete animation;
base::MessageLoop::current()->Quit();
}
diff --git a/ui/gfx/animation/linear_animation.h b/ui/gfx/animation/linear_animation.h
index d74b847..e47a783 100644
--- a/ui/gfx/animation/linear_animation.h
+++ b/ui/gfx/animation/linear_animation.h
@@ -30,7 +30,7 @@
// Gets the value for the current state, according to the animation curve in
// use. This class provides only for a linear relationship, however subclasses
// can override this to provide others.
- virtual double GetCurrentValue() const override;
+ double GetCurrentValue() const override;
// Change the current state of the animation to |new_value|.
void SetCurrentValue(double new_value);
@@ -50,16 +50,16 @@
// Invoked by the AnimationContainer when the animation is running to advance
// the animation. Use |time_now| rather than Time::Now to avoid multiple
// animations running at the same time diverging.
- virtual void Step(base::TimeTicks time_now) override;
+ void Step(base::TimeTicks time_now) override;
// Overriden to initialize state.
- virtual void AnimationStarted() override;
+ void AnimationStarted() override;
// Overriden to advance to the end (if End was invoked).
- virtual void AnimationStopped() override;
+ void AnimationStopped() override;
// Overriden to return true if state is not 1.
- virtual bool ShouldSendCanceledFromStop() override;
+ bool ShouldSendCanceledFromStop() override;
private:
base::TimeDelta duration_;
diff --git a/ui/gfx/animation/multi_animation.h b/ui/gfx/animation/multi_animation.h
index bbcbae4..9e60b66 100644
--- a/ui/gfx/animation/multi_animation.h
+++ b/ui/gfx/animation/multi_animation.h
@@ -46,7 +46,7 @@
typedef std::vector<Part> Parts;
MultiAnimation(const Parts& parts, base::TimeDelta timer_interval);
- virtual ~MultiAnimation();
+ ~MultiAnimation() override;
// Default interval.
static base::TimeDelta GetDefaultTimerInterval();
@@ -57,15 +57,15 @@
// Returns the current value. The current value for a MultiAnimation is
// determined from the tween type of the current part.
- virtual double GetCurrentValue() const override;
+ double GetCurrentValue() const override;
// Returns the index of the current part.
size_t current_part_index() const { return current_part_index_; }
protected:
// Animation overrides.
- virtual void Step(base::TimeTicks time_now) override;
- virtual void SetStartTime(base::TimeTicks start_time) override;
+ void Step(base::TimeTicks time_now) override;
+ void SetStartTime(base::TimeTicks start_time) override;
private:
// Returns the part containing the specified time. |time_ms| is reset to be
diff --git a/ui/gfx/animation/slide_animation.h b/ui/gfx/animation/slide_animation.h
index 3795e36..58effac 100644
--- a/ui/gfx/animation/slide_animation.h
+++ b/ui/gfx/animation/slide_animation.h
@@ -47,7 +47,7 @@
class GFX_EXPORT SlideAnimation : public LinearAnimation {
public:
explicit SlideAnimation(AnimationDelegate* target);
- virtual ~SlideAnimation();
+ ~SlideAnimation() override;
// Set the animation back to the 0 state.
virtual void Reset();
@@ -66,7 +66,7 @@
int GetSlideDuration() const { return slide_duration_; }
void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; }
- virtual double GetCurrentValue() const override;
+ double GetCurrentValue() const override;
bool IsShowing() const { return showing_; }
bool IsClosing() const { return !showing_ && value_end_ < value_current_; }
@@ -74,7 +74,7 @@
private:
// Overridden from Animation.
- virtual void AnimateToState(double state) override;
+ void AnimateToState(double state) override;
AnimationDelegate* target_;
diff --git a/ui/gfx/animation/throb_animation.h b/ui/gfx/animation/throb_animation.h
index 27da800..0523b44 100644
--- a/ui/gfx/animation/throb_animation.h
+++ b/ui/gfx/animation/throb_animation.h
@@ -19,7 +19,7 @@
class GFX_EXPORT ThrobAnimation : public SlideAnimation {
public:
explicit ThrobAnimation(AnimationDelegate* target);
- virtual ~ThrobAnimation() {}
+ ~ThrobAnimation() override {}
// Starts throbbing. cycles_til_stop gives the number of cycles to do before
// stopping. A negative value means "throb indefinitely".
@@ -29,13 +29,13 @@
void SetThrobDuration(int duration) { throb_duration_ = duration; }
// Overridden to reset to the slide duration.
- virtual void Reset() override;
- virtual void Reset(double value) override;
- virtual void Show() override;
- virtual void Hide() override;
+ void Reset() override;
+ void Reset(double value) override;
+ void Show() override;
+ void Hide() override;
// Overridden to maintain the slide duration.
- virtual void SetSlideDuration(int duration) override;
+ void SetSlideDuration(int duration) override;
// The number of cycles remaining until the animation stops.
void set_cycles_remaining(int value) { cycles_remaining_ = value; }
@@ -43,7 +43,7 @@
protected:
// Overriden to continually throb (assuming we're throbbing).
- virtual void Step(base::TimeTicks time_now) override;
+ void Step(base::TimeTicks time_now) override;
private:
// Resets state such that we behave like SlideAnimation.
diff --git a/ui/gfx/canvas_paint_mac.h b/ui/gfx/canvas_paint_mac.h
index f3658c3..b8d9974 100644
--- a/ui/gfx/canvas_paint_mac.h
+++ b/ui/gfx/canvas_paint_mac.h
@@ -22,7 +22,7 @@
// This constructor assumes the result is opaque.
explicit CanvasSkiaPaint(NSRect dirtyRect);
CanvasSkiaPaint(NSRect dirtyRect, bool opaque);
- virtual ~CanvasSkiaPaint();
+ ~CanvasSkiaPaint() override;
// If true, the data painted into the CanvasSkiaPaint is blended onto the
// current context, else it is copied.
diff --git a/ui/gfx/color_analysis.h b/ui/gfx/color_analysis.h
index b3bd4d2..b7ad314 100644
--- a/ui/gfx/color_analysis.h
+++ b/ui/gfx/color_analysis.h
@@ -40,9 +40,9 @@
class GFX_EXPORT GridSampler : public KMeanImageSampler {
public:
GridSampler();
- virtual ~GridSampler();
+ ~GridSampler() override;
- virtual int GetSample(int width, int height) override;
+ int GetSample(int width, int height) override;
private:
// The number of times GetSample has been called.
diff --git a/ui/gfx/color_analysis_unittest.cc b/ui/gfx/color_analysis_unittest.cc
index 128209a..d65fec7 100644
--- a/ui/gfx/color_analysis_unittest.cc
+++ b/ui/gfx/color_analysis_unittest.cc
@@ -113,14 +113,13 @@
current_result_index_(0) {
}
- virtual ~MockKMeanImageSampler() {
- }
+ ~MockKMeanImageSampler() override {}
void AddSample(int sample) {
prebaked_sample_results_.push_back(sample);
}
- virtual int GetSample(int width, int height) override {
+ int GetSample(int width, int height) override {
if (current_result_index_ >= prebaked_sample_results_.size()) {
current_result_index_ = 0;
}
diff --git a/ui/gfx/display_change_notifier_unittest.cc b/ui/gfx/display_change_notifier_unittest.cc
index 700793a..47b5bd0 100644
--- a/ui/gfx/display_change_notifier_unittest.cc
+++ b/ui/gfx/display_change_notifier_unittest.cc
@@ -19,18 +19,14 @@
latest_metrics_change_(DisplayObserver::DISPLAY_METRIC_NONE)
{}
- virtual ~MockDisplayObserver() { }
+ ~MockDisplayObserver() override {}
- virtual void OnDisplayAdded(const Display& display) override {
- display_added_++;
- }
+ void OnDisplayAdded(const Display& display) override { display_added_++; }
- virtual void OnDisplayRemoved(const Display& display) override {
- display_removed_++;
- }
+ void OnDisplayRemoved(const Display& display) override { display_removed_++; }
- virtual void OnDisplayMetricsChanged(const Display& display,
- uint32_t metrics) override {
+ void OnDisplayMetricsChanged(const Display& display,
+ uint32_t metrics) override {
display_changed_++;
latest_metrics_change_ = metrics;
}
diff --git a/ui/gfx/geometry/r_tree_base.h b/ui/gfx/geometry/r_tree_base.h
index b83aeef..dbb3b6d 100644
--- a/ui/gfx/geometry/r_tree_base.h
+++ b/ui/gfx/geometry/r_tree_base.h
@@ -93,13 +93,13 @@
class GFX_EXPORT RecordBase : public NodeBase {
public:
explicit RecordBase(const Rect& rect);
- virtual ~RecordBase();
+ ~RecordBase() override;
- virtual void AppendIntersectingRecords(const Rect& query_rect,
- Records* records_out) const override;
- virtual void AppendAllRecords(Records* records_out) const override;
- virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
- virtual int Level() const override;
+ void AppendIntersectingRecords(const Rect& query_rect,
+ Records* records_out) const override;
+ void AppendAllRecords(Records* records_out) const override;
+ scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
+ int Level() const override;
private:
friend class RTreeTest;
@@ -112,13 +112,13 @@
public:
// Constructs an empty Node with |level_| of 0.
Node();
- virtual ~Node();
+ ~Node() override;
- virtual void AppendIntersectingRecords(const Rect& query_rect,
- Records* records_out) const override;
- virtual scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
- virtual int Level() const override;
- virtual void AppendAllRecords(Records* matches_out) const override;
+ void AppendIntersectingRecords(const Rect& query_rect,
+ Records* records_out) const override;
+ scoped_ptr<NodeBase> RemoveAndReturnLastChild() override;
+ int Level() const override;
+ void AppendAllRecords(Records* matches_out) const override;
// Constructs a new Node that is the parent of this Node and already has
// this Node as its sole child. Valid to call only on root Nodes, meaning
@@ -219,7 +219,7 @@
Rects* vertical_bounds,
Rects* horizontal_bounds);
- virtual void RecomputeLocalBounds() override;
+ void RecomputeLocalBounds() override;
// Returns the increase in overlap value, as defined in Beckmann et al. as
// the sum of the areas of the intersection of all child rectangles
diff --git a/ui/gfx/image/canvas_image_source.h b/ui/gfx/image/canvas_image_source.h
index 33d97cb..8c1a87d 100644
--- a/ui/gfx/image/canvas_image_source.h
+++ b/ui/gfx/image/canvas_image_source.h
@@ -30,10 +30,10 @@
const gfx::Size& size() const { return size_; };
// Overridden from gfx::ImageSkiaSource.
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) override;
+ gfx::ImageSkiaRep GetImageForScale(float scale) override;
protected:
- virtual ~CanvasImageSource() {}
+ ~CanvasImageSource() override {}
const gfx::Size size_;
const bool is_opaque_;
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index bd8cb20..3046f36 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -66,9 +66,9 @@
class PNGImageSource : public ImageSkiaSource {
public:
PNGImageSource() {}
- virtual ~PNGImageSource() {}
+ ~PNGImageSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
if (image_skia_reps_.empty())
return ImageSkiaRep();
@@ -221,18 +221,13 @@
image_png_reps_(image_png_reps) {
}
- virtual ~ImageRepPNG() {
- }
+ ~ImageRepPNG() override {}
- virtual int Width() const override {
- return Size().width();
- }
+ int Width() const override { return Size().width(); }
- virtual int Height() const override {
- return Size().height();
- }
+ int Height() const override { return Size().height(); }
- virtual gfx::Size Size() const override {
+ gfx::Size Size() const override {
// Read the PNG data to get the image size, caching it.
if (!size_cache_) {
for (std::vector<ImagePNGRep>::const_iterator it = image_reps().begin();
@@ -267,20 +262,13 @@
image_(image) {
}
- virtual ~ImageRepSkia() {
- }
+ ~ImageRepSkia() override {}
- virtual int Width() const override {
- return image_->width();
- }
+ int Width() const override { return image_->width(); }
- virtual int Height() const override {
- return image_->height();
- }
+ int Height() const override { return image_->height(); }
- virtual gfx::Size Size() const override {
- return image_->size();
- }
+ gfx::Size Size() const override { return image_->size(); }
ImageSkia* image() { return image_.get(); }
@@ -332,22 +320,16 @@
CHECK(image);
}
- virtual ~ImageRepCocoa() {
+ ~ImageRepCocoa() override {
base::mac::NSObjectRelease(image_);
image_ = nil;
}
- virtual int Width() const override {
- return Size().width();
- }
+ int Width() const override { return Size().width(); }
- virtual int Height() const override {
- return Size().height();
- }
+ int Height() const override { return Size().height(); }
- virtual gfx::Size Size() const override {
- return internal::NSImageSize(image_);
- }
+ gfx::Size Size() const override { return internal::NSImageSize(image_); }
NSImage* image() const { return image_; }
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index d172d54..a1fefce 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -54,11 +54,10 @@
second_(second),
source_name_(source_name) {
}
- virtual ~BinaryImageSource() {
- }
+ ~BinaryImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep first_rep = first_.GetRepresentation(scale);
ImageSkiaRep second_rep = second_.GetRepresentation(scale);
if (first_rep.pixel_size() != second_rep.pixel_size()) {
@@ -106,11 +105,10 @@
alpha_(alpha) {
}
- virtual ~BlendingImageSource() {
- }
+ ~BlendingImageSource() override {}
// BinaryImageSource overrides:
- virtual ImageSkiaRep CreateImageSkiaRep(
+ ImageSkiaRep CreateImageSkiaRep(
const ImageSkiaRep& first_rep,
const ImageSkiaRep& second_rep) const override {
SkBitmap blended = SkBitmapOperations::CreateBlendedBitmap(
@@ -133,10 +131,10 @@
second_(second) {
}
- virtual ~SuperimposedImageSource() {}
+ ~SuperimposedImageSource() override {}
// gfx::CanvasImageSource override.
- virtual void Draw(Canvas* canvas) override {
+ void Draw(Canvas* canvas) override {
canvas->DrawImageInt(first_, 0, 0);
canvas->DrawImageInt(second_,
(first_.width() - second_.width()) / 2,
@@ -157,11 +155,11 @@
alpha_(alpha) {
}
- virtual ~TransparentImageSource() {}
+ ~TransparentImageSource() override {}
private:
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
SkBitmap alpha;
alpha.allocN32Pixels(image_rep.pixel_width(),
@@ -184,11 +182,10 @@
: BinaryImageSource(rgb, alpha, "MaskedImageSource") {
}
- virtual ~MaskedImageSource() {
- }
+ ~MaskedImageSource() override {}
// BinaryImageSource overrides:
- virtual ImageSkiaRep CreateImageSkiaRep(
+ ImageSkiaRep CreateImageSkiaRep(
const ImageSkiaRep& first_rep,
const ImageSkiaRep& second_rep) const override {
return ImageSkiaRep(SkBitmapOperations::CreateMaskedBitmap(
@@ -212,11 +209,10 @@
dst_h_(dst_h) {
}
- virtual ~TiledImageSource() {
- }
+ ~TiledImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep source_rep = source_.GetRepresentation(scale);
gfx::Rect bounds = DIPToPixelBounds(gfx::Rect(src_x_, src_y_, dst_w_,
dst_h_), source_rep.scale());
@@ -245,11 +241,10 @@
hsl_shift_(hsl_shift) {
}
- virtual ~HSLImageSource() {
- }
+ ~HSLImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
return gfx::ImageSkiaRep(
SkBitmapOperations::CreateHSLShiftedBitmap(image_rep.sk_bitmap(),
@@ -275,11 +270,10 @@
mask_(mask) {
}
- virtual ~ButtonImageSource() {
- }
+ ~ButtonImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
ImageSkiaRep mask_rep = mask_.GetRepresentation(scale);
if (image_rep.scale() != mask_rep.scale()) {
@@ -310,11 +304,10 @@
subset_bounds_(subset_bounds) {
}
- virtual ~ExtractSubsetImageSource() {
- }
+ ~ExtractSubsetImageSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
ImageSkiaRep image_rep = image_.GetRepresentation(scale);
SkIRect subset_bounds_in_pixel = RectToSkIRect(
DIPToPixelBounds(subset_bounds_, image_rep.scale()));
@@ -343,10 +336,10 @@
resize_method_(method),
target_dip_size_(target_dip_size) {
}
- virtual ~ResizeSource() {}
+ ~ResizeSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
if (image_rep.GetWidth() == target_dip_size_.width() &&
image_rep.GetHeight() == target_dip_size_.height())
@@ -378,10 +371,10 @@
: source_(source),
shaodws_in_dip_(shadows_in_dip) {
}
- virtual ~DropShadowSource() {}
+ ~DropShadowSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
ShadowValues shadows_in_pixel;
@@ -410,10 +403,10 @@
: source_(source),
rotation_(rotation) {
}
- virtual ~RotatedSource() {}
+ ~RotatedSource() override {}
// gfx::ImageSkiaSource overrides:
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
const ImageSkiaRep& image_rep = source_.GetRepresentation(scale);
const SkBitmap rotated_bitmap =
SkBitmapOperations::Rotate(image_rep.sk_bitmap(), rotation_);
diff --git a/ui/gfx/image/image_skia_unittest.cc b/ui/gfx/image/image_skia_unittest.cc
index 1029ddb..a8bd66d 100644
--- a/ui/gfx/image/image_skia_unittest.cc
+++ b/ui/gfx/image/image_skia_unittest.cc
@@ -30,12 +30,9 @@
public:
explicit FixedSource(const ImageSkiaRep& image) : image_(image) {}
- virtual ~FixedSource() {
- }
+ ~FixedSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
- return image_;
- }
+ ImageSkiaRep GetImageForScale(float scale) override { return image_; }
private:
ImageSkiaRep image_;
@@ -47,10 +44,9 @@
public:
explicit FixedScaleSource(const ImageSkiaRep& image) : image_(image) {}
- virtual ~FixedScaleSource() {
- }
+ ~FixedScaleSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
if (!image_.unscaled() && image_.scale() != scale)
return ImageSkiaRep();
return image_;
@@ -68,10 +64,9 @@
: size_(size),
last_requested_scale_(0.0f) {}
- virtual ~DynamicSource() {
- }
+ ~DynamicSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
last_requested_scale_ = scale;
return gfx::ImageSkiaRep(size_, scale);
}
@@ -94,10 +89,9 @@
NullSource() {
}
- virtual ~NullSource() {
- }
+ ~NullSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
return gfx::ImageSkiaRep();
}
@@ -117,7 +111,7 @@
can_modify_(false) {
}
- virtual void Run() override {
+ void Run() override {
can_read_ = image_skia_->CanRead();
can_modify_ = image_skia_->CanModify();
if (can_read_)
diff --git a/ui/gfx/interpolated_transform.h b/ui/gfx/interpolated_transform.h
index 441af38..dea52b4 100644
--- a/ui/gfx/interpolated_transform.h
+++ b/ui/gfx/interpolated_transform.h
@@ -91,10 +91,10 @@
float end_degrees,
float start_time,
float end_time);
- virtual ~InterpolatedRotation();
+ ~InterpolatedRotation() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const float start_degrees_;
@@ -119,10 +119,10 @@
float end_degrees,
float start_time,
float end_time);
- virtual ~InterpolatedAxisAngleRotation();
+ ~InterpolatedAxisAngleRotation() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
gfx::Vector3dF axis_;
@@ -149,10 +149,10 @@
const gfx::Point3F& end_scale,
float start_time,
float end_time);
- virtual ~InterpolatedScale();
+ ~InterpolatedScale() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const gfx::Point3F start_scale_;
@@ -175,10 +175,10 @@
const gfx::Point3F& end_pos,
float start_time,
float end_time);
- virtual ~InterpolatedTranslation();
+ ~InterpolatedTranslation() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const gfx::Point3F start_pos_;
@@ -199,10 +199,10 @@
class GFX_EXPORT InterpolatedConstantTransform : public InterpolatedTransform {
public:
explicit InterpolatedConstantTransform(const gfx::Transform& transform);
- virtual ~InterpolatedConstantTransform();
+ ~InterpolatedConstantTransform() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
const gfx::Transform transform_;
@@ -230,10 +230,10 @@
InterpolatedTransform* transform,
float start_time,
float end_time);
- virtual ~InterpolatedTransformAboutPivot();
+ ~InterpolatedTransformAboutPivot() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
void Init(const gfx::Point& pivot, InterpolatedTransform* transform);
@@ -253,10 +253,10 @@
float start_time,
float end_time);
- virtual ~InterpolatedMatrixTransform();
+ ~InterpolatedMatrixTransform() override;
protected:
- virtual gfx::Transform InterpolateButDoNotCompose(float t) const override;
+ gfx::Transform InterpolateButDoNotCompose(float t) const override;
private:
void Init(const gfx::Transform& start_transform,
diff --git a/ui/gfx/platform_font_mac.h b/ui/gfx/platform_font_mac.h
index 05c1249..aa85f82 100644
--- a/ui/gfx/platform_font_mac.h
+++ b/ui/gfx/platform_font_mac.h
@@ -19,21 +19,21 @@
int font_size);
// Overridden from PlatformFont:
- virtual Font DeriveFont(int size_delta, int style) const override;
- virtual int GetHeight() const override;
- virtual int GetBaseline() const override;
- virtual int GetCapHeight() const override;
- virtual int GetExpectedTextWidth(int length) const override;
- virtual int GetStyle() const override;
- virtual std::string GetFontName() const override;
- virtual std::string GetActualFontNameForTesting() const override;
- virtual int GetFontSize() const override;
- virtual const FontRenderParams& GetFontRenderParams() const override;
- virtual NativeFont GetNativeFont() const override;
+ Font DeriveFont(int size_delta, int style) const override;
+ int GetHeight() const override;
+ int GetBaseline() const override;
+ int GetCapHeight() const override;
+ int GetExpectedTextWidth(int length) const override;
+ int GetStyle() const override;
+ std::string GetFontName() const override;
+ std::string GetActualFontNameForTesting() const override;
+ int GetFontSize() const override;
+ const FontRenderParams& GetFontRenderParams() const override;
+ NativeFont GetNativeFont() const override;
private:
PlatformFontMac(const std::string& font_name, int font_size, int font_style);
- virtual ~PlatformFontMac();
+ ~PlatformFontMac() override;
// Calculates and caches the font metrics.
void CalculateMetrics();
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 329be9f..c3508ff 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -77,31 +77,31 @@
class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
public:
RenderTextHarfBuzz();
- virtual ~RenderTextHarfBuzz();
+ ~RenderTextHarfBuzz() override;
// Overridden from RenderText.
- virtual Size GetStringSize() override;
- virtual SizeF GetStringSizeF() override;
- virtual SelectionModel FindCursorPosition(const Point& point) override;
- virtual std::vector<FontSpan> GetFontSpansForTesting() override;
- virtual Range GetGlyphBounds(size_t index) override;
+ Size GetStringSize() override;
+ SizeF GetStringSizeF() override;
+ SelectionModel FindCursorPosition(const Point& point) override;
+ std::vector<FontSpan> GetFontSpansForTesting() override;
+ Range GetGlyphBounds(size_t index) override;
protected:
// Overridden from RenderText.
- virtual int GetLayoutTextBaseline() override;
- virtual SelectionModel AdjacentCharSelectionModel(
+ int GetLayoutTextBaseline() override;
+ SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
VisualCursorDirection direction) override;
- virtual SelectionModel AdjacentWordSelectionModel(
+ SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
VisualCursorDirection direction) override;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
- virtual size_t TextIndexToLayoutIndex(size_t index) const override;
- virtual size_t LayoutIndexToTextIndex(size_t index) const override;
- virtual bool IsValidCursorIndex(size_t index) override;
- virtual void ResetLayout() override;
- virtual void EnsureLayout() override;
- virtual void DrawVisualText(Canvas* canvas) override;
+ std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ size_t TextIndexToLayoutIndex(size_t index) const override;
+ size_t LayoutIndexToTextIndex(size_t index) const override;
+ bool IsValidCursorIndex(size_t index) override;
+ void ResetLayout() override;
+ void EnsureLayout() override;
+ void DrawVisualText(Canvas* canvas) override;
private:
friend class RenderTextTest;
diff --git a/ui/gfx/render_text_mac.h b/ui/gfx/render_text_mac.h
index f69bedb..247bd53 100644
--- a/ui/gfx/render_text_mac.h
+++ b/ui/gfx/render_text_mac.h
@@ -23,31 +23,31 @@
class RenderTextMac : public RenderText {
public:
RenderTextMac();
- virtual ~RenderTextMac();
+ ~RenderTextMac() override;
// Overridden from RenderText:
- virtual Size GetStringSize() override;
- virtual SizeF GetStringSizeF() override;
- virtual SelectionModel FindCursorPosition(const Point& point) override;
- virtual std::vector<FontSpan> GetFontSpansForTesting() override;
+ Size GetStringSize() override;
+ SizeF GetStringSizeF() override;
+ SelectionModel FindCursorPosition(const Point& point) override;
+ std::vector<FontSpan> GetFontSpansForTesting() override;
protected:
// Overridden from RenderText:
- virtual int GetLayoutTextBaseline() override;
- virtual SelectionModel AdjacentCharSelectionModel(
+ int GetLayoutTextBaseline() override;
+ SelectionModel AdjacentCharSelectionModel(
const SelectionModel& selection,
VisualCursorDirection direction) override;
- virtual SelectionModel AdjacentWordSelectionModel(
+ SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
VisualCursorDirection direction) override;
- virtual Range GetGlyphBounds(size_t index) override;
- virtual std::vector<Rect> GetSubstringBounds(const Range& range) override;
- virtual size_t TextIndexToLayoutIndex(size_t index) const override;
- virtual size_t LayoutIndexToTextIndex(size_t index) const override;
- virtual bool IsValidCursorIndex(size_t index) override;
- virtual void ResetLayout() override;
- virtual void EnsureLayout() override;
- virtual void DrawVisualText(Canvas* canvas) override;
+ Range GetGlyphBounds(size_t index) override;
+ std::vector<Rect> GetSubstringBounds(const Range& range) override;
+ size_t TextIndexToLayoutIndex(size_t index) const override;
+ size_t LayoutIndexToTextIndex(size_t index) const override;
+ bool IsValidCursorIndex(size_t index) override;
+ void ResetLayout() override;
+ void EnsureLayout() override;
+ void DrawVisualText(Canvas* canvas) override;
private:
struct TextRun {
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index c07dd80..45f3f45 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -91,11 +91,9 @@
ScreenMac::DisplayReconfigurationCallBack, this);
}
- virtual bool IsDIPEnabled() override {
- return true;
- }
+ bool IsDIPEnabled() override { return true; }
- virtual gfx::Point GetCursorScreenPoint() override {
+ gfx::Point GetCursorScreenPoint() override {
NSPoint mouseLocation = [NSEvent mouseLocation];
// Flip coordinates to gfx (0,0 in top-left corner) using primary screen.
NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
@@ -103,28 +101,23 @@
return gfx::Point(mouseLocation.x, mouseLocation.y);
}
- virtual gfx::NativeWindow GetWindowUnderCursor() override {
+ gfx::NativeWindow GetWindowUnderCursor() override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
- virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
- override {
+ gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
NOTIMPLEMENTED();
return gfx::NativeWindow();
}
- virtual int GetNumDisplays() const override {
- return GetAllDisplays().size();
+ int GetNumDisplays() const override { return GetAllDisplays().size(); }
- }
-
- virtual std::vector<gfx::Display> GetAllDisplays() const override {
+ std::vector<gfx::Display> GetAllDisplays() const override {
return displays_;
}
- virtual gfx::Display GetDisplayNearestWindow(
- gfx::NativeView view) const override {
+ gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override {
NSWindow* window = nil;
#if !defined(USE_AURA)
if (view)
@@ -138,8 +131,7 @@
return GetDisplayForScreen(match_screen);
}
- virtual gfx::Display GetDisplayNearestPoint(
- const gfx::Point& point) const override {
+ gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override {
NSPoint ns_point = NSPointFromCGPoint(point.ToCGPoint());
NSArray* screens = [NSScreen screens];
@@ -153,14 +145,13 @@
}
// Returns the display that most closely intersects the provided bounds.
- virtual gfx::Display GetDisplayMatching(
- const gfx::Rect& match_rect) const override {
+ gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override {
NSScreen* match_screen = GetMatchingScreen(match_rect);
return GetDisplayForScreen(match_screen);
}
// Returns the primary display.
- virtual gfx::Display GetPrimaryDisplay() const override {
+ gfx::Display GetPrimaryDisplay() const override {
// Primary display is defined as the display with the menubar,
// which is always at index 0.
NSScreen* primary = [[NSScreen screens] objectAtIndex:0];
@@ -168,11 +159,11 @@
return display;
}
- virtual void AddObserver(gfx::DisplayObserver* observer) override {
+ void AddObserver(gfx::DisplayObserver* observer) override {
change_notifier_.AddObserver(observer);
}
- virtual void RemoveObserver(gfx::DisplayObserver* observer) override {
+ void RemoveObserver(gfx::DisplayObserver* observer) override {
change_notifier_.RemoveObserver(observer);
}
diff --git a/ui/gfx/test/run_all_unittests.cc b/ui/gfx/test/run_all_unittests.cc
index 2c2f4ee..1483929 100644
--- a/ui/gfx/test/run_all_unittests.cc
+++ b/ui/gfx/test/run_all_unittests.cc
@@ -28,7 +28,7 @@
GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() override {
+ void Initialize() override {
base::TestSuite::Initialize();
#if defined(OS_ANDROID)
@@ -46,7 +46,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() override {
+ void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/gl/gl_bindings_skia_in_process.cc b/ui/gl/gl_bindings_skia_in_process.cc
index 0e2dfe5..a01bc38 100644
--- a/ui/gl/gl_bindings_skia_in_process.cc
+++ b/ui/gl/gl_bindings_skia_in_process.cc
@@ -467,7 +467,7 @@
}
GLvoid StubGLUniform1f(GLint location, GLfloat v) {
- glUniform1i(location, v);
+ glUniform1f(location, v);
}
GLvoid StubGLUniform1i(GLint location, GLint v) {
@@ -483,7 +483,7 @@
}
GLvoid StubGLUniform2f(GLint location, GLfloat v0, GLfloat v1) {
- glUniform2i(location, v0, v1);
+ glUniform2f(location, v0, v1);
}
GLvoid StubGLUniform2i(GLint location, GLint v0, GLint v1) {
@@ -499,7 +499,7 @@
}
GLvoid StubGLUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
- glUniform3i(location, v0, v1, v2);
+ glUniform3f(location, v0, v1, v2);
}
GLvoid StubGLUniform3i(GLint location, GLint v0, GLint v1, GLint v2) {
@@ -516,7 +516,7 @@
GLvoid StubGLUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
GLfloat v3) {
- glUniform4i(location, v0, v1, v2, v3);
+ glUniform4f(location, v0, v1, v2, v3);
}
GLvoid StubGLUniform4i(GLint location, GLint v0, GLint v1, GLint v2,
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index 8e5ecd8..372f513 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -186,9 +186,9 @@
explicit GLContextReal(GLShareGroup* share_group);
protected:
- virtual ~GLContextReal();
+ ~GLContextReal() override;
- virtual void SetCurrent(GLSurface* surface) override;
+ void SetCurrent(GLSurface* surface) override;
private:
DISALLOW_COPY_AND_ASSIGN(GLContextReal);
diff --git a/ui/gl/gl_context_cgl.h b/ui/gl/gl_context_cgl.h
index 5bcb335..beeb9f9 100644
--- a/ui/gl/gl_context_cgl.h
+++ b/ui/gl/gl_context_cgl.h
@@ -19,19 +19,19 @@
explicit GLContextCGL(GLShareGroup* share_group);
// Implement GLContext.
- virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) override;
- virtual void Destroy() override;
- virtual bool MakeCurrent(GLSurface* surface) override;
- virtual void ReleaseCurrent(GLSurface* surface) override;
- virtual bool IsCurrent(GLSurface* surface) override;
- virtual void* GetHandle() override;
- virtual void SetSwapInterval(int interval) override;
- virtual bool GetTotalGpuMemory(size_t* bytes) override;
- virtual void SetSafeToForceGpuSwitch() override;
+ bool Initialize(GLSurface* compatible_surface,
+ GpuPreference gpu_preference) override;
+ void Destroy() override;
+ bool MakeCurrent(GLSurface* surface) override;
+ void ReleaseCurrent(GLSurface* surface) override;
+ bool IsCurrent(GLSurface* surface) override;
+ void* GetHandle() override;
+ void SetSwapInterval(int interval) override;
+ bool GetTotalGpuMemory(size_t* bytes) override;
+ void SetSafeToForceGpuSwitch() override;
protected:
- virtual ~GLContextCGL();
+ ~GLContextCGL() override;
private:
GpuPreference GetGpuPreference();
diff --git a/ui/gl/gl_context_osmesa.h b/ui/gl/gl_context_osmesa.h
index 5cac4de..0ae32db 100644
--- a/ui/gl/gl_context_osmesa.h
+++ b/ui/gl/gl_context_osmesa.h
@@ -22,17 +22,17 @@
explicit GLContextOSMesa(GLShareGroup* share_group);
// Implement GLContext.
- virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) override;
- virtual void Destroy() override;
- virtual bool MakeCurrent(GLSurface* surface) override;
- virtual void ReleaseCurrent(GLSurface* surface) override;
- virtual bool IsCurrent(GLSurface* surface) override;
- virtual void* GetHandle() override;
- virtual void SetSwapInterval(int interval) override;
+ bool Initialize(GLSurface* compatible_surface,
+ GpuPreference gpu_preference) override;
+ void Destroy() override;
+ bool MakeCurrent(GLSurface* surface) override;
+ void ReleaseCurrent(GLSurface* surface) override;
+ bool IsCurrent(GLSurface* surface) override;
+ void* GetHandle() override;
+ void SetSwapInterval(int interval) override;
protected:
- virtual ~GLContextOSMesa();
+ ~GLContextOSMesa() override;
private:
OSMesaContext context_;
diff --git a/ui/gl/gl_context_stub.h b/ui/gl/gl_context_stub.h
index c95be1d..1a7eb24 100644
--- a/ui/gl/gl_context_stub.h
+++ b/ui/gl/gl_context_stub.h
@@ -15,19 +15,19 @@
GLContextStub();
// Implement GLContext.
- virtual bool Initialize(GLSurface* compatible_surface,
- GpuPreference gpu_preference) override;
- virtual void Destroy() override;
- virtual bool MakeCurrent(GLSurface* surface) override;
- virtual void ReleaseCurrent(GLSurface* surface) override;
- virtual bool IsCurrent(GLSurface* surface) override;
- virtual void* GetHandle() override;
- virtual void SetSwapInterval(int interval) override;
- virtual std::string GetExtensions() override;
- virtual std::string GetGLRenderer() override;
+ bool Initialize(GLSurface* compatible_surface,
+ GpuPreference gpu_preference) override;
+ void Destroy() override;
+ bool MakeCurrent(GLSurface* surface) override;
+ void ReleaseCurrent(GLSurface* surface) override;
+ bool IsCurrent(GLSurface* surface) override;
+ void* GetHandle() override;
+ void SetSwapInterval(int interval) override;
+ std::string GetExtensions() override;
+ std::string GetGLRenderer() override;
protected:
- virtual ~GLContextStub();
+ ~GLContextStub() override;
private:
DISALLOW_COPY_AND_ASSIGN(GLContextStub);
diff --git a/ui/gl/gl_context_stub_with_extensions.h b/ui/gl/gl_context_stub_with_extensions.h
index e701e0d..190e03e 100644
--- a/ui/gl/gl_context_stub_with_extensions.h
+++ b/ui/gl/gl_context_stub_with_extensions.h
@@ -15,15 +15,15 @@
class GL_EXPORT GLContextStubWithExtensions : public gfx::GLContextStub {
public:
GLContextStubWithExtensions() {}
- virtual std::string GetExtensions() override;
+ std::string GetExtensions() override;
void AddExtensionsString(const char* extensions);
void SetGLVersionString(const char* version_str);
protected:
- virtual std::string GetGLVersion() override;
+ std::string GetGLVersion() override;
- virtual ~GLContextStubWithExtensions() {}
+ ~GLContextStubWithExtensions() override {}
private:
std::string extensions_;
diff --git a/ui/gl/gl_fence_arb.h b/ui/gl/gl_fence_arb.h
index 614bfcb..ef43948 100644
--- a/ui/gl/gl_fence_arb.h
+++ b/ui/gl/gl_fence_arb.h
@@ -15,12 +15,12 @@
class GL_EXPORT GLFenceARB : public GLFence {
public:
GLFenceARB(bool flush);
- virtual ~GLFenceARB();
+ ~GLFenceARB() override;
// GLFence implementation:
- virtual bool HasCompleted() override;
- virtual void ClientWait() override;
- virtual void ServerWait() override;
+ bool HasCompleted() override;
+ void ClientWait() override;
+ void ServerWait() override;
private:
GLsync sync_;
diff --git a/ui/gl/gl_fence_egl.h b/ui/gl/gl_fence_egl.h
index fce6291..75a0444 100644
--- a/ui/gl/gl_fence_egl.h
+++ b/ui/gl/gl_fence_egl.h
@@ -15,12 +15,12 @@
class GL_EXPORT GLFenceEGL : public GLFence {
public:
GLFenceEGL(bool flush);
- virtual ~GLFenceEGL();
+ ~GLFenceEGL() override;
// GLFence implementation:
- virtual bool HasCompleted() override;
- virtual void ClientWait() override;
- virtual void ServerWait() override;
+ bool HasCompleted() override;
+ void ClientWait() override;
+ void ServerWait() override;
private:
EGLSyncKHR sync_;
diff --git a/ui/gl/gl_fence_nv.h b/ui/gl/gl_fence_nv.h
index c89cc42..0bac11c 100644
--- a/ui/gl/gl_fence_nv.h
+++ b/ui/gl/gl_fence_nv.h
@@ -15,12 +15,12 @@
class GL_EXPORT GLFenceNV : public GLFence {
public:
GLFenceNV(bool flush);
- virtual ~GLFenceNV();
+ ~GLFenceNV() override;
// GLFence implementation:
- virtual bool HasCompleted() override;
- virtual void ClientWait() override;
- virtual void ServerWait() override;
+ bool HasCompleted() override;
+ void ClientWait() override;
+ void ServerWait() override;
private:
GLuint fence_;
diff --git a/ui/gl/gl_gl_api_implementation.h b/ui/gl/gl_gl_api_implementation.h
index 39f9558..1b23097 100644
--- a/ui/gl/gl_gl_api_implementation.h
+++ b/ui/gl/gl_gl_api_implementation.h
@@ -42,7 +42,7 @@
protected:
GLApiBase();
- virtual ~GLApiBase();
+ ~GLApiBase() override;
void InitializeBase(DriverGL* driver);
void SignalFlush();
@@ -53,19 +53,19 @@
class RealGLApi : public GLApiBase {
public:
RealGLApi();
- virtual ~RealGLApi();
+ ~RealGLApi() override;
void Initialize(DriverGL* driver);
private:
- virtual void glFinishFn() override;
- virtual void glFlushFn() override;
+ void glFinishFn() override;
+ void glFlushFn() override;
};
// Inserts a TRACE for every GL call.
class TraceGLApi : public GLApi {
public:
TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { }
- virtual ~TraceGLApi();
+ ~TraceGLApi() override;
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
@@ -80,7 +80,7 @@
class NoContextGLApi : public GLApi {
public:
NoContextGLApi();
- virtual ~NoContextGLApi();
+ ~NoContextGLApi() override;
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
@@ -94,7 +94,7 @@
class VirtualGLApi : public GLApiBase {
public:
VirtualGLApi();
- virtual ~VirtualGLApi();
+ ~VirtualGLApi() override;
void Initialize(DriverGL* driver, GLContext* real_context);
// Sets the current virutal context.
@@ -104,9 +104,9 @@
private:
// Overridden functions from GLApiBase
- virtual const GLubyte* glGetStringFn(GLenum name) override;
- virtual void glFinishFn() override;
- virtual void glFlushFn() override;
+ const GLubyte* glGetStringFn(GLenum name) override;
+ void glFinishFn() override;
+ void glFlushFn() override;
// The real context we're running on.
GLContext* real_context_;
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index 07f3a0c..8497278 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -20,23 +20,23 @@
bool Initialize(IOSurfaceRef io_surface);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) override;
- virtual gfx::Size GetSize() override;
- virtual bool BindTexImage(unsigned target) override;
- virtual void ReleaseTexImage(unsigned target) override {}
- virtual bool CopyTexImage(unsigned target) override;
- virtual void WillUseTexImage() override {}
- virtual void DidUseTexImage() override {}
- virtual void WillModifyTexImage() override {}
- virtual void DidModifyTexImage() override {}
- virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
- int z_order,
- OverlayTransform transform,
- const Rect& bounds_rect,
- const RectF& crop_rect) override;
+ void Destroy(bool have_context) override;
+ gfx::Size GetSize() override;
+ bool BindTexImage(unsigned target) override;
+ void ReleaseTexImage(unsigned target) override {}
+ bool CopyTexImage(unsigned target) override;
+ void WillUseTexImage() override {}
+ void DidUseTexImage() override {}
+ void WillModifyTexImage() override {}
+ void DidModifyTexImage() override {}
+ bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+ int z_order,
+ OverlayTransform transform,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override;
protected:
- virtual ~GLImageIOSurface();
+ ~GLImageIOSurface() override;
private:
base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 2d6b93e..fd659e7 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -27,23 +27,23 @@
gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) override;
- virtual gfx::Size GetSize() override;
- virtual bool BindTexImage(unsigned target) override;
- virtual void ReleaseTexImage(unsigned target) override {}
- virtual bool CopyTexImage(unsigned target) override;
- virtual void WillUseTexImage() override;
- virtual void DidUseTexImage() override;
- virtual void WillModifyTexImage() override {}
- virtual void DidModifyTexImage() override {}
- virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
- int z_order,
- OverlayTransform transform,
- const Rect& bounds_rect,
- const RectF& crop_rect) override;
+ void Destroy(bool have_context) override;
+ gfx::Size GetSize() override;
+ bool BindTexImage(unsigned target) override;
+ void ReleaseTexImage(unsigned target) override {}
+ bool CopyTexImage(unsigned target) override;
+ void WillUseTexImage() override;
+ void DidUseTexImage() override;
+ void WillModifyTexImage() override {}
+ void DidModifyTexImage() override {}
+ bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+ int z_order,
+ OverlayTransform transform,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override;
protected:
- virtual ~GLImageMemory();
+ ~GLImageMemory() override;
private:
void DoBindTexImage(unsigned target);
diff --git a/ui/gl/gl_image_ref_counted_memory.h b/ui/gl/gl_image_ref_counted_memory.h
index bb7160e..6bcf217 100644
--- a/ui/gl/gl_image_ref_counted_memory.h
+++ b/ui/gl/gl_image_ref_counted_memory.h
@@ -22,10 +22,10 @@
gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~GLImageRefCountedMemory();
+ ~GLImageRefCountedMemory() override;
private:
scoped_refptr<base::RefCountedMemory> ref_counted_memory_;
diff --git a/ui/gl/gl_image_shared_memory.h b/ui/gl/gl_image_shared_memory.h
index 429d3c8..ab80b35 100644
--- a/ui/gl/gl_image_shared_memory.h
+++ b/ui/gl/gl_image_shared_memory.h
@@ -19,10 +19,10 @@
gfx::GpuMemoryBuffer::Format format);
// Overridden from GLImage:
- virtual void Destroy(bool have_context) override;
+ void Destroy(bool have_context) override;
protected:
- virtual ~GLImageSharedMemory();
+ ~GLImageSharedMemory() override;
private:
scoped_ptr<base::SharedMemory> shared_memory_;
diff --git a/ui/gl/gl_image_stub.h b/ui/gl/gl_image_stub.h
index 626afea..d836586 100644
--- a/ui/gl/gl_image_stub.h
+++ b/ui/gl/gl_image_stub.h
@@ -15,23 +15,23 @@
GLImageStub();
// Overridden from GLImage:
- virtual void Destroy(bool have_context) override {}
- virtual gfx::Size GetSize() override;
- virtual bool BindTexImage(unsigned target) override;
- virtual void ReleaseTexImage(unsigned target) override {}
- virtual bool CopyTexImage(unsigned target) override;
- virtual void WillUseTexImage() override {}
- virtual void DidUseTexImage() override {}
- virtual void WillModifyTexImage() override {}
- virtual void DidModifyTexImage() override {}
- virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
- int z_order,
- OverlayTransform transform,
- const Rect& bounds_rect,
- const RectF& crop_rect) override;
+ void Destroy(bool have_context) override {}
+ gfx::Size GetSize() override;
+ bool BindTexImage(unsigned target) override;
+ void ReleaseTexImage(unsigned target) override {}
+ bool CopyTexImage(unsigned target) override;
+ void WillUseTexImage() override {}
+ void DidUseTexImage() override {}
+ void WillModifyTexImage() override {}
+ void DidModifyTexImage() override {}
+ bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+ int z_order,
+ OverlayTransform transform,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override;
protected:
- virtual ~GLImageStub();
+ ~GLImageStub() override;
};
} // namespace gfx
diff --git a/ui/gl/gl_osmesa_api_implementation.h b/ui/gl/gl_osmesa_api_implementation.h
index 66f4a34..9d4dbe1 100644
--- a/ui/gl/gl_osmesa_api_implementation.h
+++ b/ui/gl/gl_osmesa_api_implementation.h
@@ -27,7 +27,7 @@
protected:
OSMESAApiBase();
- virtual ~OSMESAApiBase();
+ ~OSMESAApiBase() override;
void InitializeBase(DriverOSMESA* driver);
DriverOSMESA* driver_;
@@ -36,7 +36,7 @@
class GL_EXPORT RealOSMESAApi : public OSMESAApiBase {
public:
RealOSMESAApi();
- virtual ~RealOSMESAApi();
+ ~RealOSMESAApi() override;
void Initialize(DriverOSMESA* driver);
};
@@ -44,7 +44,7 @@
class GL_EXPORT TraceOSMESAApi : public OSMESAApi {
public:
TraceOSMESAApi(OSMESAApi* osmesa_api) : osmesa_api_(osmesa_api) { }
- virtual ~TraceOSMESAApi();
+ ~TraceOSMESAApi() override;
// Include the auto-generated part of this class. We split this because
// it means we can easily edit the non-auto generated parts right here in
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 7c7a5ce..54bcc37 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -158,37 +158,37 @@
public:
explicit GLSurfaceAdapter(GLSurface* surface);
- virtual bool Initialize() override;
- virtual void Destroy() override;
- virtual bool Resize(const gfx::Size& size) override;
- virtual bool Recreate() override;
- virtual bool DeferDraws() override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual bool PostSubBuffer(int x, int y, int width, int height) override;
- virtual bool SupportsPostSubBuffer() override;
- virtual gfx::Size GetSize() override;
- virtual void* GetHandle() override;
- virtual unsigned int GetBackingFrameBufferObject() override;
- virtual bool OnMakeCurrent(GLContext* context) override;
- virtual bool SetBackbufferAllocation(bool allocated) override;
- virtual void SetFrontbufferAllocation(bool allocated) override;
- virtual void* GetShareHandle() override;
- virtual void* GetDisplay() override;
- virtual void* GetConfig() override;
- virtual unsigned GetFormat() override;
- virtual VSyncProvider* GetVSyncProvider() override;
- virtual bool ScheduleOverlayPlane(int z_order,
- OverlayTransform transform,
- GLImage* image,
- const Rect& bounds_rect,
- const RectF& crop_rect) override;
- virtual bool IsSurfaceless() const override;
+ bool Initialize() override;
+ void Destroy() override;
+ bool Resize(const gfx::Size& size) override;
+ bool Recreate() override;
+ bool DeferDraws() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ bool PostSubBuffer(int x, int y, int width, int height) override;
+ bool SupportsPostSubBuffer() override;
+ gfx::Size GetSize() override;
+ void* GetHandle() override;
+ unsigned int GetBackingFrameBufferObject() override;
+ bool OnMakeCurrent(GLContext* context) override;
+ bool SetBackbufferAllocation(bool allocated) override;
+ void SetFrontbufferAllocation(bool allocated) override;
+ void* GetShareHandle() override;
+ void* GetDisplay() override;
+ void* GetConfig() override;
+ unsigned GetFormat() override;
+ VSyncProvider* GetVSyncProvider() override;
+ bool ScheduleOverlayPlane(int z_order,
+ OverlayTransform transform,
+ GLImage* image,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override;
+ bool IsSurfaceless() const override;
GLSurface* surface() const { return surface_.get(); }
protected:
- virtual ~GLSurfaceAdapter();
+ ~GLSurfaceAdapter() override;
private:
scoped_refptr<GLSurface> surface_;
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index b0b3336..073684b 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -29,7 +29,7 @@
GLSurfaceEGL();
// Implement GLSurface.
- virtual EGLDisplay GetDisplay() override;
+ EGLDisplay GetDisplay() override;
static bool InitializeOneOff();
static EGLDisplay GetHardwareDisplay();
@@ -44,7 +44,7 @@
static bool IsEGLSurfacelessContextSupported();
protected:
- virtual ~GLSurfaceEGL();
+ ~GLSurfaceEGL() override;
private:
#if defined(OS_WIN)
@@ -60,25 +60,25 @@
explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window);
// Implement GLSurface.
- virtual EGLConfig GetConfig() override;
- virtual bool Initialize() override;
- virtual void Destroy() override;
- virtual bool Resize(const gfx::Size& size) override;
- virtual bool Recreate() override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual gfx::Size GetSize() override;
- virtual EGLSurface GetHandle() override;
- virtual bool SupportsPostSubBuffer() override;
- virtual bool PostSubBuffer(int x, int y, int width, int height) override;
- virtual VSyncProvider* GetVSyncProvider() override;
+ EGLConfig GetConfig() override;
+ bool Initialize() override;
+ void Destroy() override;
+ bool Resize(const gfx::Size& size) override;
+ bool Recreate() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ gfx::Size GetSize() override;
+ EGLSurface GetHandle() override;
+ bool SupportsPostSubBuffer() override;
+ bool PostSubBuffer(int x, int y, int width, int height) override;
+ VSyncProvider* GetVSyncProvider() override;
// Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider.
// Takes ownership of the VSyncProvider.
virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider);
protected:
- virtual ~NativeViewGLSurfaceEGL();
+ ~NativeViewGLSurfaceEGL() override;
EGLNativeWindowType window_;
@@ -99,18 +99,18 @@
explicit PbufferGLSurfaceEGL(const gfx::Size& size);
// Implement GLSurface.
- virtual EGLConfig GetConfig() override;
- virtual bool Initialize() override;
- virtual void Destroy() override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual gfx::Size GetSize() override;
- virtual bool Resize(const gfx::Size& size) override;
- virtual EGLSurface GetHandle() override;
- virtual void* GetShareHandle() override;
+ EGLConfig GetConfig() override;
+ bool Initialize() override;
+ void Destroy() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ gfx::Size GetSize() override;
+ bool Resize(const gfx::Size& size) override;
+ EGLSurface GetHandle() override;
+ void* GetShareHandle() override;
protected:
- virtual ~PbufferGLSurfaceEGL();
+ ~PbufferGLSurfaceEGL() override;
private:
gfx::Size size_;
@@ -127,18 +127,18 @@
explicit SurfacelessEGL(const gfx::Size& size);
// Implement GLSurface.
- virtual EGLConfig GetConfig() override;
- virtual bool Initialize() override;
- virtual void Destroy() override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual gfx::Size GetSize() override;
- virtual bool Resize(const gfx::Size& size) override;
- virtual EGLSurface GetHandle() override;
- virtual void* GetShareHandle() override;
+ EGLConfig GetConfig() override;
+ bool Initialize() override;
+ void Destroy() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ gfx::Size GetSize() override;
+ bool Resize(const gfx::Size& size) override;
+ EGLSurface GetHandle() override;
+ void* GetShareHandle() override;
protected:
- virtual ~SurfacelessEGL();
+ ~SurfacelessEGL() override;
private:
gfx::Size size_;
diff --git a/ui/gl/gl_surface_mac.cc b/ui/gl/gl_surface_mac.cc
index d5a66f1..7f1ab68 100644
--- a/ui/gl/gl_surface_mac.cc
+++ b/ui/gl/gl_surface_mac.cc
@@ -30,20 +30,20 @@
explicit NoOpGLSurface(const gfx::Size& size) : size_(size) {}
// Implement GLSurface.
- virtual bool Initialize() override { return true; }
- virtual void Destroy() override {}
- virtual bool IsOffscreen() override { return true; }
- virtual bool SwapBuffers() override {
+ bool Initialize() override { return true; }
+ void Destroy() override {}
+ bool IsOffscreen() override { return true; }
+ bool SwapBuffers() override {
NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
return false;
}
- virtual gfx::Size GetSize() override { return size_; }
- virtual void* GetHandle() override { return NULL; }
- virtual void* GetDisplay() override { return NULL; }
- virtual bool IsSurfaceless() const override { return true; }
+ gfx::Size GetSize() override { return size_; }
+ void* GetHandle() override { return NULL; }
+ void* GetDisplay() override { return NULL; }
+ bool IsSurfaceless() const override { return true; }
protected:
- virtual ~NoOpGLSurface() {}
+ ~NoOpGLSurface() override {}
private:
gfx::Size size_;
diff --git a/ui/gl/gl_surface_osmesa.h b/ui/gl/gl_surface_osmesa.h
index 20fb17f..80d1087 100644
--- a/ui/gl/gl_surface_osmesa.h
+++ b/ui/gl/gl_surface_osmesa.h
@@ -21,17 +21,17 @@
GLSurfaceOSMesa(OSMesaSurfaceFormat format, const gfx::Size& size);
// Implement GLSurface.
- virtual bool Initialize() override;
- virtual void Destroy() override;
- virtual bool Resize(const gfx::Size& new_size) override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual gfx::Size GetSize() override;
- virtual void* GetHandle() override;
- virtual unsigned GetFormat() override;
+ bool Initialize() override;
+ void Destroy() override;
+ bool Resize(const gfx::Size& new_size) override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ gfx::Size GetSize() override;
+ void* GetHandle() override;
+ unsigned GetFormat() override;
protected:
- virtual ~GLSurfaceOSMesa();
+ ~GLSurfaceOSMesa() override;
private:
unsigned format_;
@@ -48,11 +48,11 @@
public:
explicit GLSurfaceOSMesaHeadless();
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
protected:
- virtual ~GLSurfaceOSMesaHeadless();
+ ~GLSurfaceOSMesaHeadless() override;
private:
DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaHeadless);
diff --git a/ui/gl/gl_surface_stub.h b/ui/gl/gl_surface_stub.h
index 8a80dfe..1bdd32a 100644
--- a/ui/gl/gl_surface_stub.h
+++ b/ui/gl/gl_surface_stub.h
@@ -15,14 +15,14 @@
void SetSize(const gfx::Size& size) { size_ = size; }
// Implement GLSurface.
- virtual void Destroy() override;
- virtual bool IsOffscreen() override;
- virtual bool SwapBuffers() override;
- virtual gfx::Size GetSize() override;
- virtual void* GetHandle() override;
+ void Destroy() override;
+ bool IsOffscreen() override;
+ bool SwapBuffers() override;
+ gfx::Size GetSize() override;
+ void* GetHandle() override;
protected:
- virtual ~GLSurfaceStub();
+ ~GLSurfaceStub() override;
private:
gfx::Size size_;
diff --git a/ui/gl/sync_control_vsync_provider.h b/ui/gl/sync_control_vsync_provider.h
index 3360354..302980d 100644
--- a/ui/gl/sync_control_vsync_provider.h
+++ b/ui/gl/sync_control_vsync_provider.h
@@ -16,9 +16,9 @@
class SyncControlVSyncProvider : public VSyncProvider {
public:
SyncControlVSyncProvider();
- virtual ~SyncControlVSyncProvider();
+ ~SyncControlVSyncProvider() override;
- virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
+ void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
protected:
virtual bool GetSyncValues(int64* system_time,
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index dc44cd6..7a7b41a 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -49,7 +49,7 @@
// Takes ownership of |proxy|.
explicit KeyboardController(KeyboardControllerProxy* proxy);
- virtual ~KeyboardController();
+ ~KeyboardController() override;
// Returns the container for the keyboard, which is owned by
// KeyboardController.
@@ -115,21 +115,16 @@
friend class KeyboardControllerTest;
// aura::WindowObserver overrides
- virtual void OnWindowHierarchyChanged(
- const HierarchyChangeParams& params) override;
+ void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
// InputMethodObserver overrides
- virtual void OnTextInputTypeChanged(
- const ui::TextInputClient* client) override {}
- virtual void OnFocus() override {}
- virtual void OnBlur() override {}
- virtual void OnCaretBoundsChanged(
- const ui::TextInputClient* client) override {}
- virtual void OnTextInputStateChanged(
- const ui::TextInputClient* client) override;
- virtual void OnInputMethodDestroyed(
- const ui::InputMethod* input_method) override;
- virtual void OnShowImeIfNeeded() override;
+ void OnTextInputTypeChanged(const ui::TextInputClient* client) override {}
+ void OnFocus() override {}
+ void OnBlur() override {}
+ void OnCaretBoundsChanged(const ui::TextInputClient* client) override {}
+ void OnTextInputStateChanged(const ui::TextInputClient* client) override;
+ void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
+ void OnShowImeIfNeeded() override;
// Show virtual keyboard immediately with animation.
void ShowKeyboardInternal();
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 6ff7091..41573e1 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -29,15 +29,14 @@
remove_count_(0),
last_clicked_index_(-1) {}
- virtual void RemoveNotification(const std::string& id,
- bool by_user) override {
+ void RemoveNotification(const std::string& id, bool by_user) override {
last_removed_id_ = id;
last_removed_by_user_ = by_user;
++remove_count_;
}
- virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) override {
+ void ClickOnNotificationButton(const std::string& id,
+ int button_index) override {
last_clicked_id_ = id;
last_clicked_index_ = button_index;
}
diff --git a/ui/message_center/cocoa/popup_collection.mm b/ui/message_center/cocoa/popup_collection.mm
index 7320dcb..dfdf108 100644
--- a/ui/message_center/cocoa/popup_collection.mm
+++ b/ui/message_center/cocoa/popup_collection.mm
@@ -57,22 +57,18 @@
message_center_->AddObserver(this);
}
- virtual ~PopupCollectionObserver() {
- message_center_->RemoveObserver(this);
- }
+ ~PopupCollectionObserver() override { message_center_->RemoveObserver(this); }
- virtual void OnNotificationAdded(
- const std::string& notification_id) override {
+ void OnNotificationAdded(const std::string& notification_id) override {
[popup_collection_ layoutNewNotifications];
}
- virtual void OnNotificationRemoved(const std::string& notification_id,
- bool user_id) override {
+ void OnNotificationRemoved(const std::string& notification_id,
+ bool user_id) override {
[popup_collection_ removeNotification:notification_id];
}
- virtual void OnNotificationUpdated(
- const std::string& notification_id) override {
+ void OnNotificationUpdated(const std::string& notification_id) override {
[popup_collection_ updateNotification:notification_id];
}
diff --git a/ui/message_center/cocoa/settings_controller.h b/ui/message_center/cocoa/settings_controller.h
index 83433b4..10a9902 100644
--- a/ui/message_center/cocoa/settings_controller.h
+++ b/ui/message_center/cocoa/settings_controller.h
@@ -27,11 +27,11 @@
virtual ~NotifierSettingsObserverMac();
// Overridden from NotifierSettingsObserver:
- virtual void UpdateIconImage(const NotifierId& notifier_id,
- const gfx::Image& icon) override;
- virtual void NotifierGroupChanged() override;
- virtual void NotifierEnabledChanged(const NotifierId& notifier_id,
- bool enabled) override;
+ void UpdateIconImage(const NotifierId& notifier_id,
+ const gfx::Image& icon) override;
+ void NotifierGroupChanged() override;
+ void NotifierEnabledChanged(const NotifierId& notifier_id,
+ bool enabled) override;
private:
MCSettingsController* settings_controller_; // weak, owns this
diff --git a/ui/message_center/fake_message_center.h b/ui/message_center/fake_message_center.h
index 073cff9..604453c 100644
--- a/ui/message_center/fake_message_center.h
+++ b/ui/message_center/fake_message_center.h
@@ -16,63 +16,57 @@
class FakeMessageCenter : public MessageCenter {
public:
FakeMessageCenter();
- virtual ~FakeMessageCenter();
+ ~FakeMessageCenter() override;
// Overridden from FakeMessageCenter.
- virtual void AddObserver(MessageCenterObserver* observer) override;
- virtual void RemoveObserver(MessageCenterObserver* observer) override;
- virtual void AddNotificationBlocker(NotificationBlocker* blocker) override;
- virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
- virtual size_t NotificationCount() const override;
- virtual size_t UnreadNotificationCount() const override;
- virtual bool HasPopupNotifications() const override;
- virtual bool IsQuietMode() const override;
- virtual bool HasClickedListener(const std::string& id) override;
- virtual message_center::Notification* FindVisibleNotificationById(
+ void AddObserver(MessageCenterObserver* observer) override;
+ void RemoveObserver(MessageCenterObserver* observer) override;
+ void AddNotificationBlocker(NotificationBlocker* blocker) override;
+ void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
+ size_t NotificationCount() const override;
+ size_t UnreadNotificationCount() const override;
+ bool HasPopupNotifications() const override;
+ bool IsQuietMode() const override;
+ bool HasClickedListener(const std::string& id) override;
+ message_center::Notification* FindVisibleNotificationById(
const std::string& id) override;
- virtual const NotificationList::Notifications& GetVisibleNotifications()
- override;
- virtual NotificationList::PopupNotifications GetPopupNotifications() override;
- virtual void AddNotification(scoped_ptr<Notification> notification) override;
- virtual void UpdateNotification(const std::string& old_id,
- scoped_ptr<Notification> new_notification)
- override;
+ const NotificationList::Notifications& GetVisibleNotifications() override;
+ NotificationList::PopupNotifications GetPopupNotifications() override;
+ void AddNotification(scoped_ptr<Notification> notification) override;
+ void UpdateNotification(const std::string& old_id,
+ scoped_ptr<Notification> new_notification) override;
- virtual void RemoveNotification(const std::string& id, bool by_user) override;
- virtual void RemoveAllNotifications(bool by_user) override;
- virtual void RemoveAllVisibleNotifications(bool by_user) override;
- virtual void SetNotificationIcon(const std::string& notification_id,
- const gfx::Image& image) override;
+ void RemoveNotification(const std::string& id, bool by_user) override;
+ void RemoveAllNotifications(bool by_user) override;
+ void RemoveAllVisibleNotifications(bool by_user) override;
+ void SetNotificationIcon(const std::string& notification_id,
+ const gfx::Image& image) override;
- virtual void SetNotificationImage(const std::string& notification_id,
- const gfx::Image& image) override;
+ void SetNotificationImage(const std::string& notification_id,
+ const gfx::Image& image) override;
- virtual void SetNotificationButtonIcon(const std::string& notification_id,
- int button_index,
- const gfx::Image& image) override;
- virtual void DisableNotificationsByNotifier(
- const NotifierId& notifier_id) override;
- virtual void ClickOnNotification(const std::string& id) override;
- virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) override;
- virtual void MarkSinglePopupAsShown(const std::string& id,
- bool mark_notification_as_read) override;
- virtual void DisplayedNotification(
- const std::string& id,
- const DisplaySource source) override;
- virtual void SetNotifierSettingsProvider(
- NotifierSettingsProvider* provider) override;
- virtual NotifierSettingsProvider* GetNotifierSettingsProvider() override;
- virtual void SetQuietMode(bool in_quiet_mode) override;
- virtual void EnterQuietModeWithExpire(
- const base::TimeDelta& expires_in) override;
- virtual void SetVisibility(Visibility visible) override;
- virtual bool IsMessageCenterVisible() const override;
- virtual void RestartPopupTimers() override;
- virtual void PausePopupTimers() override;
+ void SetNotificationButtonIcon(const std::string& notification_id,
+ int button_index,
+ const gfx::Image& image) override;
+ void DisableNotificationsByNotifier(const NotifierId& notifier_id) override;
+ void ClickOnNotification(const std::string& id) override;
+ void ClickOnNotificationButton(const std::string& id,
+ int button_index) override;
+ void MarkSinglePopupAsShown(const std::string& id,
+ bool mark_notification_as_read) override;
+ void DisplayedNotification(const std::string& id,
+ const DisplaySource source) override;
+ void SetNotifierSettingsProvider(NotifierSettingsProvider* provider) override;
+ NotifierSettingsProvider* GetNotifierSettingsProvider() override;
+ void SetQuietMode(bool in_quiet_mode) override;
+ void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) override;
+ void SetVisibility(Visibility visible) override;
+ bool IsMessageCenterVisible() const override;
+ void RestartPopupTimers() override;
+ void PausePopupTimers() override;
protected:
- virtual void DisableTimersForTest() override;
+ void DisableTimersForTest() override;
private:
const NotificationList::Notifications empty_notifications_;
diff --git a/ui/message_center/fake_message_center_tray_delegate.h b/ui/message_center/fake_message_center_tray_delegate.h
index d03310b..e43eb7a 100644
--- a/ui/message_center/fake_message_center_tray_delegate.h
+++ b/ui/message_center/fake_message_center_tray_delegate.h
@@ -20,22 +20,22 @@
public:
FakeMessageCenterTrayDelegate(MessageCenter* message_center,
base::Closure quit_closure);
- virtual ~FakeMessageCenterTrayDelegate();
+ ~FakeMessageCenterTrayDelegate() override;
bool displayed_first_run_balloon() const {
return displayed_first_run_balloon_;
}
// Overridden from MessageCenterTrayDelegate:
- virtual void OnMessageCenterTrayChanged() override;
- virtual bool ShowPopups() override;
- virtual void HidePopups() override;
- virtual bool ShowMessageCenter() override;
- virtual void HideMessageCenter() override;
- virtual bool ShowNotifierSettings() override;
- virtual bool IsContextMenuEnabled() const override;
- virtual MessageCenterTray* GetMessageCenterTray() override;
- virtual void DisplayFirstRunBalloon() override;
+ void OnMessageCenterTrayChanged() override;
+ bool ShowPopups() override;
+ void HidePopups() override;
+ bool ShowMessageCenter() override;
+ void HideMessageCenter() override;
+ bool ShowNotifierSettings() override;
+ bool IsContextMenuEnabled() const override;
+ MessageCenterTray* GetMessageCenterTray() override;
+ void DisplayFirstRunBalloon() override;
private:
scoped_ptr<MessageCenterTray> tray_;
diff --git a/ui/message_center/fake_notifier_settings_provider.h b/ui/message_center/fake_notifier_settings_provider.h
index ebefda1..0131d31 100644
--- a/ui/message_center/fake_notifier_settings_provider.h
+++ b/ui/message_center/fake_notifier_settings_provider.h
@@ -17,27 +17,26 @@
FakeNotifierSettingsProvider();
explicit FakeNotifierSettingsProvider(
const std::vector<Notifier*>& notifiers);
- virtual ~FakeNotifierSettingsProvider();
+ ~FakeNotifierSettingsProvider() override;
- virtual size_t GetNotifierGroupCount() const override;
- virtual const NotifierGroup& GetNotifierGroupAt(size_t index) const override;
- virtual bool IsNotifierGroupActiveAt(size_t index) const override;
- virtual void SwitchToNotifierGroup(size_t index) override;
- virtual const NotifierGroup& GetActiveNotifierGroup() const override;
+ size_t GetNotifierGroupCount() const override;
+ const NotifierGroup& GetNotifierGroupAt(size_t index) const override;
+ bool IsNotifierGroupActiveAt(size_t index) const override;
+ void SwitchToNotifierGroup(size_t index) override;
+ const NotifierGroup& GetActiveNotifierGroup() const override;
- virtual void GetNotifierList(std::vector<Notifier*>* notifiers) override;
+ void GetNotifierList(std::vector<Notifier*>* notifiers) override;
- virtual void SetNotifierEnabled(const Notifier& notifier,
- bool enabled) override;
+ void SetNotifierEnabled(const Notifier& notifier, bool enabled) override;
- virtual void OnNotifierSettingsClosing() override;
- virtual bool NotifierHasAdvancedSettings(const NotifierId& notifier_id) const
- override;
- virtual void OnNotifierAdvancedSettingsRequested(
+ void OnNotifierSettingsClosing() override;
+ bool NotifierHasAdvancedSettings(
+ const NotifierId& notifier_id) const override;
+ void OnNotifierAdvancedSettingsRequested(
const NotifierId& notifier_id,
const std::string* notification_id) override;
- virtual void AddObserver(NotifierSettingsObserver* observer) override;
- virtual void RemoveObserver(NotifierSettingsObserver* observer) override;
+ void AddObserver(NotifierSettingsObserver* observer) override;
+ void RemoveObserver(NotifierSettingsObserver* observer) override;
bool WasEnabled(const Notifier& notifier);
int closed_called_count();
diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h
index 9948089..d84e514 100644
--- a/ui/message_center/message_center_impl.h
+++ b/ui/message_center/message_center_impl.h
@@ -83,15 +83,13 @@
public MessageCenterObserver {
public:
explicit PopupTimersController(MessageCenter* message_center);
- virtual ~PopupTimersController();
+ ~PopupTimersController() override;
// MessageCenterObserver implementation.
- virtual void OnNotificationDisplayed(
- const std::string& id,
- const DisplaySource source) override;
- virtual void OnNotificationUpdated(const std::string& id) override;
- virtual void OnNotificationRemoved(const std::string& id, bool by_user)
- override;
+ void OnNotificationDisplayed(const std::string& id,
+ const DisplaySource source) override;
+ void OnNotificationUpdated(const std::string& id) override;
+ void OnNotificationRemoved(const std::string& id, bool by_user) override;
// Callback for each timer when its time is up.
virtual void TimerFinished(const std::string& id);
@@ -142,70 +140,64 @@
public message_center::NotifierSettingsObserver {
public:
MessageCenterImpl();
- virtual ~MessageCenterImpl();
+ ~MessageCenterImpl() override;
// MessageCenter overrides:
- virtual void AddObserver(MessageCenterObserver* observer) override;
- virtual void RemoveObserver(MessageCenterObserver* observer) override;
- virtual void AddNotificationBlocker(NotificationBlocker* blocker) override;
- virtual void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
- virtual void SetVisibility(Visibility visible) override;
- virtual bool IsMessageCenterVisible() const override;
- virtual size_t NotificationCount() const override;
- virtual size_t UnreadNotificationCount() const override;
- virtual bool HasPopupNotifications() const override;
- virtual bool IsQuietMode() const override;
- virtual bool HasClickedListener(const std::string& id) override;
- virtual message_center::Notification* FindVisibleNotificationById(
+ void AddObserver(MessageCenterObserver* observer) override;
+ void RemoveObserver(MessageCenterObserver* observer) override;
+ void AddNotificationBlocker(NotificationBlocker* blocker) override;
+ void RemoveNotificationBlocker(NotificationBlocker* blocker) override;
+ void SetVisibility(Visibility visible) override;
+ bool IsMessageCenterVisible() const override;
+ size_t NotificationCount() const override;
+ size_t UnreadNotificationCount() const override;
+ bool HasPopupNotifications() const override;
+ bool IsQuietMode() const override;
+ bool HasClickedListener(const std::string& id) override;
+ message_center::Notification* FindVisibleNotificationById(
const std::string& id) override;
- virtual const NotificationList::Notifications& GetVisibleNotifications()
- override;
- virtual NotificationList::PopupNotifications GetPopupNotifications() override;
- virtual void AddNotification(scoped_ptr<Notification> notification) override;
- virtual void UpdateNotification(const std::string& old_id,
- scoped_ptr<Notification> new_notification)
- override;
- virtual void RemoveNotification(const std::string& id, bool by_user) override;
- virtual void RemoveAllNotifications(bool by_user) override;
- virtual void RemoveAllVisibleNotifications(bool by_user) override;
- virtual void SetNotificationIcon(const std::string& notification_id,
- const gfx::Image& image) override;
- virtual void SetNotificationImage(const std::string& notification_id,
- const gfx::Image& image) override;
- virtual void SetNotificationButtonIcon(const std::string& notification_id,
- int button_index,
- const gfx::Image& image) override;
- virtual void DisableNotificationsByNotifier(
- const NotifierId& notifier_id) override;
- virtual void ClickOnNotification(const std::string& id) override;
- virtual void ClickOnNotificationButton(const std::string& id,
- int button_index) override;
- virtual void MarkSinglePopupAsShown(const std::string& id,
- bool mark_notification_as_read) override;
- virtual void DisplayedNotification(
- const std::string& id,
- const DisplaySource source) override;
- virtual void SetNotifierSettingsProvider(
- NotifierSettingsProvider* provider) override;
- virtual NotifierSettingsProvider* GetNotifierSettingsProvider() override;
- virtual void SetQuietMode(bool in_quiet_mode) override;
- virtual void EnterQuietModeWithExpire(
- const base::TimeDelta& expires_in) override;
- virtual void RestartPopupTimers() override;
- virtual void PausePopupTimers() override;
+ const NotificationList::Notifications& GetVisibleNotifications() override;
+ NotificationList::PopupNotifications GetPopupNotifications() override;
+ void AddNotification(scoped_ptr<Notification> notification) override;
+ void UpdateNotification(const std::string& old_id,
+ scoped_ptr<Notification> new_notification) override;
+ void RemoveNotification(const std::string& id, bool by_user) override;
+ void RemoveAllNotifications(bool by_user) override;
+ void RemoveAllVisibleNotifications(bool by_user) override;
+ void SetNotificationIcon(const std::string& notification_id,
+ const gfx::Image& image) override;
+ void SetNotificationImage(const std::string& notification_id,
+ const gfx::Image& image) override;
+ void SetNotificationButtonIcon(const std::string& notification_id,
+ int button_index,
+ const gfx::Image& image) override;
+ void DisableNotificationsByNotifier(const NotifierId& notifier_id) override;
+ void ClickOnNotification(const std::string& id) override;
+ void ClickOnNotificationButton(const std::string& id,
+ int button_index) override;
+ void MarkSinglePopupAsShown(const std::string& id,
+ bool mark_notification_as_read) override;
+ void DisplayedNotification(const std::string& id,
+ const DisplaySource source) override;
+ void SetNotifierSettingsProvider(NotifierSettingsProvider* provider) override;
+ NotifierSettingsProvider* GetNotifierSettingsProvider() override;
+ void SetQuietMode(bool in_quiet_mode) override;
+ void EnterQuietModeWithExpire(const base::TimeDelta& expires_in) override;
+ void RestartPopupTimers() override;
+ void PausePopupTimers() override;
// NotificationBlocker::Observer overrides:
- virtual void OnBlockingStateChanged(NotificationBlocker* blocker) override;
+ void OnBlockingStateChanged(NotificationBlocker* blocker) override;
// message_center::NotifierSettingsObserver overrides:
- virtual void UpdateIconImage(const NotifierId& notifier_id,
- const gfx::Image& icon) override;
- virtual void NotifierGroupChanged() override;
- virtual void NotifierEnabledChanged(const NotifierId& notifier_id,
- bool enabled) override;
+ void UpdateIconImage(const NotifierId& notifier_id,
+ const gfx::Image& icon) override;
+ void NotifierGroupChanged() override;
+ void NotifierEnabledChanged(const NotifierId& notifier_id,
+ bool enabled) override;
protected:
- virtual void DisableTimersForTest() override;
+ void DisableTimersForTest() override;
private:
struct NotificationCache {
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index f0453e5..6ce9131 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -107,7 +107,7 @@
explicit ToggledNotificationBlocker(MessageCenter* message_center)
: NotificationBlocker(message_center),
notifications_enabled_(true) {}
- virtual ~ToggledNotificationBlocker() {}
+ ~ToggledNotificationBlocker() override {}
void SetNotificationsEnabled(bool enabled) {
if (notifications_enabled_ != enabled) {
@@ -117,7 +117,7 @@
}
// NotificationBlocker overrides:
- virtual bool ShouldShowNotificationAsPopup(
+ bool ShouldShowNotificationAsPopup(
const message_center::NotifierId& notifier_id) const override {
return notifications_enabled_;
}
@@ -134,10 +134,10 @@
const NotifierId& allowed_notifier)
: ToggledNotificationBlocker(message_center),
allowed_notifier_(allowed_notifier) {}
- virtual ~PopupNotificationBlocker() {}
+ ~PopupNotificationBlocker() override {}
// NotificationBlocker overrides:
- virtual bool ShouldShowNotificationAsPopup(
+ bool ShouldShowNotificationAsPopup(
const NotifierId& notifier_id) const override {
return (notifier_id == allowed_notifier_) ||
ToggledNotificationBlocker::ShouldShowNotificationAsPopup(notifier_id);
@@ -154,11 +154,10 @@
TotalNotificationBlocker(MessageCenter* message_center,
const NotifierId& allowed_notifier)
: PopupNotificationBlocker(message_center, allowed_notifier) {}
- virtual ~TotalNotificationBlocker() {}
+ ~TotalNotificationBlocker() override {}
// NotificationBlocker overrides:
- virtual bool ShouldShowNotification(
- const NotifierId& notifier_id) const override {
+ bool ShouldShowNotification(const NotifierId& notifier_id) const override {
return ShouldShowNotificationAsPopup(notifier_id);
}
@@ -200,9 +199,9 @@
: PopupTimersController(message_center),
timer_finished_(false),
quit_closure_(quit_closure) {}
- virtual ~MockPopupTimersController() {}
+ ~MockPopupTimersController() override {}
- virtual void TimerFinished(const std::string& id) override {
+ void TimerFinished(const std::string& id) override {
base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_);
timer_finished_ = true;
last_id_ = id;
diff --git a/ui/message_center/message_center_tray.cc b/ui/message_center/message_center_tray.cc
index 3037c69..a4fbb08 100644
--- a/ui/message_center/message_center_tray.cc
+++ b/ui/message_center/message_center_tray.cc
@@ -29,15 +29,14 @@
NotificationMenuModel(MessageCenterTray* tray,
const NotifierId& notifier_id,
const base::string16& display_source);
- virtual ~NotificationMenuModel();
+ ~NotificationMenuModel() override;
// Overridden from ui::SimpleMenuModel::Delegate:
- virtual bool IsCommandIdChecked(int command_id) const override;
- virtual bool IsCommandIdEnabled(int command_id) const override;
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) override;
- virtual void ExecuteCommand(int command_id, int event_flags) override;
+ bool IsCommandIdChecked(int command_id) const override;
+ bool IsCommandIdEnabled(int command_id) const override;
+ bool GetAcceleratorForCommandId(int command_id,
+ ui::Accelerator* accelerator) override;
+ void ExecuteCommand(int command_id, int event_flags) override;
private:
MessageCenterTray* tray_;
diff --git a/ui/message_center/message_center_tray.h b/ui/message_center/message_center_tray.h
index 6e81409..5cd6b8d 100644
--- a/ui/message_center/message_center_tray.h
+++ b/ui/message_center/message_center_tray.h
@@ -34,7 +34,7 @@
public:
MessageCenterTray(MessageCenterTrayDelegate* delegate,
message_center::MessageCenter* message_center);
- virtual ~MessageCenterTray();
+ ~MessageCenterTray() override;
// Shows or updates the message center bubble and hides the popup bubble.
// Returns whether the message center is visible after the call, whether or
@@ -74,21 +74,17 @@
message_center::MessageCenter* message_center() { return message_center_; }
// Overridden from MessageCenterObserver:
- virtual void OnNotificationAdded(const std::string& notification_id) override;
- virtual void OnNotificationRemoved(const std::string& notification_id,
- bool by_user) override;
- virtual void OnNotificationUpdated(
- const std::string& notification_id) override;
- virtual void OnNotificationClicked(
- const std::string& notification_id) override;
- virtual void OnNotificationButtonClicked(
- const std::string& notification_id,
- int button_index) override;
- virtual void OnNotificationDisplayed(
- const std::string& notification_id,
- const DisplaySource source) override;
- virtual void OnQuietModeChanged(bool in_quiet_mode) override;
- virtual void OnBlockingStateChanged(NotificationBlocker* blocker) override;
+ void OnNotificationAdded(const std::string& notification_id) override;
+ void OnNotificationRemoved(const std::string& notification_id,
+ bool by_user) override;
+ void OnNotificationUpdated(const std::string& notification_id) override;
+ void OnNotificationClicked(const std::string& notification_id) override;
+ void OnNotificationButtonClicked(const std::string& notification_id,
+ int button_index) override;
+ void OnNotificationDisplayed(const std::string& notification_id,
+ const DisplaySource source) override;
+ void OnQuietModeChanged(bool in_quiet_mode) override;
+ void OnBlockingStateChanged(NotificationBlocker* blocker) override;
private:
void OnMessageCenterChanged();
diff --git a/ui/message_center/message_center_tray_unittest.cc b/ui/message_center/message_center_tray_unittest.cc
index cf1fcee..f938a13 100644
--- a/ui/message_center/message_center_tray_unittest.cc
+++ b/ui/message_center/message_center_tray_unittest.cc
@@ -22,26 +22,16 @@
: show_popups_success_(true),
show_message_center_success_(true),
enable_context_menu_(true) {}
- virtual ~MockDelegate() {}
- virtual void OnMessageCenterTrayChanged() override {}
- virtual bool ShowPopups() override {
- return show_message_center_success_;
- }
- virtual void HidePopups() override {}
- virtual bool ShowMessageCenter() override {
- return show_popups_success_;
- }
- virtual void HideMessageCenter() override {}
- virtual bool ShowNotifierSettings() override {
- return true;
- }
- virtual bool IsContextMenuEnabled() const override {
- return enable_context_menu_;
- }
+ ~MockDelegate() override {}
+ void OnMessageCenterTrayChanged() override {}
+ bool ShowPopups() override { return show_message_center_success_; }
+ void HidePopups() override {}
+ bool ShowMessageCenter() override { return show_popups_success_; }
+ void HideMessageCenter() override {}
+ bool ShowNotifierSettings() override { return true; }
+ bool IsContextMenuEnabled() const override { return enable_context_menu_; }
- virtual MessageCenterTray* GetMessageCenterTray() override {
- return NULL;
- }
+ MessageCenterTray* GetMessageCenterTray() override { return NULL; }
bool show_popups_success_;
bool show_message_center_success_;
diff --git a/ui/message_center/notification_delegate.h b/ui/message_center/notification_delegate.h
index 2faf2d0..f870fcb 100644
--- a/ui/message_center/notification_delegate.h
+++ b/ui/message_center/notification_delegate.h
@@ -59,15 +59,15 @@
explicit HandleNotificationClickedDelegate(const base::Closure& closure);
// message_center::NotificationDelegate overrides:
- virtual void Display() override;
- virtual void Error() override;
- virtual void Close(bool by_user) override;
- virtual bool HasClickedListener() override;
- virtual void Click() override;
- virtual void ButtonClick(int button_index) override;
+ void Display() override;
+ void Error() override;
+ void Close(bool by_user) override;
+ bool HasClickedListener() override;
+ void Click() override;
+ void ButtonClick(int button_index) override;
protected:
- virtual ~HandleNotificationClickedDelegate();
+ ~HandleNotificationClickedDelegate() override;
private:
std::string id_;
@@ -87,14 +87,14 @@
const ButtonClickCallback& button_callback);
// message_center::NotificationDelegate overrides:
- virtual void Display() override;
- virtual void Error() override;
- virtual void Close(bool by_user) override;
- virtual void Click() override;
- virtual void ButtonClick(int button_index) override;
+ void Display() override;
+ void Error() override;
+ void Close(bool by_user) override;
+ void Click() override;
+ void ButtonClick(int button_index) override;
protected:
- virtual ~HandleNotificationButtonClickDelegate();
+ ~HandleNotificationButtonClickDelegate() override;
private:
ButtonClickCallback button_callback_;
diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc
index 7c2c8cb..fa53d67 100644
--- a/ui/message_center/test/run_all_unittests.cc
+++ b/ui/message_center/test/run_all_unittests.cc
@@ -25,7 +25,7 @@
MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
protected:
- virtual void Initialize() override {
+ void Initialize() override {
#if defined(OS_MACOSX)
mock_cr_app::RegisterMockCrApp();
#else
@@ -39,7 +39,7 @@
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
}
- virtual void Shutdown() override {
+ void Shutdown() override {
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
diff --git a/ui/native_theme/fallback_theme.h b/ui/native_theme/fallback_theme.h
index 4f695b0..ca2cb48 100644
--- a/ui/native_theme/fallback_theme.h
+++ b/ui/native_theme/fallback_theme.h
@@ -14,11 +14,11 @@
class NATIVE_THEME_EXPORT FallbackTheme : public NativeThemeBase {
public:
FallbackTheme();
- virtual ~FallbackTheme();
+ ~FallbackTheme() override;
protected:
// Overridden from NativeThemeBase:
- virtual SkColor GetSystemColor(ColorId color_id) const override;
+ SkColor GetSystemColor(ColorId color_id) const override;
private:
DISALLOW_COPY_AND_ASSIGN(FallbackTheme);
diff --git a/ui/native_theme/native_theme_base.h b/ui/native_theme/native_theme_base.h
index b928c81..8ceed5a 100644
--- a/ui/native_theme/native_theme_base.h
+++ b/ui/native_theme/native_theme_base.h
@@ -24,25 +24,25 @@
class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme {
public:
// NativeTheme implementation:
- virtual gfx::Size GetPartSize(Part part,
- State state,
- const ExtraParams& extra) const override;
- virtual void Paint(SkCanvas* canvas,
- Part part,
- State state,
- const gfx::Rect& rect,
- const ExtraParams& extra) const override;
+ gfx::Size GetPartSize(Part part,
+ State state,
+ const ExtraParams& extra) const override;
+ void Paint(SkCanvas* canvas,
+ Part part,
+ State state,
+ const gfx::Rect& rect,
+ const ExtraParams& extra) const override;
- virtual void PaintStateTransition(SkCanvas* canvas,
- Part part,
- State startState,
- State endState,
- double progress,
- const gfx::Rect& rect) const override;
+ void PaintStateTransition(SkCanvas* canvas,
+ Part part,
+ State startState,
+ State endState,
+ double progress,
+ const gfx::Rect& rect) const override;
protected:
NativeThemeBase();
- virtual ~NativeThemeBase();
+ ~NativeThemeBase() override;
// Draw the arrow. Used by scrollbar and inner spin button.
virtual void PaintArrowButton(
diff --git a/ui/native_theme/native_theme_mac.h b/ui/native_theme/native_theme_mac.h
index 433e16d..195054d 100644
--- a/ui/native_theme/native_theme_mac.h
+++ b/ui/native_theme/native_theme_mac.h
@@ -17,27 +17,26 @@
static NativeThemeMac* instance();
// Overridden from NativeTheme:
- virtual SkColor GetSystemColor(ColorId color_id) const override;
+ SkColor GetSystemColor(ColorId color_id) const override;
// Overridden from NativeThemeBase:
- virtual void PaintScrollbarTrack(
- SkCanvas* canvas,
- Part part,
- State state,
- const ScrollbarTrackExtraParams& extra_params,
- const gfx::Rect& rect) const override;
- virtual void PaintScrollbarThumb(SkCanvas* sk_canvas,
- Part part,
- State state,
- const gfx::Rect& rect) const override;
- virtual void PaintScrollbarCorner(SkCanvas* canvas,
- State state,
- const gfx::Rect& rect) const override;
- virtual void PaintMenuPopupBackground(
+ void PaintScrollbarTrack(SkCanvas* canvas,
+ Part part,
+ State state,
+ const ScrollbarTrackExtraParams& extra_params,
+ const gfx::Rect& rect) const override;
+ void PaintScrollbarThumb(SkCanvas* sk_canvas,
+ Part part,
+ State state,
+ const gfx::Rect& rect) const override;
+ void PaintScrollbarCorner(SkCanvas* canvas,
+ State state,
+ const gfx::Rect& rect) const override;
+ void PaintMenuPopupBackground(
SkCanvas* canvas,
const gfx::Size& size,
const MenuBackgroundExtraParams& menu_background) const override;
- virtual void PaintMenuItemBackground(
+ void PaintMenuItemBackground(
SkCanvas* canvas,
State state,
const gfx::Rect& rect,
@@ -45,7 +44,7 @@
private:
NativeThemeMac();
- virtual ~NativeThemeMac();
+ ~NativeThemeMac() override;
DISALLOW_COPY_AND_ASSIGN(NativeThemeMac);
};
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
index c5fc26d..b5c877b 100644
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -178,7 +178,7 @@
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
explicit SelectFileDialog(Listener* listener, SelectFilePolicy* policy);
- virtual ~SelectFileDialog();
+ ~SelectFileDialog() override;
// Displays the actual file-selection dialog.
// This is overridden in the platform-specific descendants of FileSelectDialog
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index a0d75e5..281c1fe 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -64,8 +64,8 @@
ui::SelectFilePolicy* policy);
// BaseShellDialog implementation.
- virtual bool IsRunning(gfx::NativeWindow parent_window) const override;
- virtual void ListenerDestroyed() override;
+ bool IsRunning(gfx::NativeWindow parent_window) const override;
+ void ListenerDestroyed() override;
// Callback from ObjC bridge.
void FileWasSelected(NSSavePanel* dialog,
@@ -78,24 +78,23 @@
protected:
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(
- Type type,
- const base::string16& title,
- const base::FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const base::FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) override;
+ void SelectFileImpl(Type type,
+ const base::string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) override;
private:
- virtual ~SelectFileDialogImpl();
+ ~SelectFileDialogImpl() override;
// Gets the accessory view for the save dialog.
NSView* GetAccessoryView(const FileTypeInfo* file_types,
int file_type_index);
- virtual bool HasMultipleFileTypeChoicesImpl() override;
+ bool HasMultipleFileTypeChoicesImpl() override;
// The bridge for results from Cocoa to return to us.
base::scoped_nsobject<SelectFileDialogBridge> bridge_;
diff --git a/ui/views/accessibility/native_view_accessibility.h b/ui/views/accessibility/native_view_accessibility.h
index a85dc0c..9a94d3a 100644
--- a/ui/views/accessibility/native_view_accessibility.h
+++ b/ui/views/accessibility/native_view_accessibility.h
@@ -32,12 +32,12 @@
static void UnregisterWebView(View* web_view);
// ui::AXPlatformNodeDelegate
- virtual ui::AXNodeData* GetData() override;
- virtual int GetChildCount() override;
- virtual gfx::NativeViewAccessible ChildAtIndex(int index) override;
- virtual gfx::NativeViewAccessible GetParent() override;
- virtual gfx::Vector2d GetGlobalCoordinateOffset() override;
- virtual void NotifyAccessibilityEvent(ui::AXEvent event_type) override;
+ ui::AXNodeData* GetData() override;
+ int GetChildCount() override;
+ gfx::NativeViewAccessible ChildAtIndex(int index) override;
+ gfx::NativeViewAccessible GetParent() override;
+ gfx::Vector2d GetGlobalCoordinateOffset() override;
+ void NotifyAccessibilityEvent(ui::AXEvent event_type) override;
protected:
NativeViewAccessibility();
diff --git a/ui/views/controls/webview/webview.h b/ui/views/controls/webview/webview.h
index 32d423a..f5fe3c8 100644
--- a/ui/views/controls/webview/webview.h
+++ b/ui/views/controls/webview/webview.h
@@ -38,7 +38,7 @@
static const char kViewClassName[];
explicit WebView(content::BrowserContext* browser_context);
- virtual ~WebView();
+ ~WebView() override;
// This creates a WebContents if none is yet associated with this WebView. The
// WebView owns this implicitly created WebContents.
@@ -89,8 +89,8 @@
void SetPreferredSize(const gfx::Size& preferred_size);
// Overridden from View:
- virtual const char* GetClassName() const override;
- virtual ui::TextInputClient* GetTextInputClient() override;
+ const char* GetClassName() const override;
+ ui::TextInputClient* GetTextInputClient() override;
protected:
// Swaps the owned WebContents |wc_owner_| with |new_web_contents|. Returns
@@ -99,38 +99,35 @@
scoped_ptr<content::WebContents> new_web_contents);
// Overridden from View:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
- virtual void ViewHierarchyChanged(
+ void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+ void ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) override;
- virtual bool SkipDefaultKeyEventProcessing(
- const ui::KeyEvent& event) override;
- virtual void OnFocus() override;
- virtual void AboutToRequestFocusFromTabTraversal(bool reverse) override;
- virtual void GetAccessibleState(ui::AXViewState* state) override;
- virtual gfx::NativeViewAccessible GetNativeViewAccessible() override;
- virtual gfx::Size GetPreferredSize() const override;
+ bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override;
+ void OnFocus() override;
+ void AboutToRequestFocusFromTabTraversal(bool reverse) override;
+ void GetAccessibleState(ui::AXViewState* state) override;
+ gfx::NativeViewAccessible GetNativeViewAccessible() override;
+ gfx::Size GetPreferredSize() const override;
// Overridden from content::WebContentsDelegate:
- virtual void WebContentsFocused(content::WebContents* web_contents) override;
- virtual bool EmbedsFullscreenWidget() const override;
+ void WebContentsFocused(content::WebContents* web_contents) override;
+ bool EmbedsFullscreenWidget() const override;
// Overridden from content::WebContentsObserver:
- virtual void RenderViewDeleted(
- content::RenderViewHost* render_view_host) override;
- virtual void RenderProcessGone(base::TerminationStatus status) override;
- virtual void RenderViewHostChanged(
- content::RenderViewHost* old_host,
- content::RenderViewHost* new_host) override;
- virtual void DidShowFullscreenWidget(int routing_id) override;
- virtual void DidDestroyFullscreenWidget(int routing_id) override;
- virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) override;
- virtual void DidAttachInterstitialPage() override;
- virtual void DidDetachInterstitialPage() override;
+ void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
+ void RenderProcessGone(base::TerminationStatus status) override;
+ void RenderViewHostChanged(content::RenderViewHost* old_host,
+ content::RenderViewHost* new_host) override;
+ void DidShowFullscreenWidget(int routing_id) override;
+ void DidDestroyFullscreenWidget(int routing_id) override;
+ void DidToggleFullscreenModeForTab(bool entered_fullscreen) override;
+ void DidAttachInterstitialPage() override;
+ void DidDetachInterstitialPage() override;
// Workaround for MSVC++ linker bug/feature that requires
// instantiation of the inline IPC::Listener methods in all translation units.
- virtual void OnChannelConnected(int32 peer_id) override {}
- virtual void OnChannelError() override {}
- virtual void OnBadMessageReceived(const IPC::Message& message) override {}
+ void OnChannelConnected(int32 peer_id) override {}
+ void OnChannelError() override {}
+ void OnBadMessageReceived(const IPC::Message& message) override {}
private:
void AttachWebContents();
diff --git a/ui/views/view.h b/ui/views/view.h
index 5ae0c02..a38f3ce 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -145,7 +145,7 @@
// Creation and lifetime -----------------------------------------------------
View();
- virtual ~View();
+ ~View() override;
// By default a View is owned by its parent unless specified otherwise here.
void set_owned_by_client() { owned_by_client_ = true; }
@@ -714,19 +714,19 @@
ViewTargeter* targeter() const { return targeter_.get(); }
// Overridden from ui::EventTarget:
- virtual bool CanAcceptEvent(const ui::Event& event) override;
- virtual ui::EventTarget* GetParentTarget() override;
- virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
- virtual ui::EventTargeter* GetEventTargeter() override;
- virtual void ConvertEventToTarget(ui::EventTarget* target,
- ui::LocatedEvent* event) override;
+ bool CanAcceptEvent(const ui::Event& event) override;
+ ui::EventTarget* GetParentTarget() override;
+ scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+ ui::EventTargeter* GetEventTargeter() override;
+ void ConvertEventToTarget(ui::EventTarget* target,
+ ui::LocatedEvent* event) override;
// Overridden from ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) override;
- virtual void OnMouseEvent(ui::MouseEvent* event) override;
- virtual void OnScrollEvent(ui::ScrollEvent* event) override;
- virtual void OnTouchEvent(ui::TouchEvent* event) override final;
- virtual void OnGestureEvent(ui::GestureEvent* event) override;
+ void OnKeyEvent(ui::KeyEvent* event) override;
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnScrollEvent(ui::ScrollEvent* event) override;
+ void OnTouchEvent(ui::TouchEvent* event) final;
+ void OnGestureEvent(ui::GestureEvent* event) override;
// Accelerators --------------------------------------------------------------
@@ -744,12 +744,12 @@
virtual void ResetAccelerators();
// Overridden from AcceleratorTarget:
- virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
// Returns whether accelerators are enabled for this view. Accelerators are
// enabled if the containing widget is visible and the view is enabled() and
// IsDrawn()
- virtual bool CanHandleAccelerators() const override;
+ bool CanHandleAccelerators() const override;
// Focus ---------------------------------------------------------------------
@@ -1117,11 +1117,10 @@
void UpdateChildLayerBounds(const gfx::Vector2d& offset);
// Overridden from ui::LayerDelegate:
- virtual void OnPaintLayer(gfx::Canvas* canvas) override;
- virtual void OnDelegatedFrameDamage(
- const gfx::Rect& damage_rect_in_dip) override;
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
- virtual base::Closure PrepareForLayerBoundsChange() override;
+ void OnPaintLayer(gfx::Canvas* canvas) override;
+ void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
+ void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ base::Closure PrepareForLayerBoundsChange() override;
// Finds the layer that this view paints to (it may belong to an ancestor
// view), then reorders the immediate children of that layer to match the
diff --git a/ui/views/view_targeter.h b/ui/views/view_targeter.h
index de87909..572f106 100644
--- a/ui/views/view_targeter.h
+++ b/ui/views/view_targeter.h
@@ -22,7 +22,7 @@
class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
public:
explicit ViewTargeter(ViewTargeterDelegate* delegate);
- virtual ~ViewTargeter();
+ ~ViewTargeter() override;
// A call-through to DoesIntersectRect() on |delegate_|.
bool DoesIntersectRect(const View* target, const gfx::Rect& rect) const;
@@ -32,16 +32,14 @@
protected:
// ui::EventTargeter:
- virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
- ui::Event* event) override;
- virtual ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target,
- ui::Event* event) override;
- virtual bool SubtreeCanAcceptEvent(
- ui::EventTarget* target,
- const ui::LocatedEvent& event) const override;
- virtual bool EventLocationInsideBounds(
- ui::EventTarget* target,
- const ui::LocatedEvent& event) const override;
+ ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
+ ui::Event* event) override;
+ ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target,
+ ui::Event* event) override;
+ bool SubtreeCanAcceptEvent(ui::EventTarget* target,
+ const ui::LocatedEvent& event) const override;
+ bool EventLocationInsideBounds(ui::EventTarget* target,
+ const ui::LocatedEvent& event) const override;
private:
// TODO(tdanderson): Un-friend RootView once RootView::DispatchGestureEvent()
diff --git a/ui/web_dialogs/test/test_web_contents_handler.h b/ui/web_dialogs/test/test_web_contents_handler.h
index 86e197b..691376e 100644
--- a/ui/web_dialogs/test/test_web_contents_handler.h
+++ b/ui/web_dialogs/test/test_web_contents_handler.h
@@ -16,20 +16,20 @@
: public WebDialogWebContentsDelegate::WebContentsHandler {
public:
TestWebContentsHandler();
- virtual ~TestWebContentsHandler();
+ ~TestWebContentsHandler() override;
private:
// Overridden from WebDialogWebContentsDelegate::WebContentsHandler:
- virtual content::WebContents* OpenURLFromTab(
+ content::WebContents* OpenURLFromTab(
content::BrowserContext* context,
content::WebContents* source,
const content::OpenURLParams& params) override;
- virtual void AddNewContents(content::BrowserContext* context,
- content::WebContents* source,
- content::WebContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) override;
+ void AddNewContents(content::BrowserContext* context,
+ content::WebContents* source,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture) override;
DISALLOW_COPY_AND_ASSIGN(TestWebContentsHandler);
};
diff --git a/ui/web_dialogs/test/test_web_dialog_delegate.h b/ui/web_dialogs/test/test_web_dialog_delegate.h
index b289536..c753a71 100644
--- a/ui/web_dialogs/test/test_web_dialog_delegate.h
+++ b/ui/web_dialogs/test/test_web_dialog_delegate.h
@@ -18,24 +18,24 @@
class TestWebDialogDelegate : public WebDialogDelegate {
public:
explicit TestWebDialogDelegate(const GURL& url);
- virtual ~TestWebDialogDelegate();
+ ~TestWebDialogDelegate() override;
void set_size(int width, int height) {
size_.SetSize(width, height);
}
// WebDialogDelegate implementation:
- virtual ModalType GetDialogModalType() const override;
- virtual base::string16 GetDialogTitle() const override;
- virtual GURL GetDialogContentURL() const override;
- virtual void GetWebUIMessageHandlers(
+ ModalType GetDialogModalType() const override;
+ base::string16 GetDialogTitle() const override;
+ GURL GetDialogContentURL() const override;
+ void GetWebUIMessageHandlers(
std::vector<content::WebUIMessageHandler*>* handlers) const override;
- virtual void GetDialogSize(gfx::Size* size) const override;
- virtual std::string GetDialogArgs() const override;
- virtual void OnDialogClosed(const std::string& json_retval) override;
- virtual void OnCloseContents(content::WebContents* source,
- bool* out_close_dialog) override;
- virtual bool ShouldShowDialogTitle() const override;
+ void GetDialogSize(gfx::Size* size) const override;
+ std::string GetDialogArgs() const override;
+ void OnDialogClosed(const std::string& json_retval) override;
+ void OnCloseContents(content::WebContents* source,
+ bool* out_close_dialog) override;
+ bool ShouldShowDialogTitle() const override;
protected:
const GURL url_;
diff --git a/ui/web_dialogs/web_dialog_ui.cc b/ui/web_dialogs/web_dialog_ui.cc
index 161af45..456b034 100644
--- a/ui/web_dialogs/web_dialog_ui.cc
+++ b/ui/web_dialogs/web_dialog_ui.cc
@@ -28,7 +28,7 @@
public:
explicit WebDialogDelegateUserData(WebDialogDelegate* delegate)
: delegate_(delegate) {}
- virtual ~WebDialogDelegateUserData() {}
+ ~WebDialogDelegateUserData() override {}
WebDialogDelegate* delegate() { return delegate_; }
private:
diff --git a/ui/web_dialogs/web_dialog_ui.h b/ui/web_dialogs/web_dialog_ui.h
index 144b8c7..6bd91dc 100644
--- a/ui/web_dialogs/web_dialog_ui.h
+++ b/ui/web_dialogs/web_dialog_ui.h
@@ -57,7 +57,7 @@
// When created, the delegate should already be set as user data on the
// WebContents.
explicit WebDialogUI(content::WebUI* web_ui);
- virtual ~WebDialogUI();
+ ~WebDialogUI() override;
// Close the dialog, passing the specified arguments to the close handler.
void CloseDialog(const base::ListValue* args);
@@ -68,8 +68,7 @@
private:
// WebUIController
- virtual void RenderViewCreated(
- content::RenderViewHost* render_view_host) override;
+ void RenderViewCreated(content::RenderViewHost* render_view_host) override;
// Gets the delegate for the WebContent set with SetDelegate.
static WebDialogDelegate* GetDelegate(content::WebContents* web_contents);
@@ -88,7 +87,7 @@
class WEB_DIALOGS_EXPORT ExternalWebDialogUI : public WebDialogUI {
public:
explicit ExternalWebDialogUI(content::WebUI* web_ui);
- virtual ~ExternalWebDialogUI();
+ ~ExternalWebDialogUI() override;
};
} // namespace ui
diff --git a/ui/web_dialogs/web_dialog_web_contents_delegate.h b/ui/web_dialogs/web_dialog_web_contents_delegate.h
index d5ed725..00f9aa4 100644
--- a/ui/web_dialogs/web_dialog_web_contents_delegate.h
+++ b/ui/web_dialogs/web_dialog_web_contents_delegate.h
@@ -40,7 +40,7 @@
WebDialogWebContentsDelegate(content::BrowserContext* context,
WebContentsHandler* handler);
- virtual ~WebDialogWebContentsDelegate();
+ ~WebDialogWebContentsDelegate() override;
// The returned browser context is guaranteed to be original if non-NULL.
content::BrowserContext* browser_context() const {
@@ -53,20 +53,18 @@
void Detach();
// content::WebContentsDelegate declarations.
- virtual content::WebContents* OpenURLFromTab(
+ content::WebContents* OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params) override;
- virtual void AddNewContents(content::WebContents* source,
- content::WebContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture,
- bool* was_blocked) override;
- virtual bool IsPopupOrPanel(
- const content::WebContents* source) const override;
- virtual bool PreHandleGestureEvent(
- content::WebContents* source,
- const blink::WebGestureEvent& event) override;
+ void AddNewContents(content::WebContents* source,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture,
+ bool* was_blocked) override;
+ bool IsPopupOrPanel(const content::WebContents* source) const override;
+ bool PreHandleGestureEvent(content::WebContents* source,
+ const blink::WebGestureEvent& event) override;
private:
// Weak pointer. Always an original profile.
diff --git a/ui/wm/core/cursor_manager.h b/ui/wm/core/cursor_manager.h
index 4f9c21b..a10b8ac 100644
--- a/ui/wm/core/cursor_manager.h
+++ b/ui/wm/core/cursor_manager.h
@@ -40,36 +40,33 @@
public NativeCursorManagerDelegate {
public:
explicit CursorManager(scoped_ptr<NativeCursorManager> delegate);
- virtual ~CursorManager();
+ ~CursorManager() override;
// Overridden from aura::client::CursorClient:
- virtual void SetCursor(gfx::NativeCursor) override;
- virtual gfx::NativeCursor GetCursor() const override;
- virtual void ShowCursor() override;
- virtual void HideCursor() override;
- virtual bool IsCursorVisible() const override;
- virtual void SetCursorSet(ui::CursorSetType cursor_set) override;
- virtual ui::CursorSetType GetCursorSet() const override;
- virtual void EnableMouseEvents() override;
- virtual void DisableMouseEvents() override;
- virtual bool IsMouseEventsEnabled() const override;
- virtual void SetDisplay(const gfx::Display& display) override;
- virtual void LockCursor() override;
- virtual void UnlockCursor() override;
- virtual bool IsCursorLocked() const override;
- virtual void AddObserver(
- aura::client::CursorClientObserver* observer) override;
- virtual void RemoveObserver(
- aura::client::CursorClientObserver* observer) override;
- virtual bool ShouldHideCursorOnKeyEvent(
- const ui::KeyEvent& event) const override;
+ void SetCursor(gfx::NativeCursor) override;
+ gfx::NativeCursor GetCursor() const override;
+ void ShowCursor() override;
+ void HideCursor() override;
+ bool IsCursorVisible() const override;
+ void SetCursorSet(ui::CursorSetType cursor_set) override;
+ ui::CursorSetType GetCursorSet() const override;
+ void EnableMouseEvents() override;
+ void DisableMouseEvents() override;
+ bool IsMouseEventsEnabled() const override;
+ void SetDisplay(const gfx::Display& display) override;
+ void LockCursor() override;
+ void UnlockCursor() override;
+ bool IsCursorLocked() const override;
+ void AddObserver(aura::client::CursorClientObserver* observer) override;
+ void RemoveObserver(aura::client::CursorClientObserver* observer) override;
+ bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override;
private:
// Overridden from NativeCursorManagerDelegate:
- virtual void CommitCursor(gfx::NativeCursor cursor) override;
- virtual void CommitVisibility(bool visible) override;
- virtual void CommitCursorSet(ui::CursorSetType cursor_set) override;
- virtual void CommitMouseEventsEnabled(bool enabled) override;
+ void CommitCursor(gfx::NativeCursor cursor) override;
+ void CommitVisibility(bool visible) override;
+ void CommitCursorSet(ui::CursorSetType cursor_set) override;
+ void CommitMouseEventsEnabled(bool enabled) override;
scoped_ptr<NativeCursorManager> delegate_;