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.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "components/filesystem/directory_impl.h" | 12 #include "components/filesystem/directory_impl.h" |
13 #include "components/filesystem/lock_table.h" | 13 #include "components/filesystem/lock_table.h" |
14 #include "components/filesystem/public/interfaces/types.mojom.h" | 14 #include "components/filesystem/public/interfaces/types.mojom.h" |
15 #include "mojo/shell/public/cpp/connection.h" | 15 #include "services/shell/public/cpp/connection.h" |
16 #include "mojo/shell/public/cpp/message_loop_ref.h" | 16 #include "services/shell/public/cpp/message_loop_ref.h" |
17 | 17 |
18 namespace profile { | 18 namespace profile { |
19 | 19 |
20 ProfileServiceImpl::ProfileServiceImpl( | 20 ProfileServiceImpl::ProfileServiceImpl( |
21 const base::FilePath& base_profile_dir, | 21 const base::FilePath& base_profile_dir, |
22 const scoped_refptr<filesystem::LockTable>& lock_table) | 22 const scoped_refptr<filesystem::LockTable>& lock_table) |
23 : lock_table_(lock_table), path_(base_profile_dir) { | 23 : lock_table_(lock_table), path_(base_profile_dir) { |
24 base::CreateDirectory(path_); | 24 base::CreateDirectory(path_); |
25 } | 25 } |
26 | 26 |
(...skipping 24 matching lines...) Expand all Loading... |
51 callback.Run(static_cast<filesystem::FileError>(error)); | 51 callback.Run(static_cast<filesystem::FileError>(error)); |
52 return; | 52 return; |
53 } | 53 } |
54 | 54 |
55 new filesystem::DirectoryImpl(std::move(request), subdir, | 55 new filesystem::DirectoryImpl(std::move(request), subdir, |
56 scoped_ptr<base::ScopedTempDir>(), lock_table_); | 56 scoped_ptr<base::ScopedTempDir>(), lock_table_); |
57 callback.Run(filesystem::FileError::OK); | 57 callback.Run(filesystem::FileError::OK); |
58 } | 58 } |
59 | 59 |
60 } // namespace profile | 60 } // namespace profile |
OLD | NEW |