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

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_impl.cc

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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: 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);
}
« no previous file with comments | « chrome/browser/chromeos/attestation/platform_verification_impl.h ('k') | chrome/browser/media/output_protection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698