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

Unified Diff: services/catalog/catalog.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
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | services/file/file_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/catalog.cc
diff --git a/services/catalog/catalog.cc b/services/catalog/catalog.cc
index bcd03c5e92bfe5b103209b1805a405713eaa0120..19b088373551c99d2c1e8b8e4fe61aab08804696 100644
--- a/services/catalog/catalog.cc
+++ b/services/catalog/catalog.cc
@@ -14,6 +14,7 @@
#include "components/filesystem/directory_impl.h"
#include "components/filesystem/lock_table.h"
#include "components/filesystem/public/interfaces/types.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/catalog/constants.h"
#include "services/catalog/instance.h"
#include "services/catalog/reader.h"
@@ -130,9 +131,11 @@ void Catalog::Create(const shell::Identity& remote_identity,
lock_table_ = new filesystem::LockTable;
base::FilePath resources_path =
GetPathForApplicationName(remote_identity.name());
- new filesystem::DirectoryImpl(std::move(request), resources_path,
- scoped_refptr<filesystem::SharedTempDir>(),
- lock_table_);
+ mojo::MakeStrongBinding(
+ base::MakeUnique<filesystem::DirectoryImpl>(
+ resources_path, scoped_refptr<filesystem::SharedTempDir>(),
+ lock_table_),
+ std::move(request));
}
Instance* Catalog::GetInstanceForUserId(const std::string& user_id) {
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | services/file/file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698