Chromium Code Reviews| Index: ios/web/navigation/navigation_item_impl.mm |
| diff --git a/ios/web/navigation/navigation_item_impl.mm b/ios/web/navigation/navigation_item_impl.mm |
| index 0e979bc48f3a78ca095712b151f475c767d6c7e2..2cc32f570eb39b67e13c8a34ac418e95a7bb607a 100644 |
| --- a/ios/web/navigation/navigation_item_impl.mm |
| +++ b/ios/web/navigation/navigation_item_impl.mm |
| @@ -14,6 +14,10 @@ |
| #include "ui/base/page_transition_types.h" |
| #include "ui/gfx/text_elider.h" |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| namespace { |
| // Returns a new unique ID for use in NavigationItem during construction. The |
| @@ -204,7 +208,7 @@ bool NavigationItemImpl::HasPostData() const { |
| } |
| NSDictionary* NavigationItemImpl::GetHttpRequestHeaders() const { |
| - return [[http_request_headers_ copy] autorelease]; |
| + return [http_request_headers_ copy]; |
| } |
| void NavigationItemImpl::AddHttpRequestHeaders( |
| @@ -220,7 +224,7 @@ void NavigationItemImpl::AddHttpRequestHeaders( |
| void NavigationItemImpl::SetSerializedStateObject( |
| NSString* serialized_state_object) { |
| - serialized_state_object_.reset([serialized_state_object retain]); |
| + serialized_state_object_.reset(serialized_state_object); |
|
kkhorimoto
2016/08/19 23:15:43
How does ARC function for C++ classes that have NS
stkhapugin
2016/08/22 11:37:00
ARC treats all Cocoa object type variables in Obje
|
| } |
| NSString* NavigationItemImpl::GetSerializedStateObject() const { |
| @@ -244,7 +248,7 @@ bool NavigationItemImpl::ShouldSkipResubmitDataConfirmation() const { |
| } |
| void NavigationItemImpl::SetPostData(NSData* post_data) { |
| - post_data_.reset([post_data retain]); |
| + post_data_.reset(post_data); |
| } |
| NSData* NavigationItemImpl::GetPostData() const { |