summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/mac/scoped_ioobject.h8
-rw-r--r--base/process_util_mac.mm4
-rw-r--r--chrome/browser/mac/install_from_dmg.mm8
-rw-r--r--chrome/common/mac/mock_launchd.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm2
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc2
-rw-r--r--content/renderer/render_view_impl.cc2
-rw-r--r--content/renderer/webplugin_delegate_proxy.cc4
-rw-r--r--crypto/cssm_init.cc6
-rw-r--r--crypto/rsa_private_key_mac.cc9
-rw-r--r--net/base/x509_util_mac.cc10
-rw-r--r--ui/gfx/compositor/layer_unittest.cc3
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm6
-rw-r--r--webkit/tools/test_shell/mac/test_webview_delegate.mm2
14 files changed, 35 insertions, 33 deletions
diff --git a/base/mac/scoped_ioobject.h b/base/mac/scoped_ioobject.h
index d5cb90c..9c4ebe2 100644
--- a/base/mac/scoped_ioobject.h
+++ b/base/mac/scoped_ioobject.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -20,7 +20,7 @@ class ScopedIOObject {
public:
typedef IOT element_type;
- explicit ScopedIOObject(IOT object = NULL)
+ explicit ScopedIOObject(IOT object = IO_OBJECT_NULL)
: object_(object) {
}
@@ -29,7 +29,7 @@ class ScopedIOObject {
IOObjectRelease(object_);
}
- void reset(IOT object = NULL) {
+ void reset(IOT object = IO_OBJECT_NULL) {
if (object_)
IOObjectRelease(object_);
object_ = object;
@@ -59,7 +59,7 @@ class ScopedIOObject {
IOT release() WARN_UNUSED_RESULT {
IOT temp = object_;
- object_ = NULL;
+ object_ = IO_OBJECT_NULL;
return temp;
}
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index ae8e6f1..3ab2fb6 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -834,8 +834,8 @@ void EnableTerminationOnOutOfMemory() {
ChromeMallocZone* purgeable_zone =
reinterpret_cast<ChromeMallocZone*>(GetPurgeableZone());
- vm_address_t page_start_default = NULL;
- vm_address_t page_start_purgeable = NULL;
+ vm_address_t page_start_default = 0;
+ vm_address_t page_start_purgeable = 0;
vm_size_t len_default = 0;
vm_size_t len_purgeable = 0;
if (zone_allocators_protected) {
diff --git a/chrome/browser/mac/install_from_dmg.mm b/chrome/browser/mac/install_from_dmg.mm
index ab1241e..3b454c7 100644
--- a/chrome/browser/mac/install_from_dmg.mm
+++ b/chrome/browser/mac/install_from_dmg.mm
@@ -82,10 +82,10 @@ io_service_t CopyHDIXDriveServiceForMedia(io_service_t media) {
&iterator_ref);
if (kr != KERN_SUCCESS) {
LOG(ERROR) << "IORegistryEntryCreateIterator: " << kr;
- return NULL;
+ return IO_OBJECT_NULL;
}
base::mac::ScopedIOObject<io_iterator_t> iterator(iterator_ref);
- iterator_ref = NULL;
+ iterator_ref = IO_OBJECT_NULL;
// Look at each of the ancestor services, beginning with the parent,
// iterating all the way up to the device tree's root. If any ancestor
@@ -102,7 +102,7 @@ io_service_t CopyHDIXDriveServiceForMedia(io_service_t media) {
}
// The media does not reside on a disk image.
- return NULL;
+ return IO_OBJECT_NULL;
}
// Given an io_service_t (expected to be of class IOMedia), determines whether
@@ -213,7 +213,7 @@ bool IsPathOnReadOnlyDiskImage(const char path[],
return false;
}
base::mac::ScopedIOObject<io_iterator_t> iterator(iterator_ref);
- iterator_ref = NULL;
+ iterator_ref = IO_OBJECT_NULL;
// There needs to be exactly one matching service.
base::mac::ScopedIOObject<io_service_t> media(IOIteratorNext(iterator));
diff --git a/chrome/common/mac/mock_launchd.cc b/chrome/common/mac/mock_launchd.cc
index 2f130b59..473e76a 100644
--- a/chrome/common/mac/mock_launchd.cc
+++ b/chrome/common/mac/mock_launchd.cc
@@ -214,7 +214,7 @@ CFDictionaryRef MockLaunchd::CopyDictionaryByCheckingIn(CFErrorRef* error) {
signature.address = address;
CFSocketRef socket =
- CFSocketCreateWithSocketSignature(NULL, &signature, NULL, NULL, NULL);
+ CFSocketCreateWithSocketSignature(NULL, &signature, 0, NULL, NULL);
local_pipe = CFSocketGetNative(socket);
EXPECT_NE(-1, local_pipe);
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 7dfbade..c1434b3 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2094,7 +2094,7 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
NSEvent* fakeRightClick = [NSEvent
mouseEventWithType:NSRightMouseDown
location:location
- modifierFlags:nil
+ modifierFlags:0
timestamp:0
windowNumber:[[self window] windowNumber]
context:[NSGraphicsContext currentContext]
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index fc6da12..d9d059c 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -136,7 +136,7 @@ gfx::PluginWindowHandle
TestRenderWidgetHostView::AllocateFakePluginWindowHandle(
bool opaque,
bool root) {
- return NULL;
+ return gfx::kNullPluginWindow;
}
void TestRenderWidgetHostView::DestroyFakePluginWindowHandle(
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index e07eb6c..e378b3d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -4936,7 +4936,7 @@ void RenderViewImpl::StartPluginIme() {
gfx::PluginWindowHandle RenderViewImpl::AllocateFakePluginWindowHandle(
bool opaque, bool root) {
- gfx::PluginWindowHandle window = NULL;
+ gfx::PluginWindowHandle window = gfx::kNullPluginWindow;
Send(new ViewHostMsg_AllocateFakePluginWindowHandle(
routing_id(), opaque, root, &window));
if (window) {
diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc
index 1dd9bfb..1945670 100644
--- a/content/renderer/webplugin_delegate_proxy.cc
+++ b/content/renderer/webplugin_delegate_proxy.cc
@@ -1317,7 +1317,7 @@ void WebPluginDelegateProxy::OnBindFakePluginWindowHandle(bool opaque) {
// the plug-in. Returns true if it successfully sets the window handle on the
// plug-in.
bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) {
- gfx::PluginWindowHandle fake_window = NULL;
+ gfx::PluginWindowHandle fake_window = gfx::kNullPluginWindow;
if (render_view_)
fake_window = render_view_->AllocateFakePluginWindowHandle(opaque, false);
// If we aren't running on 10.6, this allocation will fail.
@@ -1415,7 +1415,7 @@ void WebPluginDelegateProxy::OnAcceleratedSurfaceBuffersSwapped(
void WebPluginDelegateProxy::OnAcceleratedPluginEnabledRendering() {
uses_compositor_ = true;
- OnSetWindow(NULL);
+ OnSetWindow(gfx::kNullPluginWindow);
}
void WebPluginDelegateProxy::OnAcceleratedPluginAllocatedIOSurface(
diff --git a/crypto/cssm_init.cc b/crypto/cssm_init.cc
index 23c2660..cf5ac25 100644
--- a/crypto/cssm_init.cc
+++ b/crypto/cssm_init.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -50,8 +50,8 @@ class CSSMInitSingleton {
private:
CSSMInitSingleton()
: inited_(false), csp_loaded_(false), cl_loaded_(false),
- tp_loaded_(false), csp_handle_(NULL), cl_handle_(NULL),
- tp_handle_(NULL) {
+ tp_loaded_(false), csp_handle_(CSSM_INVALID_HANDLE),
+ cl_handle_(CSSM_INVALID_HANDLE), tp_handle_(CSSM_INVALID_HANDLE) {
static CSSM_VERSION version = {2, 0};
// TODO(wtc): what should our caller GUID be?
static const CSSM_GUID test_guid = {
diff --git a/crypto/rsa_private_key_mac.cc b/crypto/rsa_private_key_mac.cc
index 8dcf14a..fbe1491e 100644
--- a/crypto/rsa_private_key_mac.cc
+++ b/crypto/rsa_private_key_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -71,7 +71,8 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
CSSM_KEY_SIZE key_size;
CSSM_RETURN crtn;
- crtn = CSSM_QueryKeySizeInBits(GetSharedCSPHandle(), NULL, &key, &key_size);
+ crtn = CSSM_QueryKeySizeInBits(
+ GetSharedCSPHandle(), CSSM_INVALID_HANDLE, &key, &key_size);
if (crtn) {
NOTREACHED() << "CSSM_QueryKeySizeInBits failed: " << crtn;
return NULL;
@@ -133,8 +134,8 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
public_key->KeyHeader.KeyAttr = CSSM_KEYATTR_EXTRACTABLE;
public_key->KeyHeader.KeyUsage = CSSM_KEYUSE_ANY;
- crtn = CSSM_QueryKeySizeInBits(GetSharedCSPHandle(), NULL, public_key,
- &key_size);
+ crtn = CSSM_QueryKeySizeInBits(
+ GetSharedCSPHandle(), CSSM_INVALID_HANDLE, public_key, &key_size);
if (crtn) {
DLOG(ERROR) << "CSSM_QueryKeySizeInBits failed " << crtn;
return NULL;
diff --git a/net/base/x509_util_mac.cc b/net/base/x509_util_mac.cc
index 5145467..d06009e 100644
--- a/net/base/x509_util_mac.cc
+++ b/net/base/x509_util_mac.cc
@@ -133,7 +133,7 @@ OSStatus CreateRevocationPolicies(bool enable_revocation_checking,
}
CSSMFieldValue::CSSMFieldValue()
- : cl_handle_(NULL),
+ : cl_handle_(CSSM_INVALID_HANDLE),
oid_(NULL),
field_(NULL) {
}
@@ -146,7 +146,7 @@ CSSMFieldValue::CSSMFieldValue(CSSM_CL_HANDLE cl_handle,
}
CSSMFieldValue::~CSSMFieldValue() {
- Reset(NULL, NULL, NULL);
+ Reset(CSSM_INVALID_HANDLE, NULL, NULL);
}
void CSSMFieldValue::Reset(CSSM_CL_HANDLE cl_handle,
@@ -160,8 +160,8 @@ void CSSMFieldValue::Reset(CSSM_CL_HANDLE cl_handle,
}
CSSMCachedCertificate::CSSMCachedCertificate()
- : cl_handle_(NULL),
- cached_cert_handle_(NULL) {
+ : cl_handle_(CSSM_INVALID_HANDLE),
+ cached_cert_handle_(CSSM_INVALID_HANDLE) {
}
CSSMCachedCertificate::~CSSMCachedCertificate() {
if (cl_handle_ && cached_cert_handle_)
@@ -194,7 +194,7 @@ OSStatus CSSMCachedCertificate::GetField(const CSSM_OID* field_oid,
CSSM_OID_PTR oid = const_cast<CSSM_OID_PTR>(field_oid);
CSSM_DATA_PTR field_ptr = NULL;
- CSSM_HANDLE results_handle = NULL;
+ CSSM_HANDLE results_handle = CSSM_INVALID_HANDLE;
uint32 field_value_count = 0;
CSSM_RETURN status = CSSM_CL_CertGetFirstCachedFieldValue(
cl_handle_, cached_cert_handle_, oid, &results_handle,
diff --git a/ui/gfx/compositor/layer_unittest.cc b/ui/gfx/compositor/layer_unittest.cc
index 9c360e9..571df13 100644
--- a/ui/gfx/compositor/layer_unittest.cc
+++ b/ui/gfx/compositor/layer_unittest.cc
@@ -365,7 +365,8 @@ class LayerWithDelegateTest : public testing::Test, public CompositorDelegate {
// Overridden from testing::Test:
virtual void SetUp() OVERRIDE {
ui::SetupTestCompositor();
- compositor_.reset(new Compositor(this, NULL, gfx::Size(1000, 1000)));
+ compositor_.reset(new Compositor(
+ this, gfx::kNullAcceleratedWidget, gfx::Size(1000, 1000)));
}
virtual void TearDown() OVERRIDE {
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index 5127eaf..00eb86b 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -256,7 +256,7 @@ int ExternalDragTracker::WebEventButtonModifierMask() {
WebPluginDelegateImpl::WebPluginDelegateImpl(
gfx::PluginWindowHandle containing_view,
PluginInstance *instance)
- : windowed_handle_(NULL),
+ : windowed_handle_(gfx::kNullPluginWindow),
// all Mac plugins are "windowless" in the Windows/X11 sense
windowless_(true),
plugin_(NULL),
@@ -426,7 +426,7 @@ bool WebPluginDelegateImpl::PlatformInitialize() {
// calls SetWindow. Rendering breaks if SetWindow is called before
// accelerated rendering is enabled.
if (!layer_)
- plugin_->SetWindow(NULL);
+ plugin_->SetWindow(gfx::kNullPluginWindow);
#ifndef NP_NO_CARBON
// If the plugin wants Carbon events, hook up to the source of idle events.
diff --git a/webkit/tools/test_shell/mac/test_webview_delegate.mm b/webkit/tools/test_shell/mac/test_webview_delegate.mm
index 59a07ff..cd05eee 100644
--- a/webkit/tools/test_shell/mac/test_webview_delegate.mm
+++ b/webkit/tools/test_shell/mac/test_webview_delegate.mm
@@ -233,7 +233,7 @@ webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
if (!host)
return NULL;
- gfx::PluginWindowHandle containing_view = NULL;
+ gfx::PluginWindowHandle containing_view = gfx::kNullPluginWindow;
WebPluginDelegateImpl* delegate =
WebPluginDelegateImpl::Create(path, mime_type, containing_view);
if (delegate)