diff options
author | viettrungluu <viettrungluu@chromium.org> | 2014-09-29 22:04:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-30 05:05:04 +0000 |
commit | 473e9133cbe6f90140bf172003e70ee788afc5d9 (patch) | |
tree | f5d370019071d5eb13e33e187c5b0f8a7933c67e | |
parent | 5f7ee2f338c9d7c5616c18e594ec8ef834d718c6 (diff) | |
download | chromium_src-473e9133cbe6f90140bf172003e70ee788afc5d9.zip chromium_src-473e9133cbe6f90140bf172003e70ee788afc5d9.tar.gz chromium_src-473e9133cbe6f90140bf172003e70ee788afc5d9.tar.bz2 |
Mojo: Convert OVERRIDE -> override in various subdirectories of mojo/.
(Every subdirectory except aura/, examples/, services/, and views/.)
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/619493002
Cr-Commit-Position: refs/heads/master@{#297364}
46 files changed, 196 insertions, 181 deletions
diff --git a/mojo/application_manager/application_loader.h b/mojo/application_manager/application_loader.h index d0e6fee..b7d9f19 100644 --- a/mojo/application_manager/application_loader.h +++ b/mojo/application_manager/application_loader.h @@ -47,9 +47,9 @@ class MOJO_APPLICATION_MANAGER_EXPORT ApplicationLoader { : public LoadCallbacks { public: SimpleLoadCallbacks(ScopedMessagePipeHandle shell_handle); - virtual ScopedMessagePipeHandle RegisterApplication() OVERRIDE; + virtual ScopedMessagePipeHandle RegisterApplication() override; virtual void LoadWithContentHandler(const GURL& content_handler_url, - URLResponsePtr response) OVERRIDE; + URLResponsePtr response) override; private: ScopedMessagePipeHandle shell_handle_; diff --git a/mojo/application_manager/application_manager.cc b/mojo/application_manager/application_manager.cc index 3750b64..b183d9f 100644 --- a/mojo/application_manager/application_manager.cc +++ b/mojo/application_manager/application_manager.cc @@ -54,7 +54,7 @@ class ApplicationManager::LoadCallbacksImpl virtual ~LoadCallbacksImpl() {} // LoadCallbacks implementation - virtual ScopedMessagePipeHandle RegisterApplication() OVERRIDE { + virtual ScopedMessagePipeHandle RegisterApplication() override { ScopedMessagePipeHandle shell_handle; if (manager_) { manager_->RegisterLoadedApplication(requested_url_, @@ -66,7 +66,7 @@ class ApplicationManager::LoadCallbacksImpl } virtual void LoadWithContentHandler(const GURL& content_handler_url, - URLResponsePtr url_response) OVERRIDE { + URLResponsePtr url_response) override { if (manager_) { manager_->LoadWithContentHandler(requested_url_, requestor_url_, @@ -98,7 +98,7 @@ class ApplicationManager::ShellImpl : public InterfaceImpl<Shell> { // ServiceProvider implementation: virtual void ConnectToApplication( const String& app_url, - InterfaceRequest<ServiceProvider> in_service_provider) OVERRIDE { + InterfaceRequest<ServiceProvider> in_service_provider) override { ServiceProviderPtr out_service_provider; out_service_provider.Bind(in_service_provider.PassMessagePipe()); manager_->ConnectToApplication( @@ -108,7 +108,7 @@ class ApplicationManager::ShellImpl : public InterfaceImpl<Shell> { const GURL& url() const { return url_; } private: - virtual void OnConnectionError() OVERRIDE { + virtual void OnConnectionError() override { manager_->OnShellImplError(this); } diff --git a/mojo/application_manager/application_manager_unittest.cc b/mojo/application_manager/application_manager_unittest.cc index 658b670..5763265 100644 --- a/mojo/application_manager/application_manager_unittest.cc +++ b/mojo/application_manager/application_manager_unittest.cc @@ -4,6 +4,7 @@ #include "base/at_exit.h" #include "base/bind.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "mojo/application_manager/application_loader.h" #include "mojo/application_manager/application_manager.h" @@ -36,7 +37,7 @@ class QuitMessageLoopErrorHandler : public ErrorHandler { virtual ~QuitMessageLoopErrorHandler() {} // |ErrorHandler| implementation: - virtual void OnConnectionError() OVERRIDE { + virtual void OnConnectionError() override { base::MessageLoop::current()->QuitWhenIdle(); } @@ -52,14 +53,14 @@ class TestServiceImpl : public InterfaceImpl<TestService> { virtual ~TestServiceImpl() { --context_->num_impls; } - virtual void OnConnectionError() OVERRIDE { + virtual void OnConnectionError() override { if (!base::MessageLoop::current()->is_running()) return; base::MessageLoop::current()->Quit(); } // TestService implementation: - virtual void Test(const String& test_string) OVERRIDE { + virtual void Test(const String& test_string) override { context_->last_test_string = test_string; client()->AckTest(); } @@ -77,7 +78,7 @@ class TestClientImpl : public TestClient { virtual ~TestClientImpl() { service_.reset(); } - virtual void AckTest() OVERRIDE { + virtual void AckTest() override { if (quit_after_ack_) base::MessageLoop::current()->Quit(); } @@ -115,25 +116,25 @@ class TestApplicationLoader : public ApplicationLoader, // ApplicationLoader implementation. virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { + 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 {} + const GURL& url) override {} // ApplicationDelegate implementation. virtual bool ConfigureIncomingConnection( - ApplicationConnection* connection) OVERRIDE { + ApplicationConnection* connection) override { connection->AddService(this); return true; } // InterfaceFactory implementation. virtual void Create(ApplicationConnection* connection, - InterfaceRequest<TestService> request) OVERRIDE { + InterfaceRequest<TestService> request) override { BindToRequest(new TestServiceImpl(context_), &request); } @@ -252,11 +253,11 @@ class TestAImpl : public InterfaceImpl<TestA> { } private: - virtual void CallB() OVERRIDE { + virtual void CallB() override { b_->B(base::Bind(&TestAImpl::Quit, base::Unretained(this))); } - virtual void CallCFromB() OVERRIDE { + virtual void CallCFromB() override { b_->CallC(base::Bind(&TestAImpl::Quit, base::Unretained(this))); } @@ -285,12 +286,12 @@ class TestBImpl : public InterfaceImpl<TestB> { } private: - virtual void B(const mojo::Callback<void()>& callback) OVERRIDE { + virtual void B(const mojo::Callback<void()>& callback) override { test_context_->IncrementNumBCalls(); callback.Run(); } - virtual void CallC(const mojo::Callback<void()>& callback) OVERRIDE { + virtual void CallC(const mojo::Callback<void()>& callback) override { test_context_->IncrementNumBCalls(); c_->C(callback); } @@ -307,7 +308,7 @@ class TestCImpl : public InterfaceImpl<TestC> { virtual ~TestCImpl() { test_context_->IncrementNumCDeletes(); } private: - virtual void C(const mojo::Callback<void()>& callback) OVERRIDE { + virtual void C(const mojo::Callback<void()>& callback) override { test_context_->IncrementNumCCalls(); callback.Run(); } @@ -327,16 +328,16 @@ class Tester : public ApplicationDelegate, private: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { + scoped_refptr<LoadCallbacks> callbacks) override { app_.reset( new ApplicationImpl(this, callbacks->RegisterApplication().Pass())); } virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE {} + const GURL& url) override {} virtual bool ConfigureIncomingConnection( - ApplicationConnection* connection) OVERRIDE { + ApplicationConnection* connection) override { if (!requestor_url_.empty() && requestor_url_ != connection->GetRemoteApplicationURL()) { context_->set_tester_called_quit(); @@ -353,7 +354,7 @@ class Tester : public ApplicationDelegate, } virtual bool ConfigureOutgoingConnection( - ApplicationConnection* connection) OVERRIDE { + ApplicationConnection* connection) override { // If we're connecting to B, then add C. if (connection->GetRemoteApplicationURL() == kTestBURLString) connection->AddService<TestC>(this); @@ -361,17 +362,17 @@ class Tester : public ApplicationDelegate, } virtual void Create(ApplicationConnection* connection, - InterfaceRequest<TestA> request) OVERRIDE { + InterfaceRequest<TestA> request) override { BindToRequest(new TestAImpl(connection, context_), &request); } virtual void Create(ApplicationConnection* connection, - InterfaceRequest<TestB> request) OVERRIDE { + InterfaceRequest<TestB> request) override { BindToRequest(new TestBImpl(connection, context_), &request); } virtual void Create(ApplicationConnection* connection, - InterfaceRequest<TestC> request) OVERRIDE { + InterfaceRequest<TestC> request) override { BindToRequest(new TestCImpl(connection, context_), &request); } @@ -386,7 +387,7 @@ class TestServiceInterceptor : public ApplicationManager::Interceptor { virtual ServiceProviderPtr OnConnectToClient( const GURL& url, - ServiceProviderPtr service_provider) OVERRIDE { + ServiceProviderPtr service_provider) override { ++call_count_; url_ = url; return service_provider.Pass(); @@ -414,7 +415,7 @@ class ApplicationManagerTest : public testing::Test { virtual ~ApplicationManagerTest() {} - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { application_manager_.reset(new ApplicationManager); TestApplicationLoader* default_loader = new TestApplicationLoader; default_loader->set_context(&context_); @@ -427,7 +428,7 @@ class ApplicationManagerTest : public testing::Test { test_client_.reset(new TestClientImpl(service_proxy.Pass())); } - virtual void TearDown() OVERRIDE { + virtual void TearDown() override { test_client_.reset(NULL); application_manager_.reset(NULL); } diff --git a/mojo/application_manager/background_shell_application_loader.h b/mojo/application_manager/background_shell_application_loader.h index e890903..3c56290 100644 --- a/mojo/application_manager/background_shell_application_loader.h +++ b/mojo/application_manager/background_shell_application_loader.h @@ -5,6 +5,7 @@ #ifndef MOJO_APPLICATION_MANAGER_BACKGROUND_SHELL_APPLICATION_LOADER_H_ #define MOJO_APPLICATION_MANAGER_BACKGROUND_SHELL_APPLICATION_LOADER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/synchronization/waitable_event.h" @@ -28,15 +29,15 @@ class MOJO_APPLICATION_MANAGER_EXPORT BackgroundShellApplicationLoader // ApplicationLoader overrides: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + const GURL& url) override; private: class BackgroundLoader; // |base::DelegateSimpleThread::Delegate| method: - virtual void Run() OVERRIDE; + virtual 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 0fbf3b0..acf1a01 100644 --- a/mojo/application_manager/background_shell_application_loader_unittest.cc +++ b/mojo/application_manager/background_shell_application_loader_unittest.cc @@ -18,13 +18,13 @@ class DummyLoader : public ApplicationLoader { // ApplicationLoader overrides: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { + scoped_refptr<LoadCallbacks> callbacks) override { if (simulate_app_quit_) base::MessageLoop::current()->Quit(); } virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE {} + const GURL& url) override {} void DontSimulateAppQuit() { simulate_app_quit_ = false; } diff --git a/mojo/apps/js/bindings/gl/context.h b/mojo/apps/js/bindings/gl/context.h index 905f0fd..2166860 100644 --- a/mojo/apps/js/bindings/gl/context.h +++ b/mojo/apps/js/bindings/gl/context.h @@ -55,7 +55,7 @@ class Context : public gin::Wrappable<Context> { private: virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( - v8::Isolate* isolate) OVERRIDE; + v8::Isolate* isolate) override; explicit Context(v8::Isolate* isolate, mojo::Handle handle, diff --git a/mojo/apps/js/mojo_runner_delegate.h b/mojo/apps/js/mojo_runner_delegate.h index 71ee4af..8a7b448 100644 --- a/mojo/apps/js/mojo_runner_delegate.h +++ b/mojo/apps/js/mojo_runner_delegate.h @@ -5,7 +5,7 @@ #ifndef MOJO_APPS_JS_MOJO_RUNNER_DELEGATE_H_ #define MOJO_APPS_JS_MOJO_RUNNER_DELEGATE_H_ -#include "base/compiler_specific.h" +#include "base/macros.h" #include "gin/modules/module_runner_delegate.h" #include "mojo/public/c/system/core.h" @@ -22,7 +22,7 @@ class MojoRunnerDelegate : public gin::ModuleRunnerDelegate { private: // From ModuleRunnerDelegate: virtual void UnhandledException(gin::ShellRunner* runner, - gin::TryCatch& try_catch) OVERRIDE; + gin::TryCatch& try_catch) override; DISALLOW_COPY_AND_ASSIGN(MojoRunnerDelegate); }; diff --git a/mojo/apps/js/test/handle_unittest.cc b/mojo/apps/js/test/handle_unittest.cc index e4e8edf7..ec089c9 100644 --- a/mojo/apps/js/test/handle_unittest.cc +++ b/mojo/apps/js/test/handle_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "mojo/bindings/js/handle.h" #include "mojo/bindings/js/handle_close_observer.h" #include "mojo/public/cpp/system/core.h" @@ -15,7 +16,7 @@ class HandleWrapperTest : public testing::Test, public: HandleWrapperTest() : closes_observed_(0) {} - virtual void OnWillCloseHandle() OVERRIDE { closes_observed_++; } + virtual 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 9152b0c..76c357b 100644 --- a/mojo/apps/js/test/js_to_cpp_unittest.cc +++ b/mojo/apps/js/test/js_to_cpp_unittest.cc @@ -5,6 +5,7 @@ #include "base/at_exit.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" @@ -220,28 +221,28 @@ class CppSideConnection : public js_to_cpp::CppSide { js_to_cpp::JsSide* js_side() { return js_side_; } // js_to_cpp::CppSide: - virtual void StartTest() OVERRIDE { + virtual void StartTest() override { NOTREACHED(); } - virtual void TestFinished() OVERRIDE { + virtual void TestFinished() override { NOTREACHED(); } - virtual void PingResponse() OVERRIDE { + virtual void PingResponse() override { mishandled_messages_ += 1; } - virtual void EchoResponse(js_to_cpp::EchoArgsListPtr list) OVERRIDE { + virtual void EchoResponse(js_to_cpp::EchoArgsListPtr list) override { mishandled_messages_ += 1; } - virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) OVERRIDE { + virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override { mishandled_messages_ += 1; } virtual void BackPointerResponse( - js_to_cpp::EchoArgsListPtr list) OVERRIDE { + js_to_cpp::EchoArgsListPtr list) override { mishandled_messages_ += 1; } @@ -261,11 +262,11 @@ class PingCppSideConnection : public CppSideConnection { virtual ~PingCppSideConnection() {} // js_to_cpp::CppSide: - virtual void StartTest() OVERRIDE { + virtual void StartTest() override { js_side_->Ping(); } - virtual void PingResponse() OVERRIDE { + virtual void PingResponse() override { got_message_ = true; run_loop()->Quit(); } @@ -289,11 +290,11 @@ class EchoCppSideConnection : public CppSideConnection { virtual ~EchoCppSideConnection() {} // js_to_cpp::CppSide: - virtual void StartTest() OVERRIDE { + virtual void StartTest() override { js_side_->Echo(kExpectedMessageCount, BuildSampleEchoArgs()); } - virtual void EchoResponse(js_to_cpp::EchoArgsListPtr list) OVERRIDE { + virtual 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); @@ -304,7 +305,7 @@ class EchoCppSideConnection : public CppSideConnection { CheckSampleEchoArgsList(list->next); } - virtual void TestFinished() OVERRIDE { + virtual void TestFinished() override { termination_seen_ = true; run_loop()->Quit(); } @@ -329,15 +330,15 @@ class BitFlipCppSideConnection : public CppSideConnection { virtual ~BitFlipCppSideConnection() {} // js_to_cpp::CppSide: - virtual void StartTest() OVERRIDE { + virtual void StartTest() override { js_side_->BitFlip(BuildSampleEchoArgs()); } - virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) OVERRIDE { + virtual void BitFlipResponse(js_to_cpp::EchoArgsListPtr list) override { CheckCorruptedEchoArgsList(list); } - virtual void TestFinished() OVERRIDE { + virtual void TestFinished() override { termination_seen_ = true; run_loop()->Quit(); } @@ -358,16 +359,16 @@ class BackPointerCppSideConnection : public CppSideConnection { virtual ~BackPointerCppSideConnection() {} // js_to_cpp::CppSide: - virtual void StartTest() OVERRIDE { + virtual void StartTest() override { js_side_->BackPointer(BuildSampleEchoArgs()); } virtual void BackPointerResponse( - js_to_cpp::EchoArgsListPtr list) OVERRIDE { + js_to_cpp::EchoArgsListPtr list) override { CheckCorruptedEchoArgsList(list); } - virtual void TestFinished() OVERRIDE { + virtual void TestFinished() override { termination_seen_ = true; run_loop()->Quit(); } diff --git a/mojo/bindings/js/waiting_callback.h b/mojo/bindings/js/waiting_callback.h index 1871d93..b3a4fda 100644 --- a/mojo/bindings/js/waiting_callback.h +++ b/mojo/bindings/js/waiting_callback.h @@ -47,7 +47,7 @@ class WaitingCallback : public gin::Wrappable<WaitingCallback>, // Invoked by the HandleWrapper if the handle is closed while this wait is // still in progress. - virtual void OnWillCloseHandle() OVERRIDE; + virtual 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 1e300d4..294bd5d 100644 --- a/mojo/cc/context_provider_mojo.h +++ b/mojo/cc/context_provider_mojo.h @@ -5,6 +5,7 @@ #ifndef MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ #define MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ +#include "base/macros.h" #include "cc/output/context_provider.h" #include "mojo/public/c/gles2/gles2.h" #include "mojo/public/cpp/system/core.h" @@ -16,20 +17,20 @@ class ContextProviderMojo : public cc::ContextProvider { 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 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( - const LostContextCallback& lost_context_callback) OVERRIDE {} + const LostContextCallback& lost_context_callback) override {} virtual void SetMemoryPolicyChangedCallback( const MemoryPolicyChangedCallback& memory_policy_changed_callback) - OVERRIDE {} + override {} protected: friend class base::RefCountedThreadSafe<ContextProviderMojo>; diff --git a/mojo/cc/output_surface_mojo.h b/mojo/cc/output_surface_mojo.h index 32b85be..b8f2bab 100644 --- a/mojo/cc/output_surface_mojo.h +++ b/mojo/cc/output_surface_mojo.h @@ -5,6 +5,7 @@ #ifndef MOJO_CC_OUTPUT_SURFACE_MOJO_H_ #define MOJO_CC_OUTPUT_SURFACE_MOJO_H_ +#include "base/macros.h" #include "cc/output/output_surface.h" #include "cc/surfaces/surface_id.h" #include "cc/surfaces/surface_id_allocator.h" @@ -27,11 +28,11 @@ class OutputSurfaceMojo : public cc::OutputSurface, public SurfaceClient { uint32_t id_namespace); // SurfaceClient implementation. - virtual void ReturnResources(Array<ReturnedResourcePtr> resources) OVERRIDE; + virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override; // cc::OutputSurface implementation. - virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; - virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; + virtual void SwapBuffers(cc::CompositorFrame* frame) override; + virtual bool BindToClient(cc::OutputSurfaceClient* client) override; protected: virtual ~OutputSurfaceMojo(); diff --git a/mojo/common/handle_watcher.cc b/mojo/common/handle_watcher.cc index eeb3e043..e8df765 100644 --- a/mojo/common/handle_watcher.cc +++ b/mojo/common/handle_watcher.cc @@ -79,8 +79,8 @@ class WatcherBackend : public MessagePumpMojoHandler { 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; + virtual void OnHandleReady(const Handle& handle) override; + virtual void OnHandleError(const Handle& handle, MojoResult result) override; // Maps from assigned id to WatchData. HandleToWatchDataMap handle_to_data_; @@ -338,7 +338,7 @@ class HandleWatcher::StateBase : public base::MessageLoop::DestructionObserver { bool got_ready() const { return got_ready_; } private: - virtual void WillDestroyCurrentMessageLoop() OVERRIDE { + virtual void WillDestroyCurrentMessageLoop() override { // The current thread is exiting. Simulate a watch error. NotifyAndDestroy(MOJO_RESULT_ABORTED); } @@ -385,11 +385,11 @@ class HandleWatcher::SameThreadWatchingState : public StateBase, private: // MessagePumpMojoHandler overrides: - virtual void OnHandleReady(const Handle& handle) OVERRIDE { + virtual void OnHandleReady(const Handle& handle) override { StopWatchingAndNotifyReady(handle, MOJO_RESULT_OK); } - virtual void OnHandleError(const Handle& handle, MojoResult result) OVERRIDE { + virtual void OnHandleError(const Handle& handle, MojoResult result) override { StopWatchingAndNotifyReady(handle, result); } diff --git a/mojo/common/message_pump_mojo.h b/mojo/common/message_pump_mojo.h index 8b71316..3ec3457 100644 --- a/mojo/common/message_pump_mojo.h +++ b/mojo/common/message_pump_mojo.h @@ -7,6 +7,7 @@ #include <map> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_pump.h" #include "base/synchronization/lock.h" @@ -45,11 +46,11 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump { void RemoveHandler(const Handle& handle); // MessagePump: - virtual void Run(Delegate* delegate) OVERRIDE; - virtual void Quit() OVERRIDE; - virtual void ScheduleWork() OVERRIDE; + virtual void Run(Delegate* delegate) override; + virtual void Quit() override; + virtual void ScheduleWork() override; virtual void ScheduleDelayedWork( - const base::TimeTicks& delayed_work_time) OVERRIDE; + const base::TimeTicks& delayed_work_time) override; private: struct RunState; diff --git a/mojo/common/test/test_support_impl.h b/mojo/common/test/test_support_impl.h index c752b57..9f69bfe 100644 --- a/mojo/common/test/test_support_impl.h +++ b/mojo/common/test/test_support_impl.h @@ -18,10 +18,10 @@ class TestSupportImpl : public TestSupport { virtual void LogPerfResult(const char* test_name, double value, - const char* units) OVERRIDE; - virtual FILE* OpenSourceRootRelativeFile(const char* relative_path) OVERRIDE; + const char* units) override; + virtual FILE* OpenSourceRootRelativeFile(const char* relative_path) override; virtual char** EnumerateSourceRootRelativeDirectory(const char* relative_path) - OVERRIDE; + override; private: DISALLOW_COPY_AND_ASSIGN(TestSupportImpl); diff --git a/mojo/dbus/dbus_external_service.h b/mojo/dbus/dbus_external_service.h index 68e2f96..8eb7869 100644 --- a/mojo/dbus/dbus_external_service.h +++ b/mojo/dbus/dbus_external_service.h @@ -75,11 +75,11 @@ class DBusExternalService } protected: - virtual void Connect(ScopedMessagePipeHandle client_handle) OVERRIDE { + virtual void Connect(ScopedMessagePipeHandle client_handle) override { external_service_.reset(BindToPipe(new Impl(this), client_handle.Pass())); } - virtual void Disconnect() OVERRIDE { + virtual void Disconnect() override { external_service_.reset(); } @@ -88,11 +88,11 @@ class DBusExternalService public: explicit Impl(DBusExternalService* service) : service_(service) { } - virtual void OnConnectionError() OVERRIDE { + virtual void OnConnectionError() override { service_->Disconnect(); } virtual void Activate(ScopedMessagePipeHandle service_provider_handle) - OVERRIDE { + override { app_.reset(new ApplicationImpl(service_, service_provider_handle.Pass())); } private: diff --git a/mojo/embedder/platform_channel_pair_posix_unittest.cc b/mojo/embedder/platform_channel_pair_posix_unittest.cc index 523b767..b3f9682 100644 --- a/mojo/embedder/platform_channel_pair_posix_unittest.cc +++ b/mojo/embedder/platform_channel_pair_posix_unittest.cc @@ -44,14 +44,14 @@ class PlatformChannelPairPosixTest : public testing::Test { PlatformChannelPairPosixTest() {} virtual ~PlatformChannelPairPosixTest() {} - virtual void SetUp() OVERRIDE { + virtual 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 { + virtual void TearDown() override { // Restore the |SIGPIPE| handler. ASSERT_EQ(0, sigaction(SIGPIPE, &old_action_, nullptr)); } diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc index 233573f..2d3387b 100644 --- a/mojo/gles2/command_buffer_client_impl.cc +++ b/mojo/gles2/command_buffer_client_impl.cc @@ -64,10 +64,10 @@ class CommandBufferClientImpl::SyncClientImpl private: // CommandBufferSyncClient methods: - virtual void DidInitialize(bool success) OVERRIDE { + virtual void DidInitialize(bool success) override { initialized_successfully_ = success; } - virtual void DidMakeProgress(CommandBufferStatePtr state) OVERRIDE { + virtual 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 e192169..2241b60 100644 --- a/mojo/gles2/command_buffer_client_impl.h +++ b/mojo/gles2/command_buffer_client_impl.h @@ -41,45 +41,45 @@ class CommandBufferClientImpl : public CommandBufferClient, virtual ~CommandBufferClientImpl(); // 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 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; + int32* id) override; + virtual void DestroyTransferBuffer(int32 id) override; // gpu::GpuControl implementation: - virtual gpu::Capabilities GetCapabilities() OVERRIDE; + virtual gpu::Capabilities GetCapabilities() override; virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(size_t width, size_t height, unsigned internalformat, unsigned usage, - int32* id) OVERRIDE; - virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; - virtual uint32 InsertSyncPoint() OVERRIDE; - virtual uint32 InsertFutureSyncPoint() OVERRIDE; - virtual void RetireSyncPoint(uint32 sync_point) OVERRIDE; + int32* id) override; + virtual void DestroyGpuMemoryBuffer(int32 id) 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; + const base::Closure& callback) override; virtual void SignalQuery(uint32 query, - const base::Closure& callback) OVERRIDE; - virtual void SetSurfaceVisible(bool visible) OVERRIDE; - virtual void Echo(const base::Closure& callback) OVERRIDE; - virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE; + const base::Closure& callback) override; + virtual void SetSurfaceVisible(bool visible) override; + virtual void Echo(const base::Closure& callback) override; + virtual uint32 CreateStreamTexture(uint32 texture_id) override; private: class SyncClientImpl; // CommandBufferClient implementation: - virtual void DidDestroy() OVERRIDE; - virtual void LostContext(int32_t lost_reason) OVERRIDE; + virtual void DidDestroy() override; + virtual void LostContext(int32_t lost_reason) override; // ErrorHandler implementation: - virtual void OnConnectionError() OVERRIDE; + virtual void OnConnectionError() override; void TryUpdateState(); void MakeProgressAndUpdateState(); diff --git a/mojo/gles2/gles2_context.h b/mojo/gles2/gles2_context.h index ab39c4c..0bbb754 100644 --- a/mojo/gles2/gles2_context.h +++ b/mojo/gles2/gles2_context.h @@ -40,7 +40,7 @@ class GLES2Context : public CommandBufferDelegate, gpu::ContextSupport* context_support() const { return implementation_.get(); } private: - virtual void ContextLost() OVERRIDE; + virtual void ContextLost() override; CommandBufferClientImpl command_buffer_; scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; diff --git a/mojo/shell/app_child_process.cc b/mojo/shell/app_child_process.cc index 054cd5d1..c288ee3 100644 --- a/mojo/shell/app_child_process.cc +++ b/mojo/shell/app_child_process.cc @@ -190,13 +190,13 @@ class AppChildControllerImpl : public InterfaceImpl<AppChildController> { app_context->set_controller(impl.Pass()); } - virtual void OnConnectionError() OVERRIDE { + virtual 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 { + 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 b5b1eb6..9b3b8cf 100644 --- a/mojo/shell/app_child_process.h +++ b/mojo/shell/app_child_process.h @@ -18,7 +18,7 @@ class AppChildProcess : public ChildProcess { AppChildProcess(); virtual ~AppChildProcess(); - virtual void Main() OVERRIDE; + virtual 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 30e6b79..f65e2a4 100644 --- a/mojo/shell/app_child_process_host.h +++ b/mojo/shell/app_child_process_host.h @@ -35,8 +35,8 @@ class AppChildProcessHost : public ChildProcessHost, private: // |ChildProcessHost::Delegate| methods: - virtual void WillStart() OVERRIDE; - virtual void DidStart(bool success) OVERRIDE; + virtual void WillStart() override; + virtual 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 f92a4bb..5223018 100644 --- a/mojo/shell/child_process_host_unittest.cc +++ b/mojo/shell/child_process_host_unittest.cc @@ -22,10 +22,10 @@ class TestChildProcessHostDelegate : public ChildProcessHost::Delegate { public: TestChildProcessHostDelegate() {} virtual ~TestChildProcessHostDelegate() {} - virtual void WillStart() OVERRIDE { + virtual void WillStart() override { VLOG(2) << "TestChildProcessHostDelegate::WillStart()"; } - virtual void DidStart(bool success) OVERRIDE { + virtual 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 3336681..5f4a285 100644 --- a/mojo/shell/context.cc +++ b/mojo/shell/context.cc @@ -10,6 +10,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/strings/string_split.h" @@ -125,18 +126,18 @@ class Context::NativeViewportApplicationLoader // ApplicationLoader implementation. virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { + scoped_refptr<LoadCallbacks> callbacks) override { ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); if (shell_handle.is_valid()) app_.reset(new ApplicationImpl(this, shell_handle.Pass())); } virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE {} + const GURL& url) override {} // ApplicationDelegate implementation. virtual bool ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) OVERRIDE { + mojo::ApplicationConnection* connection) override { connection->AddService<NativeViewport>(this); connection->AddService<Gpu>(this); return true; @@ -144,13 +145,13 @@ class Context::NativeViewportApplicationLoader // InterfaceFactory<NativeViewport> implementation. virtual void Create(ApplicationConnection* connection, - InterfaceRequest<NativeViewport> request) OVERRIDE { + InterfaceRequest<NativeViewport> request) override { BindToRequest(new NativeViewportImpl(app_.get(), false), &request); } // InterfaceFactory<Gpu> implementation. virtual void Create(ApplicationConnection* connection, - InterfaceRequest<Gpu> request) OVERRIDE { + InterfaceRequest<Gpu> request) override { BindToRequest(new GpuImpl(share_group_.get(), mailbox_manager_.get()), &request); } diff --git a/mojo/shell/context.h b/mojo/shell/context.h index c49b68c..1f098c7 100644 --- a/mojo/shell/context.h +++ b/mojo/shell/context.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "mojo/application_manager/application_manager.h" #include "mojo/shell/mojo_url_resolver.h" #include "mojo/shell/task_runners.h" @@ -33,7 +34,7 @@ class Context : ApplicationManager::Delegate { void Init(); // ApplicationManager::Delegate override. - virtual void OnApplicationError(const GURL& gurl) OVERRIDE; + virtual void OnApplicationError(const GURL& gurl) override; void Run(const GURL& url); ScopedMessagePipeHandle ConnectToServiceByName( diff --git a/mojo/shell/dbus_application_loader_linux.h b/mojo/shell/dbus_application_loader_linux.h index c1cba41..ec0111f 100644 --- a/mojo/shell/dbus_application_loader_linux.h +++ b/mojo/shell/dbus_application_loader_linux.h @@ -62,10 +62,10 @@ class DBusApplicationLoader : public ApplicationLoader { // "/org/chromium/MojoImpl". virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + const GURL& url) override; private: class LoadContext; diff --git a/mojo/shell/dynamic_application_loader.h b/mojo/shell/dynamic_application_loader.h index 77867a6..6d8df9f 100644 --- a/mojo/shell/dynamic_application_loader.h +++ b/mojo/shell/dynamic_application_loader.h @@ -40,9 +40,9 @@ class DynamicApplicationLoader : public ApplicationLoader { // ApplicationLoader methods: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + 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 7e85af2..ea6fb1d 100644 --- a/mojo/shell/dynamic_application_loader_unittest.cc +++ b/mojo/shell/dynamic_application_loader_unittest.cc @@ -36,7 +36,7 @@ class TestDynamicServiceRunner : public DynamicServiceRunner { } virtual void Start(const base::FilePath& app_path, ScopedMessagePipeHandle service_handle, - const base::Closure& app_completed_callback) OVERRIDE { + const base::Closure& app_completed_callback) override { state_->runner_was_started = true; } @@ -48,7 +48,7 @@ class TestDynamicServiceRunnerFactory : public DynamicServiceRunnerFactory { public: explicit TestDynamicServiceRunnerFactory(TestState* state) : state_(state) {} virtual ~TestDynamicServiceRunnerFactory() {} - virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) OVERRIDE { + virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) override { return scoped_ptr<DynamicServiceRunner>( new TestDynamicServiceRunner(state_)); } @@ -63,7 +63,7 @@ class DynamicApplicationLoaderTest : public testing::Test { public: DynamicApplicationLoaderTest() {} virtual ~DynamicApplicationLoaderTest() {} - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { context_.Init(); scoped_ptr<DynamicServiceRunnerFactory> factory( new TestDynamicServiceRunnerFactory(&state_)); diff --git a/mojo/shell/dynamic_service_runner.h b/mojo/shell/dynamic_service_runner.h index 1409fb0e..aa392f8 100644 --- a/mojo/shell/dynamic_service_runner.h +++ b/mojo/shell/dynamic_service_runner.h @@ -6,7 +6,6 @@ #define MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ #include "base/callback_forward.h" -#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "mojo/public/cpp/system/core.h" @@ -45,7 +44,7 @@ class DynamicServiceRunnerFactoryImpl : public DynamicServiceRunnerFactory { public: DynamicServiceRunnerFactoryImpl() {} virtual ~DynamicServiceRunnerFactoryImpl() {} - virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) OVERRIDE { + virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) override { return scoped_ptr<DynamicServiceRunner>( new DynamicServiceRunnerImpl(context)); } diff --git a/mojo/shell/external_application_listener_posix.h b/mojo/shell/external_application_listener_posix.h index fab6e32..9a7eedc 100644 --- a/mojo/shell/external_application_listener_posix.h +++ b/mojo/shell/external_application_listener_posix.h @@ -63,7 +63,7 @@ class ExternalApplicationListenerPosix // Errors are ignored. virtual void ListenInBackground( const base::FilePath& listen_socket_path, - const RegisterCallback& register_callback) OVERRIDE; + 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. @@ -71,11 +71,11 @@ class ExternalApplicationListenerPosix virtual void ListenInBackgroundWithErrorCallback( const base::FilePath& listen_socket_path, const RegisterCallback& register_callback, - const ErrorCallback& error_callback) OVERRIDE; + 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; + virtual void WaitForListening() override; private: class RegistrarImpl; diff --git a/mojo/shell/external_application_listener_unittest.cc b/mojo/shell/external_application_listener_unittest.cc index 8c39043..5676b68 100644 --- a/mojo/shell/external_application_listener_unittest.cc +++ b/mojo/shell/external_application_listener_unittest.cc @@ -30,7 +30,7 @@ class ExternalApplicationListenerTest : public testing::Test { ExternalApplicationListenerTest() : io_thread_("io thread") {} virtual ~ExternalApplicationListenerTest() {} - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { base::Thread::Options options; options.message_loop_type = base::MessageLoop::TYPE_IO; io_thread_.StartWithOptions(options); @@ -53,6 +53,7 @@ class ExternalApplicationListenerTest : public testing::Test { }; namespace { + class StubShellImpl : public InterfaceImpl<Shell> { private: virtual void ConnectToApplication( @@ -81,6 +82,7 @@ void ConnectOnIOThread(const base::FilePath& socket_path, ExternalApplicationRegistrarConnection connection(socket_path); connection.Connect(base::Bind(&QuitLoopOnConnect, to_quit, quit_callback)); } + } // namespace TEST_F(ExternalApplicationListenerTest, ConnectConnection) { @@ -95,6 +97,7 @@ TEST_F(ExternalApplicationListenerTest, ConnectConnection) { } namespace { + class QuitLoopOnConnectApplicationImpl : public InterfaceImpl<Application> { public: QuitLoopOnConnectApplicationImpl(const std::string& url, @@ -190,6 +193,7 @@ void ConnectAndRegisterOnIOThread(const base::FilePath& socket_path, void DestroyOnIOThread(scoped_ptr<FakeExternalApplication> doomed1, scoped_ptr<FakeExternalApplication> doomed2) { } + } // namespace // Create two external applications, have them discover and connect to diff --git a/mojo/shell/external_application_listener_win.h b/mojo/shell/external_application_listener_win.h index 934cd41..8280e75 100644 --- a/mojo/shell/external_application_listener_win.h +++ b/mojo/shell/external_application_listener_win.h @@ -18,15 +18,15 @@ namespace shell { class ExternalApplicationListenerStub : public ExternalApplicationListener { public: ExternalApplicationListenerStub(); - virtual ~ExternalApplicationListenerStub() OVERRIDE; + virtual ~ExternalApplicationListenerStub() override; void ListenInBackground(const base::FilePath& listen_socket_path, - const RegisterCallback& register_callback) OVERRIDE; + const RegisterCallback& register_callback) override; void ListenInBackgroundWithErrorCallback( const base::FilePath& listen_socket_path, const RegisterCallback& register_callback, - const ErrorCallback& error_callback) OVERRIDE; - void WaitForListening() OVERRIDE; + const ErrorCallback& error_callback) override; + void WaitForListening() override; }; } // namespace shell diff --git a/mojo/shell/external_application_registrar_connection.h b/mojo/shell/external_application_registrar_connection.h index 19f47d7..38b66fc 100644 --- a/mojo/shell/external_application_registrar_connection.h +++ b/mojo/shell/external_application_registrar_connection.h @@ -32,7 +32,7 @@ class ExternalApplicationRegistrarConnection : public ErrorHandler { virtual ~ExternalApplicationRegistrarConnection(); // Implementation of ErrorHandler - virtual void OnConnectionError() OVERRIDE; + virtual 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 699428e..0e0cade 100644 --- a/mojo/shell/in_process_dynamic_service_runner.h +++ b/mojo/shell/in_process_dynamic_service_runner.h @@ -27,11 +27,11 @@ class InProcessDynamicServiceRunner // |DynamicServiceRunner| method: virtual void Start(const base::FilePath& app_path, ScopedMessagePipeHandle service_handle, - const base::Closure& app_completed_callback) OVERRIDE; + const base::Closure& app_completed_callback) override; private: // |base::DelegateSimpleThread::Delegate| method: - virtual void Run() OVERRIDE; + virtual 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 ada8c19..5a99a25 100644 --- a/mojo/shell/incoming_connection_listener_unittest.cc +++ b/mojo/shell/incoming_connection_listener_unittest.cc @@ -20,6 +20,7 @@ namespace mojo { namespace shell { namespace { + // Delegate implementation that expects success. class TestDelegate : public IncomingConnectionListenerPosix::Delegate { public: @@ -53,6 +54,7 @@ void OnConnect(base::Closure quit_callback, int rv) { EXPECT_EQ(net::OK, rv); base::MessageLoop::current()->PostTask(FROM_HERE, quit_callback); } + } // namespace class IncomingConnectionListenerTest : public testing::Test { @@ -60,7 +62,7 @@ class IncomingConnectionListenerTest : public testing::Test { IncomingConnectionListenerTest() {} virtual ~IncomingConnectionListenerTest() {} - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); socket_path_ = temp_dir_.path().Append(FILE_PATH_LITERAL("socket")); } diff --git a/mojo/shell/network_application_loader.h b/mojo/shell/network_application_loader.h index 9b1ad15..0f426b0 100644 --- a/mojo/shell/network_application_loader.h +++ b/mojo/shell/network_application_loader.h @@ -5,9 +5,8 @@ #ifndef MOJO_SHELL_NETWORK_APPLICATION_LOADER_H_ #define MOJO_SHELL_NETWORK_APPLICATION_LOADER_H_ -#include <map> - #include "base/containers/scoped_ptr_hash_map.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "mojo/application_manager/application_loader.h" #include "mojo/public/cpp/application/application_delegate.h" @@ -33,18 +32,18 @@ class NetworkApplicationLoader : public ApplicationLoader, // ApplicationLoader overrides: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + const GURL& url) override; // ApplicationDelegate overrides. - virtual void Initialize(ApplicationImpl* app) OVERRIDE; + virtual void Initialize(ApplicationImpl* app) override; virtual bool ConfigureIncomingConnection( - ApplicationConnection* connection) OVERRIDE; + ApplicationConnection* connection) override; // InterfaceFactory<NetworkService> overrides. virtual void Create(ApplicationConnection* connection, - InterfaceRequest<NetworkService> request) OVERRIDE; + InterfaceRequest<NetworkService> request) override; base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_; scoped_ptr<NetworkContext> context_; diff --git a/mojo/shell/out_of_process_dynamic_service_runner.h b/mojo/shell/out_of_process_dynamic_service_runner.h index 9b3c96d..71272e7 100644 --- a/mojo/shell/out_of_process_dynamic_service_runner.h +++ b/mojo/shell/out_of_process_dynamic_service_runner.h @@ -27,11 +27,11 @@ class OutOfProcessDynamicServiceRunner // |DynamicServiceRunner| method: virtual void Start(const base::FilePath& app_path, ScopedMessagePipeHandle service_handle, - const base::Closure& app_completed_callback) OVERRIDE; + const base::Closure& app_completed_callback) override; private: // |AppChildControllerClient| method: - virtual void AppCompleted(int32_t result) OVERRIDE; + virtual void AppCompleted(int32_t result) override; Context* const context_; diff --git a/mojo/shell/shell_test_base.h b/mojo/shell/shell_test_base.h index 98e744c..4017315 100644 --- a/mojo/shell/shell_test_base.h +++ b/mojo/shell/shell_test_base.h @@ -30,7 +30,7 @@ class ShellTestBase : public testing::Test { ShellTestBase(); virtual ~ShellTestBase(); - virtual void SetUp() OVERRIDE; + virtual void SetUp() override; // |application_url| should typically be a mojo: URL (the origin will be set // to an "appropriate" file: URL). diff --git a/mojo/shell/shell_test_base_unittest.cc b/mojo/shell/shell_test_base_unittest.cc index dae5071..8a0bdd4 100644 --- a/mojo/shell/shell_test_base_unittest.cc +++ b/mojo/shell/shell_test_base_unittest.cc @@ -80,7 +80,7 @@ class QuitMessageLoopErrorHandler : public ErrorHandler { virtual ~QuitMessageLoopErrorHandler() {} // |ErrorHandler| implementation: - virtual void OnConnectionError() OVERRIDE { + virtual void OnConnectionError() override { base::MessageLoop::current()->QuitWhenIdle(); } diff --git a/mojo/shell/test_child_process.h b/mojo/shell/test_child_process.h index c2d440b..c3acb9b 100644 --- a/mojo/shell/test_child_process.h +++ b/mojo/shell/test_child_process.h @@ -16,7 +16,7 @@ class TestChildProcess : public ChildProcess { TestChildProcess(); virtual ~TestChildProcess(); - virtual void Main() OVERRIDE; + virtual 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 074a070..bed36ca 100644 --- a/mojo/shell/ui_application_loader_android.h +++ b/mojo/shell/ui_application_loader_android.h @@ -5,6 +5,7 @@ #ifndef MOJO_SHELL_UI_APPLICATION_LOADER_ANDROID_H_ #define MOJO_SHELL_UI_APPLICATION_LOADER_ANDROID_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "mojo/application_manager/application_loader.h" @@ -28,9 +29,9 @@ class UIApplicationLoader : public ApplicationLoader { // ApplicationLoader overrides: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + const GURL& url) override; private: class UILoader; diff --git a/mojo/shell/view_manager_loader.h b/mojo/shell/view_manager_loader.h index 1491247..83c5f31 100644 --- a/mojo/shell/view_manager_loader.h +++ b/mojo/shell/view_manager_loader.h @@ -5,6 +5,7 @@ #ifndef MOJO_SHELL_VIEW_MANAGER_LOADER_H_ #define MOJO_SHELL_VIEW_MANAGER_LOADER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "mojo/application_manager/application_loader.h" @@ -31,18 +32,18 @@ class ViewManagerLoader : public ApplicationLoader, // ApplicationLoader overrides: virtual void Load(ApplicationManager* manager, const GURL& url, - scoped_refptr<LoadCallbacks> callbacks) OVERRIDE; + scoped_refptr<LoadCallbacks> callbacks) override; virtual void OnApplicationError(ApplicationManager* manager, - const GURL& url) OVERRIDE; + const GURL& url) override; // ApplicationDelegate overrides. virtual bool ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) OVERRIDE; + mojo::ApplicationConnection* connection) override; // InterfaceFactory<ViewManagerInitService> overrides. virtual void Create( ApplicationConnection* connection, - InterfaceRequest<ViewManagerInitService> request) OVERRIDE; + InterfaceRequest<ViewManagerInitService> request) override; ScopedVector<Application> apps_; service::ViewManagerInitServiceContext context_; diff --git a/mojo/spy/spy.cc b/mojo/spy/spy.cc index 8de8229..67ae56a 100644 --- a/mojo/spy/spy.cc +++ b/mojo/spy/spy.cc @@ -233,7 +233,7 @@ class SpyInterceptor : public mojo::ApplicationManager::Interceptor { private: virtual mojo::ServiceProviderPtr OnConnectToClient( - const GURL& url, mojo::ServiceProviderPtr real_client) OVERRIDE { + 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 368e69a..20d355e 100644 --- a/mojo/spy/spy_server_impl.h +++ b/mojo/spy/spy_server_impl.h @@ -7,7 +7,6 @@ #include <map> -#include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "mojo/public/cpp/system/core.h" #include "mojo/spy/public/spy.mojom.h" @@ -25,17 +24,17 @@ class SpyServerImpl : virtual void StartSession( spy_api::VersionPtr version, const mojo::Callback<void(spy_api::Result, - mojo::String)>& callback) OVERRIDE; + mojo::String)>& callback) override; virtual void StopSession( - const mojo::Callback<void(spy_api::Result)>& callback) OVERRIDE; + const mojo::Callback<void(spy_api::Result)>& callback) override; virtual void TrackConnection( uint32_t id, spy_api::ConnectionOptions options, - const mojo::Callback<void(spy_api::Result)>& callback) OVERRIDE; + const mojo::Callback<void(spy_api::Result)>& callback) override; - virtual void OnConnectionError() OVERRIDE; + virtual void OnConnectionError() override; // SpyServerImpl own methods. void OnIntercept(const GURL& url); diff --git a/mojo/spy/websocket_server.h b/mojo/spy/websocket_server.h index 272d682..c6dc076 100644 --- a/mojo/spy/websocket_server.h +++ b/mojo/spy/websocket_server.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "mojo/spy/common.h" #include "mojo/spy/public/spy.mojom.h" #include "net/server/http_server.h" @@ -38,26 +39,26 @@ class WebSocketServer : public net::HttpServer::Delegate, protected: // Overridden from net::HttpServer::Delegate. - virtual void OnConnect(int connection_id) OVERRIDE {} + virtual void OnConnect(int connection_id) override {} virtual void OnHttpRequest( int connection_id, - const net::HttpServerRequestInfo& info) OVERRIDE; + const net::HttpServerRequestInfo& info) override; virtual void OnWebSocketRequest( int connection_id, - const net::HttpServerRequestInfo& info) OVERRIDE; + const net::HttpServerRequestInfo& info) override; virtual void OnWebSocketMessage( int connection_id, - const std::string& data) OVERRIDE; - virtual void OnClose(int connection_id) OVERRIDE; + const std::string& data) override; + virtual 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 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; + spy_api::ConnectionOptions options) override; + virtual void OnMessage(spy_api::MessagePtr message) override; // Callbacks from calling spy_api::SpyServer. void OnStartSession(spy_api::Result, mojo::String); |