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

Unified Diff: ios/web/navigation/navigation_manager_impl_unittest.mm

Issue 2935983002: [ObjC ARC] Converts ios/web:ios_web_navigation_unittests to ARC. (Closed)
Patch Set: 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
Index: ios/web/navigation/navigation_manager_impl_unittest.mm
diff --git a/ios/web/navigation/navigation_manager_impl_unittest.mm b/ios/web/navigation/navigation_manager_impl_unittest.mm
index 0cc3e0f0e00490b37092b6cf66833c4e7f34d7ad..899d7e3f4f451fbae5c0710848a49c030c1ea5b2 100644
--- a/ios/web/navigation/navigation_manager_impl_unittest.mm
+++ b/ios/web/navigation/navigation_manager_impl_unittest.mm
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "base/mac/bind_objc_block.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/web/navigation/crw_session_controller+private_constructors.h"
#import "ios/web/navigation/navigation_manager_delegate.h"
#include "ios/web/public/navigation_item.h"
@@ -17,6 +16,10 @@
#include "url/scheme_host_port.h"
#include "url/url_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace web {
namespace {
@@ -63,11 +66,11 @@ class NavigationManagerTest : public PlatformTest {
manager_->SetDelegate(&delegate_);
manager_->SetBrowserState(&browser_state_);
- controller_.reset(
- [[CRWSessionController alloc] initWithBrowserState:&browser_state_]);
- manager_->SetSessionController(controller_.get());
+ controller_ =
+ [[CRWSessionController alloc] initWithBrowserState:&browser_state_];
+ manager_->SetSessionController(controller_);
}
- CRWSessionController* session_controller() { return controller_.get(); }
+ CRWSessionController* session_controller() { return controller_; }
NavigationManagerImpl* navigation_manager() { return manager_.get(); }
TestNavigationManagerDelegate navigation_manager_delegate() {
return delegate_;
@@ -77,7 +80,7 @@ class NavigationManagerTest : public PlatformTest {
TestBrowserState browser_state_;
TestNavigationManagerDelegate delegate_;
std::unique_ptr<NavigationManagerImpl> manager_;
- base::scoped_nsobject<CRWSessionController> controller_;
+ CRWSessionController* controller_;
};
// Tests state of an empty navigation manager.
« no previous file with comments | « ios/web/navigation/navigation_item_storage_test_util.mm ('k') | ios/web/navigation/nscoder_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698