| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "mojo/application/public/cpp/application_connection.h" | 9 #include "mojo/application/public/cpp/application_connection.h" |
| 10 #include "mojo/application/public/cpp/application_impl.h" | 10 #include "mojo/application/public/cpp/application_impl.h" |
| 11 | 11 |
| 12 namespace filesystem { | 12 namespace filesystem { |
| 13 | 13 |
| 14 FileSystemApp::FileSystemApp() : app_(nullptr), in_shutdown_(false) {} | 14 FileSystemApp::FileSystemApp() : app_(nullptr), in_shutdown_(false) {} |
| 15 | 15 |
| 16 FileSystemApp::~FileSystemApp() {} | 16 FileSystemApp::~FileSystemApp() {} |
| 17 | 17 |
| 18 void FileSystemApp::Initialize(mojo::ApplicationImpl* app) { | 18 void FileSystemApp::Initialize(mojo::ApplicationImpl* app) { |
| 19 app_ = app; | 19 app_ = app; |
| 20 tracing_.Initialize(app); |
| 20 } | 21 } |
| 21 | 22 |
| 22 bool FileSystemApp::ConfigureIncomingConnection( | 23 bool FileSystemApp::ConfigureIncomingConnection( |
| 23 mojo::ApplicationConnection* connection) { | 24 mojo::ApplicationConnection* connection) { |
| 24 connection->AddService<FileSystem>(this); | 25 connection->AddService<FileSystem>(this); |
| 25 return true; | 26 return true; |
| 26 } | 27 } |
| 27 | 28 |
| 28 void FileSystemApp::RegisterDirectoryToClient(DirectoryImpl* directory, | 29 void FileSystemApp::RegisterDirectoryToClient(DirectoryImpl* directory, |
| 29 FileSystemClientPtr client) { | 30 FileSystemClientPtr client) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 FileSystemApp::Client::~Client() {} | 90 FileSystemApp::Client::~Client() {} |
| 90 | 91 |
| 91 FileSystemApp::Client& FileSystemApp::Client::operator=( | 92 FileSystemApp::Client& FileSystemApp::Client::operator=( |
| 92 FileSystemApp::Client&& rhs) { | 93 FileSystemApp::Client&& rhs) { |
| 93 directory_ = rhs.directory_; | 94 directory_ = rhs.directory_; |
| 94 fs_client_ = rhs.fs_client_.Pass(); | 95 fs_client_ = rhs.fs_client_.Pass(); |
| 95 return *this; | 96 return *this; |
| 96 } | 97 } |
| 97 | 98 |
| 98 } // namespace filesystem | 99 } // namespace filesystem |
| OLD | NEW |