OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/profile_service/profile_service_impl.h" | 5 #include "components/profile_service/profile_service_impl.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "components/filesystem/directory_impl.h" | 10 #include "components/filesystem/directory_impl.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 lock_table_(lock_table), | 22 lock_table_(lock_table), |
23 path_(base_profile_dir) { | 23 path_(base_profile_dir) { |
24 if (!base::PathExists(path_)) | 24 if (!base::PathExists(path_)) |
25 base::CreateDirectory(path_); | 25 base::CreateDirectory(path_); |
26 } | 26 } |
27 | 27 |
28 ProfileServiceImpl::~ProfileServiceImpl() { | 28 ProfileServiceImpl::~ProfileServiceImpl() { |
29 } | 29 } |
30 | 30 |
31 void ProfileServiceImpl::GetDirectory( | 31 void ProfileServiceImpl::GetDirectory( |
32 mojo::InterfaceRequest<filesystem::Directory> request) { | 32 mojo::InterfaceRequest<filesystem::Directory> request, |
| 33 const GetDirectoryCallback& callback) { |
| 34 LOG(ERROR) << "Getting directory..."; |
33 new filesystem::DirectoryImpl(std::move(request), | 35 new filesystem::DirectoryImpl(std::move(request), |
34 path_, | 36 path_, |
35 scoped_ptr<base::ScopedTempDir>(), | 37 scoped_ptr<base::ScopedTempDir>(), |
36 lock_table_); | 38 lock_table_); |
| 39 callback.Run(filesystem::FileError::OK); |
37 } | 40 } |
38 | 41 |
39 } // namespace profile | 42 } // namespace profile |
OLD | NEW |