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

Side by Side Diff: third_party/WebKit/Source/core/dom/ThrowOnDynamicMarkupInsertionCountIncrementer.h

Issue 2812013004: Rewrite references to "wtf/" to "platform/wtf/" in core/{dom,html,xml}. (Closed)
Patch Set: Created 3 years, 8 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 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 #ifndef ThrowOnDynamicMarkupInsertionCountIncrementer_h 5 #ifndef ThrowOnDynamicMarkupInsertionCountIncrementer_h
6 #define ThrowOnDynamicMarkupInsertionCountIncrementer_h 6 #define ThrowOnDynamicMarkupInsertionCountIncrementer_h
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "wtf/Allocator.h" 9 #include "platform/wtf/Allocator.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ThrowOnDynamicMarkupInsertionCountIncrementer { 13 class ThrowOnDynamicMarkupInsertionCountIncrementer {
14 STACK_ALLOCATED(); 14 STACK_ALLOCATED();
15 WTF_MAKE_NONCOPYABLE(ThrowOnDynamicMarkupInsertionCountIncrementer); 15 WTF_MAKE_NONCOPYABLE(ThrowOnDynamicMarkupInsertionCountIncrementer);
16 16
17 public: 17 public:
18 explicit ThrowOnDynamicMarkupInsertionCountIncrementer(Document* document) 18 explicit ThrowOnDynamicMarkupInsertionCountIncrementer(Document* document)
19 : count_(document ? &document->throw_on_dynamic_markup_insertion_count_ 19 : count_(document ? &document->throw_on_dynamic_markup_insertion_count_
20 : 0) { 20 : 0) {
21 if (!count_) 21 if (!count_)
22 return; 22 return;
23 ++(*count_); 23 ++(*count_);
24 } 24 }
25 25
26 ~ThrowOnDynamicMarkupInsertionCountIncrementer() { 26 ~ThrowOnDynamicMarkupInsertionCountIncrementer() {
27 if (!count_) 27 if (!count_)
28 return; 28 return;
29 --(*count_); 29 --(*count_);
30 } 30 }
31 31
32 private: 32 private:
33 unsigned* count_; 33 unsigned* count_;
34 }; 34 };
35 35
36 } // namespace blink 36 } // namespace blink
37 37
38 #endif 38 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/TextLinkColors.cpp ('k') | third_party/WebKit/Source/core/dom/TouchList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698