summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-07 08:19:51 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-07 08:19:51 +0000
commit3152ef0d6ce224da636fae49699c9b26f6aeaeb6 (patch)
treef9e98518df64c5768bc93fafd93b2b0f9c70d1e8
parent8a94ea1faf5f96d4cd92d52edee54d47be033b20 (diff)
downloadchromium_src-3152ef0d6ce224da636fae49699c9b26f6aeaeb6.zip
chromium_src-3152ef0d6ce224da636fae49699c9b26f6aeaeb6.tar.gz
chromium_src-3152ef0d6ce224da636fae49699c9b26f6aeaeb6.tar.bz2
Rewrite scoped_array<T> to scoped_ptr<T[]> in content/, Linux edition.
This changelist was automatically generated using a clang tool. BUG=171111 Review URL: https://codereview.chromium.org/13749004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192769 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter.cc2
-rw-r--r--content/browser/gpu/gpu_blacklist_unittest.cc2
-rw-r--r--content/browser/gpu/gpu_driver_bug_list_unittest.cc2
-rw-r--r--content/browser/gpu/gpu_switching_list_unittest.cc2
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager_unittest.cc4
-rw-r--r--content/browser/renderer_host/render_sandbox_host_linux.cc2
-rw-r--r--content/browser/speech/audio_encoder.cc2
-rw-r--r--content/browser/web_contents/web_drag_dest_gtk.h2
-rw-r--r--content/common/child_process_sandbox_support_impl_linux.cc2
-rw-r--r--content/common/common_param_traits_unittest.cc2
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc12
-rw-r--r--content/gpu/gpu_info_collector_linux.cc2
-rw-r--r--content/ppapi_plugin/broker_process_dispatcher.cc2
-rw-r--r--content/renderer/browser_plugin/browser_plugin_browsertest.cc2
-rw-r--r--content/renderer/hyphenator/hyphenator.cc2
-rw-r--r--content/renderer/media/webrtc_audio_renderer.h2
-rw-r--r--content/renderer/pepper/pepper_truetype_font_linux.cc2
17 files changed, 23 insertions, 23 deletions
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc
index f8b4cc7..cbe0629 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter.cc
@@ -52,7 +52,7 @@ void AccessibilityTreeFormatter::FormatAccessibilityTree(
void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree(
BrowserAccessibility* node, string16* contents, int indent) {
- scoped_array<char> prefix(new char[indent + 1]);
+ scoped_ptr<char[]> prefix(new char[indent + 1]);
for (int i = 0; i < indent; ++i)
prefix[i] = ' ';
prefix[indent] = '\0';
diff --git a/content/browser/gpu/gpu_blacklist_unittest.cc b/content/browser/gpu/gpu_blacklist_unittest.cc
index 531ad05..89c0b10 100644
--- a/content/browser/gpu/gpu_blacklist_unittest.cc
+++ b/content/browser/gpu/gpu_blacklist_unittest.cc
@@ -91,7 +91,7 @@ TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) {
int64 data_file_size64 = 0;
ASSERT_TRUE(file_util::GetFileSize(data_file, &data_file_size64));
int data_file_size = static_cast<int>(data_file_size64);
- scoped_array<char> data(new char[data_file_size]);
+ scoped_ptr<char[]> data(new char[data_file_size]);
ASSERT_EQ(data_file_size,
file_util::ReadFile(data_file, data.get(), data_file_size));
std::string json_string(data.get(), data_file_size);
diff --git a/content/browser/gpu/gpu_driver_bug_list_unittest.cc b/content/browser/gpu/gpu_driver_bug_list_unittest.cc
index b0322a3..931274c 100644
--- a/content/browser/gpu/gpu_driver_bug_list_unittest.cc
+++ b/content/browser/gpu/gpu_driver_bug_list_unittest.cc
@@ -43,7 +43,7 @@ class GpuDriverBugListTest : public testing::Test {
if (!file_util::GetFileSize(data_file, &data_file_size64))
return false;
int data_file_size = static_cast<int>(data_file_size64);
- scoped_array<char> data(new char[data_file_size]);
+ scoped_ptr<char[]> data(new char[data_file_size]);
if (file_util::ReadFile(data_file, data.get(), data_file_size) !=
data_file_size)
return false;
diff --git a/content/browser/gpu/gpu_switching_list_unittest.cc b/content/browser/gpu/gpu_switching_list_unittest.cc
index a356922..b6ceb4b 100644
--- a/content/browser/gpu/gpu_switching_list_unittest.cc
+++ b/content/browser/gpu/gpu_switching_list_unittest.cc
@@ -65,7 +65,7 @@ TEST_F(GpuSwitchingListTest, CurrentSwitchingListValidation) {
int64 data_file_size64 = 0;
ASSERT_TRUE(file_util::GetFileSize(data_file, &data_file_size64));
int data_file_size = static_cast<int>(data_file_size64);
- scoped_array<char> data(new char[data_file_size]);
+ scoped_ptr<char[]> data(new char[data_file_size]);
ASSERT_EQ(data_file_size,
file_util::ReadFile(data_file, data.get(), data_file_size));
std::string json_string(data.get(), data_file_size);
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index c5294dc..ec11cda 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -140,7 +140,7 @@ TEST_F(AudioInputDeviceManagerTest, OpenMultipleDevices) {
InSequence s;
int index = 0;
- scoped_array<int> session_id(new int[devices_.size()]);
+ scoped_ptr<int[]> session_id(new int[devices_.size()]);
// Opens the devices in a loop.
for (StreamDeviceInfoArray::const_iterator iter = devices_.begin();
@@ -245,7 +245,7 @@ TEST_F(AudioInputDeviceManagerTest, AccessAndCloseSession) {
InSequence s;
int index = 0;
- scoped_array<int> session_id(new int[devices_.size()]);
+ scoped_ptr<int[]> session_id(new int[devices_.size()]);
// Loops through the devices and calls Open()/Close()/GetOpenedDeviceInfoById
// for each device.
diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc
index 07f0b20..0cc3638 100644
--- a/content/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/content/browser/renderer_host/render_sandbox_host_linux.cc
@@ -253,7 +253,7 @@ class SandboxIPCProcess {
}
EnsureWebKitInitialized();
- scoped_array<WebUChar> chars(new WebUChar[num_chars]);
+ scoped_ptr<WebUChar[]> chars(new WebUChar[num_chars]);
for (int i = 0; i < num_chars; ++i) {
uint32_t c;
diff --git a/content/browser/speech/audio_encoder.cc b/content/browser/speech/audio_encoder.cc
index 73bbd41..e1a407b 100644
--- a/content/browser/speech/audio_encoder.cc
+++ b/content/browser/speech/audio_encoder.cc
@@ -88,7 +88,7 @@ void FLACEncoder::Encode(const AudioChunk& raw_audio) {
// FLAC encoder wants samples as int32s.
const int num_samples = raw_audio.NumSamples();
- scoped_array<FLAC__int32> flac_samples(new FLAC__int32[num_samples]);
+ scoped_ptr<FLAC__int32[]> flac_samples(new FLAC__int32[num_samples]);
FLAC__int32* flac_samples_ptr = flac_samples.get();
for (int i = 0; i < num_samples; ++i)
flac_samples_ptr[i] = static_cast<FLAC__int32>(raw_audio.GetSample16(i));
diff --git a/content/browser/web_contents/web_drag_dest_gtk.h b/content/browser/web_contents/web_drag_dest_gtk.h
index fb9a6b3..96d7aa3 100644
--- a/content/browser/web_contents/web_drag_dest_gtk.h
+++ b/content/browser/web_contents/web_drag_dest_gtk.h
@@ -96,7 +96,7 @@ class CONTENT_EXPORT WebDragDestGtk {
// signal handlers when this WebDragDestGtk is deleted so that if, later on,
// we re-create the drag dest with the same widget, we don't get callbacks to
// deleted functions.
- scoped_array<int> handlers_;
+ scoped_ptr<int[]> handlers_;
// A delegate that can receive drag information about drag events.
WebDragDestDelegate* delegate_;
diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc
index 19cdb08..6eec6fe 100644
--- a/content/common/child_process_sandbox_support_impl_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_linux.cc
@@ -127,7 +127,7 @@ bool GetFontTable(int fd, uint32_t table_tag, off_t offset,
// Read the table directory.
static const size_t kTableEntrySize = 16;
const size_t directory_size = num_tables * kTableEntrySize;
- scoped_array<uint8_t> table_entries(new uint8_t[directory_size]);
+ scoped_ptr<uint8_t[]> table_entries(new uint8_t[directory_size]);
n = HANDLE_EINTR(pread(fd, table_entries.get(), directory_size,
12 /* skip the SFNT header */));
if (n != base::checked_numeric_cast<ssize_t>(directory_size))
diff --git a/content/common/common_param_traits_unittest.cc b/content/common/common_param_traits_unittest.cc
index 0540032..432f8f9 100644
--- a/content/common/common_param_traits_unittest.cc
+++ b/content/common/common_param_traits_unittest.cc
@@ -113,7 +113,7 @@ TEST(IPCMessageTest, Bitmap) {
bad_msg.WriteData(fixed_data, fixed_data_size);
// Add some bogus pixel data.
const size_t bogus_pixels_size = bitmap.getSize() * 2;
- scoped_array<char> bogus_pixels(new char[bogus_pixels_size]);
+ scoped_ptr<char[]> bogus_pixels(new char[bogus_pixels_size]);
memset(bogus_pixels.get(), 'B', bogus_pixels_size);
bad_msg.WriteData(bogus_pixels.get(), bogus_pixels_size);
// Make sure we don't read out the bitmap!
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 8484974..90f7d9d 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -999,7 +999,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveAttrib(
program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max_name_length);
if (max_name_length < 0)
return false;
- scoped_array<GLchar> name(new GLchar[max_name_length]);
+ scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
if (!name.get()) {
synthesizeGLError(GL_OUT_OF_MEMORY);
return false;
@@ -1025,7 +1025,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveUniform(
program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &max_name_length);
if (max_name_length < 0)
return false;
- scoped_array<GLchar> name(new GLchar[max_name_length]);
+ scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
if (!name.get()) {
synthesizeGLError(GL_OUT_OF_MEMORY);
return false;
@@ -1093,7 +1093,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getProgramInfoLog(
gl_->GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength);
if (!logLength)
return WebKit::WebString();
- scoped_array<GLchar> log(new GLchar[logLength]);
+ scoped_ptr<GLchar[]> log(new GLchar[logLength]);
if (!log.get())
return WebKit::WebString();
GLsizei returnedLogLength = 0;
@@ -1116,7 +1116,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderInfoLog(
gl_->GetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength);
if (!logLength)
return WebKit::WebString();
- scoped_array<GLchar> log(new GLchar[logLength]);
+ scoped_ptr<GLchar[]> log(new GLchar[logLength]);
if (!log.get())
return WebKit::WebString();
GLsizei returnedLogLength = 0;
@@ -1137,7 +1137,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderSource(
gl_->GetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength);
if (!logLength)
return WebKit::WebString();
- scoped_array<GLchar> log(new GLchar[logLength]);
+ scoped_ptr<GLchar[]> log(new GLchar[logLength]);
if (!log.get())
return WebKit::WebString();
GLsizei returnedLogLength = 0;
@@ -1158,7 +1158,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
shader, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, &logLength);
if (!logLength)
return WebKit::WebString();
- scoped_array<GLchar> log(new GLchar[logLength]);
+ scoped_ptr<GLchar[]> log(new GLchar[logLength]);
if (!log.get())
return WebKit::WebString();
GLsizei returnedLogLength = 0;
diff --git a/content/gpu/gpu_info_collector_linux.cc b/content/gpu/gpu_info_collector_linux.cc
index 56b3800..29df288 100644
--- a/content/gpu/gpu_info_collector_linux.cc
+++ b/content/gpu/gpu_info_collector_linux.cc
@@ -131,7 +131,7 @@ bool CollectPCIVideoCardInfo(content::GPUInfo* gpu_info) {
gpu.device_id = device->device_id;
const int buffer_size = 255;
- scoped_array<char> buffer(new char[buffer_size]);
+ scoped_ptr<char[]> buffer(new char[buffer_size]);
// The current implementation of pci_lookup_name returns the same pointer
// as the passed in upon success, and a different one (NULL or a pointer
// to an error message) upon failure.
diff --git a/content/ppapi_plugin/broker_process_dispatcher.cc b/content/ppapi_plugin/broker_process_dispatcher.cc
index d9dd974..c6d8592 100644
--- a/content/ppapi_plugin/broker_process_dispatcher.cc
+++ b/content/ppapi_plugin/broker_process_dispatcher.cc
@@ -304,7 +304,7 @@ bool BrokerProcessDispatcher::SetSitePermission(
return true;
std::string data_str = ConvertPluginDataPath(plugin_data_path);
- scoped_array<PP_Flash_BrowserOperations_SiteSetting> site_array(
+ scoped_ptr<PP_Flash_BrowserOperations_SiteSetting[]> site_array(
new PP_Flash_BrowserOperations_SiteSetting[sites.size()]);
for (size_t i = 0; i < sites.size(); ++i) {
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
index 5efffe9..626a8e5 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
@@ -121,7 +121,7 @@ std::string BrowserPluginTest::ExecuteScriptAndReturnString(
v8::Local<v8::String> v8_str = value->ToString();
int length = v8_str->Utf8Length() + 1;
- scoped_array<char> str(new char[length]);
+ scoped_ptr<char[]> str(new char[length]);
v8_str->WriteUtf8(str.get(), length);
return str.get();
}
diff --git a/content/renderer/hyphenator/hyphenator.cc b/content/renderer/hyphenator/hyphenator.cc
index ae60fd8..b3b9e28 100644
--- a/content/renderer/hyphenator/hyphenator.cc
+++ b/content/renderer/hyphenator/hyphenator.cc
@@ -98,7 +98,7 @@ class Query {
std::string word_utf8_;
// Return variables from the hyphen library.
- scoped_array<char> hyphen_vector_;
+ scoped_ptr<char[]> hyphen_vector_;
char** rep_;
int* pos_;
int* cut_;
diff --git a/content/renderer/media/webrtc_audio_renderer.h b/content/renderer/media/webrtc_audio_renderer.h
index e0b19c7..af4bf38 100644
--- a/content/renderer/media/webrtc_audio_renderer.h
+++ b/content/renderer/media/webrtc_audio_renderer.h
@@ -78,7 +78,7 @@ class CONTENT_EXPORT WebRtcAudioRenderer
// Buffers used for temporary storage during render callbacks.
// Allocated during initialization.
- scoped_array<int16> buffer_;
+ scoped_ptr<int16[]> buffer_;
// Protects access to |state_|, |source_| and |sink_|.
base::Lock lock_;
diff --git a/content/renderer/pepper/pepper_truetype_font_linux.cc b/content/renderer/pepper/pepper_truetype_font_linux.cc
index 93cdfa5..2e3326a 100644
--- a/content/renderer/pepper/pepper_truetype_font_linux.cc
+++ b/content/renderer/pepper/pepper_truetype_font_linux.cc
@@ -103,7 +103,7 @@ int32_t PepperTrueTypeFontLinux::GetTableTags(std::vector<uint32_t>* tags) {
static const size_t kFontHeaderSize = 12;
static const size_t kTableEntrySize = 16;
output_length = num_tables * kTableEntrySize;
- scoped_array<uint8_t> table_entries(new uint8_t[output_length]);
+ scoped_ptr<uint8_t[]> table_entries(new uint8_t[output_length]);
// Get the table directory entries, which follow the font header.
if (!content::GetFontTable(fd_,
0 /* tag */,