summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 19:22:23 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 19:22:23 +0000
commit6a3294658a85b4d0d1894d4f08af68a4cdf31bb0 (patch)
tree4b921333653c51253153a70fd9af2d29c04a21e3 /chrome/browser
parenta263d56dd156e94f3453604d231e06a9bb1f537d (diff)
downloadchromium_src-6a3294658a85b4d0d1894d4f08af68a4cdf31bb0.zip
chromium_src-6a3294658a85b4d0d1894d4f08af68a4cdf31bb0.tar.gz
chromium_src-6a3294658a85b4d0d1894d4f08af68a4cdf31bb0.tar.bz2
Fix NULL vs 0 problems which break the build with -Werror using GCC 4.5
BUG=none TEST=try to compile with gcc 4.5 Patch by Benjamin Jemlich <pcgod99@gmail.com>. Review URL: http://codereview.chromium.org/2007003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/cancelable_request.h4
-rw-r--r--chrome/browser/gears_integration.cc4
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc2
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc4
-rw-r--r--chrome/browser/gtk/gtk_expanded_container.cc2
-rw-r--r--chrome/browser/gtk/gtk_floating_container.cc2
-rw-r--r--chrome/browser/gtk/repost_form_warning_gtk.cc2
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc4
-rw-r--r--chrome/browser/history/starred_url_database.cc8
-rw-r--r--chrome/browser/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/renderer_host/gtk_key_bindings_handler.cc3
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc2
13 files changed, 20 insertions, 21 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 24cff0f..76b9b9b 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1107,7 +1107,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/cancelable_request.h b/chrome/browser/cancelable_request.h
index 28bc8ed..32a2120 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -192,7 +192,7 @@ class CancelableRequestConsumerBase {
};
// Template for clients to use. It allows them to associate random "client
-// data" with a specific request. The default value for this type is NULL.
+// data" with a specific request. The default value for this type is 0.
// The type T should be small and easily copyable (like a pointer
// or an integer).
template<class T>
@@ -280,7 +280,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,
diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc
index 79d2abc..e29f224 100644
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -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, 0);
}
// This class holds and manages the data passed to the
@@ -308,5 +308,5 @@ struct RunnableMethodTraits<QueryShortcutsCommand> {
void GearsQueryShortcuts(GearsQueryShortcutsCallback* callback) {
CPHandleCommand(GEARSPLUGINCOMMAND_GET_SHORTCUT_LIST,
new QueryShortcutsCommand(callback),
- NULL);
+ 0);
}
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index eed763f..89a48ae 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -679,7 +679,7 @@ void BookmarkBarGtk::UpdateFloatingState() {
if (floating_ && widget()->parent) {
// Only connect once.
if (g_signal_handler_find(widget()->parent, G_SIGNAL_MATCH_FUNC,
- 0, NULL, NULL, reinterpret_cast<gpointer>(OnParentSizeAllocateThunk),
+ 0, 0, NULL, reinterpret_cast<gpointer>(OnParentSizeAllocateThunk),
NULL) == 0) {
g_signal_connect(widget()->parent, "size-allocate",
G_CALLBACK(OnParentSizeAllocateThunk), this);
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index b8785da..65d6e83 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -120,7 +120,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();
}
@@ -136,7 +136,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;
diff --git a/chrome/browser/gtk/gtk_expanded_container.cc b/chrome/browser/gtk/gtk_expanded_container.cc
index dbcb15e..4e5daad 100644
--- a/chrome/browser/gtk/gtk_expanded_container.cc
+++ b/chrome/browser/gtk/gtk_expanded_container.cc
@@ -127,7 +127,7 @@ static void gtk_expanded_container_class_init(
g_signal_new("child-size-request",
G_OBJECT_CLASS_TYPE(object_class),
static_cast<GSignalFlags>(G_SIGNAL_RUN_FIRST),
- NULL,
+ 0,
NULL, NULL,
Marshal_VOID__OBJECT_BOXED,
G_TYPE_NONE, 2,
diff --git a/chrome/browser/gtk/gtk_floating_container.cc b/chrome/browser/gtk/gtk_floating_container.cc
index b9d0e46..a8021e6 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,
+ 0,
NULL, NULL,
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
diff --git a/chrome/browser/gtk/repost_form_warning_gtk.cc b/chrome/browser/gtk/repost_form_warning_gtk.cc
index 44d70d0..f5524c54 100644
--- a/chrome/browser/gtk/repost_form_warning_gtk.cc
+++ b/chrome/browser/gtk/repost_form_warning_gtk.cc
@@ -17,7 +17,7 @@
RepostFormWarningGtk::RepostFormWarningGtk(GtkWindow* parent,
TabContents* tab_contents)
: controller_(new RepostFormWarningController(tab_contents)) {
- dialog_ = gtk_vbox_new(NULL, gtk_util::kContentAreaBorder);
+ dialog_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaBorder);
gtk_box_set_spacing(GTK_BOX(dialog_), gtk_util::kContentAreaSpacing);
GtkWidget* label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str());
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index c8a0e6b..aeca6ae 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -177,7 +177,7 @@ bool TabRendererGtk::LoadingAnimation::ValidateLoadingAnimation(
}
if (animation_state_ != ANIMATION_NONE) {
- animation_frame_ = ++animation_frame_ %
+ animation_frame_ = (animation_frame_ + 1) %
((animation_state_ == ANIMATION_WAITING) ?
data_->waiting_animation_frame_count :
data_->loading_animation_frame_count);
@@ -246,7 +246,7 @@ TabRendererGtk::TabRendererGtk(ThemeProvider* theme_provider)
loading_animation_(theme_provider),
background_offset_x_(0),
background_offset_y_(kInactiveTabBackgroundOffsetY),
- close_button_color_(NULL) {
+ close_button_color_(0) {
InitResources();
tab_.Own(gtk_fixed_new());
diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc
index 55aa0dd..48da8c4 100644
--- a/chrome/browser/history/starred_url_database.cc
+++ b/chrome/browser/history/starred_url_database.cc
@@ -542,10 +542,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;
@@ -594,7 +594,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);
@@ -605,7 +605,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/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc
index 24d6084..c3e89d0 100644
--- a/chrome/browser/login_prompt_gtk.cc
+++ b/chrome/browser/login_prompt_gtk.cc
@@ -62,7 +62,7 @@ class LoginHandlerGtk : public LoginHandler,
std::wstring explanation) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
- 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/renderer_host/gtk_key_bindings_handler.cc b/chrome/browser/renderer_host/gtk_key_bindings_handler.cc
index c3c9ad4..8f3d765 100644
--- a/chrome/browser/renderer_host/gtk_key_bindings_handler.cc
+++ b/chrome/browser/renderer_host/gtk_key_bindings_handler.cc
@@ -13,8 +13,7 @@
#include "chrome/common/native_web_keyboard_event.h"
GtkKeyBindingsHandler::GtkKeyBindingsHandler(GtkWidget* parent_widget)
- : handler_(CreateNewHandler()),
- edit_commands_(NULL) {
+ : handler_(CreateNewHandler()) {
DCHECK(GTK_IS_FIXED(parent_widget));
// We need add the |handler_| object into gtk widget hierarchy, so that
// gtk_bindings_activate_event() can find correct display and keymaps from
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 59b2231..6c77f07 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() {