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

Side by Side Diff: ios/web/web_state/web_state_weak_ptr_factory.mm

Issue 2916473002: [ObjC ARC] Converts ios/web:web to ARC. (Closed)
Patch Set: Tweaks to unit test memory management 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "ios/web/web_state/web_state_weak_ptr_factory.h" 5 #include "ios/web/web_state/web_state_weak_ptr_factory.h"
6 6
7 #import "ios/web/public/web_state/web_state.h" 7 #import "ios/web/public/web_state/web_state.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 namespace web { 13 namespace web {
10 14
11 // static 15 // static
12 base::WeakPtr<WebState> WebStateWeakPtrFactory::CreateWeakPtr( 16 base::WeakPtr<WebState> WebStateWeakPtrFactory::CreateWeakPtr(
13 WebState* web_state) { 17 WebState* web_state) {
14 if (!web_state) 18 if (!web_state)
15 return base::WeakPtr<WebState>(); 19 return base::WeakPtr<WebState>();
16 return web_state->AsWeakPtr(); 20 return web_state->AsWeakPtr();
17 } 21 }
18 22
19 } // namespace web 23 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698