| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/filesystem/file_system_impl.h" | 5 #include "components/filesystem/file_system_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/files/scoped_file.h" | 12 #include "base/files/scoped_file.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "components/filesystem/directory_impl.h" | 17 #include "components/filesystem/directory_impl.h" |
| 18 #include "components/filesystem/lock_table.h" | 18 #include "components/filesystem/lock_table.h" |
| 19 #include "mojo/shell/public/cpp/connection.h" | 19 #include "services/shell/public/cpp/connection.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 namespace filesystem { | 22 namespace filesystem { |
| 23 | 23 |
| 24 FileSystemImpl::FileSystemImpl(mojo::Connection* connection, | 24 FileSystemImpl::FileSystemImpl(mojo::Connection* connection, |
| 25 mojo::InterfaceRequest<FileSystem> request, | 25 mojo::InterfaceRequest<FileSystem> request, |
| 26 base::FilePath persistent_dir, | 26 base::FilePath persistent_dir, |
| 27 scoped_refptr<LockTable> lock_table) | 27 scoped_refptr<LockTable> lock_table) |
| 28 : remote_application_name_(connection->GetRemoteIdentity().name()), | 28 : remote_application_name_(connection->GetRemoteIdentity().name()), |
| 29 binding_(this, std::move(request)), | 29 binding_(this, std::move(request)), |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 base::FilePath path = persistent_dir_; | 53 base::FilePath path = persistent_dir_; |
| 54 if (!base::PathExists(path)) | 54 if (!base::PathExists(path)) |
| 55 base::CreateDirectory(path); | 55 base::CreateDirectory(path); |
| 56 | 56 |
| 57 new DirectoryImpl( | 57 new DirectoryImpl( |
| 58 std::move(directory), path, std::move(temp_dir), lock_table_); | 58 std::move(directory), path, std::move(temp_dir), lock_table_); |
| 59 callback.Run(FileError::OK); | 59 callback.Run(FileError::OK); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace filesystem | 62 } // namespace filesystem |
| OLD | NEW |