| 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_app.h" | 5 #include "components/filesystem/file_system_app.h" |
| 6 | 6 |
| 7 #include "mojo/shell/public/cpp/connection.h" | 7 #include "mojo/shell/public/cpp/connection.h" |
| 8 #include "mojo/shell/public/cpp/shell.h" | 8 #include "mojo/shell/public/cpp/shell.h" |
| 9 | 9 |
| 10 namespace filesystem { | 10 namespace filesystem { |
| 11 | 11 |
| 12 FileSystemApp::FileSystemApp() | 12 FileSystemApp::FileSystemApp() |
| 13 : shell_(nullptr), lock_table_(new LockTable) {} | 13 : shell_(nullptr), lock_table_(new LockTable) {} |
| 14 | 14 |
| 15 FileSystemApp::~FileSystemApp() {} | 15 FileSystemApp::~FileSystemApp() {} |
| 16 | 16 |
| 17 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url, | 17 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url, |
| 18 uint32_t id) { | 18 uint32_t id, uint32_t user_id) { |
| 19 shell_ = shell; | 19 shell_ = shell; |
| 20 tracing_.Initialize(shell, url); | 20 tracing_.Initialize(shell, url); |
| 21 } | 21 } |
| 22 | 22 |
| 23 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) { | 23 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) { |
| 24 connection->AddInterface<FileSystem>(this); | 24 connection->AddInterface<FileSystem>(this); |
| 25 return true; | 25 return true; |
| 26 } | 26 } |
| 27 | 27 |
| 28 // |InterfaceFactory<Files>| implementation: | 28 // |InterfaceFactory<Files>| implementation: |
| 29 void FileSystemApp::Create(mojo::Connection* connection, | 29 void FileSystemApp::Create(mojo::Connection* connection, |
| 30 mojo::InterfaceRequest<FileSystem> request) { | 30 mojo::InterfaceRequest<FileSystem> request) { |
| 31 new FileSystemImpl(connection, std::move(request), lock_table_.get()); | 31 new FileSystemImpl(connection, std::move(request), lock_table_.get()); |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace filesystem | 34 } // namespace filesystem |
| OLD | NEW |