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

Unified Diff: ios/web/public/test/fakes/test_web_state.mm

Issue 2922973004: [ObjC ARC] Converts ios/web/public/test/fakes:fakes to ARC. (Closed)
Patch Set: scoped_nsobject in .h Created 3 years, 6 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
« no previous file with comments | « ios/web/public/test/fakes/test_web_state.h ('k') | ios/web/public/test/fakes/test_web_state_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/test_web_state.mm
diff --git a/ios/web/public/test/fakes/test_web_state.mm b/ios/web/public/test/fakes/test_web_state.mm
index ac0403237e3100ff4adb6afd2484b65f7a4aea8f..9c268874967e742a94a6ae680562f19ed78fccb5 100644
--- a/ios/web/public/test/fakes/test_web_state.mm
+++ b/ios/web/public/test/fakes/test_web_state.mm
@@ -10,6 +10,10 @@
#import "ios/web/public/web_state/ui/crw_content_view.h"
#include "ios/web/public/web_state/web_state_observer.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace web {
void TestWebState::AddObserver(WebStateObserver* observer) {
@@ -59,7 +63,7 @@ bool TestWebState::ShouldSuppressDialogs() const {
void TestWebState::SetShouldSuppressDialogs(bool should_suppress) {}
UIView* TestWebState::GetView() {
- return view_.get();
+ return view_;
}
const NavigationManager* TestWebState::GetNavigationManager() const {
@@ -90,7 +94,7 @@ void TestWebState::SetNavigationManager(
}
void TestWebState::SetView(UIView* view) {
- view_.reset([view retain]);
+ view_ = view;
}
CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const {
@@ -194,16 +198,16 @@ void TestWebState::OnRenderProcessGone() {
void TestWebState::ShowTransientContentView(CRWContentView* content_view) {
if (content_view) {
- transient_content_view_.reset([content_view retain]);
+ transient_content_view_ = content_view;
}
}
void TestWebState::ClearTransientContentView() {
- transient_content_view_.reset();
+ transient_content_view_ = nil;
}
CRWContentView* TestWebState::GetTransientContentView() {
- return transient_content_view_.get();
+ return transient_content_view_;
}
void TestWebState::SetCurrentURL(const GURL& url) {
« no previous file with comments | « ios/web/public/test/fakes/test_web_state.h ('k') | ios/web/public/test/fakes/test_web_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698