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