summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view.h8
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc8
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/blocked_popup_container.h14
-rw-r--r--chrome/browser/bookmarks/bookmark_model_observer.h5
-rw-r--r--chrome/browser/bookmarks/bookmark_service.h5
-rw-r--r--chrome/browser/browser_list.h13
-rw-r--r--chrome/browser/browser_theme_provider.cc4
-rw-r--r--chrome/browser/browser_window.h1
-rw-r--r--chrome/browser/browsing_data_remover.h4
-rw-r--r--chrome/browser/cancelable_request.h10
-rw-r--r--chrome/browser/command_updater.h6
-rw-r--r--chrome/browser/dock_info.h5
-rw-r--r--chrome/browser/download/download_manager.h6
-rw-r--r--chrome/browser/download/download_request_manager.h6
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.h2
-rw-r--r--chrome/browser/extensions/extension_shelf_model.h3
-rw-r--r--chrome/browser/extensions/external_extension_provider.h2
-rw-r--r--chrome/browser/gears_integration.cc6
-rw-r--r--chrome/browser/gtk/back_forward_button_gtk.cc2
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc4
-rw-r--r--chrome/browser/gtk/bookmark_manager_gtk.cc12
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc20
-rw-r--r--chrome/browser/gtk/constrained_window_gtk.h3
-rw-r--r--chrome/browser/gtk/download_item_gtk.cc6
-rw-r--r--chrome/browser/gtk/download_request_dialog_delegate_gtk.cc2
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc6
-rw-r--r--chrome/browser/gtk/gtk_floating_container.cc2
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.h3
-rw-r--r--chrome/browser/gtk/slide_animator_gtk.cc4
-rw-r--r--chrome/browser/gtk/slide_animator_gtk.h3
-rw-r--r--chrome/browser/gtk/tab_contents_drag_source.cc4
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_gtk.cc11
-rw-r--r--chrome/browser/gtk/tabs/tab_gtk.h3
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc6
-rw-r--r--chrome/browser/gtk/view_id_util.h2
-rw-r--r--chrome/browser/history/expire_history_backend.h11
-rw-r--r--chrome/browser/history/history_backend.h4
-rw-r--r--chrome/browser/history/history_types.h9
-rw-r--r--chrome/browser/history/starred_url_database.cc10
-rw-r--r--chrome/browser/icon_loader.h2
-rw-r--r--chrome/browser/importer/firefox_importer_utils.cc4
-rw-r--r--chrome/browser/input_window_dialog.h5
-rw-r--r--chrome/browser/location_bar.h5
-rw-r--r--chrome/browser/login_model.h4
-rw-r--r--chrome/browser/login_prompt.h5
-rw-r--r--chrome/browser/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/net/resolve_proxy_msg_helper_unittest.cc2
-rw-r--r--chrome/browser/net/url_fetcher.h4
-rw-r--r--chrome/browser/page_info_model.h2
-rw-r--r--chrome/browser/parsers/metadata_parser.h2
-rw-r--r--chrome/browser/parsers/metadata_parser_factory.h1
-rw-r--r--chrome/browser/parsers/metadata_parser_jpeg_factory.cc2
-rw-r--r--chrome/browser/parsers/metadata_parser_jpeg_factory.h3
-rw-r--r--chrome/browser/possible_url_model.h2
-rw-r--r--chrome/browser/renderer_host/render_view_host_delegate.h29
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_painting_observer.h3
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc4
-rw-r--r--chrome/browser/safe_browsing/database_perftest.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.h6
-rw-r--r--chrome/browser/search_engines/edit_search_engine_controller.h2
-rw-r--r--chrome/browser/search_engines/template_url_model.h10
-rw-r--r--chrome/browser/search_engines/template_url_parser.h10
-rw-r--r--chrome/browser/sessions/tab_restore_service.h5
-rw-r--r--chrome/browser/shell_dialogs.h10
-rw-r--r--chrome/browser/spellchecker.cc2
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.h5
-rw-r--r--chrome/browser/ssl/ssl_policy.h3
-rw-r--r--chrome/browser/tab_contents/constrained_window.h4
-rw-r--r--chrome/browser/tab_contents/page_navigator.h4
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h1
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.h3
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc6
-rw-r--r--chrome/browser/tabs/tab_strip_model.h26
-rw-r--r--chrome/browser/webdata/web_data_service.h13
79 files changed, 311 insertions, 135 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index b3ed20b..4e96102 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +466,8 @@ 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 efe5c9a..8567c62 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +51,8 @@ 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 928d7e4..ea3988a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +125,8 @@ 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 344ab9c..d1977ae 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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 dffc91a..d657a62 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(event->y);
+ size_t line = LineFromY(static_cast<int>(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(event->y);
+ size_t line = LineFromY(static_cast<int>(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(event->y);
+ size_t line = LineFromY(static_cast<int>(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 ?
- text_width * kContentWidthPercentage : text_width;
+ static_cast<int>(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 93aad4d..3b10911 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_ = NULL;
+ redirect_query_ = 0;
reply_message_ = NULL;
}
diff --git a/chrome/browser/blocked_popup_container.h b/chrome/browser/blocked_popup_container.h
index d7e5d0e..4d89a3f 100644
--- a/chrome/browser/blocked_popup_container.h
+++ b/chrome/browser/blocked_popup_container.h
@@ -52,6 +52,8 @@ 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
@@ -146,7 +148,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,
@@ -156,10 +158,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);
@@ -174,13 +176,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 1b85fe3..738fc09 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,6 +51,9 @@ 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 2de91cf..1816057 100644
--- a/chrome/browser/bookmarks/bookmark_service.h
+++ b/chrome/browser/bookmarks/bookmark_service.h
@@ -1,4 +1,4 @@
-// Copyright 2008, Google Inc.
+// Copyright 2009, The Chromium Authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,9 @@ 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 fda1aa4..20c360d 100644
--- a/chrome/browser/browser_list.h
+++ b/chrome/browser/browser_list.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,7 +28,10 @@ class BrowserList {
virtual void OnBrowserRemoving(const Browser* browser) = 0;
// Called immediately after a browser is set active (SetLastActive)
- virtual void OnBrowserSetLastActive(const Browser* browser) { };
+ virtual void OnBrowserSetLastActive(const Browser* browser) {};
+
+ protected:
+ ~Observer() {};
};
// Adds and removes browsers from the global list. The browser object should
@@ -191,4 +194,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 ec4054b..ee361e9 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 = NULL;
-const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = NULL;
+const SkColor BrowserThemeProvider::kDefaultColorControlBackground = 0u;
+const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = 0u;
// 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 a1dbe76..fd41fc0 100644
--- a/chrome/browser/browser_window.h
+++ b/chrome/browser/browser_window.h
@@ -244,6 +244,7 @@ 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 0425c6f..3f2bbbb 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +41,8 @@ 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 713440e..3840936 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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 NULL;
+ return 0;
}
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 3a6b7ca..9e2afcb 100644
--- a/chrome/browser/command_updater.h
+++ b/chrome/browser/command_updater.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +24,8 @@ 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
@@ -50,6 +52,8 @@ 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 4f6d476..76c900e 100644
--- a/chrome/browser/dock_info.h
+++ b/chrome/browser/dock_info.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +32,9 @@ 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 fec86ad..b7d87c7 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -98,6 +98,9 @@ class DownloadItem {
// Called when a downloaded file has been opened.
virtual void OnDownloadOpened(DownloadItem* download) = 0;
+
+ protected:
+ ~Observer() {}
};
// Constructing from persistent store:
@@ -323,6 +326,9 @@ 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 f9351c8..62c3caa 100644
--- a/chrome/browser/download/download_request_manager.h
+++ b/chrome/browser/download/download_request_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +57,8 @@ class DownloadRequestManager :
public:
virtual void ContinueDownload() = 0;
virtual void CancelDownload() = 0;
+ protected:
+ ~Callback() {}
};
// TabDownloadState maintains the download state for a particular tab.
@@ -169,6 +171,8 @@ 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 7a47b3f..a967c8f 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.h
+++ b/chrome/browser/extensions/extension_function_dispatcher.h
@@ -31,6 +31,8 @@ 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 29f6592..ba8b8b1d 100644
--- a/chrome/browser/extensions/extension_shelf_model.h
+++ b/chrome/browser/extensions/extension_shelf_model.h
@@ -158,6 +158,9 @@ 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 f431bfc..6c664c8 100644
--- a/chrome/browser/extensions/external_extension_provider.h
+++ b/chrome/browser/extensions/external_extension_provider.h
@@ -27,6 +27,8 @@ 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 6805175..a2a0e4f 100644
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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, NULL);
+ CPHandleCommand(GEARSPLUGINCOMMAND_CREATE_SHORTCUT, command, 0u);
}
// 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),
- NULL);
+ 0u);
}
diff --git a/chrome/browser/gtk/back_forward_button_gtk.cc b/chrome/browser/gtk/back_forward_button_gtk.cc
index 7f4bd69..e5f6125 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_ = event->y;
+ button->y_position_of_last_press_ = static_cast<int>(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 373ce0f..909243d 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,
- animation->GetCurrentValue() *
- kBookmarkBarHeight);
+ static_cast<gint>(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 f38512c..0d005e9 100644
--- a/chrome/browser/gtk/bookmark_manager_gtk.cc
+++ b/chrome/browser/gtk/bookmark_manager_gtk.cc
@@ -1183,7 +1183,9 @@ gboolean BookmarkManagerGtk::OnRightTreeViewButtonPress(
GtkTreePath* path;
gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view),
- event->x, event->y, &path, NULL, NULL, NULL);
+ static_cast<gint>(event->x),
+ static_cast<gint>(event->y), &path,
+ NULL, NULL, NULL);
if (path == NULL)
return TRUE;
@@ -1207,10 +1209,10 @@ gboolean BookmarkManagerGtk::OnRightTreeViewMotion(
return FALSE;
if (gtk_drag_check_threshold(tree_view,
- bm->mousedown_event_.x,
- bm->mousedown_event_.y,
- event->x,
- event->y)) {
+ 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->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 9c295ac..278f973 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,
- NULL,
+ 0,
IDR_WINDOW_RIGHT_SIDE,
IDR_WINDOW_BOTTOM_LEFT_CORNER,
IDR_WINDOW_BOTTOM_CENTER,
@@ -1825,7 +1825,8 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,
gdk_window_get_origin(GTK_WIDGET(browser->window_)->window, &win_x, &win_y);
GdkWindowEdge edge;
- gfx::Point point(event->x_root - win_x, event->y_root - win_y);
+ gfx::Point point(static_cast<int>(event->x_root - win_x),
+ static_cast<int>( 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.
@@ -1844,7 +1845,8 @@ 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(event->x, event->y);
+ browser->last_click_position_ = gfx::Point(static_cast<int>(event->x),
+ static_cast<int>(event->y));
if (has_hit_titlebar) {
// We want to start a move when the user single clicks, but not start a
@@ -1864,19 +1866,23 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,
NULL);
guint32 click_time = event->time - last_click_time;
- int click_move_x = event->x - last_click_position.x();
- int click_move_y = event->y - last_click_position.y();
+ 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());
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,
- event->x_root, event->y_root, event->time);
+ static_cast<gint>(event->x_root),
+ static_cast<gint>(event->y_root),
+ event->time);
return TRUE;
}
} else if (has_hit_edge) {
gtk_window_begin_resize_drag(browser->window_, edge, event->button,
- event->x_root, event->y_root, event->time);
+ static_cast<gint>(event->x_root),
+ static_cast<gint>(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 91fa9ac..d2003a9 100644
--- a/chrome/browser/gtk/constrained_window_gtk.h
+++ b/chrome/browser/gtk/constrained_window_gtk.h
@@ -22,6 +22,9 @@ 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 815459a..90bb019 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 = (dangerous_hbox_full_width_ -
- dangerous_hbox_start_width_) *
- new_item_animation_->GetCurrentValue();
+ int progress = static_cast<int>((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 8903ee2..7e499b1 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(NULL, gtk_util::kContentAreaBorder));
+ root_.Own(gtk_vbox_new(false, 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 0bf856a..231aa00 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,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ 0, 0, 0, 0, 0, 0);
dialog_shape->ChangeWhiteToTransparent();
}
@@ -132,7 +132,7 @@ const NineBox* GetDialogBorder() {
IDR_FIND_DIALOG_LEFT,
IDR_FIND_DIALOG_MIDDLE,
IDR_FIND_DIALOG_RIGHT,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ 0, 0, 0, 0, 0, 0);
}
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 b9d0e46..51f9632 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),
- NULL,
+ 0u,
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 137b395..eb88724 100644
--- a/chrome/browser/gtk/info_bubble_gtk.h
+++ b/chrome/browser/gtk/info_bubble_gtk.h
@@ -34,6 +34,9 @@ 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 866aca5..519a58f 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 = child_->allocation.height *
- animation_->GetCurrentValue();
+ int showing_height = static_cast<int>(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 a4cf657..547ae83 100644
--- a/chrome/browser/gtk/slide_animator_gtk.h
+++ b/chrome/browser/gtk/slide_animator_gtk.h
@@ -28,6 +28,9 @@ 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 b27ef57..7953ba8 100644
--- a/chrome/browser/gtk/tab_contents_drag_source.cc
+++ b/chrome/browser/gtk/tab_contents_drag_source.cc
@@ -112,7 +112,9 @@ void TabContentsDragSource::DidProcessEvent(GdkEvent* event) {
if (tab_contents()->render_view_host()) {
tab_contents()->render_view_host()->DragSourceMovedTo(
- client.x(), client.y(), event_motion->x_root, event_motion->y_root);
+ client.x(), client.y(),
+ static_cast<int>(event_motion->x_root),
+ static_cast<int>(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 2ddb607..5809cd1 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -263,8 +263,9 @@ 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 = kScalingFactor * gdk_pixbuf_get_height(pixbuf) -
- kDragFrameBorderSize;
+ int tab_height = static_cast<int>(kScalingFactor *
+ gdk_pixbuf_get_height(pixbuf) -
+ kDragFrameBorderSize);
cairo_rectangle(cairo_context,
0, tab_height,
size.width(), size.height() - tab_height);
@@ -295,8 +296,10 @@ gboolean DraggedTabGtk::OnExposeEvent(GtkWidget* widget,
}
// Only used when not attached.
- int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf);
- int tab_width = kScalingFactor * gdk_pixbuf_get_width(pixbuf);
+ int tab_height = static_cast<int>(kScalingFactor *
+ gdk_pixbuf_get_height(pixbuf));
+ int tab_width = static_cast<int>(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 dd8547b..2667b42 100644
--- a/chrome/browser/gtk/tabs/tab_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_gtk.h
@@ -73,6 +73,9 @@ 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 6a60e2b..867d9245 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -236,7 +236,9 @@ TabRendererGtk::TabRendererGtk(ThemeProvider* theme_provider)
fav_icon_hiding_offset_(0),
should_display_crashed_favicon_(false),
loading_animation_(theme_provider),
- close_button_color_(NULL) {
+ // Zero is not a valid SkColor. It'll be replaced by the
+ // theme tab_text_color.
+ close_button_color_(0u) {
InitResources();
data_.pinned = false;
@@ -590,7 +592,7 @@ void TabRendererGtk::Layout() {
if (theme_provider_) {
SkColor tab_text_color =
theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT);
- if (!close_button_color_ || tab_text_color != close_button_color_) {
+ if (close_button_color_ == 0u || 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 1ec65e8..6c6f328 100644
--- a/chrome/browser/gtk/view_id_util.h
+++ b/chrome/browser/gtk/view_id_util.h
@@ -15,6 +15,8 @@ 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 dc37044..4c64acb 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +36,9 @@ 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.
@@ -277,4 +280,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 36b5193..846da67 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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);
- ~HistoryBackend();
+ virtual ~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 c967374..9a7f36d 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +73,7 @@ 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_; }
@@ -520,4 +521,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 b56bcd9..38124aa2 100644
--- a/chrome/browser/history/starred_url_database.cc
+++ b/chrome/browser/history/starred_url_database.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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(NULL, GURL());
+ BookmarkNode bookmark_bar_node(0, GURL());
bookmark_bar_node.Reset(entry);
entry.type = history::StarredEntry::OTHER;
- BookmarkNode other_node(NULL, GURL());
+ BookmarkNode other_node(0, 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(NULL, i->url);
+ node = new BookmarkNode(0, 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(NULL, GURL());
+ parent = new BookmarkNode(0, GURL());
id_to_node_map[parent_id] = parent;
}
diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h
index af4a10a..30788ad 100644
--- a/chrome/browser/icon_loader.h
+++ b/chrome/browser/icon_loader.h
@@ -43,6 +43,8 @@ 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 28a9365..624a4e9 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() { }
- ~FirefoxURLParameterFilter() { }
+ FirefoxURLParameterFilter() {}
+ virtual ~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 56bdfb9..0a93bcea 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,7 +42,8 @@ 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 c8e9293..f9d178f 100644
--- a/chrome/browser/location_bar.h
+++ b/chrome/browser/location_bar.h
@@ -64,12 +64,17 @@ 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 cbd2fef..6d764be 100644
--- a/chrome/browser/login_model.h
+++ b/chrome/browser/login_model.h
@@ -15,6 +15,8 @@ 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 {
@@ -23,6 +25,8 @@ 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 6279c7a..3ba1aad 100644
--- a/chrome/browser/login_prompt.h
+++ b/chrome/browser/login_prompt.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +64,9 @@ 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 dda0e15..a8f4316 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(NULL, gtk_util::kContentAreaBorder));
+ root_.Own(gtk_vbox_new(false, 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 9e79623..492ddf8 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_EQ(NULL, delegate.pending_result());
+ EXPECT_TRUE(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 6b1c87c..28ec2c5 100644
--- a/chrome/browser/net/url_fetcher.h
+++ b/chrome/browser/net/url_fetcher.h
@@ -75,6 +75,8 @@ 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
@@ -85,6 +87,8 @@ 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 526372e..994549e 100644
--- a/chrome/browser/page_info_model.h
+++ b/chrome/browser/page_info_model.h
@@ -23,6 +23,8 @@ 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 97a4e85..9a8d80d 100644
--- a/chrome/browser/parsers/metadata_parser.h
+++ b/chrome/browser/parsers/metadata_parser.h
@@ -13,6 +13,7 @@
class MetadataPropertyIterator {
public:
MetadataPropertyIterator() {}
+ virtual ~MetadataPropertyIterator() {}
// Gets the next Property in the iterator. Returns false if at the end
// of the list.
@@ -29,6 +30,7 @@ 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 c42e01d..9c291c4 100644
--- a/chrome/browser/parsers/metadata_parser_factory.h
+++ b/chrome/browser/parsers/metadata_parser_factory.h
@@ -12,6 +12,7 @@
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 e49cbcb..e79d969 100644
--- a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
+++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
@@ -11,6 +11,8 @@
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 48c059b..68399fe 100644
--- a/chrome/browser/parsers/metadata_parser_jpeg_factory.h
+++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.h
@@ -15,6 +15,9 @@ 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 4a688fe..45403a9 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, NULL> consumer_;
+ CancelableRequestConsumerT<size_t, 0> 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 2727879..916ff9db 100644
--- a/chrome/browser/renderer_host/render_view_host_delegate.h
+++ b/chrome/browser/renderer_host/render_view_host_delegate.h
@@ -136,6 +136,9 @@ class RenderViewHostDelegate {
// The content's intrinsic width (prefWidth) changed.
virtual void UpdatePreferredWidth(int pref_width) = 0;
+
+ protected:
+ ~View() {}
};
// RendererManagerment -------------------------------------------------------
@@ -161,6 +164,9 @@ class RenderViewHostDelegate {
// Called the ResourceDispatcherHost's associate CrossSiteRequestHandler
// when a cross-site navigation has been canceled.
virtual void OnCrossSiteNavigationCanceled() = 0;
+
+ protected:
+ ~RendererManagement() {}
};
// BrowserIntegration --------------------------------------------------------
@@ -207,6 +213,9 @@ class RenderViewHostDelegate {
virtual void OnDidGetApplicationInfo(
int32 page_id,
const webkit_glue::WebApplicationInfo& app_info) = 0;
+
+ protected:
+ ~BrowserIntegration() {}
};
// Resource ------------------------------------------------------------------
@@ -263,6 +272,9 @@ class RenderViewHostDelegate {
// Notification that a document has been loaded in a frame.
virtual void DocumentLoadedInFrame() = 0;
+
+ protected:
+ ~Resource() {}
};
// Save ----------------------------------------------------------------------
@@ -288,6 +300,9 @@ class RenderViewHostDelegate {
virtual void OnReceivedSerializedHtmlData(const GURL& frame_url,
const std::string& data,
int32 status) = 0;
+
+ protected:
+ ~Save() {}
};
// Printing ------------------------------------------------------------------
@@ -303,6 +318,9 @@ class RenderViewHostDelegate {
// EMF memory mapped data.
virtual void DidPrintPage(
const ViewHostMsg_DidPrintPage_Params& params) = 0;
+
+ protected:
+ ~Printing() {}
};
// FavIcon -------------------------------------------------------------------
@@ -326,6 +344,9 @@ class RenderViewHostDelegate {
virtual void UpdateFavIconURL(RenderViewHost* render_view_host,
int32 page_id,
const GURL& icon_url) = 0;
+
+ protected:
+ ~FavIcon() {}
};
// AutoFill ------------------------------------------------------------------
@@ -352,6 +373,9 @@ class RenderViewHostDelegate {
// autofill suggestion from the database.
virtual void RemoveAutofillEntry(const std::wstring& field_name,
const std::wstring& value) = 0;
+
+ protected:
+ ~Autofill() {}
};
// ---------------------------------------------------------------------------
@@ -397,7 +421,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,
@@ -542,6 +566,9 @@ 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 40fba47..2397c79 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 NULL;
+ return 0;
}
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 d24b61a..652ec47 100644
--- a/chrome/browser/renderer_host/render_widget_host_painting_observer.h
+++ b/chrome/browser/renderer_host/render_widget_host_painting_observer.h
@@ -19,6 +19,9 @@ 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 c8183bb..8df6c4c 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) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,
- NULL,
+ 0,
0,
false,
task);
diff --git a/chrome/browser/safe_browsing/database_perftest.cc b/chrome/browser/safe_browsing/database_perftest.cc
index bbf4839..b25f419 100644
--- a/chrome/browser/safe_browsing/database_perftest.cc
+++ b/chrome/browser/safe_browsing/database_perftest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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) {
}
- ~Database() {
+ virtual ~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 280ffbb..c3c6ec7 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) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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 6333dbf..40bba57 100644
--- a/chrome/browser/search_engines/edit_search_engine_controller.h
+++ b/chrome/browser/search_engines/edit_search_engine_controller.h
@@ -23,6 +23,8 @@ 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 c0e169b..f584580 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) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +48,8 @@ class TemplateURLModelObserver {
public:
// Notification that the template url model has changed in some way.
virtual void OnTemplateURLModelChanged() = 0;
+ protected:
+ ~TemplateURLModelObserver() {}
};
class TemplateURLModel : public WebDataServiceConsumer,
@@ -351,4 +353,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 65a4881..dfb139c 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) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +21,8 @@ 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
@@ -44,4 +46,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 a3e611c..5e980e4 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +41,9 @@ 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 f9a3baa..5098fb4 100644
--- a/chrome/browser/shell_dialogs.h
+++ b/chrome/browser/shell_dialogs.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +27,9 @@ 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.
@@ -64,6 +67,9 @@ 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
@@ -140,6 +146,8 @@ 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 b8bcc7f..b6a990b 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] = NULL;
+ misspelled_word[i] = 0;
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 b83e16a..3156bfc 100644
--- a/chrome/browser/ssl/ssl_blocking_page.h
+++ b/chrome/browser/ssl/ssl_blocking_page.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +31,9 @@ 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 48a5f0d..ebabd3b 100644
--- a/chrome/browser/ssl/ssl_policy.h
+++ b/chrome/browser/ssl/ssl_policy.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +26,7 @@ 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 a1b8c2a..8719e65 100644
--- a/chrome/browser/tab_contents/constrained_window.h
+++ b/chrome/browser/tab_contents/constrained_window.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +42,8 @@ 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 7d203e3..328971a 100644
--- a/chrome/browser/tab_contents/page_navigator.h
+++ b/chrome/browser/tab_contents/page_navigator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +21,8 @@ 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 4f9e600..641ca5e 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -28,6 +28,7 @@ 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 8c8dde2..874febd 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.h
+++ b/chrome/browser/tab_contents/render_view_host_manager.h
@@ -59,6 +59,9 @@ 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 47426c4..fac89e0 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) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +70,8 @@ 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 4f1d44b..e776d6c 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,18 +92,21 @@ 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() { }
+ virtual void TabStripEmpty() {}
+
+ protected:
+ ~TabStripModelObserver() {}
};
///////////////////////////////////////////////////////////////////////////////
@@ -199,6 +202,9 @@ 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 f15911b..2c008c3 100644
--- a/chrome/browser/webdata/web_data_service.h
+++ b/chrome/browser/webdata/web_data_service.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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,6 +539,9 @@ 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_