diff --git a/compositor/layer_host.h b/compositor/layer_host.h index 1e4fcc7b17b..36bf2df53a5 100644 --- a/compositor/layer_host.h +++ b/compositor/layer_host.h @@ -22,7 +22,7 @@ class LayerHostClient; class LayerHost : public SurfaceHolder::Client { public: explicit LayerHost(LayerHostClient* client); - ~LayerHost(); + ~LayerHost() override; LayerHostClient* client() const { return client_; } diff --git a/engine/BUILD.gn b/engine/BUILD.gn index cc9d4063044..b94f7d51533 100644 --- a/engine/BUILD.gn +++ b/engine/BUILD.gn @@ -46,7 +46,7 @@ config("config") { # nullptr) conflict with upcoming c++0x types. cflags_cc = [ "-Wno-c++0x-compat" ] - if (is_linux && cpu_arch == "arm") { + if (is_linux && target_cpu == "arm") { # Due to a bug in gcc arm, we get warnings about uninitialized # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. cflags += [ "-Wno-uninitialized" ] diff --git a/engine/config.gni b/engine/config.gni index 95759233c7a..d6214be92fa 100644 --- a/engine/config.gni +++ b/engine/config.gni @@ -8,7 +8,7 @@ if (is_android) { import("//build/config/android/config.gni") } -if (cpu_arch == "arm") { +if (target_cpu == "arm") { import("//build/config/arm.gni") } else { # TODO(brettw) remove this once && early-out is checked in. diff --git a/engine/platform/BUILD.gn b/engine/platform/BUILD.gn index da61f25de05..c0bae3bef26 100644 --- a/engine/platform/BUILD.gn +++ b/engine/platform/BUILD.gn @@ -640,7 +640,7 @@ source_set("platform") { direct_dependent_configs = [ "//build/config/linux:fontconfig" ] } - if (cpu_arch == "arm") { + if (target_cpu == "arm") { deps += [ ":sky_arm_neon" ] } } @@ -713,7 +713,7 @@ test("platform_unittests") { include_dirs = [ "$root_build_dir" ] } -if (cpu_arch == "arm") { +if (target_cpu == "arm") { source_set("sky_arm_neon") { sources = [ "graphics/cpu/arm/WebGLImageConversionNEON.h", diff --git a/engine/platform/graphics/ImageDecodingStoreTest.cpp b/engine/platform/graphics/ImageDecodingStoreTest.cpp index c0650fcfff2..0e153c86ef6 100644 --- a/engine/platform/graphics/ImageDecodingStoreTest.cpp +++ b/engine/platform/graphics/ImageDecodingStoreTest.cpp @@ -38,7 +38,7 @@ namespace { class ImageDecodingStoreTest : public ::testing::Test, public MockImageDecoderClient { public: - virtual void SetUp() + void SetUp() override { ImageDecodingStore::instance()->setCacheLimitInBytes(1024 * 1024); m_data = SharedBuffer::create(); @@ -46,17 +46,17 @@ public: m_decodersDestroyed = 0; } - virtual void TearDown() + void TearDown() override { ImageDecodingStore::instance()->clear(); } - virtual void decoderBeingDestroyed() + void decoderBeingDestroyed() override { ++m_decodersDestroyed; } - virtual void frameBufferRequested() + void frameBufferRequested() override { // Decoder is never used by ImageDecodingStore. ASSERT_TRUE(false); diff --git a/engine/platform/graphics/gpu/DrawingBufferTest.cpp b/engine/platform/graphics/gpu/DrawingBufferTest.cpp index bc9794b90e5..cbc407458a7 100644 --- a/engine/platform/graphics/gpu/DrawingBufferTest.cpp +++ b/engine/platform/graphics/gpu/DrawingBufferTest.cpp @@ -205,7 +205,7 @@ public: class DrawingBufferTest : public Test { protected: - virtual void SetUp() + void SetUp() override { RefPtr contextEvictionManager = adoptRef(new FakeContextEvictionManager()); OwnPtr context = adoptPtr(new WebGraphicsContext3DForTests); @@ -443,7 +443,7 @@ TEST_F(DrawingBufferTest, verifyInsertAndWaitSyncPointCorrectly) class DrawingBufferImageChromiumTest : public DrawingBufferTest { protected: - virtual void SetUp() + void SetUp() override { RefPtr contextEvictionManager = adoptRef(new FakeContextEvictionManager()); OwnPtr context = adoptPtr(new WebGraphicsContext3DForTests); @@ -456,7 +456,7 @@ protected: testing::Mock::VerifyAndClearExpectations(webContext()); } - virtual void TearDown() + void TearDown() override { RuntimeEnabledFeatures::setWebGLImageChromiumEnabled(false); } diff --git a/engine/platform/text/LineEnding.cpp b/engine/platform/text/LineEnding.cpp index 80ee70af673..ac71b2ec3dc 100644 --- a/engine/platform/text/LineEnding.cpp +++ b/engine/platform/text/LineEnding.cpp @@ -50,16 +50,16 @@ public: : m_buffer(buffer) { } - virtual ~CStringBuffer() { } + ~CStringBuffer() override { } - virtual char* allocate(size_t size) override + char* allocate(size_t size) override { char* ptr; m_buffer = CString::newUninitialized(size, ptr); return ptr; } - virtual void copy(const CString& source) override + void copy(const CString& source) override { m_buffer = source; } @@ -76,16 +76,16 @@ public: : m_buffer(buffer) { } - virtual ~VectorCharAppendBuffer() { } + ~VectorCharAppendBuffer() override { } - virtual char* allocate(size_t size) override + char* allocate(size_t size) override { size_t oldSize = m_buffer.size(); m_buffer.grow(oldSize + size); return m_buffer.data() + oldSize; } - virtual void copy(const CString& source) override + void copy(const CString& source) override { m_buffer.append(source.data(), source.length()); } diff --git a/tools/debugger/debugger.cc b/tools/debugger/debugger.cc index ed17436a23b..7ba8c5f14cd 100644 --- a/tools/debugger/debugger.cc +++ b/tools/debugger/debugger.cc @@ -29,7 +29,7 @@ class SkyDebugger : public mojo::ApplicationDelegate, public http_server::HttpHandler { public: SkyDebugger() : is_tracing_(false), handler_binding_(this) {} - virtual ~SkyDebugger() {} + ~SkyDebugger() override {} private: // mojo::ApplicationDelegate: diff --git a/tools/debugger/trace_collector.h b/tools/debugger/trace_collector.h index ce8db02de6f..8c6c322f6e8 100644 --- a/tools/debugger/trace_collector.h +++ b/tools/debugger/trace_collector.h @@ -18,7 +18,7 @@ class TraceCollector : public mojo::common::DataPipeDrainer::Client { typedef base::Callback TraceCallback; explicit TraceCollector(mojo::ScopedDataPipeConsumerHandle source); - ~TraceCollector(); + ~TraceCollector() override; void GetTrace(TraceCallback callback); diff --git a/tools/tester/test_harness_impl.h b/tools/tester/test_harness_impl.h index 3067b525f62..18f86966ee9 100644 --- a/tools/tester/test_harness_impl.h +++ b/tools/tester/test_harness_impl.h @@ -19,7 +19,7 @@ class TestHarnessImpl : public TestHarness { public: TestHarnessImpl(TestRunner* runner, mojo::InterfaceRequest request); - virtual ~TestHarnessImpl(); + ~TestHarnessImpl() override; private: // TestHarness implementation. diff --git a/tools/tester/test_runner.cc b/tools/tester/test_runner.cc index c726989ce10..5982382a543 100644 --- a/tools/tester/test_runner.cc +++ b/tools/tester/test_runner.cc @@ -20,8 +20,8 @@ TestRunner::TestRunner(TestRunnerClient* client, const std::string& url, bool enable_pixel_dumping) : client_(client), - weak_ptr_factory_(this), - enable_pixel_dumping_(enable_pixel_dumping) { + enable_pixel_dumping_(enable_pixel_dumping), + weak_ptr_factory_(this) { CHECK(client); mojo::ServiceProviderPtr test_harness_provider; diff --git a/tools/tester/test_runner.h b/tools/tester/test_runner.h index 57bfab2cac2..88102407afe 100644 --- a/tools/tester/test_runner.h +++ b/tools/tester/test_runner.h @@ -45,8 +45,8 @@ class TestRunner : public mojo::InterfaceFactory { mojo::ServiceProviderImpl test_harness_provider_impl_; TestRunnerClient* client_; - base::WeakPtrFactory weak_ptr_factory_; bool enable_pixel_dumping_; + base::WeakPtrFactory weak_ptr_factory_; MOJO_DISALLOW_COPY_AND_ASSIGN(TestRunner); }; diff --git a/tools/tester/tester.cc b/tools/tester/tester.cc index 631ca4e2604..f0af25c6654 100644 --- a/tools/tester/tester.cc +++ b/tools/tester/tester.cc @@ -64,17 +64,17 @@ class SkyTester : public mojo::ApplicationDelegate, root_(NULL), content_(NULL), weak_ptr_factory_(this) {} - virtual ~SkyTester() {} + ~SkyTester() override {} private: // Overridden from mojo::ApplicationDelegate: - virtual void Initialize(mojo::ApplicationImpl* impl) override { + void Initialize(mojo::ApplicationImpl* impl) override { window_manager_app_->Initialize(impl); if (impl->args().size() >= 2) url_from_args_ = impl->args()[1]; } - virtual bool ConfigureIncomingConnection( + bool ConfigureIncomingConnection( mojo::ApplicationConnection* connection) override { window_manager_app_->ConfigureIncomingConnection(connection); if (test_runner_) @@ -83,9 +83,9 @@ class SkyTester : public mojo::ApplicationDelegate, } // Overridden from mojo::ViewManagerDelegate: - virtual void OnEmbed(mojo::View* root, - mojo::InterfaceRequest services, - mojo::ServiceProviderPtr exposed_services) override { + void OnEmbed(mojo::View* root, + mojo::InterfaceRequest services, + mojo::ServiceProviderPtr exposed_services) override { root_ = root; root_->AddObserver(this); @@ -100,22 +100,21 @@ class SkyTester : public mojo::ApplicationDelegate, } // Overridden from window_manager::WindowManagerDelegate: - virtual void Embed(const mojo::String& url, - mojo::InterfaceRequest services, - mojo::ServiceProviderPtr exposed_services) override {} + void Embed(const mojo::String& url, + mojo::InterfaceRequest services, + mojo::ServiceProviderPtr exposed_services) override {} - virtual void OnViewManagerDisconnected( - mojo::ViewManager* view_manager) override { + void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override { root_ = NULL; } - virtual void OnViewDestroyed(mojo::View* view) override { + void OnViewDestroyed(mojo::View* view) override { view->RemoveObserver(this); } - virtual void OnViewBoundsChanged(mojo::View* view, - const mojo::Rect& old_bounds, - const mojo::Rect& new_bounds) override { + void OnViewBoundsChanged(mojo::View* view, + const mojo::Rect& old_bounds, + const mojo::Rect& new_bounds) override { content_->SetBounds(new_bounds); } diff --git a/viewer/internals.h b/viewer/internals.h index fc76d367ffa..f94f26816d1 100644 --- a/viewer/internals.h +++ b/viewer/internals.h @@ -17,7 +17,7 @@ class DocumentView; class Internals : public base::SupportsUserData::Data, public mojo::Shell { public: - virtual ~Internals(); + ~Internals() override; static void Create(Dart_Isolate isolate, DocumentView* document_view); diff --git a/viewer/viewer.cc b/viewer/viewer.cc index 61c92daf9a4..7f043b3e0d2 100644 --- a/viewer/viewer.cc +++ b/viewer/viewer.cc @@ -27,11 +27,11 @@ class Viewer : public mojo::ApplicationDelegate, public: Viewer() {} - virtual ~Viewer() { blink::shutdown(); } + ~Viewer() override { blink::shutdown(); } private: // Overridden from ApplicationDelegate: - virtual void Initialize(mojo::ApplicationImpl* app) override { + void Initialize(mojo::ApplicationImpl* app) override { RuntimeFlags::Initialize(app); mojo::NetworkServicePtr network_service; @@ -43,15 +43,15 @@ class Viewer : public mojo::ApplicationDelegate, tracing_.Initialize(app); } - virtual bool ConfigureIncomingConnection( + bool ConfigureIncomingConnection( mojo::ApplicationConnection* connection) override { connection->AddService(this); return true; } // Overridden from InterfaceFactory - virtual void Create(mojo::ApplicationConnection* connection, - mojo::InterfaceRequest request) override { + void Create(mojo::ApplicationConnection* connection, + mojo::InterfaceRequest request) override { new ContentHandlerImpl(request.Pass()); }