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

Side by Side Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 .shouldBypassMainWorldCSP()) 84 .shouldBypassMainWorldCSP())
85 return ImageLoader::BypassMainWorldCSP; 85 return ImageLoader::BypassMainWorldCSP;
86 return ImageLoader::DoNotBypassMainWorldCSP; 86 return ImageLoader::DoNotBypassMainWorldCSP;
87 } 87 }
88 88
89 class ImageLoader::Task { 89 class ImageLoader::Task {
90 public: 90 public:
91 static std::unique_ptr<Task> create(ImageLoader* loader, 91 static std::unique_ptr<Task> create(ImageLoader* loader,
92 UpdateFromElementBehavior updateBehavior, 92 UpdateFromElementBehavior updateBehavior,
93 ReferrerPolicy referrerPolicy) { 93 ReferrerPolicy referrerPolicy) {
94 return wrapUnique(new Task(loader, updateBehavior, referrerPolicy)); 94 return makeUnique<Task>(loader, updateBehavior, referrerPolicy);
95 } 95 }
96 96
97 Task(ImageLoader* loader, 97 Task(ImageLoader* loader,
98 UpdateFromElementBehavior updateBehavior, 98 UpdateFromElementBehavior updateBehavior,
99 ReferrerPolicy referrerPolicy) 99 ReferrerPolicy referrerPolicy)
100 : m_loader(loader), 100 : m_loader(loader),
101 m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)), 101 m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)),
102 m_updateBehavior(updateBehavior), 102 m_updateBehavior(updateBehavior),
103 m_weakFactory(this), 103 m_weakFactory(this),
104 m_referrerPolicy(referrerPolicy) { 104 m_referrerPolicy(referrerPolicy) {
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 640 }
641 641
642 void ImageLoader::elementDidMoveToNewDocument() { 642 void ImageLoader::elementDidMoveToNewDocument() {
643 if (m_loadDelayCounter) 643 if (m_loadDelayCounter)
644 m_loadDelayCounter->documentChanged(m_element->document()); 644 m_loadDelayCounter->documentChanged(m_element->document());
645 clearFailedLoadURL(); 645 clearFailedLoadURL();
646 setImage(0); 646 setImage(0);
647 } 647 }
648 648
649 } // namespace blink 649 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698