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

Unified Diff: components/profile_service/profile_service_impl.cc

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. (Mostly removing BrowserContext knowlege.) Created 4 years, 10 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: components/profile_service/profile_service_impl.cc
diff --git a/components/profile_service/profile_service_impl.cc b/components/profile_service/profile_service_impl.cc
index b6239dd706459860cd7bc7d52bf90d00d965cbfe..ab40f95a072084a2c02e8df7f6c93d3c0a385e33 100644
--- a/components/profile_service/profile_service_impl.cc
+++ b/components/profile_service/profile_service_impl.cc
@@ -4,36 +4,41 @@
#include "components/profile_service/profile_service_impl.h"
+#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "components/filesystem/directory_impl.h"
#include "components/filesystem/lock_table.h"
#include "mojo/shell/public/cpp/connection.h"
+#include "mojo/shell/public/cpp/message_loop_ref.h"
namespace profile {
ProfileServiceImpl::ProfileServiceImpl(
mojo::Connection* connection,
mojo::InterfaceRequest<ProfileService> request,
+ scoped_ptr<mojo::MessageLoopRef> ref,
base::FilePath base_profile_dir,
michaeln 2016/03/05 01:38:54 const ref for the FilePath&
filesystem::LockTable* lock_table)
- : binding_(this, std::move(request)),
+ : message_loop_ref_(std::move(ref)),
+ binding_(this, std::move(request)),
lock_table_(lock_table),
path_(base_profile_dir) {
if (!base::PathExists(path_))
base::CreateDirectory(path_);
}
-ProfileServiceImpl::~ProfileServiceImpl() {
-}
+ProfileServiceImpl::~ProfileServiceImpl() {}
void ProfileServiceImpl::GetDirectory(
- mojo::InterfaceRequest<filesystem::Directory> request) {
+ mojo::InterfaceRequest<filesystem::Directory> request,
+ const GetDirectoryCallback& callback) {
new filesystem::DirectoryImpl(std::move(request),
path_,
scoped_ptr<base::ScopedTempDir>(),
lock_table_);
+ callback.Run(filesystem::FileError::OK);
michaeln 2016/03/05 01:38:54 If this method can never fail, we don't need a err
Elliot Glaysher 2016/03/10 21:00:35 Problem: This method can never fail. Resolution: r
}
} // namespace profile

Powered by Google App Engine
This is Rietveld 408576698