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 #ifndef COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ | 5 #ifndef SERVICES_USER_USER_SERVICE_IMPL_H_ |
6 #define COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ | 6 #define SERVICES_USER_USER_SERVICE_IMPL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "components/filesystem/public/interfaces/directory.mojom.h" | 9 #include "components/filesystem/public/interfaces/directory.mojom.h" |
10 #include "components/profile_service/public/interfaces/profile.mojom.h" | |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 #include "services/shell/public/cpp/connection.h" | 12 #include "services/shell/public/cpp/connection.h" |
| 13 #include "services/user/public/interfaces/user_service.mojom.h" |
14 | 14 |
15 namespace filesystem { | 15 namespace filesystem { |
16 class LockTable; | 16 class LockTable; |
17 } | 17 } |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 class MessageLoopRef; | 20 class MessageLoopRef; |
21 } | 21 } |
22 | 22 |
23 namespace profile { | 23 namespace user_service { |
24 | 24 |
25 // A service which serves directories to callers. | 25 // A service which serves directories to callers. |
26 class ProfileServiceImpl : public ProfileService { | 26 class UserService : public mojom::UserService { |
27 public: | 27 public: |
28 ProfileServiceImpl(const base::FilePath& base_profile_dir, | 28 UserService(const base::FilePath& base_user_dir, |
29 const scoped_refptr<filesystem::LockTable>& lock_table); | 29 const scoped_refptr<filesystem::LockTable>& lock_table); |
30 ~ProfileServiceImpl() override; | 30 ~UserService() override; |
31 | 31 |
32 // Overridden from ProfileService: | 32 // Overridden from mojom::UserService: |
33 void GetDirectory(filesystem::DirectoryRequest request, | 33 void GetDirectory(filesystem::DirectoryRequest request, |
34 const GetDirectoryCallback& callback) override; | 34 const GetDirectoryCallback& callback) override; |
35 void GetSubDirectory(const mojo::String& sub_directory_path, | 35 void GetSubDirectory(const mojo::String& sub_directory_path, |
36 filesystem::DirectoryRequest request, | 36 filesystem::DirectoryRequest request, |
37 const GetSubDirectoryCallback& callback) override; | 37 const GetSubDirectoryCallback& callback) override; |
38 | 38 |
39 private: | 39 private: |
40 scoped_refptr<filesystem::LockTable> lock_table_; | 40 scoped_refptr<filesystem::LockTable> lock_table_; |
41 base::FilePath path_; | 41 base::FilePath path_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(ProfileServiceImpl); | 43 DISALLOW_COPY_AND_ASSIGN(UserService); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace profile | 46 } // namespace user_service |
47 | 47 |
48 #endif // COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ | 48 #endif // SERVICES_USER_USER_SERVICE_IMPL_H_ |
OLD | NEW |