summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-23 00:03:45 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-23 00:03:45 +0000
commit1e11b171293a31d64523402fe8fdf3a8074bc695 (patch)
tree3a9a41754dd93a2002f8d1b48324a1dff0cdb25b /sandbox
parenta701e5ad76729b657a80d5f4c0c4395a00b94d23 (diff)
downloadchromium_src-1e11b171293a31d64523402fe8fdf3a8074bc695.zip
chromium_src-1e11b171293a31d64523402fe8fdf3a8074bc695.tar.gz
chromium_src-1e11b171293a31d64523402fe8fdf3a8074bc695.tar.bz2
Use scoped_array (not scoped_ptr) with new[].
BUG=24266 TEST=No functional change so make sure nothing changes. Review URL: http://codereview.chromium.org/307045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/src/interception.cc2
-rw-r--r--sandbox/src/interception_unittest.cc4
-rw-r--r--sandbox/src/service_resolver.cc2
-rw-r--r--sandbox/src/service_resolver_unittest.cc2
-rw-r--r--sandbox/src/window.cc2
-rw-r--r--sandbox/wow_helper/service64_resolver.cc2
6 files changed, 7 insertions, 7 deletions
diff --git a/sandbox/src/interception.cc b/sandbox/src/interception.cc
index f75fa3a..81657aa 100644
--- a/sandbox/src/interception.cc
+++ b/sandbox/src/interception.cc
@@ -89,7 +89,7 @@ bool InterceptionManager::InitializeInterceptions() {
return true; // Nothing to do here
size_t buffer_bytes = GetBufferSize();
- scoped_ptr<char> local_buffer(new char[buffer_bytes]);
+ scoped_array<char> local_buffer(new char[buffer_bytes]);
if (!SetupConfigBuffer(local_buffer.get(), buffer_bytes))
return false;
diff --git a/sandbox/src/interception_unittest.cc b/sandbox/src/interception_unittest.cc
index 92e72c1..1c6838e 100644
--- a/sandbox/src/interception_unittest.cc
+++ b/sandbox/src/interception_unittest.cc
@@ -127,7 +127,7 @@ TEST(InterceptionManagerTest, BufferLayout1) {
ASSERT_EQ(18, interceptions.interceptions_.size());
size_t buffer_size = interceptions.GetBufferSize();
- scoped_ptr<BYTE> local_buffer(new BYTE[buffer_size]);
+ scoped_array<BYTE> local_buffer(new BYTE[buffer_size]);
ASSERT_TRUE(interceptions.SetupConfigBuffer(local_buffer.get(),
buffer_size));
@@ -179,7 +179,7 @@ TEST(InterceptionManagerTest, BufferLayout2) {
ASSERT_EQ(5, interceptions.interceptions_.size());
size_t buffer_size = interceptions.GetBufferSize();
- scoped_ptr<BYTE> local_buffer(new BYTE[buffer_size]);
+ scoped_array<BYTE> local_buffer(new BYTE[buffer_size]);
ASSERT_TRUE(interceptions.SetupConfigBuffer(local_buffer.get(),
buffer_size));
diff --git a/sandbox/src/service_resolver.cc b/sandbox/src/service_resolver.cc
index 2fae55a..9cdd824 100644
--- a/sandbox/src/service_resolver.cc
+++ b/sandbox/src/service_resolver.cc
@@ -147,7 +147,7 @@ NTSTATUS ServiceResolverThunk::Setup(const void* target_module,
return ret;
size_t thunk_bytes = GetThunkSize();
- scoped_ptr<char> thunk_buffer(new char[thunk_bytes]);
+ scoped_array<char> thunk_buffer(new char[thunk_bytes]);
ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>(
thunk_buffer.get());
diff --git a/sandbox/src/service_resolver_unittest.cc b/sandbox/src/service_resolver_unittest.cc
index 6f7da8e..3af81f2 100644
--- a/sandbox/src/service_resolver_unittest.cc
+++ b/sandbox/src/service_resolver_unittest.cc
@@ -85,7 +85,7 @@ NTSTATUS PatchNtdll(const char* function, bool relaxed) {
// Any pointer will do as an interception_entry_point
void* function_entry = resolver;
size_t thunk_size = resolver->GetThunkSize();
- scoped_ptr<char> thunk(new char[thunk_size]);
+ scoped_array<char> thunk(new char[thunk_size]);
uint32 used;
NTSTATUS ret = resolver->Setup(ntdll_base, NULL, function, NULL,
diff --git a/sandbox/src/window.cc b/sandbox/src/window.cc
index cd6022c..bc3b777 100644
--- a/sandbox/src/window.cc
+++ b/sandbox/src/window.cc
@@ -111,7 +111,7 @@ std::wstring GetWindowObjectName(HANDLE handle) {
}
// Create the buffer that will hold the name.
- scoped_ptr<wchar_t> name_buffer(new wchar_t[size]);
+ scoped_array<wchar_t> name_buffer(new wchar_t[size]);
// Query the name of the object.
if (!::GetUserObjectInformation(handle, UOI_NAME, name_buffer.get(), size,
diff --git a/sandbox/wow_helper/service64_resolver.cc b/sandbox/wow_helper/service64_resolver.cc
index 8e6f8d9..2feb237 100644
--- a/sandbox/wow_helper/service64_resolver.cc
+++ b/sandbox/wow_helper/service64_resolver.cc
@@ -210,7 +210,7 @@ NTSTATUS Service64ResolverThunk::Setup(const void* target_module,
return ret;
size_t thunk_bytes = GetThunkSize();
- scoped_ptr<char> thunk_buffer(new char[thunk_bytes]);
+ scoped_array<char> thunk_buffer(new char[thunk_bytes]);
ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>(
thunk_buffer.get());