From 2f39655a37115e8b1f531da0d69a6cd95fe7aa7b Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Sun, 1 Feb 2015 13:40:42 -0800 Subject: [PATCH] Cleanup unused #includes and declarations in PlatformImpl These aren't needed anymore. Also, use more |override|. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/892053002 --- engine/public/platform/Platform.h | 14 -------------- engine/testing/platform/platform_impl.cc | 10 ---------- engine/testing/platform/platform_impl.h | 12 ++++-------- viewer/platform/platform_impl.cc | 12 +----------- viewer/platform/platform_impl.h | 16 ++++++---------- 5 files changed, 11 insertions(+), 53 deletions(-) diff --git a/engine/public/platform/Platform.h b/engine/public/platform/Platform.h index 8d3ac0d24bf..e39689508c0 100644 --- a/engine/public/platform/Platform.h +++ b/engine/public/platform/Platform.h @@ -189,20 +189,6 @@ public: // Returns a value such as "en-US". virtual WebString defaultLocale() { return WebString(); } - // Wall clock time in seconds since the epoch. - virtual double currentTime() { return 0; } - - // Monotonically increasing time in seconds from an arbitrary fixed point in the past. - // This function is expected to return at least millisecond-precision values. For this reason, - // it is recommended that the fixed point be no further in the past than the epoch. - virtual double monotonicallyIncreasingTime() { return 0; } - - // Delayed work is driven by a shared timer. - typedef void (*SharedTimerFunction)(); - virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) { } - virtual void setSharedTimerFireInterval(double) { } - virtual void stopSharedTimer() { } - virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; } diff --git a/engine/testing/platform/platform_impl.cc b/engine/testing/platform/platform_impl.cc index 72b5fba4ffb..6df266aefd2 100644 --- a/engine/testing/platform/platform_impl.cc +++ b/engine/testing/platform/platform_impl.cc @@ -4,16 +4,6 @@ #include "sky/engine/testing/platform/platform_impl.h" -#include - -#include "base/rand_util.h" -#include "base/stl_util.h" -#include "base/synchronization/waitable_event.h" -#include "base/time/time.h" -#include "net/base/data_url.h" -#include "net/base/mime_util.h" -#include "net/base/net_errors.h" - namespace sky { PlatformImpl::PlatformImpl() { diff --git a/engine/testing/platform/platform_impl.h b/engine/testing/platform/platform_impl.h index e537599d55d..07cf93535f6 100644 --- a/engine/testing/platform/platform_impl.h +++ b/engine/testing/platform/platform_impl.h @@ -5,10 +5,6 @@ #ifndef SKY_ENGINE_TESTING_PLATFORM_PLATFORM_IMPL_H_ #define SKY_ENGINE_TESTING_PLATFORM_PLATFORM_IMPL_H_ -#include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" -#include "base/threading/thread_local_storage.h" -#include "base/timer/timer.h" #include "sky/engine/public/platform/Platform.h" #include "sky/engine/testing/platform/webunittestsupport_impl.h" @@ -16,12 +12,12 @@ namespace sky { class PlatformImpl : public blink::Platform { public: - explicit PlatformImpl(); - virtual ~PlatformImpl(); + PlatformImpl(); + ~PlatformImpl() override; // blink::Platform methods: - virtual blink::WebUnitTestSupport* unitTestSupport(); - virtual blink::WebString defaultLocale(); + blink::WebString defaultLocale() override; + blink::WebUnitTestSupport* unitTestSupport() override; private: WebUnitTestSupportImpl unit_test_support_; diff --git a/viewer/platform/platform_impl.cc b/viewer/platform/platform_impl.cc index dcfa4ef38ea..c186858f7c1 100644 --- a/viewer/platform/platform_impl.cc +++ b/viewer/platform/platform_impl.cc @@ -4,24 +4,14 @@ #include "sky/viewer/platform/platform_impl.h" -#include - -#include "base/debug/trace_event.h" -#include "base/rand_util.h" -#include "base/stl_util.h" -#include "base/synchronization/waitable_event.h" -#include "base/time/time.h" #include "mojo/public/cpp/application/application_impl.h" -#include "net/base/data_url.h" -#include "net/base/mime_util.h" #include "net/base/net_errors.h" #include "sky/viewer/platform/weburlloader_impl.h" namespace sky { PlatformImpl::PlatformImpl(mojo::ApplicationImpl* app) - : main_loop_(base::MessageLoop::current()), - main_thread_task_runner_(base::MessageLoop::current()->task_runner()) { + : main_thread_task_runner_(base::MessageLoop::current()->task_runner()) { app->ConnectToService("mojo:network_service", &network_service_); } diff --git a/viewer/platform/platform_impl.h b/viewer/platform/platform_impl.h index 140c86fd058..5cb3c2476cc 100644 --- a/viewer/platform/platform_impl.h +++ b/viewer/platform/platform_impl.h @@ -5,10 +5,7 @@ #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ -#include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" -#include "base/threading/thread_local_storage.h" -#include "base/timer/timer.h" #include "mojo/services/network/public/interfaces/network_service.mojom.h" #include "sky/engine/public/platform/Platform.h" @@ -21,18 +18,17 @@ namespace sky { class PlatformImpl : public blink::Platform { public: explicit PlatformImpl(mojo::ApplicationImpl* app); - virtual ~PlatformImpl(); + ~PlatformImpl() override; // blink::Platform methods: - virtual blink::WebString defaultLocale(); - virtual base::SingleThreadTaskRunner* mainThreadTaskRunner(); - virtual mojo::NetworkService* networkService(); - virtual blink::WebURLLoader* createURLLoader(); - virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; + blink::WebString defaultLocale() override; + base::SingleThreadTaskRunner* mainThreadTaskRunner() override; + mojo::NetworkService* networkService() override; + blink::WebURLLoader* createURLLoader() override; + blink::WebURLError cancelledError(const blink::WebURL& url) const override; private: mojo::NetworkServicePtr network_service_; - base::MessageLoop* main_loop_; scoped_refptr main_thread_task_runner_; DISALLOW_COPY_AND_ASSIGN(PlatformImpl);