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

Side by Side Diff: third_party/WebKit/Source/core/dom/IncrementLoadEventDelayCount.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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 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 #include "core/dom/IncrementLoadEventDelayCount.h" 5 #include "core/dom/IncrementLoadEventDelayCount.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "wtf/PtrUtil.h"
9 #include <memory>
8 10
9 namespace blink { 11 namespace blink {
10 12
11 PassOwnPtr<IncrementLoadEventDelayCount> IncrementLoadEventDelayCount::create(Do cument& document) 13 std::unique_ptr<IncrementLoadEventDelayCount> IncrementLoadEventDelayCount::crea te(Document& document)
12 { 14 {
13 return adoptPtr(new IncrementLoadEventDelayCount(document)); 15 return wrapUnique(new IncrementLoadEventDelayCount(document));
14 } 16 }
15 17
16 IncrementLoadEventDelayCount::IncrementLoadEventDelayCount(Document& document) 18 IncrementLoadEventDelayCount::IncrementLoadEventDelayCount(Document& document)
17 : m_document(&document) 19 : m_document(&document)
18 { 20 {
19 document.incrementLoadEventDelayCount(); 21 document.incrementLoadEventDelayCount();
20 } 22 }
21 23
22 IncrementLoadEventDelayCount::~IncrementLoadEventDelayCount() 24 IncrementLoadEventDelayCount::~IncrementLoadEventDelayCount()
23 { 25 {
24 m_document->decrementLoadEventDelayCount(); 26 m_document->decrementLoadEventDelayCount();
25 } 27 }
26 28
27 void IncrementLoadEventDelayCount::documentChanged(Document& newDocument) 29 void IncrementLoadEventDelayCount::documentChanged(Document& newDocument)
28 { 30 {
29 newDocument.incrementLoadEventDelayCount(); 31 newDocument.incrementLoadEventDelayCount();
30 m_document->decrementLoadEventDelayCount(); 32 m_document->decrementLoadEventDelayCount();
31 m_document = &newDocument; 33 m_document = &newDocument;
32 } 34 }
33 } // namespace blink 35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698