diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 |
commit | 5a3b9149085f033097663a63c90e152051fd6c56 (patch) | |
tree | 4e0ed4ceabd2ce7b7fd7ed2c9168f7641c5ad8f3 /chrome/browser | |
parent | c5874079454b61b597de2258c4256d5008183b1a (diff) | |
download | chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.zip chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.gz chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.bz2 |
Revert "Fix a ton of compiler warnings."
This reverts commit r24792.
TBR=estade
Review URL: http://codereview.chromium.org/179028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
79 files changed, 135 insertions, 311 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h index 4e96102..b3ed20b 100644 --- a/chrome/browser/autocomplete/autocomplete.h +++ b/chrome/browser/autocomplete/autocomplete.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -466,8 +466,6 @@ class AutocompleteProvider // them all again when this is called anyway, so such a parameter wouldn't // actually be useful. virtual void OnProviderUpdate(bool updated_matches) = 0; - protected: - ~ACProviderListener() {} }; AutocompleteProvider(ACProviderListener* listener, diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h index 8567c62..efe5c9a 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.h +++ b/chrome/browser/autocomplete/autocomplete_edit.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -51,8 +51,6 @@ class AutocompleteEditController { // Returns the title of the current page. virtual std::wstring GetTitle() const = 0; - protected: - ~AutocompleteEditController() {} }; class AutocompleteEditModel { diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h index ea3988a..928d7e4 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -125,8 +125,6 @@ class AutocompleteEditView { // Returns the gfx::NativeView of the edit view. virtual gfx::NativeView GetNativeView() const = 0; - protected: - ~AutocompleteEditView() {} }; #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h index d1977ae..344ab9c 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -29,17 +29,17 @@ class Profile; // bounds for the autocomplete popup view. class AutocompletePopupPositioner { public: + virtual ~AutocompletePopupPositioner() { } + // Returns the bounds at which the popup should be shown, in screen // coordinates. The height is ignored, since the popup is sized to its // contents automatically. virtual gfx::Rect GetPopupBounds() const = 0; - protected: - ~AutocompletePopupPositioner() {} }; class AutocompletePopupView { public: - virtual ~AutocompletePopupView() {} + virtual ~AutocompletePopupView() { } // Returns true if the popup is currently open. virtual bool IsOpen() const = 0; diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc index d657a62..dffc91a 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc @@ -364,7 +364,7 @@ void AutocompletePopupViewGtk::AcceptLine(size_t line, gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget, GdkEventMotion* event) { // TODO(deanm): Windows has a bunch of complicated logic here. - size_t line = LineFromY(static_cast<int>(event->y)); + size_t line = LineFromY(event->y); // There is both a hovered and selected line, hovered just means your mouse // is over it, but selected is what's showing in the location edit. model_->SetHoveredLine(line); @@ -377,7 +377,7 @@ gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget, gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget, GdkEventButton* event) { // Very similar to HandleMotion. - size_t line = LineFromY(static_cast<int>(event->y)); + size_t line = LineFromY(event->y); model_->SetHoveredLine(line); if (event->button == 1) model_->SetSelectedLine(line, false); @@ -386,7 +386,7 @@ gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget, gboolean AutocompletePopupViewGtk::HandleButtonRelease(GtkWidget* widget, GdkEventButton* event) { - size_t line = LineFromY(static_cast<int>(event->y)); + size_t line = LineFromY(event->y); switch (event->button) { case 1: // Left click. AcceptLine(line, CURRENT_TAB); @@ -465,7 +465,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget, bool has_description = !match.description.empty(); int text_width = window_rect.width() - (kIconAreaWidth + kRightPadding); int allocated_content_width = has_description ? - static_cast<int>(text_width * kContentWidthPercentage) : text_width; + text_width * kContentWidthPercentage : text_width; pango_layout_set_width(layout_, allocated_content_width * PANGO_SCALE); // Note: We force to URL to LTR for all text directions. diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 3b10911..93aad4d 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -940,7 +940,7 @@ void AutomationProvider::OnRedirectQueryComplete( IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); Send(reply_message_); - redirect_query_ = 0; + redirect_query_ = NULL; reply_message_ = NULL; } diff --git a/chrome/browser/blocked_popup_container.h b/chrome/browser/blocked_popup_container.h index 4d89a3f..d7e5d0e 100644 --- a/chrome/browser/blocked_popup_container.h +++ b/chrome/browser/blocked_popup_container.h @@ -52,8 +52,6 @@ class BlockedPopupContainerView { // Called by the BlockedPopupContainer that owns us. Destroys the view or // starts a delayed Task to destroy the View at some later time. virtual void Destroy() = 0; - protected: - ~BlockedPopupContainerView() {} }; // Takes ownership of TabContents that are unrequested popup windows and @@ -148,7 +146,7 @@ class BlockedPopupContainer : public TabContentsDelegate, // Ignored; BlockedPopupContainer doesn't display a throbber. virtual void NavigationStateChanged(const TabContents* source, - unsigned changed_flags) {} + unsigned changed_flags) { } // Forwards AddNewContents to our |owner_|. virtual void AddNewContents(TabContents* source, @@ -158,10 +156,10 @@ class BlockedPopupContainer : public TabContentsDelegate, bool user_gesture); // Ignore activation requests from the TabContents we're blocking. - virtual void ActivateContents(TabContents* contents) {} + virtual void ActivateContents(TabContents* contents) { } // Ignored; BlockedPopupContainer doesn't display a throbber. - virtual void LoadingStateChanged(TabContents* source) {} + virtual void LoadingStateChanged(TabContents* source) { } // Removes |source| from our internal list of blocked popups. virtual void CloseContents(TabContents* source); @@ -176,13 +174,13 @@ class BlockedPopupContainer : public TabContentsDelegate, virtual TabContents* GetConstrainingContents(TabContents* source); // Ignored; BlockedPopupContainer doesn't display a toolbar. - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} + virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) { } // Ignored; BlockedPopupContainer doesn't display a bookmarking star. - virtual void URLStarredChanged(TabContents* source, bool starred) {} + virtual void URLStarredChanged(TabContents* source, bool starred) { } // Ignored; BlockedPopupContainer doesn't display a URL bar. - virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} + virtual void UpdateTargetURL(TabContents* source, const GURL& url) { } // A number larger than the internal popup count on the Renderer; meant for // preventing a compromised renderer from exhausting GDI memory by spawning diff --git a/chrome/browser/bookmarks/bookmark_model_observer.h b/chrome/browser/bookmarks/bookmark_model_observer.h index 738fc09..1b85fe3 100644 --- a/chrome/browser/bookmarks/bookmark_model_observer.h +++ b/chrome/browser/bookmarks/bookmark_model_observer.h @@ -15,7 +15,7 @@ class BookmarkModelObserver { virtual void Loaded(BookmarkModel* model) = 0; // Invoked from the destructor of the BookmarkModel. - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} + virtual void BookmarkModelBeingDeleted(BookmarkModel* model) { } // Invoked when a node has moved. virtual void BookmarkNodeMoved(BookmarkModel* model, @@ -51,9 +51,6 @@ class BookmarkModelObserver { // |node| have been reordered in some way, such as sorted. virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, const BookmarkNode* node) = 0; - - protected: - ~BookmarkModelObserver() {} }; #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_OBSERVER_H_ diff --git a/chrome/browser/bookmarks/bookmark_service.h b/chrome/browser/bookmarks/bookmark_service.h index 1816057..2de91cf 100644 --- a/chrome/browser/bookmarks/bookmark_service.h +++ b/chrome/browser/bookmarks/bookmark_service.h @@ -1,4 +1,4 @@ -// Copyright 2009, The Chromium Authors +// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -56,9 +56,6 @@ class BookmarkService { // Blocks until loaded. This is intended for usage on a thread other than // the main thread. virtual void BlockTillLoaded() = 0; - - protected: - ~BookmarkService() {} }; #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_SERVICE_H_ diff --git a/chrome/browser/browser_list.h b/chrome/browser/browser_list.h index 20c360d..fda1aa4 100644 --- a/chrome/browser/browser_list.h +++ b/chrome/browser/browser_list.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_BROWSER_LIST_H_ -#define CHROME_BROWSER_BROWSER_LIST_H_ +#ifndef CHROME_BROWSER_BROWSER_LIST_H__ +#define CHROME_BROWSER_BROWSER_LIST_H__ #include <vector> @@ -28,10 +28,7 @@ class BrowserList { virtual void OnBrowserRemoving(const Browser* browser) = 0; // Called immediately after a browser is set active (SetLastActive) - virtual void OnBrowserSetLastActive(const Browser* browser) {}; - - protected: - ~Observer() {}; + virtual void OnBrowserSetLastActive(const Browser* browser) { }; }; // Adds and removes browsers from the global list. The browser object should @@ -194,4 +191,4 @@ class TabContentsIterator { TabContents* cur_; }; -#endif // CHROME_BROWSER_BROWSER_LIST_H_ +#endif // CHROME_BROWSER_BROWSER_LIST_H__ diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index ee361e9..ec4054b 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -117,8 +117,8 @@ const SkColor BrowserThemeProvider::kDefaultColorNTPSectionText = SkColorSetRGB(0, 0, 0); const SkColor BrowserThemeProvider::kDefaultColorNTPSectionLink = SkColorSetRGB(0, 0, 204); -const SkColor BrowserThemeProvider::kDefaultColorControlBackground = 0u; -const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = 0u; +const SkColor BrowserThemeProvider::kDefaultColorControlBackground = NULL; +const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = NULL; // Default tints. const skia::HSL BrowserThemeProvider::kDefaultTintButtons = { -1, -1, -1 }; diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index fd41fc0..a1dbe76 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -244,7 +244,6 @@ class BrowserWindow { protected: friend class BrowserList; friend class BrowserView; - ~BrowserWindow() {} virtual void DestroyBrowser() = 0; }; diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 3f2bbbb..0425c6f 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,8 +41,6 @@ class BrowsingDataRemover : public NotificationObserver { class Observer { public: virtual void OnBrowsingDataRemoverDone() = 0; - protected: - ~Observer() {} }; // Creates a BrowsingDataRemover to remove browser data from the specified diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h index 3840936..713440e 100644 --- a/chrome/browser/cancelable_request.h +++ b/chrome/browser/cancelable_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -80,8 +80,8 @@ // } // }; -#ifndef CHROME_BROWSER_CANCELABLE_REQUEST_H_ -#define CHROME_BROWSER_CANCELABLE_REQUEST_H_ +#ifndef CHROME_BROWSER_CANCELABLE_REQUEST_H__ +#define CHROME_BROWSER_CANCELABLE_REQUEST_H__ #include <map> #include <vector> @@ -274,7 +274,7 @@ class CancelableRequestConsumerTSimple : public CancelableRequestConsumerBase { typedef std::map<PendingRequest, T> PendingRequestList; virtual T get_initial_t() const { - return 0; + return NULL; } virtual void OnRequestAdded(CancelableRequestProvider* provider, @@ -543,4 +543,4 @@ class CancelableRequest1 : public CancelableRequest<CB> { Type value; }; -#endif // CHROME_BROWSER_CANCELABLE_REQUEST_H_ +#endif // CHROME_BROWSER_CANCELABLE_REQUEST_H__ diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h index 9e2afcb..3a6b7ca 100644 --- a/chrome/browser/command_updater.h +++ b/chrome/browser/command_updater.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -24,8 +24,6 @@ class CommandUpdater { public: // Perform the action associated with the command with the specified ID. virtual void ExecuteCommand(int id) = 0; - protected: - ~CommandUpdaterDelegate() {} }; // Create a CommandUpdater with a CommandUpdaterDelegate to handle execution @@ -52,8 +50,6 @@ class CommandUpdater { // Notifies the observer that the enabled state has changed for the // specified command id. virtual void EnabledStateChangedForCommand(int id, bool enabled) = 0; - protected: - ~CommandObserver() {} }; // Adds an observer to the state of a particular command. If the command does diff --git a/chrome/browser/dock_info.h b/chrome/browser/dock_info.h index 76c900e..4f6d476 100644 --- a/chrome/browser/dock_info.h +++ b/chrome/browser/dock_info.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -32,9 +32,6 @@ class DockInfo { virtual gfx::NativeWindow GetLocalProcessWindowAtPoint( const gfx::Point& screen_point, const std::set<gfx::NativeView>& ignore) = 0; - - protected: - ~Factory() {} }; // Possible dock positions. diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h index b7d87c7..fec86ad 100644 --- a/chrome/browser/download/download_manager.h +++ b/chrome/browser/download/download_manager.h @@ -98,9 +98,6 @@ class DownloadItem { // Called when a downloaded file has been opened. virtual void OnDownloadOpened(DownloadItem* download) = 0; - - protected: - ~Observer() {} }; // Constructing from persistent store: @@ -326,9 +323,6 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>, // downloads. The DownloadManagerObserver must copy the vector, but does not // own the individual DownloadItems, when this call is made. virtual void SetDownloads(std::vector<DownloadItem*>& downloads) = 0; - - protected: - ~Observer() {} }; // Public API diff --git a/chrome/browser/download/download_request_manager.h b/chrome/browser/download/download_request_manager.h index 62c3caa..f9351c8 100644 --- a/chrome/browser/download/download_request_manager.h +++ b/chrome/browser/download/download_request_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -57,8 +57,6 @@ class DownloadRequestManager : public: virtual void ContinueDownload() = 0; virtual void CancelDownload() = 0; - protected: - ~Callback() {} }; // TabDownloadState maintains the download state for a particular tab. @@ -171,8 +169,6 @@ class DownloadRequestManager : class TestingDelegate { public: virtual bool ShouldAllowDownload() = 0; - protected: - ~TestingDelegate() {} }; static void SetTestingDelegate(TestingDelegate* delegate); diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h index a967c8f..7a47b3f 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.h +++ b/chrome/browser/extensions/extension_function_dispatcher.h @@ -31,8 +31,6 @@ class ExtensionFunctionDispatcher { public: virtual Browser* GetBrowser() = 0; virtual ExtensionHost* GetExtensionHost() { return NULL; } - protected: - ~Delegate() {} }; // The peer object allows us to notify ExtensionFunctions when we are diff --git a/chrome/browser/extensions/extension_shelf_model.h b/chrome/browser/extensions/extension_shelf_model.h index ba8b8b1d..29f6592 100644 --- a/chrome/browser/extensions/extension_shelf_model.h +++ b/chrome/browser/extensions/extension_shelf_model.h @@ -158,9 +158,6 @@ class ExtensionShelfModelObserver { // The model is being destroyed. virtual void ShelfModelDeleting() {} - - protected: - ~ExtensionShelfModelObserver() {} }; diff --git a/chrome/browser/extensions/external_extension_provider.h b/chrome/browser/extensions/external_extension_provider.h index 6c664c8..f431bfc 100644 --- a/chrome/browser/extensions/external_extension_provider.h +++ b/chrome/browser/extensions/external_extension_provider.h @@ -27,8 +27,6 @@ class ExternalExtensionProvider { const Version* version, const FilePath& path, Extension::Location location) = 0; - protected: - ~Visitor() {} }; virtual ~ExternalExtensionProvider() {} diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc index a2a0e4f..6805175 100644 --- a/chrome/browser/gears_integration.cc +++ b/chrome/browser/gears_integration.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -254,7 +254,7 @@ void GearsCreateShortcut( new CreateShortcutCommand(name_utf8, orig_name_utf8, url.spec(), description_utf8, app_info.icons, fallback_icon, callback); - CPHandleCommand(GEARSPLUGINCOMMAND_CREATE_SHORTCUT, command, 0u); + CPHandleCommand(GEARSPLUGINCOMMAND_CREATE_SHORTCUT, command, NULL); } // This class holds and manages the data passed to the @@ -311,5 +311,5 @@ void RunnableMethodTraits<QueryShortcutsCommand>::ReleaseCallee( void GearsQueryShortcuts(GearsQueryShortcutsCallback* callback) { CPHandleCommand(GEARSPLUGINCOMMAND_GET_SHORTCUT_LIST, new QueryShortcutsCommand(callback), - 0u); + NULL); } diff --git a/chrome/browser/gtk/back_forward_button_gtk.cc b/chrome/browser/gtk/back_forward_button_gtk.cc index e5f6125..7f4bd69 100644 --- a/chrome/browser/gtk/back_forward_button_gtk.cc +++ b/chrome/browser/gtk/back_forward_button_gtk.cc @@ -110,7 +110,7 @@ gboolean BackForwardButtonGtk::OnButtonPress(GtkWidget* widget, if (event->button != 1) return FALSE; - button->y_position_of_last_press_ = static_cast<int>(event->y); + button->y_position_of_last_press_ = event->y; MessageLoop::current()->PostDelayedTask(FROM_HERE, button->show_menu_factory_.NewRunnableMethod( &BackForwardButtonGtk::ShowBackForwardMenu), diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 909243d..373ce0f 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -399,8 +399,8 @@ void BookmarkBarGtk::AnimationProgressed(const Animation* animation) { DCHECK_EQ(animation, slide_animation_.get()); gtk_widget_set_size_request(event_box_.get(), -1, - static_cast<gint>(animation->GetCurrentValue() * - kBookmarkBarHeight)); + animation->GetCurrentValue() * + kBookmarkBarHeight); } void BookmarkBarGtk::AnimationEnded(const Animation* animation) { diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index 0d005e9..f38512c 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -1183,9 +1183,7 @@ gboolean BookmarkManagerGtk::OnRightTreeViewButtonPress( GtkTreePath* path; gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), - static_cast<gint>(event->x), - static_cast<gint>(event->y), &path, - NULL, NULL, NULL); + event->x, event->y, &path, NULL, NULL, NULL); if (path == NULL) return TRUE; @@ -1209,10 +1207,10 @@ gboolean BookmarkManagerGtk::OnRightTreeViewMotion( return FALSE; if (gtk_drag_check_threshold(tree_view, - static_cast<gint>(bm->mousedown_event_.x), - static_cast<gint>(bm->mousedown_event_.y), - static_cast<gint>(event->x), - static_cast<gint>(event->y))) { + bm->mousedown_event_.x, + bm->mousedown_event_.y, + event->x, + event->y)) { bm->delaying_mousedown_ = false; GtkTargetList* targets = GtkDndUtil::GetTargetListFromCodeMask( GtkDndUtil::CHROME_BOOKMARK_ITEM | diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 278f973..9c295ac 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -603,7 +603,7 @@ gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget, IDR_WINDOW_TOP_CENTER, IDR_WINDOW_TOP_RIGHT_CORNER, IDR_WINDOW_LEFT_SIDE, - 0, + NULL, IDR_WINDOW_RIGHT_SIDE, IDR_WINDOW_BOTTOM_LEFT_CORNER, IDR_WINDOW_BOTTOM_CENTER, @@ -1825,8 +1825,7 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget, gdk_window_get_origin(GTK_WIDGET(browser->window_)->window, &win_x, &win_y); GdkWindowEdge edge; - gfx::Point point(static_cast<int>(event->x_root - win_x), - static_cast<int>( event->y_root - win_y)); + gfx::Point point(event->x_root - win_x, event->y_root - win_y); bool has_hit_edge = browser->GetWindowEdge(point.x(), point.y(), &edge); // Ignore clicks that are in/below the browser toolbar. @@ -1845,8 +1844,7 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget, guint32 last_click_time = browser->last_click_time_; gfx::Point last_click_position = browser->last_click_position_; browser->last_click_time_ = event->time; - browser->last_click_position_ = gfx::Point(static_cast<int>(event->x), - static_cast<int>(event->y)); + browser->last_click_position_ = gfx::Point(event->x, event->y); if (has_hit_titlebar) { // We want to start a move when the user single clicks, but not start a @@ -1866,23 +1864,19 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget, NULL); guint32 click_time = event->time - last_click_time; - int click_move_x = static_cast<int>(event->x - last_click_position.x()); - int click_move_y = static_cast<int>(event->y - last_click_position.y()); + int click_move_x = event->x - last_click_position.x(); + int click_move_y = event->y - last_click_position.y(); if (click_time > static_cast<guint32>(double_click_time) || click_move_x > double_click_distance || click_move_y > double_click_distance) { gtk_window_begin_move_drag(browser->window_, event->button, - static_cast<gint>(event->x_root), - static_cast<gint>(event->y_root), - event->time); + event->x_root, event->y_root, event->time); return TRUE; } } else if (has_hit_edge) { gtk_window_begin_resize_drag(browser->window_, edge, event->button, - static_cast<gint>(event->x_root), - static_cast<gint>(event->y_root), - event->time); + event->x_root, event->y_root, event->time); return TRUE; } } else if (GDK_2BUTTON_PRESS == event->type) { diff --git a/chrome/browser/gtk/constrained_window_gtk.h b/chrome/browser/gtk/constrained_window_gtk.h index d2003a9..91fa9ac 100644 --- a/chrome/browser/gtk/constrained_window_gtk.h +++ b/chrome/browser/gtk/constrained_window_gtk.h @@ -22,9 +22,6 @@ class ConstrainedWindowGtkDelegate { // Tells the delegate to either delete itself or set up a task to delete // itself later. virtual void DeleteDelegate() = 0; - - protected: - ~ConstrainedWindowGtkDelegate() {} }; // Constrained window implementation for the GTK port. Unlike the Win32 system, diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc index 90bb019..815459a 100644 --- a/chrome/browser/gtk/download_item_gtk.cc +++ b/chrome/browser/gtk/download_item_gtk.cc @@ -428,9 +428,9 @@ void DownloadItemGtk::AnimationProgressed(const Animation* animation) { gtk_widget_queue_draw(progress_area_.get()); } else { if (IsDangerous()) { - int progress = static_cast<int>((dangerous_hbox_full_width_ - - dangerous_hbox_start_width_) * - new_item_animation_->GetCurrentValue()); + int progress = (dangerous_hbox_full_width_ - + dangerous_hbox_start_width_) * + new_item_animation_->GetCurrentValue(); int showing_width = dangerous_hbox_start_width_ + progress; gtk_widget_set_size_request(dangerous_hbox_, showing_width, -1); } else { diff --git a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc index 7e499b1..8903ee2 100644 --- a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc +++ b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc @@ -29,7 +29,7 @@ DownloadRequestDialogDelegateGtk::DownloadRequestDialogDelegateGtk( : DownloadRequestDialogDelegate(host), responded_(false) { // Create dialog. - root_.Own(gtk_vbox_new(false, gtk_util::kContentAreaBorder)); + root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder)); GtkWidget* label = gtk_label_new( l10n_util::GetStringUTF8(IDS_MULTI_DOWNLOAD_WARNING).c_str()); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index 231aa00..0bf856a 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -116,7 +116,7 @@ void SetDialogShape(GtkWidget* widget) { IDR_FIND_DLG_LEFT_BACKGROUND, IDR_FIND_DLG_MIDDLE_BACKGROUND, IDR_FIND_DLG_RIGHT_BACKGROUND, - 0, 0, 0, 0, 0, 0); + NULL, NULL, NULL, NULL, NULL, NULL); dialog_shape->ChangeWhiteToTransparent(); } @@ -132,7 +132,7 @@ const NineBox* GetDialogBorder() { IDR_FIND_DIALOG_LEFT, IDR_FIND_DIALOG_MIDDLE, IDR_FIND_DIALOG_RIGHT, - 0, 0, 0, 0, 0, 0); + NULL, NULL, NULL, NULL, NULL, NULL); } return dialog_border; @@ -512,7 +512,7 @@ void FindBarGtk::Observe(NotificationType type, &kEntryBackgroundColor); gtk_alignment_set_padding(GTK_ALIGNMENT(content_alignment_), - 0, 0, 0, 0); + 0.0, 0.0, 0.0, 0.0); gtk_widget_modify_bg(border_bin_, GTK_STATE_NORMAL, &kTextBorderColor); gtk_widget_modify_bg(border_bin_aa_, GTK_STATE_NORMAL, &kTextBorderColorAA); diff --git a/chrome/browser/gtk/gtk_floating_container.cc b/chrome/browser/gtk/gtk_floating_container.cc index 51f9632..b9d0e46 100644 --- a/chrome/browser/gtk/gtk_floating_container.cc +++ b/chrome/browser/gtk/gtk_floating_container.cc @@ -115,7 +115,7 @@ static void gtk_floating_container_class_init( G_OBJECT_CLASS_TYPE(object_class), static_cast<GSignalFlags>(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), - 0u, + NULL, NULL, NULL, gtk_marshal_VOID__BOXED, G_TYPE_NONE, 1, diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h index eb88724..137b395 100644 --- a/chrome/browser/gtk/info_bubble_gtk.h +++ b/chrome/browser/gtk/info_bubble_gtk.h @@ -34,9 +34,6 @@ class InfoBubbleGtkDelegate { // NOTE: The Views interface has CloseOnEscape, except I can't find a place // where it ever returns false, so we always allow you to close via escape. - - protected: - ~InfoBubbleGtkDelegate() {} }; class InfoBubbleGtk : public NotificationObserver { diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc index 519a58f..866aca5 100644 --- a/chrome/browser/gtk/slide_animator_gtk.cc +++ b/chrome/browser/gtk/slide_animator_gtk.cc @@ -107,8 +107,8 @@ bool SlideAnimatorGtk::IsClosing() { } void SlideAnimatorGtk::AnimationProgressed(const Animation* animation) { - int showing_height = static_cast<int>(child_->allocation.height * - animation_->GetCurrentValue()); + int showing_height = child_->allocation.height * + animation_->GetCurrentValue(); if (direction_ == DOWN) { gtk_fixed_move(GTK_FIXED(widget_.get()), child_, 0, showing_height - child_->allocation.height); diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index 547ae83..a4cf657 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -28,9 +28,6 @@ class SlideAnimatorGtk : public AnimationDelegate { public: // Called when a call to Close() finishes animating. virtual void Closed() = 0; - - protected: - ~Delegate() {} }; enum Direction { diff --git a/chrome/browser/gtk/tab_contents_drag_source.cc b/chrome/browser/gtk/tab_contents_drag_source.cc index 7953ba8..b27ef57 100644 --- a/chrome/browser/gtk/tab_contents_drag_source.cc +++ b/chrome/browser/gtk/tab_contents_drag_source.cc @@ -112,9 +112,7 @@ void TabContentsDragSource::DidProcessEvent(GdkEvent* event) { if (tab_contents()->render_view_host()) { tab_contents()->render_view_host()->DragSourceMovedTo( - client.x(), client.y(), - static_cast<int>(event_motion->x_root), - static_cast<int>(event_motion->y_root)); + client.x(), client.y(), event_motion->x_root, event_motion->y_root); } } diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc index 5809cd1..2ddb607 100644 --- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc +++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc @@ -263,9 +263,8 @@ void DraggedTabGtk::SetContainerShapeMask(GdkPixbuf* pixbuf) { // border). cairo_identity_matrix(cairo_context); cairo_set_source_rgba(cairo_context, 1.0f, 1.0f, 1.0f, 1.0f); - int tab_height = static_cast<int>(kScalingFactor * - gdk_pixbuf_get_height(pixbuf) - - kDragFrameBorderSize); + int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf) - + kDragFrameBorderSize; cairo_rectangle(cairo_context, 0, tab_height, size.width(), size.height() - tab_height); @@ -296,10 +295,8 @@ gboolean DraggedTabGtk::OnExposeEvent(GtkWidget* widget, } // Only used when not attached. - int tab_height = static_cast<int>(kScalingFactor * - gdk_pixbuf_get_height(pixbuf)); - int tab_width = static_cast<int>(kScalingFactor * - gdk_pixbuf_get_width(pixbuf)); + int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf); + int tab_width = kScalingFactor * gdk_pixbuf_get_width(pixbuf); // Draw the render area. if (dragged_tab->backing_store_ && !dragged_tab->attached_) { diff --git a/chrome/browser/gtk/tabs/tab_gtk.h b/chrome/browser/gtk/tabs/tab_gtk.h index 2667b42..dd8547b 100644 --- a/chrome/browser/gtk/tabs/tab_gtk.h +++ b/chrome/browser/gtk/tabs/tab_gtk.h @@ -73,9 +73,6 @@ class TabGtk : public TabRendererGtk, // Returns the theme provider for icons and colors. virtual ThemeProvider* GetThemeProvider() = 0; - - protected: - ~TabDelegate() {} }; explicit TabGtk(TabDelegate* delegate); diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 867d9245..6a60e2b 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -236,9 +236,7 @@ TabRendererGtk::TabRendererGtk(ThemeProvider* theme_provider) fav_icon_hiding_offset_(0), should_display_crashed_favicon_(false), loading_animation_(theme_provider), - // Zero is not a valid SkColor. It'll be replaced by the - // theme tab_text_color. - close_button_color_(0u) { + close_button_color_(NULL) { InitResources(); data_.pinned = false; @@ -592,7 +590,7 @@ void TabRendererGtk::Layout() { if (theme_provider_) { SkColor tab_text_color = theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT); - if (close_button_color_ == 0u || tab_text_color != close_button_color_) { + if (!close_button_color_ || tab_text_color != close_button_color_) { close_button_color_ = tab_text_color; ResourceBundle& rb = ResourceBundle::GetSharedInstance(); close_button_->SetBackground(close_button_color_, diff --git a/chrome/browser/gtk/view_id_util.h b/chrome/browser/gtk/view_id_util.h index 6c6f328..1ec65e8 100644 --- a/chrome/browser/gtk/view_id_util.h +++ b/chrome/browser/gtk/view_id_util.h @@ -15,8 +15,6 @@ class ViewIDUtil { class Delegate { public: virtual GtkWidget* GetWidgetForViewID(ViewID id) = 0; - protected: - ~Delegate() {} }; static void SetID(GtkWidget* widget, ViewID id); diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h index 4c64acb..dc37044 100644 --- a/chrome/browser/history/expire_history_backend.h +++ b/chrome/browser/history/expire_history_backend.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ -#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ +#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ +#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ #include <queue> #include <set> @@ -36,9 +36,6 @@ class BroadcastNotificationDelegate { // thread. The details argument will have ownership taken by this function. virtual void BroadcastNotifications(NotificationType type, HistoryDetails* details_deleted) = 0; - - protected: - ~BroadcastNotificationDelegate() {} }; // Encapsulates visit expiration criteria and type of visits to expire. @@ -280,4 +277,4 @@ class ExpireHistoryBackend { } // namespace history -#endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ +#endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 846da67..36b5193 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -95,7 +95,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, Delegate* delegate, BookmarkService* bookmark_service); - virtual ~HistoryBackend(); + ~HistoryBackend(); // Must be called after creation but before any objects are created. If this // fails, all other functions will fail as well. (Since this runs on another diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h index 9a7f36d..c967374 100644 --- a/chrome/browser/history/history_types.h +++ b/chrome/browser/history/history_types.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ -#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ +#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__ +#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__ #include <map> #include <set> @@ -73,7 +73,6 @@ class URLRow { // Initialize will not set the URL, so our initialization above will stay. Initialize(); } - virtual ~URLRow() {} URLID id() const { return id_; } const GURL& url() const { return url_; } @@ -521,4 +520,4 @@ struct KeywordSearchTermVisit { } // history -#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ +#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__ diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc index 38124aa2..b56bcd9 100644 --- a/chrome/browser/history/starred_url_database.cc +++ b/chrome/browser/history/starred_url_database.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -545,10 +545,10 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) { // Create the bookmark bar and other folder nodes. history::StarredEntry entry; entry.type = history::StarredEntry::BOOKMARK_BAR; - BookmarkNode bookmark_bar_node(0, GURL()); + BookmarkNode bookmark_bar_node(NULL, GURL()); bookmark_bar_node.Reset(entry); entry.type = history::StarredEntry::OTHER; - BookmarkNode other_node(0, GURL()); + BookmarkNode other_node(NULL, GURL()); other_node.Reset(entry); std::map<history::UIStarID, history::StarID> group_id_to_id_map; @@ -597,7 +597,7 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) { // encountering the details. // The created nodes are owned by the root node. - node = new BookmarkNode(0, i->url); + node = new BookmarkNode(NULL, i->url); id_to_node_map[i->id] = node; } node->Reset(*i); @@ -608,7 +608,7 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) { BookmarkNode* parent = id_to_node_map[parent_id]; if (!parent) { // Haven't encountered the parent yet, create it now. - parent = new BookmarkNode(0, GURL()); + parent = new BookmarkNode(NULL, GURL()); id_to_node_map[parent_id] = parent; } diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h index 30788ad..af4a10a 100644 --- a/chrome/browser/icon_loader.h +++ b/chrome/browser/icon_loader.h @@ -43,8 +43,6 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> { // icon has been successfully loaded, result is non-null. This method must // return true if it is taking ownership of the returned bitmap. virtual bool OnBitmapLoaded(IconLoader* source, SkBitmap* result) = 0; - protected: - ~Delegate() {} }; IconLoader(const IconGroupID& group, IconSize size, Delegate* delegate); diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index 624a4e9..28a9365 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -21,8 +21,8 @@ namespace { // the search URL when importing search engines. class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { public: - FirefoxURLParameterFilter() {} - virtual ~FirefoxURLParameterFilter() {} + FirefoxURLParameterFilter() { } + ~FirefoxURLParameterFilter() { } // TemplateURLParser::ParameterFilter method. virtual bool KeepParameter(const std::string& key, diff --git a/chrome/browser/input_window_dialog.h b/chrome/browser/input_window_dialog.h index 0a93bcea..56bdfb9 100644 --- a/chrome/browser/input_window_dialog.h +++ b/chrome/browser/input_window_dialog.h @@ -15,7 +15,7 @@ class InputWindowDialog { public: class Delegate { public: - virtual ~Delegate() {} + virtual ~Delegate() { } // Checks whether |text| is a valid input string. virtual bool IsValid(const std::wstring& text) = 0; @@ -42,8 +42,7 @@ class InputWindowDialog { virtual void Close() = 0; protected: - InputWindowDialog() {} - ~InputWindowDialog() {} + InputWindowDialog() { } private: DISALLOW_COPY_AND_ASSIGN(InputWindowDialog); diff --git a/chrome/browser/location_bar.h b/chrome/browser/location_bar.h index f9d178f..c8e9293 100644 --- a/chrome/browser/location_bar.h +++ b/chrome/browser/location_bar.h @@ -64,17 +64,12 @@ class LocationBar { // Returns a pointer to the testing interface. virtual LocationBarTesting* GetLocationBarForTesting() = 0; - - protected: - ~LocationBar() {} }; class LocationBarTesting { public: // Returns the number of visible page actions in the Omnibox. virtual int PageActionVisibleCount() = 0; - protected: - ~LocationBarTesting() {} }; #endif // CHROME_BROWSER_LOCATION_BAR_H_ diff --git a/chrome/browser/login_model.h b/chrome/browser/login_model.h index 6d764be..cbd2fef 100644 --- a/chrome/browser/login_model.h +++ b/chrome/browser/login_model.h @@ -15,8 +15,6 @@ class LoginModelObserver { // as a match for the pending login prompt. virtual void OnAutofillDataAvailable(const std::wstring& username, const std::wstring& password) = 0; - protected: - ~LoginModelObserver() {} }; class LoginModel { @@ -25,8 +23,6 @@ class LoginModel { // observer can be null, signifying there is no longer any observer // interested in the data. virtual void SetObserver(LoginModelObserver* observer) = 0; - protected: - ~LoginModel() {} }; #endif // CHROME_BROWSER_LOGIN_MODEL_H_ diff --git a/chrome/browser/login_prompt.h b/chrome/browser/login_prompt.h index 3ba1aad..6279c7a 100644 --- a/chrome/browser/login_prompt.h +++ b/chrome/browser/login_prompt.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -64,9 +64,6 @@ class LoginHandler { // Notify the handler that the request was cancelled. // This function can only be called from the IO thread. virtual void OnRequestCancelled() = 0; - - protected: - ~LoginHandler() {} }; // Details to provide the NotificationObserver. Used by the automation proxy diff --git a/chrome/browser/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc index a8f4316..dda0e15 100644 --- a/chrome/browser/login_prompt_gtk.cc +++ b/chrome/browser/login_prompt_gtk.cc @@ -83,7 +83,7 @@ class LoginHandlerGtk : public LoginHandler, std::wstring explanation) { DCHECK(MessageLoop::current() == ui_loop_); - root_.Own(gtk_vbox_new(false, gtk_util::kContentAreaBorder)); + root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder)); GtkWidget* label = gtk_label_new(WideToUTF8(explanation).c_str()); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_box_pack_start(GTK_BOX(root_.get()), label, FALSE, FALSE, 0); diff --git a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc index 492ddf8..9e79623 100644 --- a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc +++ b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc @@ -225,7 +225,7 @@ TEST(ResolveProxyMsgHelperTest, CancelPendingRequests) { EXPECT_EQ(0u, resolver->pending_requests().size()); - EXPECT_TRUE(NULL == delegate.pending_result()); + EXPECT_EQ(NULL, delegate.pending_result()); // It should also be the case that msg1, msg2, msg3 were deleted by the // cancellation. (Else will show up as a leak in Purify/Valgrind). diff --git a/chrome/browser/net/url_fetcher.h b/chrome/browser/net/url_fetcher.h index 28ec2c5..6b1c87c 100644 --- a/chrome/browser/net/url_fetcher.h +++ b/chrome/browser/net/url_fetcher.h @@ -75,8 +75,6 @@ class URLFetcher { int response_code, const ResponseCookies& cookies, const std::string& data) = 0; - protected: - ~Delegate() {} }; // URLFetcher::Create uses the currently registered Factory to create the @@ -87,8 +85,6 @@ class URLFetcher { const GURL& url, RequestType request_type, Delegate* d) = 0; - protected: - ~Factory() {} }; // |url| is the URL to send the request to. diff --git a/chrome/browser/page_info_model.h b/chrome/browser/page_info_model.h index 994549e..526372e 100644 --- a/chrome/browser/page_info_model.h +++ b/chrome/browser/page_info_model.h @@ -23,8 +23,6 @@ class PageInfoModel { class PageInfoModelObserver { public: virtual void ModelChanged() = 0; - protected: - ~PageInfoModelObserver() {} }; // Because the UI on the Mac is statically laid-out, this enum provides the diff --git a/chrome/browser/parsers/metadata_parser.h b/chrome/browser/parsers/metadata_parser.h index 9a8d80d..97a4e85 100644 --- a/chrome/browser/parsers/metadata_parser.h +++ b/chrome/browser/parsers/metadata_parser.h @@ -13,7 +13,6 @@ class MetadataPropertyIterator { public: MetadataPropertyIterator() {} - virtual ~MetadataPropertyIterator() {} // Gets the next Property in the iterator. Returns false if at the end // of the list. @@ -30,7 +29,6 @@ class MetadataPropertyIterator { class MetadataParser { public: MetadataParser(const FilePath& path) {} - virtual ~MetadataParser() {} static const char* kPropertyType; static const char* kPropertyFilesize; diff --git a/chrome/browser/parsers/metadata_parser_factory.h b/chrome/browser/parsers/metadata_parser_factory.h index 9c291c4..c42e01d 100644 --- a/chrome/browser/parsers/metadata_parser_factory.h +++ b/chrome/browser/parsers/metadata_parser_factory.h @@ -12,7 +12,6 @@ class MetadataParserFactory { public: MetadataParserFactory() {} - virtual ~MetadataParserFactory() {} // Used to check to see if the parser can parse the given file. This // should not do any additional reading of the file. diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc index e79d969..e49cbcb 100644 --- a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc +++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc @@ -11,8 +11,6 @@ MetadataParserJpegFactory::MetadataParserJpegFactory() : MetadataParserFactory(){} -MetadataParserJpegFactory::~MetadataParserJpegFactory() {} - bool MetadataParserJpegFactory::CanParse(const FilePath& path, char* bytes, int bytes_size) { diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.h b/chrome/browser/parsers/metadata_parser_jpeg_factory.h index 68399fe..48c059b 100644 --- a/chrome/browser/parsers/metadata_parser_jpeg_factory.h +++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.h @@ -15,9 +15,6 @@ class MetadataParserJpegFactory : public MetadataParserFactory { virtual bool CanParse(const FilePath& path, char* bytes, int bytes_size); virtual MetadataParser* CreateParser(const FilePath& path); - protected: - ~MetadataParserJpegFactory(); - private: DISALLOW_COPY_AND_ASSIGN(MetadataParserJpegFactory); }; diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h index 45403a9..4a688fe 100644 --- a/chrome/browser/possible_url_model.h +++ b/chrome/browser/possible_url_model.h @@ -78,7 +78,7 @@ class PossibleURLModel : public TableModel { TableModelObserver* observer_; // Our consumer for favicon requests. - CancelableRequestConsumerT<size_t, 0> consumer_; + CancelableRequestConsumerT<size_t, NULL> consumer_; // The results we're showing. std::vector<Result> results_; diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 916ff9db..2727879 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -136,9 +136,6 @@ class RenderViewHostDelegate { // The content's intrinsic width (prefWidth) changed. virtual void UpdatePreferredWidth(int pref_width) = 0; - - protected: - ~View() {} }; // RendererManagerment ------------------------------------------------------- @@ -164,9 +161,6 @@ class RenderViewHostDelegate { // Called the ResourceDispatcherHost's associate CrossSiteRequestHandler // when a cross-site navigation has been canceled. virtual void OnCrossSiteNavigationCanceled() = 0; - - protected: - ~RendererManagement() {} }; // BrowserIntegration -------------------------------------------------------- @@ -213,9 +207,6 @@ class RenderViewHostDelegate { virtual void OnDidGetApplicationInfo( int32 page_id, const webkit_glue::WebApplicationInfo& app_info) = 0; - - protected: - ~BrowserIntegration() {} }; // Resource ------------------------------------------------------------------ @@ -272,9 +263,6 @@ class RenderViewHostDelegate { // Notification that a document has been loaded in a frame. virtual void DocumentLoadedInFrame() = 0; - - protected: - ~Resource() {} }; // Save ---------------------------------------------------------------------- @@ -300,9 +288,6 @@ class RenderViewHostDelegate { virtual void OnReceivedSerializedHtmlData(const GURL& frame_url, const std::string& data, int32 status) = 0; - - protected: - ~Save() {} }; // Printing ------------------------------------------------------------------ @@ -318,9 +303,6 @@ class RenderViewHostDelegate { // EMF memory mapped data. virtual void DidPrintPage( const ViewHostMsg_DidPrintPage_Params& params) = 0; - - protected: - ~Printing() {} }; // FavIcon ------------------------------------------------------------------- @@ -344,9 +326,6 @@ class RenderViewHostDelegate { virtual void UpdateFavIconURL(RenderViewHost* render_view_host, int32 page_id, const GURL& icon_url) = 0; - - protected: - ~FavIcon() {} }; // AutoFill ------------------------------------------------------------------ @@ -373,9 +352,6 @@ class RenderViewHostDelegate { // autofill suggestion from the database. virtual void RemoveAutofillEntry(const std::wstring& field_name, const std::wstring& value) = 0; - - protected: - ~Autofill() {} }; // --------------------------------------------------------------------------- @@ -421,7 +397,7 @@ class RenderViewHostDelegate { // The RenderView is going to be deleted. This is called when each // RenderView is going to be destroyed - virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} + virtual void RenderViewDeleted(RenderViewHost* render_view_host) { } // The RenderView was navigated to a different page. virtual void DidNavigate(RenderViewHost* render_view_host, @@ -566,9 +542,6 @@ class RenderViewHostDelegate { // The RenderView has inserted one css file into page. virtual void DidInsertCSS() {} - - protected: - ~RenderViewHostDelegate() {} }; #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 2397c79..40fba47 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -96,7 +96,7 @@ RenderWidgetHost::~RenderWidgetHost() { gfx::NativeViewId RenderWidgetHost::GetNativeViewId() { if (view_) return gfx::IdFromNativeView(view_->GetNativeView()); - return 0; + return NULL; } void RenderWidgetHost::Init() { diff --git a/chrome/browser/renderer_host/render_widget_host_painting_observer.h b/chrome/browser/renderer_host/render_widget_host_painting_observer.h index 652ec47..d24b61a 100644 --- a/chrome/browser/renderer_host/render_widget_host_painting_observer.h +++ b/chrome/browser/renderer_host/render_widget_host_painting_observer.h @@ -19,9 +19,6 @@ class RenderWidgetHostPaintingObserver { // Indicates that the RenderWidgetHost just updated the backing store. virtual void WidgetDidUpdateBackingStore(RenderWidgetHost* widget) = 0; - - protected: - ~RenderWidgetHostPaintingObserver() {} }; #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 8df6c4c..c8183bb 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -735,7 +735,7 @@ void ResourceMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { // Loads default settings. This is asynchronous, only the IPC message sender // will hang until the settings are retrieved. printer_query->GetSettings(printing::PrinterQuery::DEFAULTS, - 0, + NULL, 0, false, task); diff --git a/chrome/browser/safe_browsing/database_perftest.cc b/chrome/browser/safe_browsing/database_perftest.cc index b25f419..bbf4839 100644 --- a/chrome/browser/safe_browsing/database_perftest.cc +++ b/chrome/browser/safe_browsing/database_perftest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,7 +33,7 @@ class Database { Database() : db_(NULL) { } - virtual ~Database() { + ~Database() { if (db_) { sqlite3_close(db_); db_ = NULL; diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h index c3c6ec7..280ffbb 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -136,12 +136,12 @@ class SafeBrowsingBlockingPage : public InterstitialPage { // Factory for creating SafeBrowsingBlockingPage. Useful for tests. class SafeBrowsingBlockingPageFactory { public: + ~SafeBrowsingBlockingPageFactory() { } + virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( SafeBrowsingService* service, TabContents* tab_contents, const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; - protected: - ~SafeBrowsingBlockingPageFactory() {} }; #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ diff --git a/chrome/browser/search_engines/edit_search_engine_controller.h b/chrome/browser/search_engines/edit_search_engine_controller.h index 40bba57..6333dbf 100644 --- a/chrome/browser/search_engines/edit_search_engine_controller.h +++ b/chrome/browser/search_engines/edit_search_engine_controller.h @@ -23,8 +23,6 @@ class EditSearchEngineControllerDelegate { const std::wstring& title, const std::wstring& keyword, const std::wstring& url) = 0; - protected: - ~EditSearchEngineControllerDelegate() {} }; // EditSearchEngineController provides the core platform independent logic diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h index f584580..c0e169b 100644 --- a/chrome/browser/search_engines/template_url_model.h +++ b/chrome/browser/search_engines/template_url_model.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ -#define CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ +#ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ +#define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ #include <map> #include <string> @@ -48,8 +48,6 @@ class TemplateURLModelObserver { public: // Notification that the template url model has changed in some way. virtual void OnTemplateURLModelChanged() = 0; - protected: - ~TemplateURLModelObserver() {} }; class TemplateURLModel : public WebDataServiceConsumer, @@ -353,4 +351,4 @@ class TemplateURLModel : public WebDataServiceConsumer, DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel); }; -#endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ +#endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ diff --git a/chrome/browser/search_engines/template_url_parser.h b/chrome/browser/search_engines/template_url_parser.h index dfb139c..65a4881 100644 --- a/chrome/browser/search_engines/template_url_parser.h +++ b/chrome/browser/search_engines/template_url_parser.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ -#define CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ +#ifndef CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ +#define CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ #include <string> @@ -21,8 +21,6 @@ class TemplateURLParser { // methods returns false, the parameter is not included. virtual bool KeepParameter(const std::string& key, const std::string& value) = 0; - protected: - ~ParameterFilter() {} }; // Decodes the chunk of data representing a TemplateURL. If data does // not describe a valid TemplateURL false is returned. Additionally, if the @@ -46,4 +44,4 @@ class TemplateURLParser { DISALLOW_EVIL_CONSTRUCTORS(TemplateURLParser); }; -#endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ +#endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index 5e980e4..a3e611c 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,9 +41,6 @@ class TabRestoreService : public BaseSessionService { // Sent to all remaining Observers when TabRestoreService's // destructor is run. virtual void TabRestoreServiceDestroyed(TabRestoreService* service) = 0; - - protected: - ~Observer() {} }; // Interface used to allow the test to provide a custom time. diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index 5098fb4..f9a3baa 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -27,9 +27,6 @@ class BaseShellDialog { // Notifies the dialog box that the listener has been destroyed and it should // no longer be sent notifications. virtual void ListenerDestroyed() = 0; - - protected: - ~BaseShellDialog() {} }; // Shows a dialog box for selecting a file or a folder. @@ -67,9 +64,6 @@ class SelectFileDialog // the user canceling or closing the selection dialog box, for example). // |params| is contextual passed to SelectFile. virtual void FileSelectionCanceled(void* params) {}; - - protected: - ~Listener() {}; }; // Creates a dialog box helper. This object is ref-counted, but the returned @@ -146,8 +140,6 @@ class SelectFontDialog // canceling or closing the selection dialog box, for example). |params| is // contextual passed to SelectFile. virtual void FontSelectionCanceled(void* params) {}; - protected: - ~Listener() {}; }; // Creates a dialog box helper. This object is ref-counted, but the returned diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc index b6a990b..b8bcc7f 100644 --- a/chrome/browser/spellchecker.cc +++ b/chrome/browser/spellchecker.cc @@ -547,7 +547,7 @@ void SpellChecker::GetAutoCorrectionWord(const std::wstring& word, const wchar_t* word_char = word.c_str(); for (int i = 0; i <= kMaxAutoCorrectWordSize; i++) { if (i >= word_length) - misspelled_word[i] = 0; + misspelled_word[i] = NULL; else misspelled_word[i] = word_char[i]; } diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index 3156bfc..b83e16a 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -31,9 +31,6 @@ class SSLBlockingPage : public InterstitialPage { // Notification that the user chose to accept the certificate. virtual void OnAllowCertificate(SSLCertErrorHandler* handler) = 0; - - protected: - ~Delegate() {} }; SSLBlockingPage(SSLCertErrorHandler* handler, Delegate* delegate); diff --git a/chrome/browser/ssl/ssl_policy.h b/chrome/browser/ssl/ssl_policy.h index ebabd3b..48a5f0d 100644 --- a/chrome/browser/ssl/ssl_policy.h +++ b/chrome/browser/ssl/ssl_policy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -26,7 +26,6 @@ class SSLRequestInfo; class SSLPolicy : public SSLBlockingPage::Delegate { public: explicit SSLPolicy(SSLPolicyBackend* backend); - virtual ~SSLPolicy() {} // An error occurred with the certificate in an SSL connection. void OnCertError(SSLCertErrorHandler* handler); diff --git a/chrome/browser/tab_contents/constrained_window.h b/chrome/browser/tab_contents/constrained_window.h index 8719e65..a1b8c2a 100644 --- a/chrome/browser/tab_contents/constrained_window.h +++ b/chrome/browser/tab_contents/constrained_window.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -42,8 +42,6 @@ class ConstrainedWindow { // Closes the Constrained Window. virtual void CloseConstrainedWindow() = 0; - protected: - ~ConstrainedWindow() {} }; #endif // CHROME_BROWSER_TAB_CONTENTS_CONSTRAINED_WINDOW_H_ diff --git a/chrome/browser/tab_contents/page_navigator.h b/chrome/browser/tab_contents/page_navigator.h index 328971a..7d203e3 100644 --- a/chrome/browser/tab_contents/page_navigator.h +++ b/chrome/browser/tab_contents/page_navigator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,8 +21,6 @@ class PageNavigator { virtual void OpenURL(const GURL& url, const GURL& referrer, WindowOpenDisposition disposition, PageTransition::Type transition) = 0; - protected: - ~PageNavigator() {} }; #endif // CHROME_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_ diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h index 641ca5e..4f9e600 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h @@ -28,7 +28,6 @@ class TabContents; class RenderViewHostDelegateViewHelper { public: RenderViewHostDelegateViewHelper() {} - virtual ~RenderViewHostDelegateViewHelper() {} virtual void CreateNewWindow(int route_id, base::WaitableEvent* modal_dialog_event, diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h index 874febd..8c8dde2 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.h +++ b/chrome/browser/tab_contents/render_view_host_manager.h @@ -59,9 +59,6 @@ class RenderViewHostManager // is none. virtual NavigationEntry* GetLastCommittedNavigationEntryForRenderManager() = 0; - - protected: - ~Delegate() {} }; // Both delegate pointers must be non-NULL and are not owned by this class. diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index fac89e0..47426c4 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -41,7 +41,7 @@ static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, // Subclass the TestingProfile so that it can return certain services we need. class TabContentsTestingProfile : public TestingProfile { public: - TabContentsTestingProfile() : TestingProfile() {} + TabContentsTestingProfile() : TestingProfile() { } virtual PrefService* GetPrefs() { if (!prefs_.get()) { @@ -70,8 +70,6 @@ class TestInterstitialPage : public InterstitialPage { public: virtual void TestInterstitialPageDeleted( TestInterstitialPage* interstitial) = 0; - protected: - ~Delegate() {} }; // IMPORTANT NOTE: if you pass stack allocated values for |state| and diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index e776d6c..4f1d44b 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,21 +47,21 @@ class TabStripModelObserver { // (selected). virtual void TabInsertedAt(TabContents* contents, int index, - bool foreground) {} + bool foreground) { } // The specified TabContents at |index| is being closed (and eventually // destroyed). - virtual void TabClosingAt(TabContents* contents, int index) {} + virtual void TabClosingAt(TabContents* contents, int index) { } // The specified TabContents at |index| is being detached, perhaps to be // inserted in another TabStripModel. The implementer should take whatever // action is necessary to deal with the TabContents no longer being present. - virtual void TabDetachedAt(TabContents* contents, int index) {} + virtual void TabDetachedAt(TabContents* contents, int index) { } // The selected TabContents is about to change from |old_contents| at |index|. // This gives observers a chance to prepare for an impending switch before it // happens. - virtual void TabDeselectedAt(TabContents* contents, int index) {} + virtual void TabDeselectedAt(TabContents* contents, int index) { } // The selected TabContents changed from |old_contents| to |new_contents| at // |index|. |user_gesture| specifies whether or not this was done by a user @@ -70,14 +70,14 @@ class TabStripModelObserver { virtual void TabSelectedAt(TabContents* old_contents, TabContents* new_contents, int index, - bool user_gesture) {} + bool user_gesture) { } // The specified TabContents at |from_index| was moved to |to_index|. If // the pinned state of the tab is changing |pinned_state_changed| is true. virtual void TabMoved(TabContents* contents, int from_index, int to_index, - bool pinned_state_changed) {} + bool pinned_state_changed) { } // The specified TabContents at |index| changed in some way. |contents| may // be an entirely different object and the old value is no longer available @@ -92,21 +92,18 @@ class TabStripModelObserver { // without updating the title (which may be an ugly URL if the real title // hasn't come in yet). virtual void TabChangedAt(TabContents* contents, int index, - bool loading_only) {} + bool loading_only) { } // Invoked when the pinned state of a tab changes. // NOTE: this is only invoked if the tab doesn't move as a result of its // pinned state changing. If the tab moves as a result, the observer is // notified by way of the TabMoved method with |pinned_state_changed| true. - virtual void TabPinnedStateChanged(TabContents* contents, int index) {} + virtual void TabPinnedStateChanged(TabContents* contents, int index) { } // The TabStripModel now no longer has any "significant" (user created or // user manipulated) tabs. The implementer may use this as a trigger to try // and close the window containing the TabStripModel, for example... - virtual void TabStripEmpty() {} - - protected: - ~TabStripModelObserver() {} + virtual void TabStripEmpty() { } }; /////////////////////////////////////////////////////////////////////////////// @@ -202,9 +199,6 @@ class TabStripModelDelegate { // Returns whether some contents can be closed. virtual bool CanCloseContentsAt(int index) = 0; - - protected: - ~TabStripModelDelegate() {} }; //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h index 2c008c3..f15911b 100644 --- a/chrome/browser/webdata/web_data_service.h +++ b/chrome/browser/webdata/web_data_service.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ -#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ +#ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ +#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ #include <map> #include <vector> @@ -240,7 +240,7 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { arg2_(arg2) { } - virtual ~GenericRequest2() {} + virtual ~GenericRequest2() { } T GetArgument1() { return arg1_; @@ -539,9 +539,6 @@ class WebDataServiceConsumer { // not be opened. The result object is destroyed after this call. virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, const WDTypedResult* result) = 0; - - protected: - ~WebDataServiceConsumer() {} }; -#endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ +#endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |