diff options
26 files changed, 37 insertions, 37 deletions
@@ -74,3 +74,4 @@ Matthew Willis <appamatto@gmail.com> Novell Inc. Ryan Sleevi <ryan.sleevi@gmail.com> Satoshi Matsuzaki <satoshi.matsuzaki@gmail.com> +Benjamin Jemlich <pcgod99@gmail.com> diff --git a/app/gfx/gl/gl_context_linux.cc b/app/gfx/gl/gl_context_linux.cc index a9995d65..d3f8810 100644 --- a/app/gfx/gl/gl_context_linux.cc +++ b/app/gfx/gl/gl_context_linux.cc @@ -58,7 +58,7 @@ class PbufferGLContext : public GLContext { public: explicit PbufferGLContext() : context_(NULL), - pbuffer_(NULL) { + pbuffer_(0) { } // Initializes the GL context. @@ -338,7 +338,7 @@ void PbufferGLContext::Destroy() { if (pbuffer_) { glXDestroyPbuffer(display, pbuffer_); - pbuffer_ = NULL; + pbuffer_ = 0; } } 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() { diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc index c74de77..116fb4d 100644 --- a/chrome/plugin/command_buffer_stub.cc +++ b/chrome/plugin/command_buffer_stub.cc @@ -19,7 +19,7 @@ CommandBufferStub::CommandBufferStub(PluginChannel* channel, plugin_host_route_id_(plugin_host_route_id), window_(window) { route_id_ = channel->GenerateRouteID(); - channel->AddRoute(route_id_, this, false); + channel->AddRoute(route_id_, this, NULL); } CommandBufferStub::~CommandBufferStub() { diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc index b169b9e..3e5b3af 100644 --- a/chrome/plugin/plugin_channel.cc +++ b/chrome/plugin/plugin_channel.cc @@ -220,7 +220,7 @@ void PluginChannel::OnCreateInstance(const std::string& mime_type, *instance_id = GenerateRouteID(); scoped_refptr<WebPluginDelegateStub> stub = new WebPluginDelegateStub( mime_type, *instance_id, this); - AddRoute(*instance_id, stub, false); + AddRoute(*instance_id, stub, NULL); plugin_stubs_.push_back(stub); } diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index c0de5d2..9b1ec53 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -158,7 +158,7 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params, command_line.GetSwitchValue(switches::kPluginPath)); - gfx::PluginWindowHandle parent = NULL; + gfx::PluginWindowHandle parent = 0; #if defined(OS_WIN) parent = gfx::NativeViewFromId(params.containing_window); #elif defined(OS_LINUX) diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc index 1d2c14a..da52114 100644 --- a/chrome/renderer/ggl/ggl.cc +++ b/chrome/renderer/ggl/ggl.cc @@ -267,7 +267,7 @@ Context* CreateOffscreenContext(GpuChannelHost* channel, const gfx::Size& size) { #if defined(ENABLE_GPU) scoped_ptr<Context> context(new Context(channel, parent)); - if (!context->Initialize(NULL, size)) + if (!context->Initialize(0, size)) return NULL; return context.release(); diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index 5359f13..e8f4214 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -145,7 +145,7 @@ void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { // We should not get more enables than disables, but we want it to be a // non-fatal error if it does happen. DCHECK_GT(sudden_termination_disables_, 0); - sudden_termination_disables_ = std::max(--sudden_termination_disables_, 0); + sudden_termination_disables_ = std::max(sudden_termination_disables_ - 1, 0); if (sudden_termination_disables_ != 0) return; } else { diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc index 7bc2322..75f6cfd 100644 --- a/chrome/renderer/spellchecker/spellcheck.cc +++ b/chrome/renderer/spellchecker/spellcheck.cc @@ -113,7 +113,7 @@ string16 SpellCheck::GetAutoCorrectionWord(const string16& word, int tag) { const char16* word_char = word.c_str(); for (int i = 0; i <= SpellCheckCommon::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/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index 44b76fe..64d1828 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -445,10 +445,10 @@ NPError WebPluginDelegatePepper::Device2DInitializeContext( return NPERR_GENERIC_ERROR; } - // This is a windowless plugin, so set it to have a NULL handle. Defer this + // This is a windowless plugin, so set it to have no handle. Defer this // until we know the plugin will use the 2D device. If it uses the 3D device // it will have a window handle. - plugin_->SetWindow(NULL); + plugin_->SetWindow(0); scoped_ptr<Graphics2DDeviceContext> g2d(new Graphics2DDeviceContext(this)); NPError status = g2d->Initialize(window_rect_, config, context); diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 2a54c6d..fe5291e 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -312,7 +312,7 @@ bool WebPluginDelegateProxy::Initialize(const GURL& url, channel_host_ = channel_host; instance_id_ = instance_id; - channel_host_->AddRoute(instance_id_, this, false); + channel_host_->AddRoute(instance_id_, this, NULL); // Now tell the PluginInstance in the plugin process to initialize. PluginMsg_Init_Params params; diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc index dc1f856..8ab5bb7d 100644 --- a/net/spdy/spdy_framer.cc +++ b/net/spdy/spdy_framer.cc @@ -368,7 +368,7 @@ size_t SpdyFramer::ProcessDataFramePayload(const char* data, size_t len) { if (current_data_frame.flags() & DATA_FLAG_COMPRESSED) { // TODO(mbelshe): Assert that the decompressor is init'ed. if (!InitializeDecompressor()) - return NULL; + return 0; size_t decompressed_max_size = amount_to_forward * 100; scoped_array<char> decompressed(new char[decompressed_max_size]); diff --git a/webkit/glue/plugins/plugin_instance.cc b/webkit/glue/plugins/plugin_instance.cc index 3cfae8b..8506623 100644 --- a/webkit/glue/plugins/plugin_instance.cc +++ b/webkit/glue/plugins/plugin_instance.cc @@ -263,7 +263,7 @@ int PluginInstance::NPP_WriteReady(NPStream *stream) { if (npp_functions_->writeready != 0) { return npp_functions_->writeready(npp_, stream); } - return NULL; + return 0; } int PluginInstance::NPP_Write(NPStream *stream, @@ -275,7 +275,7 @@ int PluginInstance::NPP_Write(NPStream *stream, if (npp_functions_->write != 0) { return npp_functions_->write(npp_, stream, offset, len, buffer); } - return NULL; + return 0; } void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/glue/plugins/webplugin_impl.cc index 9ee98ed..8a0e75e 100644 --- a/webkit/glue/plugins/webplugin_impl.cc +++ b/webkit/glue/plugins/webplugin_impl.cc @@ -412,7 +412,7 @@ WebPluginImpl::WebPluginImpl( WebFrame* webframe, const WebPluginParams& params, const base::WeakPtr<WebPluginPageDelegate>& page_delegate) : windowless_(false), - window_(NULL), + window_(0), accepts_input_events_(false), page_delegate_(page_delegate), webframe_(webframe), @@ -473,7 +473,7 @@ void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { DCHECK_EQ(window, window_); - window_ = NULL; + window_ = 0; if (page_delegate_) page_delegate_->WillDestroyPluginWindow(window); } |