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

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

Issue 2120233003: [OBSOLETE] Remove WebURLResponse::initialize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non-const WrappedResourceResponse::bind() 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
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 8eeee1055ef726c37a05b5897e1f75586a0f9dec..e86bae43d207a832bca9f5151c10fe6d456a1f34 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 {
@@ -92,25 +93,13 @@ 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;
- }
+ BLINK_PLATFORM_EXPORT WebURLResponse();
+ BLINK_PLATFORM_EXPORT WebURLResponse(const WebURLResponse&);
+ BLINK_PLATFORM_EXPORT WebURLResponse& operator=(const WebURLResponse&);
- 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 explicit WebURLResponse(const WebURL&);
BLINK_PLATFORM_EXPORT bool isNull() const;
@@ -262,9 +251,15 @@ public:
BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
protected:
+ // Permit subclasses to avoid allocating a default instance of |m_private|
+ // on construction. Parameter must be non-null.
+ BLINK_PLATFORM_EXPORT explicit WebURLResponse(WebURLResponsePrivate*);
+ // Parameter must be non-null.
BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*);
private:
+ // m_private->dispose() will be called on destruction. This normally
+ // deletes the object, but subclasses may change this behaviour. Never null.
WebURLResponsePrivate* m_private;
};

Powered by Google App Engine
This is Rietveld 408576698