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

Unified Diff: third_party/WebKit/public/platform/WebURLResponse.h

Issue 2117313002: Remove WebURLResponse::initialize() [revised] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanups Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebURLResponse.h
diff --git a/third_party/WebKit/public/platform/WebURLResponse.h b/third_party/WebKit/public/platform/WebURLResponse.h
index 7ab714f9aacc3c78575b4b205eaf47ac4a8ec323..243be1e18a55e4c4a4d2d8d819b6456a59e3df53 100644
--- a/third_party/WebKit/public/platform/WebURLResponse.h
+++ b/third_party/WebKit/public/platform/WebURLResponse.h
@@ -37,6 +37,7 @@
#include "public/platform/WebString.h"
#include "public/platform/WebVector.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
+#include <memory>
namespace blink {
@@ -135,25 +136,12 @@ public:
virtual ~ExtraData() { }
};
- ~WebURLResponse() { reset(); }
+ BLINK_PLATFORM_EXPORT ~WebURLResponse();
- WebURLResponse() : m_private(0) { }
- WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
- WebURLResponse& operator=(const WebURLResponse& r)
- {
- assign(r);
- return *this;
- }
-
- explicit WebURLResponse(const WebURL& url) : m_private(0)
- {
- initialize();
- setURL(url);
- }
-
- BLINK_PLATFORM_EXPORT void initialize();
- BLINK_PLATFORM_EXPORT void reset();
- BLINK_PLATFORM_EXPORT void assign(const WebURLResponse&);
+ BLINK_PLATFORM_EXPORT WebURLResponse();
+ BLINK_PLATFORM_EXPORT WebURLResponse(const WebURLResponse&);
+ BLINK_PLATFORM_EXPORT explicit WebURLResponse(const WebURL&);
+ BLINK_PLATFORM_EXPORT WebURLResponse& operator=(const WebURLResponse&);
BLINK_PLATFORM_EXPORT bool isNull() const;
@@ -305,9 +293,17 @@ public:
BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
protected:
- BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*);
+ // Permit subclasses to set arbitrary WebURLResponsePrivate pointer as
+ // |m_private|. Parameter must be non-null. |m_owningPrivate| is not set
+ // in this case.
+ BLINK_PLATFORM_EXPORT explicit WebURLResponse(WebURLResponsePrivate*);
private:
+ // If this instance owns WebURLResponsePrivate |m_owningPrivate| is
+ // non-null and is pointed by |m_private|.
+ std::unique_ptr<WebURLResponsePrivate> m_owningPrivate;
+
+ // Should never be null.
WebURLResponsePrivate* m_private;
};
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698