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

Unified Diff: content/browser/mime_registry_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: content/browser/mime_registry_impl.cc
diff --git a/content/browser/mime_registry_impl.cc b/content/browser/mime_registry_impl.cc
index aa3562535cf42816098225bee395d73c0654ceb1..156551d7e6f74ee559302a95d6fb1a6c3609de85 100644
--- a/content/browser/mime_registry_impl.cc
+++ b/content/browser/mime_registry_impl.cc
@@ -7,21 +7,22 @@
#include "base/files/file_path.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/common/common_type_converters.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/mime_util.h"
namespace content {
+MimeRegistryImpl::MimeRegistryImpl() = default;
+
+MimeRegistryImpl::~MimeRegistryImpl() = default;
+
// static
void MimeRegistryImpl::Create(blink::mojom::MimeRegistryRequest request) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
- new MimeRegistryImpl(std::move(request));
+ mojo::MakeStrongBinding(base::MakeUnique<MimeRegistryImpl>(),
+ std::move(request));
}
-MimeRegistryImpl::MimeRegistryImpl(blink::mojom::MimeRegistryRequest request)
- : binding_(this, std::move(request)) {}
-
-MimeRegistryImpl::~MimeRegistryImpl() = default;
-
void MimeRegistryImpl::GetMimeTypeFromExtension(
const mojo::String& extension,
const GetMimeTypeFromExtensionCallback& callback) {
« no previous file with comments | « content/browser/mime_registry_impl.h ('k') | content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698