Skip to content

Commit 17a3435

Browse files
Rename EDOBlacklistedType to EDOBlockedType per go/respectful-code.
PiperOrigin-RevId: 329372445
1 parent f27af12 commit 17a3435

File tree

8 files changed

+24
-26
lines changed

8 files changed

+24
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Updates:
2727
traces of both the callee process and previous caller processes.
2828

2929
* You can
30-
[block](https://github.com/google/eDistantObject/blob/master/Service/Sources/NSObject%2BEDOBlacklistedType.h#L38)
30+
[block](https://github.com/google/eDistantObject/blob/master/Service/Sources/NSObject%2BEDOBlockedType.h#L38)
3131
certain class type to be wrapped as an eDO proxy, to help detect unexpected
3232
object creation in the wrong process.
3333

Service/Sources/NSObject+EDOBlacklistedType.h renamed to Service/Sources/NSObject+EDOBlockedType.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
NS_ASSUME_NONNULL_BEGIN
2020

2121
/**
22-
* This category provides APIs to statically blacklist a class to be used in remote invocation.
22+
* This category provides APIs to statically block a class to be used in remote invocation.
2323
*
2424
* It provides a way to prevent certain types of instances being created in the wrong process
2525
* and sent to system APIs as a remote object. For example, iOS app cannot add a remote UIView
26-
* as the subview of another native UIView. If a type is blacklisted in remote invocation,
26+
* as the subview of another native UIView. If a type is blocked in remote invocation,
2727
* its instance, which is created in this process by mistake, will throw an exception when it
2828
* appears in a remote invocation.
2929
*/
30-
@interface NSObject (EDOBlacklistedType)
30+
@interface NSObject (EDOBlockedType)
3131

3232
/**
33-
* Blacklists this type to be a parameter of remote invocation.
33+
* Blocks this type to be a parameter of remote invocation.
3434
*
35-
* If a class is blacklisted, its instances are not allowed to be either parameters or return
35+
* If a class is blocked, its instances are not allowed to be either parameters or return
3636
* values in remote invocation.
3737
*/
3838
+ (void)edo_disallowRemoteInvocation;
3939

40-
/** The boolean to indicate if @c self is blacklisted in remote invocation. */
40+
/** The boolean to indicate if @c self is blocked in remote invocation. */
4141
@property(readonly, class) BOOL edo_remoteInvocationDisallowed;
4242

4343
@end

Service/Sources/NSObject+EDOBlacklistedType.m renamed to Service/Sources/NSObject+EDOBlockedType.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515
//
16-
#import "Service/Sources/NSObject+EDOBlacklistedType.h"
16+
#import "Service/Sources/NSObject+EDOBlockedType.h"
1717

1818
#include <objc/runtime.h>
1919

@@ -23,7 +23,7 @@
2323
#import "Service/Sources/EDOServiceException.h"
2424
#import "Service/Sources/NSObject+EDOParameter.h"
2525

26-
@implementation NSObject (EDOBlacklistedType)
26+
@implementation NSObject (EDOBlockedType)
2727

2828
+ (void)edo_disallowRemoteInvocation {
2929
@synchronized(self.class) {

Service/Tests/FunctionalTests/EDOServiceUITest.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#import "Service/Sources/EDOHostService.h"
2727
#import "Service/Sources/EDORemoteException.h"
2828
#import "Service/Sources/EDOServiceError.h"
29-
#import "Service/Sources/NSObject+EDOBlacklistedType.h"
29+
#import "Service/Sources/NSObject+EDOBlockedType.h"
3030
#import "Service/Sources/NSObject+EDOValueObject.h"
3131
#import "Service/Tests/FunctionalTests/EDOTestDummyInTest.h"
3232
#import "Service/Tests/TestsBundle/EDOTestClassDummy.h"
@@ -116,10 +116,9 @@ - (void)testProtocolParameter {
116116
NSInternalInconsistencyException);
117117
}
118118

119-
- (void)testBlacklistedParameter {
119+
- (void)testBlockedParameter {
120120
[self launchApplicationWithPort:EDOTEST_APP_SERVICE_PORT initValue:0];
121-
EDOBlacklistedTestDummyInTest *testDummy =
122-
[[EDOBlacklistedTestDummyInTest alloc] initWithValue:0];
121+
EDOBlockedTestDummyInTest *testDummy = [[EDOBlockedTestDummyInTest alloc] initWithValue:0];
123122
EDOHostService *service = [EDOHostService serviceWithPort:2234
124123
rootObject:testDummy
125124
queue:dispatch_get_main_queue()];
@@ -128,7 +127,7 @@ - (void)testBlacklistedParameter {
128127
XCTAssertNoThrow([remoteDummy callBackToTest:testDummy withValue:0]);
129128
XCTAssertNoThrow([remoteDummy createEDOWithPort:2234]);
130129
XCTAssertNoThrow([remoteDummy selWithInOutEDO:&testDummy]);
131-
[EDOBlacklistedTestDummyInTest edo_disallowRemoteInvocation];
130+
[EDOBlockedTestDummyInTest edo_disallowRemoteInvocation];
132131
XCTAssertThrows([remoteDummy callBackToTest:testDummy withValue:0]);
133132
XCTAssertThrows([remoteDummy createEDOWithPort:2234]);
134133
XCTAssertThrows([remoteDummy selWithInOutEDO:&testDummy]);

Service/Tests/FunctionalTests/EDOTestDummyInTest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
+ (NSException *)exceptionWithReason:(NSString *)reason value:(int)value;
4040
@end
4141

42-
/** The test dummy class that is used in blacklisting test. */
43-
@interface EDOBlacklistedTestDummyInTest : EDOTestDummyInTest
42+
/** The test dummy class that is used in blocklist test. */
43+
@interface EDOBlockedTestDummyInTest : EDOTestDummyInTest
4444
@end

Service/Tests/FunctionalTests/EDOTestDummyInTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ - (void)invokeBlock {
6868

6969
@end
7070

71-
@implementation EDOBlacklistedTestDummyInTest
71+
@implementation EDOBlockedTestDummyInTest
7272

7373
- (EDOTestDummyInTest *)makeAnotherDummy:(int)value {
74-
return [[EDOBlacklistedTestDummyInTest alloc] initWithValue:0];
74+
return [[EDOBlockedTestDummyInTest alloc] initWithValue:0];
7575
}
7676

7777
@end

eDistantObject.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
2020
Service/Sources/EDOServiceError.h
2121
Service/Sources/EDOServiceException.h
2222
Service/Sources/EDOServicePort.h
23-
Service/Sources/NSObject+EDOBlacklistedType.h
23+
Service/Sources/NSObject+EDOBlockedType.h
2424
Service/Sources/NSObject+EDOValueObject.h
2525
Service/Sources/NSObject+EDOWeakObject.h
2626
Device/Sources/EDODeviceConnector.h

eDistantObject.xcodeproj/project.pbxproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
7674100E237E01FB00D43A15 /* EDOExecutorMessageTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7674100D237E01FB00D43A15 /* EDOExecutorMessageTest.m */; };
10+
7657C22224F9BEA70056F5A6 /* NSObject+EDOBlockedType.m in Sources */ = {isa = PBXBuildFile; fileRef = 7657C22124F9BEA70056F5A6 /* NSObject+EDOBlockedType.m */; };
1111
7685673323A1C10200EDBDB4 /* EDORemoteException.m in Sources */ = {isa = PBXBuildFile; fileRef = 7685673123A1C10100EDBDB4 /* EDORemoteException.m */; };
12-
7690BE9423A9CCBD00C00D02 /* NSObject+EDOBlacklistedType.m in Sources */ = {isa = PBXBuildFile; fileRef = 7690BE9323A9CCBD00C00D02 /* NSObject+EDOBlacklistedType.m */; };
1312
C52D85962220C4AB00E86E60 /* EDODeviceChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = C52D857A2220ADBD00E86E60 /* EDODeviceChannel.m */; };
1413
C52D85982220C4AB00E86E60 /* EDODeviceConnector.m in Sources */ = {isa = PBXBuildFile; fileRef = C52D857D2220ADBE00E86E60 /* EDODeviceConnector.m */; };
1514
C52D859A2220C4AB00E86E60 /* EDODeviceDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = C52D85782220ADBC00E86E60 /* EDODeviceDetector.m */; };
@@ -231,12 +230,12 @@
231230
/* End PBXCopyFilesBuildPhase section */
232231

233232
/* Begin PBXFileReference section */
233+
7657C22024F9BEA70056F5A6 /* NSObject+EDOBlockedType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSObject+EDOBlockedType.h"; path = "Service/Sources/NSObject+EDOBlockedType.h"; sourceTree = "<group>"; };
234+
7657C22124F9BEA70056F5A6 /* NSObject+EDOBlockedType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSObject+EDOBlockedType.m"; path = "Service/Sources/NSObject+EDOBlockedType.m"; sourceTree = "<group>"; };
234235
7674100D237E01FB00D43A15 /* EDOExecutorMessageTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EDOExecutorMessageTest.m; path = Service/Tests/UnitTests/EDOExecutorMessageTest.m; sourceTree = "<group>"; };
235236
7685673123A1C10100EDBDB4 /* EDORemoteException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EDORemoteException.m; path = Service/Sources/EDORemoteException.m; sourceTree = "<group>"; };
236237
7685673223A1C10100EDBDB4 /* EDORemoteException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EDORemoteException.h; path = Service/Sources/EDORemoteException.h; sourceTree = "<group>"; };
237238
7685673423A1C11F00EDBDB4 /* EDORemoteExceptionTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EDORemoteExceptionTest.m; path = Service/Tests/UnitTests/EDORemoteExceptionTest.m; sourceTree = "<group>"; };
238-
7690BE9223A9CCBC00C00D02 /* NSObject+EDOBlacklistedType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSObject+EDOBlacklistedType.h"; path = "Service/Sources/NSObject+EDOBlacklistedType.h"; sourceTree = "<group>"; };
239-
7690BE9323A9CCBD00C00D02 /* NSObject+EDOBlacklistedType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSObject+EDOBlacklistedType.m"; path = "Service/Sources/NSObject+EDOBlacklistedType.m"; sourceTree = "<group>"; };
240239
C52D85772220ADBB00E86E60 /* EDODeviceDetector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EDODeviceDetector.h; path = Device/Sources/EDODeviceDetector.h; sourceTree = "<group>"; };
241240
C52D85782220ADBC00E86E60 /* EDODeviceDetector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = EDODeviceDetector.m; path = Device/Sources/EDODeviceDetector.m; sourceTree = "<group>"; };
242241
C52D85792220ADBC00E86E60 /* EDOUSBMuxUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = EDOUSBMuxUtil.m; path = Device/Sources/EDOUSBMuxUtil.m; sourceTree = "<group>"; };
@@ -561,8 +560,8 @@
561560
C5A2EFD12134D40E00421D72 /* Sources */ = {
562561
isa = PBXGroup;
563562
children = (
564-
7690BE9223A9CCBC00C00D02 /* NSObject+EDOBlacklistedType.h */,
565-
7690BE9323A9CCBD00C00D02 /* NSObject+EDOBlacklistedType.m */,
563+
7657C22024F9BEA70056F5A6 /* NSObject+EDOBlockedType.h */,
564+
7657C22124F9BEA70056F5A6 /* NSObject+EDOBlockedType.m */,
566565
7685673223A1C10100EDBDB4 /* EDORemoteException.h */,
567566
7685673123A1C10100EDBDB4 /* EDORemoteException.m */,
568567
DC9BF6C022DFC8AD00E135B8 /* NSObject+EDOWeakObject.h */,
@@ -1238,7 +1237,6 @@
12381237
isa = PBXSourcesBuildPhase;
12391238
buildActionMask = 2147483647;
12401239
files = (
1241-
7690BE9423A9CCBD00C00D02 /* NSObject+EDOBlacklistedType.m in Sources */,
12421240
C5A2F0682134D6A000421D72 /* EDOClassMessage.m in Sources */,
12431241
C8A5E007213F896000D28052 /* NSBlock+EDOInvocation.m in Sources */,
12441242
C5A2F0732134D6C100421D72 /* EDOObject+Invocation.m in Sources */,
@@ -1252,6 +1250,7 @@
12521250
C5A2F07C2134D6C100421D72 /* EDOValueObject.m in Sources */,
12531251
C5A2F0782134D6C100421D72 /* EDOProtocolObject.m in Sources */,
12541252
C5A2F07E2134D6C100421D72 /* EDOValueType.m in Sources */,
1253+
7657C22224F9BEA70056F5A6 /* NSObject+EDOBlockedType.m in Sources */,
12551254
DC84AF0522D805EE00D43E26 /* EDODeallocationTracker.m in Sources */,
12561255
DC84AF0422D805C800D43E26 /* EDOWeakObject.m in Sources */,
12571256
C5A2F06D2134D6C100421D72 /* EDOInvocationMessage.m in Sources */,

0 commit comments

Comments
 (0)