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

Side by Side Diff: ios/chrome/browser/web/dom_altering_lock.mm

Issue 2518583002: [ObjC ARC] Converts ios/chrome/browser/web:web to ARC. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/resubmit_data_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome/browser/web/dom_altering_lock.h" 5 #import "ios/chrome/browser/web/dom_altering_lock.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/web/public/web_thread.h" 8 #include "ios/web/public/web_thread.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
10 DEFINE_WEB_STATE_USER_DATA_KEY(DOMAlteringLock); 14 DEFINE_WEB_STATE_USER_DATA_KEY(DOMAlteringLock);
11 15
12 DOMAlteringLock::DOMAlteringLock(web::WebState* web_state) { 16 DOMAlteringLock::DOMAlteringLock(web::WebState* web_state) {
13 } 17 }
14 18
15 DOMAlteringLock::~DOMAlteringLock() { 19 DOMAlteringLock::~DOMAlteringLock() {
16 } 20 }
17 21
18 void DOMAlteringLock::Acquire(id<DOMAltering> feature, 22 void DOMAlteringLock::Acquire(id<DOMAltering> feature,
19 ProceduralBlockWithBool lockAction) { 23 ProceduralBlockWithBool lockAction) {
(...skipping 19 matching lines...) Expand all
39 current_dom_altering_feature_.reset(feature); 43 current_dom_altering_feature_.reset(feature);
40 lockAction(YES); 44 lockAction(YES);
41 } 45 }
42 46
43 // Release the lock on the DOM tree. 47 // Release the lock on the DOM tree.
44 void DOMAlteringLock::Release(id<DOMAltering> feature) { 48 void DOMAlteringLock::Release(id<DOMAltering> feature) {
45 DCHECK_CURRENTLY_ON(web::WebThread::UI); 49 DCHECK_CURRENTLY_ON(web::WebThread::UI);
46 if (current_dom_altering_feature_.get() == feature) 50 if (current_dom_altering_feature_.get() == feature)
47 current_dom_altering_feature_.reset(); 51 current_dom_altering_feature_.reset();
48 } 52 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/BUILD.gn ('k') | ios/chrome/browser/web/resubmit_data_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698