diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 13:43:42 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 13:43:42 +0000 |
commit | 659f73fa7b0a91ceef30e89fff34629f39853761 (patch) | |
tree | 54856047a10c8ba93f82c725cb0e3ee5283e707d /chrome | |
parent | b2be7a6889ea1af900760b6e69e22152f652e950 (diff) | |
download | chromium_src-659f73fa7b0a91ceef30e89fff34629f39853761.zip chromium_src-659f73fa7b0a91ceef30e89fff34629f39853761.tar.gz chromium_src-659f73fa7b0a91ceef30e89fff34629f39853761.tar.bz2 |
Turn NULL used as int to 0.
(Excluding chrome/browser/...)
Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067
BUG=none
TEST=base_unittests & app_unittests
Review URL: http://codereview.chromium.org/267076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/child_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/render_widget.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 12 | ||||
-rw-r--r-- | chrome/test/render_view_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 830d7e0..4b7a999 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -205,7 +205,7 @@ void ChildProcessHost::OnChildDied() { // On POSIX, once we've called DidProcessCrash, handle() is no longer // valid. Ensure the destructor doesn't try to use it. - set_handle(NULL); + set_handle(base::kNullProcessHandle); delete this; } diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 9dc6e92..9600b8d 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1316,7 +1316,7 @@ WebView* RenderView::createView(WebFrame* creator) { return NULL; RenderView* view = RenderView::Create(render_thread_, - NULL, + 0, routing_id_, renderer_preferences_, webkit_preferences_, diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 0d7fadf..0c5e970 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -46,7 +46,7 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) webwidget_(NULL), opener_id_(MSG_ROUTING_NONE), render_thread_(render_thread), - host_window_(NULL), + host_window_(0), current_paint_buf_(NULL), current_scroll_buf_(NULL), next_paint_flags_(0), diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index d67a68e..b15de39 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -60,7 +60,7 @@ class ResourceClientProxy : public webkit_glue::WebPluginResourceClient { public: ResourceClientProxy(PluginChannelHost* channel, int instance_id) : channel_(channel), instance_id_(instance_id), resource_id_(0), - notify_needed_(false), notify_data_(NULL), + notify_needed_(false), notify_data_(0), multibyte_response_expected_(false) { } @@ -161,7 +161,7 @@ WebPluginDelegateProxy::WebPluginDelegateProxy( : render_view_(render_view), plugin_(NULL), windowless_(false), - window_(NULL), + window_(gfx::kNullPluginWindow), mime_type_(mime_type), instance_id_(MSG_ROUTING_NONE), npobject_(NULL), @@ -656,8 +656,8 @@ bool WebPluginDelegateProxy::BackgroundChanged( #else const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface); int page_stride = cairo_image_surface_get_stride(page_surface); - int page_start_x = page_x_double; - int page_start_y = page_y_double; + int page_start_x = static_cast<int>(page_x_double); + int page_start_y = static_cast<int>(page_y_double); skia::PlatformDevice& device = background_store_canvas_->getTopPlatformDevice(); @@ -786,7 +786,7 @@ void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) { void WebPluginDelegateProxy::WillDestroyWindow() { DCHECK(window_); plugin_->WillDestroyWindow(window_); - window_ = NULL; + window_ = gfx::kNullPluginWindow; } #if defined(OS_WIN) @@ -936,7 +936,7 @@ void WebPluginDelegateProxy::OnGetDragData(const NPVariant_Param& object, for (size_t i = 0; i < arraysize(results); ++i) { values->push_back(NPVariant_Param()); CreateNPVariantParam( - results[i], NULL, &values->back(), false, NULL, page_url_); + results[i], NULL, &values->back(), false, 0, page_url_); } *success = true; diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index 2f8943d..54fde06 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -96,7 +96,7 @@ void RenderViewTest::SetUp() { render_thread_.set_routing_id(kRouteId); // This needs to pass the mock render thread to the view. - view_ = RenderView::Create(&render_thread_, NULL, kOpenerId, + view_ = RenderView::Create(&render_thread_, 0, kOpenerId, RendererPreferences(), WebPreferences(), new SharedRenderViewCounter(0), kRouteId); diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index c4a37e2..d0959ca 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -420,7 +420,7 @@ void UITest::QuitBrowser() { // Don't forget to close the handle base::CloseProcessHandle(process_); - process_ = NULL; + process_ = base::kNullProcessHandle; } void UITest::AssertAppNotRunning(const std::wstring& error_message) { |