Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: components/filesystem/file_system_impl.cc

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/filesystem/file_system_impl.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/files/scoped_file.h" 14 #include "base/files/scoped_file.h"
15 #include "base/files/scoped_temp_dir.h" 15 #include "base/files/scoped_temp_dir.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "components/filesystem/directory_impl.h" 18 #include "components/filesystem/directory_impl.h"
19 #include "components/filesystem/lock_table.h" 19 #include "components/filesystem/lock_table.h"
20 #include "services/shell/public/cpp/connection.h" 20 #include "services/shell/public/cpp/identity.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace filesystem { 23 namespace filesystem {
24 24
25 FileSystemImpl::FileSystemImpl(shell::Connection* connection, 25 FileSystemImpl::FileSystemImpl(const shell::Identity& remote_identity,
26 mojom::FileSystemRequest request, 26 mojom::FileSystemRequest request,
27 base::FilePath persistent_dir, 27 base::FilePath persistent_dir,
28 scoped_refptr<LockTable> lock_table) 28 scoped_refptr<LockTable> lock_table)
29 : remote_application_name_(connection->GetRemoteIdentity().name()), 29 : remote_application_name_(remote_identity.name()),
30 binding_(this, std::move(request)), 30 binding_(this, std::move(request)),
31 lock_table_(std::move(lock_table)), 31 lock_table_(std::move(lock_table)),
32 persistent_dir_(persistent_dir) {} 32 persistent_dir_(persistent_dir) {}
33 33
34 FileSystemImpl::~FileSystemImpl() { 34 FileSystemImpl::~FileSystemImpl() {
35 } 35 }
36 36
37 void FileSystemImpl::OpenTempDirectory( 37 void FileSystemImpl::OpenTempDirectory(
38 mojo::InterfaceRequest<mojom::Directory> directory, 38 mojo::InterfaceRequest<mojom::Directory> directory,
39 const OpenTempDirectoryCallback& callback) { 39 const OpenTempDirectoryCallback& callback) {
(...skipping 19 matching lines...) Expand all
59 59
60 scoped_refptr<SharedTempDir> shared_temp_dir = 60 scoped_refptr<SharedTempDir> shared_temp_dir =
61 new SharedTempDir(std::move(temp_dir)); 61 new SharedTempDir(std::move(temp_dir));
62 62
63 new DirectoryImpl( 63 new DirectoryImpl(
64 std::move(directory), path, std::move(shared_temp_dir), lock_table_); 64 std::move(directory), path, std::move(shared_temp_dir), lock_table_);
65 callback.Run(mojom::FileError::OK); 65 callback.Run(mojom::FileError::OK);
66 } 66 }
67 67
68 } // namespace filesystem 68 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/filesystem/file_system_impl.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698