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

Unified Diff: third_party/WebKit/Source/core/html/forms/InputType.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/forms/InputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/InputType.cpp b/third_party/WebKit/Source/core/html/forms/InputType.cpp
index ebd6b063070d5def7a87c8ed0fe7077e7aaa6710..4144964b1bafe54d316c233652aa570ba3f01c52 100644
--- a/third_party/WebKit/Source/core/html/forms/InputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/InputType.cpp
@@ -71,8 +71,6 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/text/PlatformLocale.h"
#include "platform/text/TextBreakIterator.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -82,9 +80,9 @@ using namespace HTMLNames;
using InputTypeFactoryFunction = InputType* (*)(HTMLInputElement&);
using InputTypeFactoryMap = HashMap<AtomicString, InputTypeFactoryFunction, CaseFoldingHash>;
-static std::unique_ptr<InputTypeFactoryMap> createInputTypeFactoryMap()
+static PassOwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
{
- std::unique_ptr<InputTypeFactoryMap> map = wrapUnique(new InputTypeFactoryMap);
+ OwnPtr<InputTypeFactoryMap> map = adoptPtr(new InputTypeFactoryMap);
map->add(InputTypeNames::button, ButtonInputType::create);
map->add(InputTypeNames::checkbox, CheckboxInputType::create);
map->add(InputTypeNames::color, ColorInputType::create);
@@ -112,7 +110,7 @@ static std::unique_ptr<InputTypeFactoryMap> createInputTypeFactoryMap()
static const InputTypeFactoryMap* factoryMap()
{
- static const InputTypeFactoryMap* factoryMap = createInputTypeFactoryMap().release();
+ static const InputTypeFactoryMap* factoryMap = createInputTypeFactoryMap().leakPtr();
return factoryMap;
}

Powered by Google App Engine
This is Rietveld 408576698