| 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..473bddb01d08f7d8d393a377fba013bcdc0426b7 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;
|
| }
|
|
|
| - (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
|
|
|