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 "services/file/file_service.h" | 5 #include "services/file/file_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "components/filesystem/lock_table.h" | 10 #include "components/filesystem/lock_table.h" |
11 #include "components/leveldb/leveldb_service_impl.h" | 11 #include "components/leveldb/leveldb_service_impl.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 #include "services/file/file_system.h" | 13 #include "services/file/file_system.h" |
14 #include "services/file/user_id_map.h" | 14 #include "services/file/user_id_map.h" |
15 #include "services/service_manager/public/cpp/connection.h" | |
16 #include "services/service_manager/public/cpp/service_context.h" | 15 #include "services/service_manager/public/cpp/service_context.h" |
17 | 16 |
18 namespace file { | 17 namespace file { |
19 | 18 |
20 class FileService::FileSystemObjects | 19 class FileService::FileSystemObjects |
21 : public base::SupportsWeakPtr<FileSystemObjects> { | 20 : public base::SupportsWeakPtr<FileSystemObjects> { |
22 public: | 21 public: |
23 // Created on the main thread. | 22 // Created on the main thread. |
24 FileSystemObjects(base::FilePath user_dir) : user_dir_(user_dir) {} | 23 FileSystemObjects(base::FilePath user_dir) : user_dir_(user_dir) {} |
25 | 24 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 leveldb::mojom::LevelDBServiceRequest request) { | 121 leveldb::mojom::LevelDBServiceRequest request) { |
123 leveldb_service_runner_->PostTask( | 122 leveldb_service_runner_->PostTask( |
124 FROM_HERE, | 123 FROM_HERE, |
125 base::Bind( | 124 base::Bind( |
126 &FileService::LevelDBServiceObjects::OnLevelDBServiceRequest, | 125 &FileService::LevelDBServiceObjects::OnLevelDBServiceRequest, |
127 leveldb_objects_->AsWeakPtr(), remote_identity, | 126 leveldb_objects_->AsWeakPtr(), remote_identity, |
128 base::Passed(&request))); | 127 base::Passed(&request))); |
129 } | 128 } |
130 | 129 |
131 } // namespace user_service | 130 } // namespace user_service |
OLD | NEW |