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

Side by Side Diff: ios/web/shell/test/app/web_shell_test_util.mm

Issue 2446893004: [ObjC ARC] Converts ios/web/shell/test to ARC. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/shell/test/app/web_shell_test_util.h" 5 #import "ios/web/shell/test/app/web_shell_test_util.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #import "ios/web/shell/view_controller.h" 9 #import "ios/web/shell/view_controller.h"
10 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
11 namespace web { 15 namespace web {
12 namespace shell_test_util { 16 namespace shell_test_util {
13 17
14 web::WebState* GetCurrentWebState() { 18 web::WebState* GetCurrentWebState() {
15 ViewController* view_controller = static_cast<ViewController*>([[ 19 ViewController* view_controller = static_cast<ViewController*>([[
16 [[UIApplication sharedApplication] delegate] window] rootViewController]); 20 [[UIApplication sharedApplication] delegate] window] rootViewController]);
17 return view_controller.webState; 21 return view_controller.webState;
18 } 22 }
19 23
20 } // namespace shell_test_util 24 } // namespace shell_test_util
21 } // namespace web 25 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698