Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: rlz/lib/rlz_lib_test.cc

Issue 14114002: Rewrite scoped_array<T> to scoped_ptr<T[]> in rlz. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « rlz/lib/financial_ping.cc ('k') | rlz/win/lib/machine_id_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A test application for the RLZ library. 5 // A test application for the RLZ library.
6 // 6 //
7 // These tests should not be executed on the build server: 7 // These tests should not be executed on the build server:
8 // - They assert for the failed cases. 8 // - They assert for the failed cases.
9 // - They modify machine state (registry). 9 // - They modify machine state (registry).
10 // 10 //
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 EXPECT_STREQ("GdbRlzValue", cgi); 517 EXPECT_STREQ("GdbRlzValue", cgi);
518 518
519 EXPECT_FALSE(rlz_lib::GetProductEventsAsCgi(rlz_lib::TOOLBAR_NOTIFIER, 519 EXPECT_FALSE(rlz_lib::GetProductEventsAsCgi(rlz_lib::TOOLBAR_NOTIFIER,
520 cgi, 2048)); 520 cgi, 2048));
521 EXPECT_STREQ("", cgi); 521 EXPECT_STREQ("", cgi);
522 } 522 }
523 523
524 #if defined(OS_WIN) 524 #if defined(OS_WIN)
525 template<class T> 525 template<class T>
526 class typed_buffer_ptr { 526 class typed_buffer_ptr {
527 scoped_array<char> buffer_; 527 scoped_ptr<char[]> buffer_;
528 528
529 public: 529 public:
530 typed_buffer_ptr() { 530 typed_buffer_ptr() {
531 } 531 }
532 532
533 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) { 533 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) {
534 } 534 }
535 535
536 void reset(size_t size) { 536 void reset(size_t size) {
537 buffer_.reset(new char[size]); 537 buffer_.reset(new char[size]);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 int mkdir_result = mkdir(rlz_lib::testing::RlzStoreFilenameStr().c_str(), 883 int mkdir_result = mkdir(rlz_lib::testing::RlzStoreFilenameStr().c_str(),
884 0500); 884 0500);
885 ASSERT_EQ(0, mkdir_result); 885 ASSERT_EQ(0, mkdir_result);
886 886
887 rlz_lib::SupplementaryBranding branding("TEST"); 887 rlz_lib::SupplementaryBranding branding("TEST");
888 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, 888 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER,
889 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); 889 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL));
890 } 890 }
891 891
892 #endif 892 #endif
OLDNEW
« no previous file with comments | « rlz/lib/financial_ping.cc ('k') | rlz/win/lib/machine_id_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698