Chromium Code Reviews| Index: ios/chrome/browser/web/error_page_generator.mm |
| diff --git a/ios/chrome/browser/web/error_page_generator.mm b/ios/chrome/browser/web/error_page_generator.mm |
| index 239c3cb1dc9e13608be1fe7e5387740175476369..0f97f3ca815950826a953bce47ad05348148a73f 100644 |
| --- a/ios/chrome/browser/web/error_page_generator.mm |
| +++ b/ios/chrome/browser/web/error_page_generator.mm |
| @@ -6,7 +6,6 @@ |
| #import "base/ios/ns_error_util.h" |
| #include "base/logging.h" |
| -#import "base/mac/scoped_nsobject.h" |
| #include "base/strings/sys_string_conversions.h" |
| #include "base/values.h" |
| #include "components/error_page/common/error_page_params.h" |
| @@ -19,9 +18,13 @@ |
| #include "ui/base/webui/jstemplate_builder.h" |
| #include "url/gurl.h" |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| @implementation ErrorPageGenerator { |
| // Stores the HTML generated from the NSError in the initializer. |
| - base::scoped_nsobject<NSString> html_; |
| + NSString* html_; |
|
Eugene But (OOO till 7-30)
2017/04/18 15:44:43
Since you touching this, would you mind s/html_/_H
gambard
2017/04/20 08:31:40
Done.
|
| } |
| - (instancetype)initWithError:(NSError*)error |
| @@ -60,7 +63,7 @@ |
| NOTREACHED() << "unable to load template. ID: " << IDR_NET_ERROR_HTML; |
| std::string errorHTML = webui::GetTemplatesHtml( |
| templateHTML, &errorStrings, "t" /* IDR_NET_ERROR_HTML root id */); |
| - html_.reset([base::SysUTF8ToNSString(errorHTML) retain]); |
| + html_ = base::SysUTF8ToNSString(errorHTML); |
| } |
| return self; |
| } |
| @@ -68,7 +71,7 @@ |
| #pragma mark - HtmlGenerator |
| - (void)generateHtml:(HtmlCallback)callback { |
| - callback(html_.get()); |
| + callback(html_); |
| } |
| @end |