diff options
60 files changed, 212 insertions, 178 deletions
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc index dad5d18..78fc815 100644 --- a/ash/launcher/launcher_button.cc +++ b/ash/launcher/launcher_button.cc @@ -96,7 +96,7 @@ class LauncherButtonAnimation : public ui::AnimationDelegate { } // ui::AnimationDelegate - void AnimationProgressed(const ui::Animation* animation) { + virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE { if (animation != &animation_) return; if (!animation_.is_animating()) @@ -126,7 +126,7 @@ class LauncherButton::BarView : public views::ImageView, show_attention_(false) { } - ~BarView() { + virtual ~BarView() { if (show_attention_) LauncherButtonAnimation::GetInstance()->RemoveObserver(this); } diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index f847a5e..eab771be1ad 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc @@ -71,13 +71,13 @@ class DimmerView : public views::View, } // ash::internal::BackgroundAnimatorDelegate overrides: - virtual void UpdateBackground(int alpha) { + virtual void UpdateBackground(int alpha) OVERRIDE { alpha_ = alpha; SchedulePaint(); } // views::View overrides: - void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; + virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; // A function to test the current alpha used. int get_dimming_alpha_for_test() { return alpha_; } @@ -87,7 +87,7 @@ class DimmerView : public views::View, class DimmerEventFilter : public ui::EventHandler { public: explicit DimmerEventFilter(DimmerView* owner); - ~DimmerEventFilter(); + virtual ~DimmerEventFilter(); // Overridden from ui::EventHandler: virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc index 9afee4f..7ee4d38 100644 --- a/ash/shell/app_list.cc +++ b/ash/shell/app_list.cc @@ -295,19 +295,19 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { return gfx::ImageSkia(); } - virtual base::string16 GetCurrentUserName() { + virtual base::string16 GetCurrentUserName() OVERRIDE { return base::string16(); } - virtual base::string16 GetCurrentUserEmail() { + virtual base::string16 GetCurrentUserEmail() OVERRIDE { return base::string16(); } - virtual void OpenSettings() { + virtual void OpenSettings() OVERRIDE { // Nothing needs to be done. } - virtual void OpenFeedback() { + virtual void OpenFeedback() OVERRIDE { // Nothing needs to be done. } diff --git a/ash/wm/partial_screenshot_view_unittest.cc b/ash/wm/partial_screenshot_view_unittest.cc index ea1d54c..a763577 100644 --- a/ash/wm/partial_screenshot_view_unittest.cc +++ b/ash/wm/partial_screenshot_view_unittest.cc @@ -17,14 +17,14 @@ class FakeScreenshotDelegate : public ScreenshotDelegate { public: FakeScreenshotDelegate() : screenshot_count_(0) {} - void HandleTakeScreenshotForAllRootWindows() OVERRIDE {} - void HandleTakePartialScreenshot(aura::Window* window, - const gfx::Rect& rect) OVERRIDE { + virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE {} + virtual void HandleTakePartialScreenshot(aura::Window* window, + const gfx::Rect& rect) OVERRIDE { rect_ = rect; screenshot_count_++; } - bool CanTakeScreenshot() OVERRIDE { + virtual bool CanTakeScreenshot() OVERRIDE { return true; } diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc index ba264cd..e1d4a4c 100644 --- a/base/debug/trace_event_impl.cc +++ b/base/debug/trace_event_impl.cc @@ -232,24 +232,25 @@ class TraceBufferDiscardsEvents : public TraceBuffer { public: virtual ~TraceBufferDiscardsEvents() { } - virtual void AddEvent(const TraceEvent& event) { } - virtual bool HasMoreEvents() const { return false; } + virtual void AddEvent(const TraceEvent& event) OVERRIDE {} + virtual bool HasMoreEvents() const OVERRIDE { return false; } - virtual const TraceEvent& NextEvent() { + virtual const TraceEvent& NextEvent() OVERRIDE { NOTREACHED(); return *static_cast<TraceEvent*>(NULL); } - virtual bool IsFull() const { return false; } + virtual bool IsFull() const OVERRIDE { return false; } - virtual size_t CountEnabledByName(const unsigned char* category, - const std::string& event_name) const { + virtual size_t CountEnabledByName( + const unsigned char* category, + const std::string& event_name) const OVERRIDE { return 0; } - virtual size_t Size() const { return 0; } + virtual size_t Size() const OVERRIDE { return 0; } - virtual const TraceEvent& GetEventAt(size_t index) const { + virtual const TraceEvent& GetEventAt(size_t index) const OVERRIDE { NOTREACHED(); return *static_cast<TraceEvent*>(NULL); } diff --git a/build/common.gypi b/build/common.gypi index fe4ecbc..8e55692 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1526,8 +1526,27 @@ 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], }], ['clang_use_chrome_plugins==1 and OS!="win"', { - 'clang_chrome_plugins_flags': [ - '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' + 'variables': { + 'clang_chrome_plugins_flags': [ + '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' + ], + }, + 'conditions': [ + ['OS=="linux" and chromeos==0', { + 'clang_chrome_plugins_flags': [ + '<@(clang_chrome_plugins_flags)' + ], + }, { + # TODO(rsleevi): http://crbug.com/115047 - This warning is only + # enabled for Linux for now. Disable everywhere else. + 'clang_chrome_plugins_flags': [ + '<@(clang_chrome_plugins_flags)', + '-Xclang', + '-plugin-arg-find-bad-constructs', + '-Xclang', + 'skip-virtuals-in-implementations', + ], + }] ], }], diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc index 5786bae..9cbbcad 100644 --- a/cc/resources/tile_manager_unittest.cc +++ b/cc/resources/tile_manager_unittest.cc @@ -20,7 +20,7 @@ class FakePicturePileImpl : public PicturePileImpl { } protected: - ~FakePicturePileImpl() {} + virtual ~FakePicturePileImpl() {} }; class TilePriorityForEventualBin : public TilePriority { diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index 7f3cf1b..323bd30 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -2357,7 +2357,7 @@ class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation PostSetNeedsCommitToMainThread(); } - virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) { + virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { EndTest(); } @@ -2577,7 +2577,7 @@ class LayerTreeHostTestAsyncReadback : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() { + virtual void DidCommitAndDrawFrame() OVERRIDE { WaitForCallback(); } @@ -2639,7 +2639,7 @@ class LayerTreeHostTestAsyncReadback : public LayerTreeHostTest { callbacks_.push_back(gfx::Size(bitmap->width(), bitmap->height())); } - virtual void AfterTest() { + virtual void AfterTest() OVERRIDE { EXPECT_EQ(4u, callbacks_.size()); } @@ -2700,7 +2700,7 @@ class LayerTreeHostTestAsyncReadbackLayerDestroyed : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() { + virtual void DidCommit() OVERRIDE { int frame = layer_tree_host()->commit_number(); switch (frame) { case 1: @@ -2755,7 +2755,7 @@ class LayerTreeHostTestAsyncReadbackLayerDestroyed : public LayerTreeHostTest { ++callback_count_; } - virtual void AfterTest() {} + virtual void AfterTest() OVERRIDE {} int callback_count_; FakeContentLayerClient client_; diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index 89be84f..a86253b5 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc @@ -708,7 +708,7 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - bool result) { + bool result) OVERRIDE { if (added_animations_ < 2) return result; // Act like there is checkerboard when the second animation wants to draw. diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc index 1658dea..1c3da612 100644 --- a/cc/trees/layer_tree_host_unittest_context.cc +++ b/cc/trees/layer_tree_host_unittest_context.cc @@ -1374,7 +1374,7 @@ class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface : FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) {} // FakeLayerTreeHostClient - virtual scoped_ptr<OutputSurface> CreateOutputSurface() { + virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { return scoped_ptr<OutputSurface>(); } diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc index fd9bdc5..2ac5cdc 100644 --- a/chrome/browser/chrome_security_exploit_browsertest.cc +++ b/chrome/browser/chrome_security_exploit_browsertest.cc @@ -30,7 +30,7 @@ class ChromeSecurityExploitBrowserTest : public InProcessBrowserTest { ChromeSecurityExploitBrowserTest() {} virtual ~ChromeSecurityExploitBrowserTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { ASSERT_TRUE(test_server()->Start()); net::TestServer https_server( net::TestServer::TYPE_HTTPS, diff --git a/chrome/browser/chromeos/cros/cert_library.cc b/chrome/browser/chromeos/cros/cert_library.cc index b5d7673..a8c502a9 100644 --- a/chrome/browser/chromeos/cros/cert_library.cc +++ b/chrome/browser/chromeos/cros/cert_library.cc @@ -448,31 +448,31 @@ class CertLibraryImplStub : public CertLibrary { } virtual ~CertLibraryImplStub() {} - virtual void AddObserver(Observer* observer) {} - virtual void RemoveObserver(Observer* observer) {} - virtual void LoadKeyStore() {} - virtual bool CertificatesLoading() const { + virtual void AddObserver(Observer* observer) OVERRIDE {} + virtual void RemoveObserver(Observer* observer) OVERRIDE {} + virtual void LoadKeyStore() OVERRIDE {} + virtual bool CertificatesLoading() const OVERRIDE { return false; } - virtual bool CertificatesLoaded() const { + virtual bool CertificatesLoaded() const OVERRIDE { return true; } - virtual bool IsHardwareBacked() const { + virtual bool IsHardwareBacked() const OVERRIDE { return false; } - virtual const std::string& GetTpmTokenName() const { + virtual const std::string& GetTpmTokenName() const OVERRIDE { return token_name_; } - virtual const CertList& GetCertificates() const { + virtual const CertList& GetCertificates() const OVERRIDE { return cert_list_; } - virtual const CertList& GetUserCertificates() const { + virtual const CertList& GetUserCertificates() const OVERRIDE { return cert_list_; } - virtual const CertList& GetServerCertificates() const { + virtual const CertList& GetServerCertificates() const OVERRIDE { return cert_list_; } - virtual const CertList& GetCACertificates() const { + virtual const CertList& GetCACertificates() const OVERRIDE { return cert_list_; } diff --git a/chrome/browser/chromeos/net/connectivity_state_helper.cc b/chrome/browser/chromeos/net/connectivity_state_helper.cc index c6c1055..e7085ef 100644 --- a/chrome/browser/chromeos/net/connectivity_state_helper.cc +++ b/chrome/browser/chromeos/net/connectivity_state_helper.cc @@ -65,7 +65,8 @@ class ConnectivityStateHelperNetworkLibrary virtual void RequestScan() const OVERRIDE; // NetworkLibrary::NetworkManagerObserver overrides. - virtual void OnNetworkManagerChanged(NetworkLibrary* network_library); + virtual void OnNetworkManagerChanged( + NetworkLibrary* network_library) OVERRIDE; private: NetworkLibrary* network_library_; diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc index f9a3162..72a9e21 100644 --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc @@ -138,26 +138,24 @@ class DevToolsConfirmInfoBarDelegate : public ConfirmInfoBarDelegate { message_(message) { } - virtual string16 GetMessageText() const { - return message_; - } + virtual string16 GetMessageText() const OVERRIDE { return message_; } - virtual bool Accept() { + virtual bool Accept() OVERRIDE { callback_.Run(true); callback_.Reset(); return true; } - virtual bool Cancel() { + virtual bool Cancel() OVERRIDE { callback_.Run(false); callback_.Reset(); return true; } - string16 GetButtonLabel(InfoBarButton button) const { - return l10n_util::GetStringUTF16((button == BUTTON_OK) ? - IDS_DEV_TOOLS_CONFIRM_ALLOW_BUTTON : - IDS_DEV_TOOLS_CONFIRM_DENY_BUTTON); + virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE { + return l10n_util::GetStringUTF16((button == BUTTON_OK) + ? IDS_DEV_TOOLS_CONFIRM_ALLOW_BUTTON + : IDS_DEV_TOOLS_CONFIRM_DENY_BUTTON); } private: diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc index c399e94..d87b5ac 100644 --- a/chrome/browser/errorpage_browsertest.cc +++ b/chrome/browser/errorpage_browsertest.cc @@ -255,7 +255,7 @@ class AddressUnreachableProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { public: AddressUnreachableProtocolHandler() {} - ~AddressUnreachableProtocolHandler() {} + virtual ~AddressUnreachableProtocolHandler() {} // net::URLRequestJobFactory::ProtocolHandler: virtual net::URLRequestJob* MaybeCreateJob( diff --git a/chrome/browser/extensions/api/audio/audio_service.cc b/chrome/browser/extensions/api/audio/audio_service.cc index 3406f65..e5fa3db 100644 --- a/chrome/browser/extensions/api/audio/audio_service.cc +++ b/chrome/browser/extensions/api/audio/audio_service.cc @@ -12,11 +12,11 @@ class AudioServiceImpl : public AudioService { virtual ~AudioServiceImpl() {} // Called by listeners to this service to add/remove themselves as observers. - virtual void AddObserver(Observer* observer); - virtual void RemoveObserver(Observer* observer); + virtual void AddObserver(Observer* observer) OVERRIDE; + virtual void RemoveObserver(Observer* observer) OVERRIDE; // Start to query audio device information. - virtual void StartGetInfo(const GetInfoCallback& callback); + virtual void StartGetInfo(const GetInfoCallback& callback) OVERRIDE; }; void AudioServiceImpl::AddObserver(Observer* observer) { diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 7c81008..287aea9 100644 --- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc +++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc @@ -123,7 +123,7 @@ class ExtensionCrashRecoveryTestBase : public ExtensionBrowserTest { class MessageCenterExtensionCrashRecoveryTest : public ExtensionCrashRecoveryTestBase { protected: - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { ExtensionCrashRecoveryTestBase::SetUpCommandLine(command_line); command_line->AppendSwitch( message_center::switches::kEnableRichNotifications); diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc index d8a839d..55695c6 100644 --- a/chrome/browser/notifications/notification_browsertest.cc +++ b/chrome/browser/notifications/notification_browsertest.cc @@ -102,11 +102,12 @@ class MessageCenterChangeObserver const std::string& notification_id) OVERRIDE { OnMessageCenterChanged(); } - virtual void OnNotificationRemoved( - const std::string& notification_id, bool by_user) { + virtual void OnNotificationRemoved(const std::string& notification_id, + bool by_user) OVERRIDE { OnMessageCenterChanged(); } - virtual void OnNotificationUpdated(const std::string& notification_id) { + virtual void OnNotificationUpdated( + const std::string& notification_id) OVERRIDE { OnMessageCenterChanged(); } diff --git a/chrome/browser/signin/oauth2_token_service_unittest.cc b/chrome/browser/signin/oauth2_token_service_unittest.cc index 8f96f13..4acffb9 100644 --- a/chrome/browser/signin/oauth2_token_service_unittest.cc +++ b/chrome/browser/signin/oauth2_token_service_unittest.cc @@ -54,9 +54,7 @@ class TestOAuth2TokenService : public OAuth2TokenService { } protected: - std::string GetRefreshToken() OVERRIDE { - return refresh_token_; - } + virtual std::string GetRefreshToken() OVERRIDE { return refresh_token_; } private: std::string refresh_token_; diff --git a/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc b/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc index 54863bc..b318509 100644 --- a/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc +++ b/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc @@ -69,7 +69,7 @@ class LauncherFaviconLoaderBrowsertest virtual ~LauncherFaviconLoaderBrowsertest() { } - virtual void SetUpOnMainThread() { + virtual void SetUpOnMainThread() OVERRIDE { WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); contents_observer_.reset(new ContentsObserver(web_contents)); diff --git a/chrome/browser/ui/global_error/global_error_service_unittest.cc b/chrome/browser/ui/global_error/global_error_service_unittest.cc index 07d239a..35ab8c8 100644 --- a/chrome/browser/ui/global_error/global_error_service_unittest.cc +++ b/chrome/browser/ui/global_error/global_error_service_unittest.cc @@ -74,7 +74,7 @@ class MenuError : public BaseError { severity_(severity) { } - virtual Severity GetSeverity() { return severity_; } + virtual Severity GetSeverity() OVERRIDE { return severity_; } virtual bool HasMenuItem() OVERRIDE { return true; } virtual int MenuItemCommandID() OVERRIDE { return command_id_; } diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc index 51a6881..6a9ac2f 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc @@ -1714,7 +1714,7 @@ class BookmarkBarViewTest21 : public BookmarkBarViewEventTestBase { protected: // Move the mouse to the empty folder on the bookmark bar and press the // left mouse button. - virtual void DoTestOnMessageLoop() { + virtual void DoTestOnMessageLoop() OVERRIDE { views::TextButton* button = GetBookmarkButton(5); ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT, ui_controls::DOWN | ui_controls::UP, diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc index 029aa67..aca23d6 100644 --- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc +++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc @@ -92,7 +92,7 @@ class RevealedLockAsh : public ImmersiveRevealedLock { controller_->LockRevealedState(animate_reveal); } - ~RevealedLockAsh() { + virtual ~RevealedLockAsh() { if (controller_) controller_->UnlockRevealedState(); } diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc index 16207e4..5297f3b 100644 --- a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc +++ b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc @@ -32,7 +32,7 @@ class BrowserProcessDetails : public MemoryDetails { typedef base::Callback<void(const ProcessData&)> DataCallback; explicit BrowserProcessDetails(const DataCallback& callback) : callback_(callback) {} - virtual void OnDetailsAvailable() { + virtual void OnDetailsAvailable() OVERRIDE { const std::vector<ProcessData>& browser_processes = processes(); callback_.Run(browser_processes[0]); } diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 777560e..d895b7e 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -302,14 +302,14 @@ class PrintPreviewHandler::AccessTokenService } } - void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) OVERRIDE { + virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) OVERRIDE { OnServiceResponce(request, access_token); } - void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) OVERRIDE { + virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) OVERRIDE { OnServiceResponce(request, std::string()); } diff --git a/chrome/common/extensions/features/base_feature_provider.cc b/chrome/common/extensions/features/base_feature_provider.cc index 506e1b6..285426d 100644 --- a/chrome/common/extensions/features/base_feature_provider.cc +++ b/chrome/common/extensions/features/base_feature_provider.cc @@ -32,11 +32,11 @@ class LazyFeatureProvider : public FeatureProvider { resource_id_(resource_id) { } - virtual Feature* GetFeature(const std::string& name) { + virtual Feature* GetFeature(const std::string& name) OVERRIDE { return GetBaseFeatureProvider()->GetFeature(name); } - virtual std::set<std::string> GetAllFeatureNames() { + virtual std::set<std::string> GetAllFeatureNames() OVERRIDE { return GetBaseFeatureProvider()->GetAllFeatureNames(); } diff --git a/chrome/test/chromedriver/chrome/devtools_event_logger_unittest.cc b/chrome/test/chromedriver/chrome/devtools_event_logger_unittest.cc index d6920a0..d13492a 100644 --- a/chrome/test/chromedriver/chrome/devtools_event_logger_unittest.cc +++ b/chrome/test/chromedriver/chrome/devtools_event_logger_unittest.cc @@ -51,7 +51,7 @@ class FakeDevToolsClient : public StubDevToolsClient { listener_ = listener; } - const std::string& GetId() OVERRIDE { + virtual const std::string& GetId() OVERRIDE { return id_; } diff --git a/chromeos/dbus/experimental_bluetooth_adapter_client.cc b/chromeos/dbus/experimental_bluetooth_adapter_client.cc index 34b8ae1..53486d9 100644 --- a/chromeos/dbus/experimental_bluetooth_adapter_client.cc +++ b/chromeos/dbus/experimental_bluetooth_adapter_client.cc @@ -81,7 +81,7 @@ class ExperimentalBluetoothAdapterClientImpl } // Returns the list of adapter object paths known to the system. - virtual std::vector<dbus::ObjectPath> GetAdapters() { + virtual std::vector<dbus::ObjectPath> GetAdapters() OVERRIDE { return object_manager_->GetObjectsWithInterface( bluetooth_adapter::kExperimentalBluetoothAdapterInterface); } @@ -90,9 +90,10 @@ class ExperimentalBluetoothAdapterClientImpl virtual dbus::PropertySet* CreateProperties( dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, - const std::string& interface_name) { + const std::string& interface_name) OVERRIDE { Properties* properties = new Properties( - object_proxy, interface_name, + object_proxy, + interface_name, base::Bind(&ExperimentalBluetoothAdapterClientImpl::OnPropertyChanged, weak_ptr_factory_.GetWeakPtr(), object_path)); @@ -187,17 +188,19 @@ class ExperimentalBluetoothAdapterClientImpl private: // Called by dbus::ObjectManager when an object with the adapter interface // is created. Informs observers. - void ObjectAdded(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { - FOR_EACH_OBSERVER(ExperimentalBluetoothAdapterClient::Observer, observers_, + virtual void ObjectAdded(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { + FOR_EACH_OBSERVER(ExperimentalBluetoothAdapterClient::Observer, + observers_, AdapterAdded(object_path)); } // Called by dbus::ObjectManager when an object with the adapter interface // is removed. Informs observers. - void ObjectRemoved(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { - FOR_EACH_OBSERVER(ExperimentalBluetoothAdapterClient::Observer, observers_, + virtual void ObjectRemoved(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { + FOR_EACH_OBSERVER(ExperimentalBluetoothAdapterClient::Observer, + observers_, AdapterRemoved(object_path)); } diff --git a/chromeos/dbus/experimental_bluetooth_device_client.cc b/chromeos/dbus/experimental_bluetooth_device_client.cc index 9de3c94..7cfc88f 100644 --- a/chromeos/dbus/experimental_bluetooth_device_client.cc +++ b/chromeos/dbus/experimental_bluetooth_device_client.cc @@ -86,9 +86,10 @@ class ExperimentalBluetoothDeviceClientImpl virtual dbus::PropertySet* CreateProperties( dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, - const std::string& interface_name) { + const std::string& interface_name) OVERRIDE { Properties* properties = new Properties( - object_proxy, interface_name, + object_proxy, + interface_name, base::Bind(&ExperimentalBluetoothDeviceClientImpl::OnPropertyChanged, weak_ptr_factory_.GetWeakPtr(), object_path)); @@ -278,17 +279,19 @@ class ExperimentalBluetoothDeviceClientImpl private: // Called by dbus::ObjectManager when an object with the device interface // is created. Informs observers. - void ObjectAdded(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { - FOR_EACH_OBSERVER(ExperimentalBluetoothDeviceClient::Observer, observers_, + virtual void ObjectAdded(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { + FOR_EACH_OBSERVER(ExperimentalBluetoothDeviceClient::Observer, + observers_, DeviceAdded(object_path)); } // Called by dbus::ObjectManager when an object with the device interface // is removed. Informs observers. - void ObjectRemoved(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { - FOR_EACH_OBSERVER(ExperimentalBluetoothDeviceClient::Observer, observers_, + virtual void ObjectRemoved(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { + FOR_EACH_OBSERVER(ExperimentalBluetoothDeviceClient::Observer, + observers_, DeviceRemoved(object_path)); } diff --git a/chromeos/display/output_configurator_unittest.cc b/chromeos/display/output_configurator_unittest.cc index 3dec5ca..0b2ee48 100644 --- a/chromeos/display/output_configurator_unittest.cc +++ b/chromeos/display/output_configurator_unittest.cc @@ -155,10 +155,12 @@ class TestDelegate : public OutputConfigurator::Delegate { virtual void CreateFrameBuffer( int width, int height, - const std::vector<OutputConfigurator::CrtcConfig>& configs) { - AppendAction(GetFramebufferAction(width, height, - configs.size() >= 1 ? configs[0].crtc : 0, - configs.size() >= 2 ? configs[1].crtc : 0)); + const std::vector<OutputConfigurator::CrtcConfig>& configs) OVERRIDE { + AppendAction( + GetFramebufferAction(width, + height, + configs.size() >= 1 ? configs[0].crtc : 0, + configs.size() >= 2 ? configs[1].crtc : 0)); } virtual void ConfigureCTM( int touch_device_id, @@ -201,7 +203,7 @@ class TestDelegate : public OutputConfigurator::Delegate { class TestStateController : public OutputConfigurator::StateController { public: TestStateController() : state_(STATE_DUAL_EXTENDED) {} - ~TestStateController() {} + virtual ~TestStateController() {} void set_state(OutputState state) { state_ = state; } diff --git a/chromeos/ime/component_extension_ime_manager_unittest.cc b/chromeos/ime/component_extension_ime_manager_unittest.cc index 5de1657..f921ef0 100644 --- a/chromeos/ime/component_extension_ime_manager_unittest.cc +++ b/chromeos/ime/component_extension_ime_manager_unittest.cc @@ -28,7 +28,7 @@ class ComponentExtensionIMEManagerTest : on_initialized_callcount_(0) { } - void SetUp() { + virtual void SetUp() { ime_list_.clear(); ComponentExtensionIME ext1; @@ -129,7 +129,7 @@ class ComponentExtensionIMEManagerTest : } - void TearDown() { + virtual void TearDown() { EXPECT_EQ(1, on_initialized_callcount_); component_ext_mgr_->RemoveObserver(this); } @@ -140,7 +140,7 @@ class ComponentExtensionIMEManagerTest : std::vector<ComponentExtensionIME> ime_list_; private: - void OnInitialized() { + virtual void OnInitialized() OVERRIDE { ++on_initialized_callcount_; } diff --git a/components/autofill/browser/autofill_data_model_unittest.cc b/components/autofill/browser/autofill_data_model_unittest.cc index 77a8385..bcd8ae1 100644 --- a/components/autofill/browser/autofill_data_model_unittest.cc +++ b/components/autofill/browser/autofill_data_model_unittest.cc @@ -4,6 +4,7 @@ #include "components/autofill/browser/autofill_data_model.h" +#include "base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" namespace autofill { @@ -18,16 +19,17 @@ class TestAutofillDataModel : public AutofillDataModel { virtual ~TestAutofillDataModel() {} private: - virtual base::string16 GetRawInfo(AutofillFieldType type) const { + virtual base::string16 GetRawInfo(AutofillFieldType type) const OVERRIDE { return base::string16(); } virtual void SetRawInfo(AutofillFieldType type, - const base::string16& value) {} - virtual void GetSupportedTypes(FieldTypeSet* supported_types) const {} + const base::string16& value) OVERRIDE {} + virtual void GetSupportedTypes( + FieldTypeSet* supported_types) const OVERRIDE {} virtual void FillFormField(const AutofillField& field, size_t variant, const std::string& app_locale, - FormFieldData* field_data) const {} + FormFieldData* field_data) const OVERRIDE {} DISALLOW_COPY_AND_ASSIGN(TestAutofillDataModel); }; diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc index 225ff15..3bf558a 100644 --- a/content/browser/loader/resource_dispatcher_host_unittest.cc +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc @@ -536,7 +536,7 @@ class ResourceDispatcherHostTest : public testing::Test, this, browser_context_->GetResourceContext()); } - ~ResourceDispatcherHostTest() { + virtual ~ResourceDispatcherHostTest() { for (std::set<int>::iterator it = child_ids_.begin(); it != child_ids_.end(); ++it) { host_.CancelRequestsForProcess(*it); diff --git a/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc b/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc index 0e46dc5..96b70a2 100644 --- a/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc +++ b/content/browser/renderer_host/smooth_scroll_gesture_controller_unittest.cc @@ -91,8 +91,7 @@ class SmoothScrollGestureControllerTest : public testing::Test { public: SmoothScrollGestureControllerTest() : process_(NULL) { } - ~SmoothScrollGestureControllerTest() { - } + virtual ~SmoothScrollGestureControllerTest() {} protected: // testing::Test implementation: diff --git a/content/renderer/dom_operations_browsertest.cc b/content/renderer/dom_operations_browsertest.cc index 0fe3031..0d333a5 100644 --- a/content/renderer/dom_operations_browsertest.cc +++ b/content/renderer/dom_operations_browsertest.cc @@ -18,7 +18,7 @@ namespace content { class DomOperationsTests : public ContentBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kSingleProcess); #if defined(OS_WIN) && defined(USE_AURA) // Don't want to try to create a GPU process. diff --git a/content/renderer/dom_serializer_browsertest.cc b/content/renderer/dom_serializer_browsertest.cc index 0e84143..3df004d 100644 --- a/content/renderer/dom_serializer_browsertest.cc +++ b/content/renderer/dom_serializer_browsertest.cc @@ -151,7 +151,7 @@ class LoadObserver : public RenderViewObserver { : RenderViewObserver(render_view), quit_closure_(quit_closure) {} - virtual void DidFinishLoad(WebKit::WebFrame* frame) { + virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE { if (frame == render_view()->GetWebView()->mainFrame()) quit_closure_.Run(); } @@ -167,7 +167,7 @@ class DomSerializerTests : public ContentBrowserTest, : serialized_(false), local_directory_name_(FILE_PATH_LITERAL("./dummy_files/")) {} - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kSingleProcess); #if defined(OS_WIN) && defined(USE_AURA) // Don't want to try to create a GPU process. diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc index 3f97676..e7e0c36 100644 --- a/content/renderer/resource_fetcher_browsertest.cc +++ b/content/renderer/resource_fetcher_browsertest.cc @@ -121,7 +121,7 @@ class EvilFetcherDelegate : public FetcherDelegate { class ResourceFetcherTests : public ContentBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) { + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { command_line->AppendSwitch(switches::kSingleProcess); #if defined(OS_WIN) && defined(USE_AURA) // Don't want to try to create a GPU process. diff --git a/dbus/object_manager_unittest.cc b/dbus/object_manager_unittest.cc index 3033b20..79f4d21 100644 --- a/dbus/object_manager_unittest.cc +++ b/dbus/object_manager_unittest.cc @@ -113,15 +113,15 @@ class ObjectManagerTest protected: // Called when an object is added. - void ObjectAdded(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { + virtual void ObjectAdded(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { added_objects_.push_back(std::make_pair(object_path, interface_name)); message_loop_.Quit(); } // Called when an object is removed. - void ObjectRemoved(const dbus::ObjectPath& object_path, - const std::string& interface_name) OVERRIDE { + virtual void ObjectRemoved(const dbus::ObjectPath& object_path, + const std::string& interface_name) OVERRIDE { removed_objects_.push_back(std::make_pair(object_path, interface_name)); message_loop_.Quit(); } diff --git a/net/quic/congestion_control/available_channel_estimator_test.cc b/net/quic/congestion_control/available_channel_estimator_test.cc index 8c1c69e..b4a4b9c 100644 --- a/net/quic/congestion_control/available_channel_estimator_test.cc +++ b/net/quic/congestion_control/available_channel_estimator_test.cc @@ -13,7 +13,7 @@ namespace test { class AvailableChannelEstimatorTest : public ::testing::Test { protected: - void SetUp() { + virtual void SetUp() { srand(1234); packet_size_ = 1200; sequence_number_ = 1; diff --git a/net/quic/congestion_control/channel_estimator_test.cc b/net/quic/congestion_control/channel_estimator_test.cc index 7ff1b6c..460e436 100644 --- a/net/quic/congestion_control/channel_estimator_test.cc +++ b/net/quic/congestion_control/channel_estimator_test.cc @@ -12,7 +12,7 @@ namespace test { class ChannelEstimatorTest : public ::testing::Test { protected: - void SetUp() { + virtual void SetUp() { srand(1234); packet_size_ = 1200; sequence_number_ = 1; diff --git a/net/quic/congestion_control/inter_arrival_bitrate_ramp_up_test.cc b/net/quic/congestion_control/inter_arrival_bitrate_ramp_up_test.cc index b644301..acae78d 100644 --- a/net/quic/congestion_control/inter_arrival_bitrate_ramp_up_test.cc +++ b/net/quic/congestion_control/inter_arrival_bitrate_ramp_up_test.cc @@ -18,7 +18,7 @@ class InterArrivalBitrateRampUpTest : public ::testing::Test { hundred_ms_(QuicTime::Delta::FromMilliseconds(100)), bitrate_ramp_up_(&clock_) { } - void SetUp() { + virtual void SetUp() { clock_.AdvanceTime(one_ms_); } const QuicTime::Delta one_ms_; diff --git a/net/quic/congestion_control/inter_arrival_sender_test.cc b/net/quic/congestion_control/inter_arrival_sender_test.cc index 28ac9b2..9594780 100644 --- a/net/quic/congestion_control/inter_arrival_sender_test.cc +++ b/net/quic/congestion_control/inter_arrival_sender_test.cc @@ -28,7 +28,7 @@ class InterArrivalSenderTest : public ::testing::Test { receive_clock_.AdvanceTime(one_ms_); } - ~InterArrivalSenderTest() { + virtual ~InterArrivalSenderTest() { STLDeleteValues(&sent_packets_); } diff --git a/net/quic/congestion_control/inter_arrival_state_machine_test.cc b/net/quic/congestion_control/inter_arrival_state_machine_test.cc index 10759c2..1a4bc85 100644 --- a/net/quic/congestion_control/inter_arrival_state_machine_test.cc +++ b/net/quic/congestion_control/inter_arrival_state_machine_test.cc @@ -17,7 +17,7 @@ class InterArrivalStateMachineTest : public ::testing::Test { InterArrivalStateMachineTest() { } - void SetUp() { + virtual void SetUp() { state_machine_.reset(new InterArrivalStateMachine(&clock_)); } diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc index 74f2be7..ebb8cd0 100644 --- a/net/quic/quic_framer_test.cc +++ b/net/quic/quic_framer_test.cc @@ -78,13 +78,13 @@ class TestEncrypter : public QuicEncrypter { virtual bool Encrypt(StringPiece nonce, StringPiece associated_data, StringPiece plaintext, - unsigned char* output) { + unsigned char* output) OVERRIDE { CHECK(false) << "Not implemented"; return false; } virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number, StringPiece associated_data, - StringPiece plaintext) { + StringPiece plaintext) OVERRIDE { sequence_number_ = sequence_number; associated_data_ = associated_data.as_string(); plaintext_ = plaintext.as_string(); @@ -126,13 +126,13 @@ class TestDecrypter : public QuicDecrypter { StringPiece associated_data, StringPiece ciphertext, unsigned char* output, - size_t* output_length) { + size_t* output_length) OVERRIDE { CHECK(false) << "Not implemented"; return false; } virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number, StringPiece associated_data, - StringPiece ciphertext) { + StringPiece ciphertext) OVERRIDE { sequence_number_ = sequence_number; associated_data_ = associated_data.as_string(); ciphertext_ = ciphertext.as_string(); diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc index 332057c..9504949 100644 --- a/net/quic/test_tools/crypto_test_utils.cc +++ b/net/quic/test_tools/crypto_test_utils.cc @@ -45,11 +45,12 @@ class CryptoFramerVisitor : public CryptoFramerVisitorInterface { : error_(false) { } - void OnError(CryptoFramer* framer) { + virtual void OnError(CryptoFramer* framer) OVERRIDE { error_ = true; } - void OnHandshakeMessage(const CryptoHandshakeMessage& message) { + virtual void OnHandshakeMessage( + const CryptoHandshakeMessage& message) OVERRIDE { messages_.push_back(message); } diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc index 896b0f8..12e2da9 100644 --- a/net/tools/quic/end_to_end_test.cc +++ b/net/tools/quic/end_to_end_test.cc @@ -66,7 +66,7 @@ class ServerThread : public base::SimpleThread { virtual ~ServerThread() { } - virtual void Run() { + virtual void Run() OVERRIDE { server_.Listen(address_); port_lock_.Acquire(); diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc index e88a21e..3cacde3 100644 --- a/net/tools/quic/quic_dispatcher.cc +++ b/net/tools/quic/quic_dispatcher.cc @@ -24,7 +24,7 @@ class DeleteSessionsAlarm : public EpollAlarm { : dispatcher_(dispatcher) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); dispatcher_->DeleteSessions(); return 0; diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc index ba77cbd..809ddd3 100644 --- a/net/tools/quic/quic_dispatcher_test.cc +++ b/net/tools/quic/quic_dispatcher_test.cc @@ -109,8 +109,7 @@ class QuicDispatcherTest : public ::testing::Test { session2_(NULL) { } - ~QuicDispatcherTest() { - } + virtual ~QuicDispatcherTest() {} MockConnection* connection1() { return reinterpret_cast<MockConnection*>(session1_->connection()); @@ -238,7 +237,7 @@ TEST_F(QuicDispatcherTest, TimeWaitListManager) { class WriteBlockedListTest : public QuicDispatcherTest { public: - void SetUp() { + virtual void SetUp() { IPEndPoint addr(Loopback4(), 1); EXPECT_CALL(dispatcher_, CreateQuicSession(_, addr, _, &eps_)) diff --git a/net/tools/quic/quic_epoll_connection_helper.cc b/net/tools/quic/quic_epoll_connection_helper.cc index d4266a2..ba720875 100644 --- a/net/tools/quic/quic_epoll_connection_helper.cc +++ b/net/tools/quic/quic_epoll_connection_helper.cc @@ -26,7 +26,7 @@ class RetransmissionAlarm : public EpollAlarm { : connection_(connection) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); // This is safe because this code is Google3 specific, and the // Google3 QuicTime's epoch is the unix epoch. @@ -46,7 +46,7 @@ class SendAlarm : public EpollAlarm { : connection_(connection) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); connection_->OnCanWrite(); // Never reschedule the alarm, since OnCanWrite does that. @@ -64,7 +64,7 @@ class TimeoutAlarm : public EpollAlarm { : connection_(connection) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); connection_->CheckForTimeout(); // Never reschedule the alarm, since CheckForTimeout does that. @@ -82,7 +82,7 @@ class AckAlarm : public EpollAlarm { : connection_(connection) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); connection_->SendAck(); return 0; diff --git a/net/tools/quic/quic_epoll_connection_helper_test.cc b/net/tools/quic/quic_epoll_connection_helper_test.cc index e4c49ba..daaa59e 100644 --- a/net/tools/quic/quic_epoll_connection_helper_test.cc +++ b/net/tools/quic/quic_epoll_connection_helper_test.cc @@ -33,12 +33,12 @@ const bool kHasData = true; class TestConnectionHelper : public QuicEpollConnectionHelper { public: - TestConnectionHelper(int fd, EpollServer* eps) - : QuicEpollConnectionHelper(fd, eps) { - } + TestConnectionHelper(int fd, EpollServer* eps) + : QuicEpollConnectionHelper(fd, eps) { + } virtual int WritePacketToWire(const QuicEncryptedPacket& packet, - int* error) { + int* error) OVERRIDE { QuicFramer framer(kQuicVersion1, QuicDecrypter::Create(kNULL), QuicEncrypter::Create(kNULL), diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc index 32ea702..9d086e2 100644 --- a/net/tools/quic/quic_in_memory_cache.cc +++ b/net/tools/quic/quic_in_memory_cache.cc @@ -26,37 +26,45 @@ namespace { class CachingBalsaVisitor : public BalsaVisitorInterface { public: CachingBalsaVisitor() : done_framing_(false) {} - virtual void ProcessBodyData(const char* input, size_t size) { + virtual void ProcessBodyData(const char* input, size_t size) OVERRIDE { AppendToBody(input, size); } virtual void ProcessTrailers(const BalsaHeaders& trailer) { LOG(DFATAL) << "Trailers not supported."; } - virtual void MessageDone() { + virtual void MessageDone() OVERRIDE { done_framing_ = true; } - virtual void HandleHeaderError(BalsaFrame* framer) { UnhandledError(); } - virtual void HandleHeaderWarning(BalsaFrame* framer) { UnhandledError(); } + virtual void HandleHeaderError(BalsaFrame* framer) OVERRIDE { + UnhandledError(); + } + virtual void HandleHeaderWarning(BalsaFrame* framer) OVERRIDE { + UnhandledError(); + } virtual void HandleTrailerError(BalsaFrame* framer) { UnhandledError(); } virtual void HandleTrailerWarning(BalsaFrame* framer) { UnhandledError(); } - virtual void HandleChunkingError(BalsaFrame* framer) { UnhandledError(); } - virtual void HandleBodyError(BalsaFrame* framer) { UnhandledError(); } + virtual void HandleChunkingError(BalsaFrame* framer) OVERRIDE { + UnhandledError(); + } + virtual void HandleBodyError(BalsaFrame* framer) OVERRIDE { + UnhandledError(); + } void UnhandledError() { LOG(DFATAL) << "Unhandled error framing HTTP."; } - virtual void ProcessBodyInput(const char*, size_t) {} - virtual void ProcessHeaderInput(const char*, size_t) {} - virtual void ProcessTrailerInput(const char*, size_t) {} - virtual void ProcessHeaders(const net::BalsaHeaders&) {} + virtual void ProcessBodyInput(const char*, size_t) OVERRIDE {} + virtual void ProcessHeaderInput(const char*, size_t) OVERRIDE {} + virtual void ProcessTrailerInput(const char*, size_t) OVERRIDE {} + virtual void ProcessHeaders(const net::BalsaHeaders&) OVERRIDE {} virtual void ProcessRequestFirstLine( const char*, size_t, const char*, size_t, - const char*, size_t, const char*, size_t) {} + const char*, size_t, const char*, size_t) OVERRIDE {} virtual void ProcessResponseFirstLine( const char*, size_t, const char*, - size_t, const char*, size_t, const char*, size_t) {} - virtual void ProcessChunkLength(size_t) {} - virtual void ProcessChunkExtensions(const char*, size_t) {} - virtual void HeaderDone() {} + size_t, const char*, size_t, const char*, size_t) OVERRIDE {} + virtual void ProcessChunkLength(size_t) OVERRIDE {} + virtual void ProcessChunkExtensions(const char*, size_t) OVERRIDE {} + virtual void HeaderDone() OVERRIDE {} void AppendToBody(const char* input, size_t size) { body_.append(input, size); diff --git a/net/tools/quic/quic_time_wait_list_manager.cc b/net/tools/quic/quic_time_wait_list_manager.cc index 0bf44a8..81e199b 100644 --- a/net/tools/quic/quic_time_wait_list_manager.cc +++ b/net/tools/quic/quic_time_wait_list_manager.cc @@ -37,7 +37,7 @@ class GuidCleanUpAlarm : public EpollAlarm { : time_wait_list_manager_(time_wait_list_manager) { } - virtual int64 OnAlarm() { + virtual int64 OnAlarm() OVERRIDE { EpollAlarm::OnAlarm(); time_wait_list_manager_->CleanUpOldGuids(); // Let the time wait manager register the alarm at appropriate time. diff --git a/sync/syncable/parent_child_index_unittest.cc b/sync/syncable/parent_child_index_unittest.cc index a2058c5..5ae9d27 100644 --- a/sync/syncable/parent_child_index_unittest.cc +++ b/sync/syncable/parent_child_index_unittest.cc @@ -21,7 +21,7 @@ static const std::string kCacheGuid = "8HhNIHlEOCGQbIAALr9QEg=="; class ParentChildIndexTest : public testing::Test { public: - void TearDown() { + virtual void TearDown() { // To make memory management easier, we take ownership of all EntryKernels // returned by our factory methods and delete them here. STLDeleteElements(&owned_entry_kernels_); diff --git a/tools/clang/scripts/plugin_flags.sh b/tools/clang/scripts/plugin_flags.sh index 92eaad9..0d8dea5 100755 --- a/tools/clang/scripts/plugin_flags.sh +++ b/tools/clang/scripts/plugin_flags.sh @@ -17,6 +17,4 @@ else fi echo -Xclang -load -Xclang $CLANG_LIB_PATH/libFindBadConstructs.$LIBSUFFIX \ - -Xclang -add-plugin -Xclang find-bad-constructs \ - -Xclang -plugin-arg-find-bad-constructs \ - -Xclang skip-virtuals-in-implementations + -Xclang -add-plugin -Xclang find-bad-constructs diff --git a/ui/app_list/views/app_list_menu_views.cc b/ui/app_list/views/app_list_menu_views.cc index 7243756..1d8a4e4 100644 --- a/ui/app_list/views/app_list_menu_views.cc +++ b/ui/app_list/views/app_list_menu_views.cc @@ -94,9 +94,9 @@ class AppListMenuModelAdapter : public views::MenuModelAdapter { virtual ~AppListMenuModelAdapter() {} // Overridden from views::MenuModelAdapter: - MenuItemView* AppendMenuItem(MenuItemView* menu, - ui::MenuModel* model, - int index) OVERRIDE { + virtual MenuItemView* AppendMenuItem(MenuItemView* menu, + ui::MenuModel* model, + int index) OVERRIDE { if (!delegate_) return NULL; diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc index b076942..252a154 100644 --- a/ui/gfx/image/image.cc +++ b/ui/gfx/image/image.cc @@ -342,15 +342,15 @@ class ImageRepGdk : public ImageRep { } } - virtual int Width() const { + virtual int Width() const OVERRIDE { return gdk_pixbuf_get_width(pixbuf_); } - virtual int Height() const { + virtual int Height() const OVERRIDE { return gdk_pixbuf_get_height(pixbuf_); } - virtual gfx::Size Size() const { + virtual gfx::Size Size() const OVERRIDE { return gfx::Size(Width(), Height()); } @@ -376,15 +376,15 @@ class ImageRepCairo : public ImageRep { delete cairo_cache_; } - virtual int Width() const { + virtual int Width() const OVERRIDE { return cairo_cache_->Width(); } - virtual int Height() const { + virtual int Height() const OVERRIDE { return cairo_cache_->Height(); } - virtual gfx::Size Size() const { + virtual gfx::Size Size() const OVERRIDE { return gfx::Size(Width(), Height()); } diff --git a/ui/message_center/views/message_center_view_unittest.cc b/ui/message_center/views/message_center_view_unittest.cc index 128b9b7..84ac652 100644 --- a/ui/message_center/views/message_center_view_unittest.cc +++ b/ui/message_center/views/message_center_view_unittest.cc @@ -40,9 +40,9 @@ class MockNotificationView : public NotificationView { int view_id); virtual ~MockNotificationView(); - virtual gfx::Size GetPreferredSize(); - virtual int GetHeightForWidth(int w); - virtual void Layout(); + virtual gfx::Size GetPreferredSize() OVERRIDE; + virtual int GetHeightForWidth(int w) OVERRIDE; + virtual void Layout() OVERRIDE; int get_id() { return id_; }; @@ -104,7 +104,7 @@ class MessageCenterViewTest : public testing::Test, int GetNotificationCount(); int GetCallCount(CallType type); - void RegisterCall(int receiver_id, CallType type); + virtual void RegisterCall(int receiver_id, CallType type) OVERRIDE; void LogBounds(int depth, views::View* view); diff --git a/ui/views/corewm/focus_controller_unittest.cc b/ui/views/corewm/focus_controller_unittest.cc index 2d77103..62062f8 100644 --- a/ui/views/corewm/focus_controller_unittest.cc +++ b/ui/views/corewm/focus_controller_unittest.cc @@ -547,7 +547,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase { ActivateWindowById(1); EXPECT_EQ(1, GetFocusedWindowId()); } - virtual void ShiftFocusOnActivationDueToHide() { + virtual void ShiftFocusOnActivationDueToHide() OVERRIDE { // Similar to ShiftFocusOnActivation except the activation change is // triggered by hiding the active window. ActivateWindowById(1); diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc index 419485d..b5bbf3a 100644 --- a/ui/views/widget/widget_unittest.cc +++ b/ui/views/widget/widget_unittest.cc @@ -1746,7 +1746,7 @@ class WidgetDeleterView : public View { WidgetDeleterView() : View() {} // Overridden from View. - bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { + virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { delete GetWidget(); return true; } diff --git a/webkit/fileapi/copy_or_move_file_validator_unittest.cc b/webkit/fileapi/copy_or_move_file_validator_unittest.cc index d33ad6a..505b2aa 100644 --- a/webkit/fileapi/copy_or_move_file_validator_unittest.cc +++ b/webkit/fileapi/copy_or_move_file_validator_unittest.cc @@ -178,7 +178,7 @@ class TestCopyOrMoveFileValidatorFactory virtual CopyOrMoveFileValidator* CreateCopyOrMoveFileValidator( const FileSystemURL& /*src_url*/, - const base::FilePath& /*platform_path*/) { + const base::FilePath& /*platform_path*/) OVERRIDE { return new TestCopyOrMoveFileValidator(all_valid_); } @@ -191,7 +191,8 @@ class TestCopyOrMoveFileValidatorFactory } virtual ~TestCopyOrMoveFileValidator() {} - virtual void StartValidation(const ResultCallback& result_callback) { + virtual void StartValidation( + const ResultCallback& result_callback) OVERRIDE { // Post the result since a real validator must do work asynchronously. MessageLoop::current()->PostTask(FROM_HERE, base::Bind(result_callback, result_)); |