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

Unified Diff: ios/web/net/clients/crw_js_injection_network_client_unittest.mm

Issue 2239773002: Annotates functions returning retained objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removes functions that are not in headers AND not in ios code. Created 4 years, 4 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: ios/web/net/clients/crw_js_injection_network_client_unittest.mm
diff --git a/ios/web/net/clients/crw_js_injection_network_client_unittest.mm b/ios/web/net/clients/crw_js_injection_network_client_unittest.mm
index b5353d5dc850920a0bff2287dfabf9143cf81972..19958204aede0cc335fdb575f04cec3351ed9a7c 100644
--- a/ios/web/net/clients/crw_js_injection_network_client_unittest.mm
+++ b/ios/web/net/clients/crw_js_injection_network_client_unittest.mm
@@ -111,7 +111,8 @@ class CRWJSInjectionNetworkClientTest : public testing::Test {
protected:
// Returns a CRNHTTPURLResponse. If |include_content_length|, header includes
// Content-Length set to the length of test_data_.
- CRNHTTPURLResponse* CreateTestResponse(BOOL include_content_length);
+ CRNHTTPURLResponse* CreateTestResponse(BOOL include_content_length)
+ NS_RETURNS_RETAINED;
// Returns number of times an injected cr_web script tag is found in the
// underlying client's loaded data. Script tag should immediately follow
@@ -130,7 +131,7 @@ class CRWJSInjectionNetworkClientTest : public testing::Test {
};
CRNHTTPURLResponse* CRWJSInjectionNetworkClientTest::CreateTestResponse(
- BOOL include_content_length) {
+ BOOL include_content_length) NS_RETURNS_RETAINED {
Eugene But (OOO till 7-30) 2016/08/16 16:45:48 Is it necessary to annotate in both interface and
stkhapugin 2016/08/16 16:51:49 Actually this annotation only makes a difference i
Eugene But (OOO till 7-30) 2016/08/16 17:02:31 If |NS_RETURNS_RETAINED| in implementation does no
NSMutableDictionary *headers = [NSMutableDictionary
dictionaryWithDictionary:@{ @"Content-Type" : @"text/html" }];
if (include_content_length) {

Powered by Google App Engine
This is Rietveld 408576698