diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-12 22:26:07 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-12 22:26:07 +0000 |
commit | e9d2ba6f66503b29f50fae511b57500a3d782ae1 (patch) | |
tree | 3d62ede2647f823ac4a0191712f0836b280e48fe /sandbox/win | |
parent | 36a4a54f15cfbe07371e4c2bdcf1d61ad557bb80 (diff) | |
download | chromium_src-e9d2ba6f66503b29f50fae511b57500a3d782ae1.zip chromium_src-e9d2ba6f66503b29f50fae511b57500a3d782ae1.tar.gz chromium_src-e9d2ba6f66503b29f50fae511b57500a3d782ae1.tar.bz2 |
Rewrite scoped_array<T> to scoped_ptr<T[]> in sandbox.
This is a manual cleanup pass using sed for files which are not built on
Linux.
BUG=171111
Review URL: https://chromiumcodereview.appspot.com/13888007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/win')
-rw-r--r-- | sandbox/win/src/handle_closer.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/interception.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/interception_unittest.cc | 4 | ||||
-rw-r--r-- | sandbox/win/src/service_resolver_32.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/service_resolver_64.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/service_resolver_unittest.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/win_utils.cc | 2 | ||||
-rw-r--r-- | sandbox/win/src/window.cc | 2 | ||||
-rw-r--r-- | sandbox/win/wow_helper/service64_resolver.cc | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/sandbox/win/src/handle_closer.cc b/sandbox/win/src/handle_closer.cc index fc72835..a47bf65 100644 --- a/sandbox/win/src/handle_closer.cc +++ b/sandbox/win/src/handle_closer.cc @@ -81,7 +81,7 @@ bool HandleCloser::InitializeTargetHandles(TargetProcess* target) { return true; size_t bytes_needed = GetBufferSize(); - scoped_array<size_t> local_buffer( + scoped_ptr<size_t[]> local_buffer( new size_t[bytes_needed / sizeof(size_t)]); if (!SetupHandleList(local_buffer.get(), bytes_needed)) diff --git a/sandbox/win/src/interception.cc b/sandbox/win/src/interception.cc index 8def6e8..8c897a1 100644 --- a/sandbox/win/src/interception.cc +++ b/sandbox/win/src/interception.cc @@ -120,7 +120,7 @@ bool InterceptionManager::InitializeInterceptions() { return true; // Nothing to do here size_t buffer_bytes = GetBufferSize(); - scoped_array<char> local_buffer(new char[buffer_bytes]); + scoped_ptr<char[]> local_buffer(new char[buffer_bytes]); if (!SetupConfigBuffer(local_buffer.get(), buffer_bytes)) return false; diff --git a/sandbox/win/src/interception_unittest.cc b/sandbox/win/src/interception_unittest.cc index cc76767..0fc9b7c 100644 --- a/sandbox/win/src/interception_unittest.cc +++ b/sandbox/win/src/interception_unittest.cc @@ -135,7 +135,7 @@ TEST(InterceptionManagerTest, BufferLayout1) { ASSERT_EQ(18, interceptions.interceptions_.size()); size_t buffer_size = interceptions.GetBufferSize(); - scoped_array<BYTE> local_buffer(new BYTE[buffer_size]); + scoped_ptr<BYTE[]> local_buffer(new BYTE[buffer_size]); ASSERT_TRUE(interceptions.SetupConfigBuffer(local_buffer.get(), buffer_size)); @@ -188,7 +188,7 @@ TEST(InterceptionManagerTest, BufferLayout2) { ASSERT_EQ(5, interceptions.interceptions_.size()); size_t buffer_size = interceptions.GetBufferSize(); - scoped_array<BYTE> local_buffer(new BYTE[buffer_size]); + scoped_ptr<BYTE[]> local_buffer(new BYTE[buffer_size]); ASSERT_TRUE(interceptions.SetupConfigBuffer(local_buffer.get(), buffer_size)); diff --git a/sandbox/win/src/service_resolver_32.cc b/sandbox/win/src/service_resolver_32.cc index 3497516..2e69dbc 100644 --- a/sandbox/win/src/service_resolver_32.cc +++ b/sandbox/win/src/service_resolver_32.cc @@ -159,7 +159,7 @@ NTSTATUS ServiceResolverThunk::Setup(const void* target_module, relative_jump_ = 0; size_t thunk_bytes = GetThunkSize(); - scoped_array<char> thunk_buffer(new char[thunk_bytes]); + scoped_ptr<char[]> thunk_buffer(new char[thunk_bytes]); ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>( thunk_buffer.get()); diff --git a/sandbox/win/src/service_resolver_64.cc b/sandbox/win/src/service_resolver_64.cc index b69d4d8..32de53a 100644 --- a/sandbox/win/src/service_resolver_64.cc +++ b/sandbox/win/src/service_resolver_64.cc @@ -97,7 +97,7 @@ NTSTATUS ServiceResolverThunk::Setup(const void* target_module, return ret; size_t thunk_bytes = GetThunkSize(); - scoped_array<char> thunk_buffer(new char[thunk_bytes]); + scoped_ptr<char[]> thunk_buffer(new char[thunk_bytes]); ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>( thunk_buffer.get()); diff --git a/sandbox/win/src/service_resolver_unittest.cc b/sandbox/win/src/service_resolver_unittest.cc index 8c44202..59105cc 100644 --- a/sandbox/win/src/service_resolver_unittest.cc +++ b/sandbox/win/src/service_resolver_unittest.cc @@ -105,7 +105,7 @@ NTSTATUS PatchNtdllWithResolver(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_array<char> thunk(new char[thunk_size]); + scoped_ptr<char[]> thunk(new char[thunk_size]); size_t used; NTSTATUS ret = resolver->Setup(ntdll_base, NULL, function, NULL, diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc index 8e63ac7..f5c479a 100644 --- a/sandbox/win/src/win_utils.cc +++ b/sandbox/win/src/win_utils.cc @@ -191,7 +191,7 @@ bool ConvertToLongPath(const std::wstring& short_path, } DWORD size = MAX_PATH; - scoped_array<wchar_t> long_path_buf(new wchar_t[size]); + scoped_ptr<wchar_t[]> long_path_buf(new wchar_t[size]); DWORD return_value = ::GetLongPathName(path.c_str(), long_path_buf.get(), size); diff --git a/sandbox/win/src/window.cc b/sandbox/win/src/window.cc index 445cb17..d8de967 100644 --- a/sandbox/win/src/window.cc +++ b/sandbox/win/src/window.cc @@ -111,7 +111,7 @@ std::wstring GetWindowObjectName(HANDLE handle) { } // Create the buffer that will hold the name. - scoped_array<wchar_t> name_buffer(new wchar_t[size]); + scoped_ptr<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/win/wow_helper/service64_resolver.cc b/sandbox/win/wow_helper/service64_resolver.cc index fe8a210..033b9d7 100644 --- a/sandbox/win/wow_helper/service64_resolver.cc +++ b/sandbox/win/wow_helper/service64_resolver.cc @@ -210,7 +210,7 @@ NTSTATUS Service64ResolverThunk::Setup(const void* target_module, return ret; size_t thunk_bytes = GetThunkSize(); - scoped_array<char> thunk_buffer(new char[thunk_bytes]); + scoped_ptr<char[]> thunk_buffer(new char[thunk_bytes]); ServiceFullThunk* thunk = reinterpret_cast<ServiceFullThunk*>( thunk_buffer.get()); |