Skip to content

Commit

Permalink
Rewrite scoped_array<T> to scoped_ptr<T[]> in rlz.
Browse files Browse the repository at this point in the history
This is a manual cleanup pass using sed for files which are not built on
Linux.

BUG=171111


Review URL: https://chromiumcodereview.appspot.com/14114002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193534 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dcheng@chromium.org committed Apr 11, 2013
1 parent 3cc9039 commit 0789032
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rlz/lib/financial_ping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ bool FinancialPing::PingServer(const char* request, std::string* response) {
return false;

// Get the response text.
scoped_array<char> buffer(new char[kMaxPingResponseLength]);
scoped_ptr<char[]> buffer(new char[kMaxPingResponseLength]);
if (buffer.get() == NULL)
return false;

Expand Down
2 changes: 1 addition & 1 deletion rlz/lib/rlz_lib_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ TEST_F(RlzLibTest, ClearProductState) {
#if defined(OS_WIN)
template<class T>
class typed_buffer_ptr {
scoped_array<char> buffer_;
scoped_ptr<char[]> buffer_;

public:
typed_buffer_ptr() {
Expand Down
2 changes: 1 addition & 1 deletion rlz/win/lib/machine_id_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool GetSystemVolumeSerialNumber(int* number) {
bool GetComputerSid(const wchar_t* account_name, SID* sid, DWORD sid_size) {
static const DWORD kStartDomainLength = 128; // reasonable to start with

scoped_array<wchar_t> domain_buffer(new wchar_t[kStartDomainLength]);
scoped_ptr<wchar_t[]> domain_buffer(new wchar_t[kStartDomainLength]);
DWORD domain_size = kStartDomainLength;
DWORD sid_dword_size = sid_size;
SID_NAME_USE sid_name_use;
Expand Down
2 changes: 1 addition & 1 deletion rlz/win/lib/process_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HRESULT GetCurrentUser(std::wstring* name,

// (Following call will fail with ERROR_INSUFFICIENT_BUFFER and give us the
// required size.)
scoped_array<char> token_user_bytes;
scoped_ptr<char[]> token_user_bytes;
DWORD token_user_size;
DWORD token_user_size2;
BOOL result = ::GetTokenInformation(token, TokenUser, NULL, 0,
Expand Down
2 changes: 1 addition & 1 deletion rlz/win/lib/rlz_lib_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace rlz_lib {

template<class T>
class typed_buffer_ptr {
scoped_array<char> buffer_;
scoped_ptr<char[]> buffer_;

public:
typed_buffer_ptr() {
Expand Down

0 comments on commit 0789032

Please sign in to comment.