Index: chrome/browser/chromeos/attestation/platform_verification_impl.cc |
diff --git a/chrome/browser/chromeos/attestation/platform_verification_impl.cc b/chrome/browser/chromeos/attestation/platform_verification_impl.cc |
index f8debc33b8e3ad8f33aaaf18a7046f3afbe4b73a..f9744b22bfddf58d1cf961fcadd9c1f482388ef8 100644 |
--- a/chrome/browser/chromeos/attestation/platform_verification_impl.cc |
+++ b/chrome/browser/chromeos/attestation/platform_verification_impl.cc |
@@ -8,6 +8,7 @@ |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/web_contents.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
namespace chromeos { |
namespace attestation { |
@@ -21,17 +22,14 @@ void PlatformVerificationImpl::Create( |
DVLOG(2) << __FUNCTION__; |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
DCHECK(render_frame_host); |
- |
- // The created object is strongly bound to (and owned by) the pipe. |
- new PlatformVerificationImpl(render_frame_host, std::move(request)); |
+ mojo::MakeStrongBinding( |
+ base::MakeUnique<PlatformVerificationImpl>(render_frame_host), |
+ std::move(request)); |
} |
PlatformVerificationImpl::PlatformVerificationImpl( |
- content::RenderFrameHost* render_frame_host, |
- mojo::InterfaceRequest<PlatformVerification> request) |
- : binding_(this, std::move(request)), |
- render_frame_host_(render_frame_host), |
- weak_factory_(this) { |
+ content::RenderFrameHost* render_frame_host) |
+ : render_frame_host_(render_frame_host), weak_factory_(this) { |
DCHECK(render_frame_host); |
} |