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

Unified Diff: extensions/common/permissions/api_permission_set_unittest.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: extensions/common/permissions/api_permission_set_unittest.cc
diff --git a/extensions/common/permissions/api_permission_set_unittest.cc b/extensions/common/permissions/api_permission_set_unittest.cc
index 0574250d202ab09a979ea55c21c3b2b70e75815e..5bb0daf69b32a2050cd42f084d7f9ddfbd6a9876 100644
--- a/extensions/common/permissions/api_permission_set_unittest.cc
+++ b/extensions/common/permissions/api_permission_set_unittest.cc
@@ -33,7 +33,7 @@ TEST(APIPermissionSetTest, General) {
}
TEST(APIPermissionSetTest, CreateUnion) {
- APIPermission* permission = NULL;
+ APIPermission* permission = nullptr;
APIPermissionSet apis1;
APIPermissionSet apis2;
@@ -48,7 +48,7 @@ TEST(APIPermissionSetTest, CreateUnion) {
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
// Union with an empty set.
@@ -82,7 +82,7 @@ TEST(APIPermissionSetTest, CreateUnion) {
scoped_ptr<base::ListValue> value(new base::ListValue());
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-send-to::8899"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis2.insert(permission);
@@ -98,7 +98,7 @@ TEST(APIPermissionSetTest, CreateUnion) {
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
value->Append(new base::StringValue("udp-send-to::8899"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
// Insert a new socket permission which will replace the old one.
expected_apis.insert(permission);
@@ -116,7 +116,7 @@ TEST(APIPermissionSetTest, CreateUnion) {
}
TEST(APIPermissionSetTest, CreateIntersection) {
- APIPermission* permission = NULL;
+ APIPermission* permission = nullptr;
APIPermissionSet apis1;
APIPermissionSet apis2;
@@ -135,7 +135,7 @@ TEST(APIPermissionSetTest, CreateIntersection) {
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis1.insert(permission);
@@ -163,7 +163,7 @@ TEST(APIPermissionSetTest, CreateIntersection) {
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
value->Append(new base::StringValue("udp-send-to::8899"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis2.insert(permission);
@@ -173,7 +173,7 @@ TEST(APIPermissionSetTest, CreateIntersection) {
scoped_ptr<base::ListValue> value(new base::ListValue());
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
expected_apis.insert(permission);
@@ -190,7 +190,7 @@ TEST(APIPermissionSetTest, CreateIntersection) {
}
TEST(APIPermissionSetTest, CreateDifference) {
- APIPermission* permission = NULL;
+ APIPermission* permission = nullptr;
APIPermissionSet apis1;
APIPermissionSet apis2;
@@ -209,7 +209,7 @@ TEST(APIPermissionSetTest, CreateDifference) {
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis1.insert(permission);
@@ -228,7 +228,7 @@ TEST(APIPermissionSetTest, CreateDifference) {
scoped_ptr<base::ListValue> value(new base::ListValue());
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-send-to::8899"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis2.insert(permission);
@@ -238,7 +238,7 @@ TEST(APIPermissionSetTest, CreateDifference) {
scoped_ptr<base::ListValue> value(new base::ListValue());
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
expected_apis.insert(permission);
@@ -256,7 +256,7 @@ TEST(APIPermissionSetTest, CreateDifference) {
}
TEST(APIPermissionSetTest, IPC) {
- APIPermission* permission = NULL;
+ APIPermission* permission = nullptr;
APIPermissionSet apis;
APIPermissionSet expected_apis;
@@ -272,7 +272,7 @@ TEST(APIPermissionSetTest, IPC) {
value->Append(new base::StringValue("tcp-connect:*.example.com:80"));
value->Append(new base::StringValue("udp-bind::8080"));
value->Append(new base::StringValue("udp-send-to::8888"));
- ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL));
+ ASSERT_TRUE(permission->FromValue(value.get(), nullptr, NULL));
}
apis.insert(permission);

Powered by Google App Engine
This is Rietveld 408576698