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 "mojo/shell/public/cpp/connection.h" |
| 14 |
| 15 namespace filesystem { |
| 16 class LockTable; |
| 17 } |
| 18 |
| 19 namespace profile { |
| 20 |
| 21 // A service which serves directories to callers. |
| 22 class ProfileServiceImpl : public ProfileService { |
| 23 public: |
| 24 ProfileServiceImpl(mojo::Connection* connection, |
| 25 mojo::InterfaceRequest<ProfileService> request, |
| 26 base::FilePath base_profile_dir, |
| 27 filesystem::LockTable* lock_table); |
| 28 ~ProfileServiceImpl() override; |
| 29 |
| 30 // Overridden from ProfileService: |
| 31 void GetDirectory( |
| 32 mojo::InterfaceRequest<filesystem::Directory> request) override; |
| 33 |
| 34 private: |
| 35 mojo::StrongBinding<ProfileService> binding_; |
| 36 filesystem::LockTable* lock_table_; |
| 37 base::FilePath path_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(ProfileServiceImpl); |
| 40 }; |
| 41 |
| 42 } // namespace profile |
| 43 |
| 44 #endif // COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ |
OLD | NEW |