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

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

Issue 1967693003: Avoid object slicing in WebCredential::create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding the hilarious namespace :) 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/public/platform/WebCredential.h
diff --git a/third_party/WebKit/public/platform/WebCredential.h b/third_party/WebKit/public/platform/WebCredential.h
index 858630232099d23e3dffc5d6e78e6329f61c91e6..459058a157a87ed432831e5c4d2915a73bb1d405 100644
--- a/third_party/WebKit/public/platform/WebCredential.h
+++ b/third_party/WebKit/public/platform/WebCredential.h
@@ -10,6 +10,8 @@
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
+#include <memory>
+
namespace blink {
class PlatformCredential;
@@ -35,7 +37,7 @@ public:
BLINK_PLATFORM_EXPORT bool isLocalCredential() const { return isPasswordCredential(); }
#if INSIDE_BLINK
- BLINK_PLATFORM_EXPORT static WebCredential create(PlatformCredential*);
+ BLINK_PLATFORM_EXPORT static std::unique_ptr<WebCredential> create(PlatformCredential*);
BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*);
BLINK_PLATFORM_EXPORT PlatformCredential* getPlatformCredential() const { return m_platformCredential.get(); }
#endif

Powered by Google App Engine
This is Rietveld 408576698