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/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[*]}"