diff --git a/components/autofill/browser/autofill_country.cc b/components/autofill/browser/autofill_country.cc index 9018d6a2ba9342..71d9244accad4b 100644 --- a/components/autofill/browser/autofill_country.cc +++ b/components/autofill/browser/autofill_country.cc @@ -871,7 +871,7 @@ class CountryNames { // the |buffer| is resized. const std::string GetSortKey(const icu::Collator& collator, const string16& str, - scoped_array* buffer, + scoped_ptr* buffer, int32_t* buffer_size) const; // Maps from common country names, including 2- and 3-letter country codes, @@ -954,7 +954,7 @@ void CountryNames::AddLocalizedNamesForLocale(const std::string& locale) { std::map localized_names; const icu::Collator* collator = GetCollatorForLocale(locale); int32_t buffer_size = 1000; - scoped_array buffer(new uint8_t[buffer_size]); + scoped_ptr buffer(new uint8_t[buffer_size]); for (CountryDataMap::Iterator it = CountryDataMap::Begin(); it != CountryDataMap::End(); @@ -984,7 +984,7 @@ const std::string CountryNames::GetCountryCodeForLocalizedName( // source string length. // [1] http://userguide.icu-project.org/collation/api#TOC-Examples int32_t buffer_size = country_name.size() * 4; - scoped_array buffer(new uint8_t[buffer_size]); + scoped_ptr buffer(new uint8_t[buffer_size]); std::string sort_key = GetSortKey(*collator, country_name, &buffer, @@ -1021,7 +1021,7 @@ icu::Collator* CountryNames::GetCollatorForLocale(const std::string& locale) { const std::string CountryNames::GetSortKey(const icu::Collator& collator, const string16& str, - scoped_array* buffer, + scoped_ptr* buffer, int32_t* buffer_size) const { DCHECK(buffer); DCHECK(buffer_size); diff --git a/courgette/assembly_program.h b/courgette/assembly_program.h index 3d231c2b53b34f..2a68e518ba1877 100644 --- a/courgette/assembly_program.h +++ b/courgette/assembly_program.h @@ -124,7 +124,7 @@ class AssemblyProgram { // Sharing instructions that emit a single byte saves a lot of space. Instruction* GetByteInstruction(uint8 byte); - scoped_array byte_instruction_cache_; + scoped_ptr byte_instruction_cache_; uint64 image_base_; // Desired or mandated base address of image. diff --git a/crypto/hmac.cc b/crypto/hmac.cc index 126d124a0d7e19..c9a2b74d983ed8 100644 --- a/crypto/hmac.cc +++ b/crypto/hmac.cc @@ -45,7 +45,7 @@ bool HMAC::VerifyTruncated(const base::StringPiece& data, if (digest.empty()) return false; size_t digest_length = DigestLength(); - scoped_array computed_digest( + scoped_ptr computed_digest( new unsigned char[digest_length]); if (!Sign(data, computed_digest.get(), digest_length)) return false; diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 0d4b11419e6839..9cd0cd1aa34be5 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -69,7 +69,7 @@ static const base::FilePath::CharType kReadOnlyCertDB[] = std::string GetNSSErrorMessage() { std::string result; if (PR_GetErrorTextLength()) { - scoped_array error_text(new char[PR_GetErrorTextLength() + 1]); + scoped_ptr error_text(new char[PR_GetErrorTextLength() + 1]); PRInt32 copied = PR_GetErrorText(error_text.get()); result = std::string(error_text.get(), copied); } else { diff --git a/jingle/glue/chrome_async_socket_unittest.cc b/jingle/glue/chrome_async_socket_unittest.cc index d609dcb103f256..1775a6d70c64cc 100644 --- a/jingle/glue/chrome_async_socket_unittest.cc +++ b/jingle/glue/chrome_async_socket_unittest.cc @@ -393,7 +393,7 @@ class ChromeAsyncSocketTest std::string DrainRead(size_t buf_size) { std::string read; - scoped_array buf(new char[buf_size]); + scoped_ptr buf(new char[buf_size]); size_t len_read; while (true) { bool success = diff --git a/ppapi/proxy/device_enumeration_resource_helper.cc b/ppapi/proxy/device_enumeration_resource_helper.cc index 2729406a7ca20b..e8d63e1dbdfdbe 100644 --- a/ppapi/proxy/device_enumeration_resource_helper.cc +++ b/ppapi/proxy/device_enumeration_resource_helper.cc @@ -184,7 +184,7 @@ void DeviceEnumerationResourceHelper::OnPluginMsgNotifyDeviceChange( CHECK(monitor_callback_.get()); - scoped_array elements; + scoped_ptr elements; uint32_t size = devices.size(); if (size > 0) { elements.reset(new PP_Resource[size]); diff --git a/ppapi/proxy/video_capture_resource.cc b/ppapi/proxy/video_capture_resource.cc index ca88adf2ba17d0..af5c62e0a08027 100644 --- a/ppapi/proxy/video_capture_resource.cc +++ b/ppapi/proxy/video_capture_resource.cc @@ -158,7 +158,7 @@ void VideoCaptureResource::OnPluginMsgOnDeviceInfo( PluginResourceTracker* tracker = PluginGlobals::Get()->plugin_resource_tracker(); - scoped_array resources(new PP_Resource[buffers.size()]); + scoped_ptr resources(new PP_Resource[buffers.size()]); for (size_t i = 0; i < buffers.size(); ++i) { // We assume that the browser created a new set of resources. DCHECK(!tracker->PluginResourceForHostResource(buffers[i])); diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h index 0b6afd48841a74..c1644701c5a7d2 100644 --- a/ppapi/shared_impl/ppb_audio_shared.h +++ b/ppapi/shared_impl/ppb_audio_shared.h @@ -109,7 +109,7 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared // Internal buffer for client's integer audio data. int client_buffer_size_bytes_; - scoped_array client_buffer_; + scoped_ptr client_buffer_; DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); }; diff --git a/ppapi/shared_impl/ppb_device_ref_shared.cc b/ppapi/shared_impl/ppb_device_ref_shared.cc index 73a9a7c7d105db..4f9c14c09a25ca 100644 --- a/ppapi/shared_impl/ppb_device_ref_shared.cc +++ b/ppapi/shared_impl/ppb_device_ref_shared.cc @@ -47,7 +47,7 @@ PP_Resource PPB_DeviceRef_Shared::CreateResourceArray( ResourceObjectType type, PP_Instance instance, const std::vector& devices) { - scoped_array elements; + scoped_ptr elements; size_t size = devices.size(); if (size > 0) { elements.reset(new PP_Resource[size]); diff --git a/ppapi/thunk/ppb_flash_clipboard_thunk.cc b/ppapi/thunk/ppb_flash_clipboard_thunk.cc index fcdc52e69ca4cc..359d78f203ff09 100644 --- a/ppapi/thunk/ppb_flash_clipboard_thunk.cc +++ b/ppapi/thunk/ppb_flash_clipboard_thunk.cc @@ -70,7 +70,7 @@ int32_t WriteData_4_0(PP_Instance instance, uint32_t data_item_count, const PP_Flash_Clipboard_Format formats[], const PP_Var data_items[]) { - scoped_array new_formats(new uint32_t[data_item_count]); + scoped_ptr new_formats(new uint32_t[data_item_count]); for (uint32_t i = 0; i < data_item_count; ++i) new_formats[i] = static_cast(formats[i]); return WriteData(instance, clipboard_type, data_item_count, diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc index 5ef94082687990..29d8dd19e792f8 100644 --- a/tools/imagediff/image_diff.cc +++ b/tools/imagediff/image_diff.cc @@ -77,7 +77,7 @@ class Image { if (byte_length == 0) return false; - scoped_array source(new unsigned char[byte_length]); + scoped_ptr source(new unsigned char[byte_length]); if (fread(source.get(), 1, byte_length, stdin) != byte_length) return false;