From 95d28c398e2c510d53feef4474a43d86ec990885 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 5 Jun 2015 12:07:27 +0800 Subject: [PATCH] Update cpplint --- brightray/browser/browser_context.cc | 4 +- brightray/browser/browser_context.h | 4 +- brightray/browser/browser_main_parts.h | 12 ++--- .../devtools_embedder_message_dispatcher.cc | 2 +- brightray/browser/devtools_ui.cc | 21 +++++---- .../inspectable_web_contents_view_mac.h | 12 ++--- .../linux/notification_presenter_linux.cc | 7 +-- .../media/media_capture_devices_dispatcher.h | 10 ++--- .../browser/url_request_context_getter.h | 4 +- .../inspectable_web_contents_view_views.h | 16 +++---- brightray/browser/views/views_delegate.h | 44 +++++++++---------- brightray/browser/web_ui_controller_factory.h | 10 ++--- brightray/common/main_delegate.h | 6 +-- brightray/vendor/google-styleguide | 2 +- 14 files changed, 77 insertions(+), 77 deletions(-) diff --git a/brightray/browser/browser_context.cc b/brightray/browser/browser_context.cc index c4aa7d186d8c..3e0e271164bf 100644 --- a/brightray/browser/browser_context.cc +++ b/brightray/browser/browser_context.cc @@ -33,11 +33,11 @@ class BrowserContext::ResourceContext : public content::ResourceContext { } private: - virtual net::HostResolver* GetHostResolver() override { + net::HostResolver* GetHostResolver() override { return getter_->host_resolver(); } - virtual net::URLRequestContext* GetRequestContext() override { + net::URLRequestContext* GetRequestContext() override { return getter_->GetURLRequestContext(); } diff --git a/brightray/browser/browser_context.h b/brightray/browser/browser_context.h index d7f957477f15..5cddd0a494e6 100644 --- a/brightray/browser/browser_context.h +++ b/brightray/browser/browser_context.h @@ -40,9 +40,9 @@ class BrowserContext : public content::BrowserContext, virtual void RegisterPrefs(PrefRegistrySimple* pref_registry) {} // URLRequestContextGetter::Delegate: - virtual net::NetworkDelegate* CreateNetworkDelegate() override; + net::NetworkDelegate* CreateNetworkDelegate() override; - virtual base::FilePath GetPath() const override; + base::FilePath GetPath() const override; private: class ResourceContext; diff --git a/brightray/browser/browser_main_parts.h b/brightray/browser/browser_main_parts.h index a5ba51508b46..e8d7c323c78a 100644 --- a/brightray/browser/browser_main_parts.h +++ b/brightray/browser/browser_main_parts.h @@ -39,12 +39,12 @@ class BrowserMainParts : public content::BrowserMainParts { protected: // content::BrowserMainParts: - virtual void PreEarlyInitialization() override; - virtual void ToolkitInitialized() override; - virtual void PreMainMessageLoopStart() override; - virtual void PreMainMessageLoopRun() override; - virtual void PostMainMessageLoopRun() override; - virtual int PreCreateThreads() override; + void PreEarlyInitialization() override; + void ToolkitInitialized() override; + void PreMainMessageLoopStart() override; + void PreMainMessageLoopRun() override; + void PostMainMessageLoopRun() override; + int PreCreateThreads() override; // Subclasses should override this to provide their own BrowserContxt // implementation. The caller takes ownership of the returned object. diff --git a/brightray/browser/devtools_embedder_message_dispatcher.cc b/brightray/browser/devtools_embedder_message_dispatcher.cc index c5b90fccef9c..cb44ec16d860 100644 --- a/brightray/browser/devtools_embedder_message_dispatcher.cc +++ b/brightray/browser/devtools_embedder_message_dispatcher.cc @@ -104,7 +104,7 @@ bool ParseAndHandleWithCallback( return true; } -} // namespace +} // namespace /** * Dispatcher for messages sent from the frontend running in an diff --git a/brightray/browser/devtools_ui.cc b/brightray/browser/devtools_ui.cc index 30a974fccfc7..9b5eba7d6fc2 100644 --- a/brightray/browser/devtools_ui.cc +++ b/brightray/browser/devtools_ui.cc @@ -52,18 +52,17 @@ std::string GetMimeTypeForPath(const std::string& path) { class BundledDataSource : public content::URLDataSource { public: - explicit BundledDataSource() { - } + BundledDataSource() {} // content::URLDataSource implementation. - virtual std::string GetSource() const override { + std::string GetSource() const override { return kChromeUIDevToolsBundledHost; } - virtual void StartDataRequest(const std::string& path, - int render_process_id, - int render_view_id, - const GotDataCallback& callback) override { + void StartDataRequest(const std::string& path, + int render_process_id, + int render_view_id, + const GotDataCallback& callback) override { std::string filename = PathWithoutParams(path); int resource_id = @@ -79,19 +78,19 @@ class BundledDataSource : public content::URLDataSource { callback.Run(bytes.get()); } - virtual std::string GetMimeType(const std::string& path) const override { + std::string GetMimeType(const std::string& path) const override { return GetMimeTypeForPath(path); } - virtual bool ShouldAddContentSecurityPolicy() const override { + bool ShouldAddContentSecurityPolicy() const override { return false; } - virtual bool ShouldDenyXFrameOptions() const override { + bool ShouldDenyXFrameOptions() const override { return false; } - virtual bool ShouldServeMimeTypeAsContentTypeHeader() const override { + bool ShouldServeMimeTypeAsContentTypeHeader() const override { return true; } diff --git a/brightray/browser/inspectable_web_contents_view_mac.h b/brightray/browser/inspectable_web_contents_view_mac.h index 6a81d642c8d9..fbe19adaebda 100644 --- a/brightray/browser/inspectable_web_contents_view_mac.h +++ b/brightray/browser/inspectable_web_contents_view_mac.h @@ -17,12 +17,12 @@ class InspectableWebContentsViewMac : public InspectableWebContentsView { InspectableWebContentsImpl* inspectable_web_contents_impl); virtual ~InspectableWebContentsViewMac(); - virtual gfx::NativeView GetNativeView() const override; - virtual void ShowDevTools() override; - virtual void CloseDevTools() override; - virtual bool IsDevToolsViewShowing() override; - virtual void SetIsDocked(bool docked) override; - virtual void SetContentsResizingStrategy( + gfx::NativeView GetNativeView() const override; + void ShowDevTools() override; + void CloseDevTools() override; + bool IsDevToolsViewShowing() override; + void SetIsDocked(bool docked) override; + void SetContentsResizingStrategy( const DevToolsContentsResizingStrategy& strategy) override; InspectableWebContentsImpl* inspectable_web_contents() { diff --git a/brightray/browser/linux/notification_presenter_linux.cc b/brightray/browser/linux/notification_presenter_linux.cc index 9baa4474e980..0c688906a7b6 100644 --- a/brightray/browser/linux/notification_presenter_linux.cc +++ b/brightray/browser/linux/notification_presenter_linux.cc @@ -30,7 +30,7 @@ static bool UnityIsRunning() { struct DBusConnection* bus = NULL; dbus_error_init(&err); - + bus = dbus_bus_get(DBUS_BUS_SESSION, &err); if (dbus_error_is_set(&err)) { g_debug("Failed to get Session Bus reference"); @@ -39,7 +39,7 @@ static bool UnityIsRunning() { goto out; } - + unity_result = dbus_bus_name_has_owner(bus, "com.canonical.indicator.session", &err); if (dbus_error_is_set(&err)) { @@ -107,7 +107,8 @@ void NotificationPresenterLinux::ShowNotification( // Zen Nature" is difficult, we will test for the presence of the indicate // dbus service if (!UnityIsRunning()) { - notify_notification_add_action(notification, "default", "View", OnNotificationViewThunk, this, nullptr); + notify_notification_add_action( + notification, "default", "View", OnNotificationViewThunk, this, nullptr); } GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(icon); diff --git a/brightray/browser/media/media_capture_devices_dispatcher.h b/brightray/browser/media/media_capture_devices_dispatcher.h index f89f9b02203b..be369a2ff61f 100644 --- a/brightray/browser/media/media_capture_devices_dispatcher.h +++ b/brightray/browser/media/media_capture_devices_dispatcher.h @@ -51,17 +51,17 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { void DisableDeviceEnumerationForTesting(); // Overridden from content::MediaObserver: - virtual void OnAudioCaptureDevicesChanged() override; - virtual void OnVideoCaptureDevicesChanged() override; - virtual void OnMediaRequestStateChanged( + void OnAudioCaptureDevicesChanged() override; + void OnVideoCaptureDevicesChanged() override; + void OnMediaRequestStateChanged( int render_process_id, int render_view_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state) override; - virtual void OnCreatingAudioStream(int render_process_id, - int render_view_id) override; + void OnCreatingAudioStream(int render_process_id, + int render_view_id) override; private: friend struct DefaultSingletonTraits; diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index 599bf6c4d228..d1f847fc968e 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -52,8 +52,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { virtual ~URLRequestContextGetter(); // net::URLRequestContextGetter: - virtual net::URLRequestContext* GetURLRequestContext() override; - virtual scoped_refptr GetNetworkTaskRunner() const override; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr GetNetworkTaskRunner() const override; net::HostResolver* host_resolver(); diff --git a/brightray/browser/views/inspectable_web_contents_view_views.h b/brightray/browser/views/inspectable_web_contents_view_views.h index 80934755692d..4e2503504632 100644 --- a/brightray/browser/views/inspectable_web_contents_view_views.h +++ b/brightray/browser/views/inspectable_web_contents_view_views.h @@ -24,13 +24,13 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView, ~InspectableWebContentsViewViews(); // InspectableWebContentsView: - virtual views::View* GetView() override; - virtual views::View* GetWebView() override; - virtual void ShowDevTools() override; - virtual void CloseDevTools() override; - virtual bool IsDevToolsViewShowing() override; - virtual void SetIsDocked(bool docked) override; - virtual void SetContentsResizingStrategy( + views::View* GetView() override; + views::View* GetWebView() override; + void ShowDevTools() override; + void CloseDevTools() override; + bool IsDevToolsViewShowing() override; + void SetIsDocked(bool docked) override; + void SetContentsResizingStrategy( const DevToolsContentsResizingStrategy& strategy) override; InspectableWebContentsImpl* inspectable_web_contents() { @@ -39,7 +39,7 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView, private: // views::View: - virtual void Layout() override; + void Layout() override; // Owns us. InspectableWebContentsImpl* inspectable_web_contents_; diff --git a/brightray/browser/views/views_delegate.h b/brightray/browser/views/views_delegate.h index bd1e7bc2b6be..157660aa5d09 100644 --- a/brightray/browser/views/views_delegate.h +++ b/brightray/browser/views/views_delegate.h @@ -17,42 +17,42 @@ class ViewsDelegate : public views::ViewsDelegate { protected: // views::ViewsDelegate: - virtual void SaveWindowPlacement(const views::Widget* window, - const std::string& window_name, - const gfx::Rect& bounds, - ui::WindowShowState show_state) override; - virtual bool GetSavedWindowPlacement( + void SaveWindowPlacement(const views::Widget* window, + const std::string& window_name, + const gfx::Rect& bounds, + ui::WindowShowState show_state) override; + bool GetSavedWindowPlacement( const views::Widget* widget, const std::string& window_name, gfx::Rect* bounds, ui::WindowShowState* show_state) const override; - virtual void NotifyAccessibilityEvent( + void NotifyAccessibilityEvent( views::View* view, ui::AXEvent event_type) override; - virtual void NotifyMenuItemFocused(const base::string16& menu_name, - const base::string16& menu_item_name, - int item_index, - int item_count, - bool has_submenu) override; + void NotifyMenuItemFocused(const base::string16& menu_name, + const base::string16& menu_item_name, + int item_index, + int item_count, + bool has_submenu) override; #if defined(OS_WIN) - virtual HICON GetDefaultWindowIcon() const override; - virtual HICON GetSmallWindowIcon() const override; - virtual bool IsWindowInMetro(gfx::NativeWindow window) const override; + HICON GetDefaultWindowIcon() const override; + HICON GetSmallWindowIcon() const override; + bool IsWindowInMetro(gfx::NativeWindow window) const override; #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) - virtual gfx::ImageSkia* GetDefaultWindowIcon() const override; + gfx::ImageSkia* GetDefaultWindowIcon() const override; #endif - virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( + views::NonClientFrameView* CreateDefaultNonClientFrameView( views::Widget* widget) override; - virtual void AddRef() override; - virtual void ReleaseRef() override; - virtual content::WebContents* CreateWebContents( + void AddRef() override; + void ReleaseRef() override; + content::WebContents* CreateWebContents( content::BrowserContext* browser_context, content::SiteInstance* site_instance) override; - virtual void OnBeforeWidgetInit( + void OnBeforeWidgetInit( views::Widget::InitParams* params, views::internal::NativeWidgetDelegate* delegate) override; - virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() override; - virtual bool WindowManagerProvidesTitleBar(bool maximized) override; + base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() override; + bool WindowManagerProvidesTitleBar(bool maximized) override; private: DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); diff --git a/brightray/browser/web_ui_controller_factory.h b/brightray/browser/web_ui_controller_factory.h index ed99e3247c57..6f860841affe 100644 --- a/brightray/browser/web_ui_controller_factory.h +++ b/brightray/browser/web_ui_controller_factory.h @@ -18,13 +18,13 @@ class WebUIControllerFactory : public content::WebUIControllerFactory { explicit WebUIControllerFactory(BrowserContext* browser_context); virtual ~WebUIControllerFactory(); - virtual content::WebUI::TypeID GetWebUIType( + content::WebUI::TypeID GetWebUIType( content::BrowserContext* browser_context, const GURL& url) const override; - virtual bool UseWebUIForURL(content::BrowserContext* browser_context, + bool UseWebUIForURL(content::BrowserContext* browser_context, + const GURL& url) const override; + bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, const GURL& url) const override; - virtual bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, - const GURL& url) const override; - virtual content::WebUIController* CreateWebUIControllerForURL( + content::WebUIController* CreateWebUIControllerForURL( content::WebUI* web_ui, const GURL& url) const override; diff --git a/brightray/common/main_delegate.h b/brightray/common/main_delegate.h index 153013b3c210..58349944746d 100644 --- a/brightray/common/main_delegate.h +++ b/brightray/common/main_delegate.h @@ -49,11 +49,11 @@ class MainDelegate : public content::ContentMainDelegate { virtual void OverrideFrameworkBundlePath(); #endif - virtual bool BasicStartupComplete(int* exit_code) override; - virtual void PreSandboxStartup() override; + bool BasicStartupComplete(int* exit_code) override; + void PreSandboxStartup() override; private: - virtual content::ContentBrowserClient* CreateContentBrowserClient() override; + content::ContentBrowserClient* CreateContentBrowserClient() override; void InitializeResourceBundle(); diff --git a/brightray/vendor/google-styleguide b/brightray/vendor/google-styleguide index 8025f5495c04..ba88c8a53f1b 160000 --- a/brightray/vendor/google-styleguide +++ b/brightray/vendor/google-styleguide @@ -1 +1 @@ -Subproject commit 8025f5495c04f1cf9e0d65a0aaa97b58c304faf7 +Subproject commit ba88c8a53f1b563c43fc063cc048e5efdc238c18