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

Unified Diff: ipc/file_descriptor_set_posix_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/worker/worker_webkitclient_impl.cc ('k') | media/audio/audio_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/file_descriptor_set_posix_unittest.cc
diff --git a/ipc/file_descriptor_set_posix_unittest.cc b/ipc/file_descriptor_set_posix_unittest.cc
index b6077d1f0ff1b5c4ab1e657cf0e6d56e4605150b..31b8bf42fbf726a373bf8853496079dc96ef3ec4 100644
--- a/ipc/file_descriptor_set_posix_unittest.cc
+++ b/ipc/file_descriptor_set_posix_unittest.cc
@@ -36,7 +36,7 @@ bool VerifyClosed(int fd) {
static const int kFDBase = 50000;
TEST(FileDescriptorSet, BasicAdd) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_EQ(set->size(), 0u);
ASSERT_TRUE(set->empty());
@@ -50,7 +50,7 @@ TEST(FileDescriptorSet, BasicAdd) {
}
TEST(FileDescriptorSet, BasicAddAndClose) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_EQ(set->size(), 0u);
ASSERT_TRUE(set->empty());
@@ -64,7 +64,7 @@ TEST(FileDescriptorSet, BasicAddAndClose) {
ASSERT_TRUE(VerifyClosed(fd));
}
TEST(FileDescriptorSet, MaxSize) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
for (unsigned i = 0;
i < FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE; ++i) {
@@ -77,7 +77,7 @@ TEST(FileDescriptorSet, MaxSize) {
}
TEST(FileDescriptorSet, SetDescriptors) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_TRUE(set->empty());
set->SetDescriptors(NULL, 0);
@@ -95,7 +95,7 @@ TEST(FileDescriptorSet, SetDescriptors) {
}
TEST(FileDescriptorSet, GetDescriptors) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
set->GetDescriptors(NULL);
ASSERT_TRUE(set->Add(kFDBase));
@@ -109,7 +109,7 @@ TEST(FileDescriptorSet, GetDescriptors) {
}
TEST(FileDescriptorSet, WalkInOrder) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_TRUE(set->Add(kFDBase));
ASSERT_TRUE(set->Add(kFDBase + 1));
@@ -123,7 +123,7 @@ TEST(FileDescriptorSet, WalkInOrder) {
}
TEST(FileDescriptorSet, WalkWrongOrder) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_TRUE(set->Add(kFDBase));
ASSERT_TRUE(set->Add(kFDBase + 1));
@@ -136,7 +136,7 @@ TEST(FileDescriptorSet, WalkWrongOrder) {
}
TEST(FileDescriptorSet, WalkCycle) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
ASSERT_TRUE(set->Add(kFDBase));
ASSERT_TRUE(set->Add(kFDBase + 1));
@@ -156,7 +156,7 @@ TEST(FileDescriptorSet, WalkCycle) {
}
TEST(FileDescriptorSet, DontClose) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
const int fd = GetSafeFd();
ASSERT_TRUE(set->Add(fd));
@@ -166,7 +166,7 @@ TEST(FileDescriptorSet, DontClose) {
}
TEST(FileDescriptorSet, DoClose) {
- scoped_refptr<FileDescriptorSet> set = new FileDescriptorSet;
+ scoped_refptr<FileDescriptorSet> set(new FileDescriptorSet);
const int fd = GetSafeFd();
ASSERT_TRUE(set->AddAndAutoClose(fd));
« no previous file with comments | « chrome/worker/worker_webkitclient_impl.cc ('k') | media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698