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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Maybe.h

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 7 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/platform/inspector_protocol/Maybe.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h b/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
index 236c20c9ffcbbe6e7189bca2d74f1d7c58aec4d1..917d26854bb27037dc430588a63dc5fb57675626 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Maybe.h
@@ -16,14 +16,14 @@ template<typename T>
class Maybe {
public:
Maybe() { }
- Maybe(PassOwnPtr<T> value) : m_value(std::move(value)) { }
- void operator=(PassOwnPtr<T> value) { m_value = std::move(value); }
+ Maybe(std::unique_ptr<T> value) : m_value(std::move(value)) { }
+ void operator=(std::unique_ptr<T> value) { m_value = std::move(value); }
T* fromJust() const { DCHECK(m_value); return m_value.get(); }
T* fromMaybe(T* defaultValue) const { return m_value ? m_value.get() : defaultValue; }
bool isJust() const { return !!m_value; }
- PassOwnPtr<T> takeJust() { DCHECK(m_value); return m_value.release(); }
+ std::unique_ptr<T> takeJust() { DCHECK(m_value); return m_value.release(); }
private:
- OwnPtr<T> m_value;
+ std::unique_ptr<T> m_value;
};
template<typename T>

Powered by Google App Engine
This is Rietveld 408576698