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

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

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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
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_app.h" 5 #include "components/filesystem/file_system_app.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/shell/public/cpp/connection.h" 11 #include "mojo/shell/public/cpp/connection.h"
12 #include "mojo/shell/public/cpp/shell.h" 12 #include "mojo/shell/public/cpp/shell.h"
13 13
14 namespace filesystem { 14 namespace filesystem {
15 15
16 FileSystemApp::FileSystemApp() : shell_(nullptr), in_shutdown_(false) {} 16 FileSystemApp::FileSystemApp() : shell_(nullptr), in_shutdown_(false) {}
17 17
18 FileSystemApp::~FileSystemApp() {} 18 FileSystemApp::~FileSystemApp() {}
19 19
20 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url, 20 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url,
21 uint32_t id) { 21 uint32_t id) {
22 shell_ = shell; 22 shell_ = shell;
23 tracing_.Initialize(shell, url); 23 tracing_.Initialize(shell, url);
24 } 24 }
25 25
26 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) { 26 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) {
27 connection->AddService<FileSystem>(this); 27 connection->AddInterface<FileSystem>(this);
28 return true; 28 return true;
29 } 29 }
30 30
31 void FileSystemApp::RegisterDirectoryToClient(DirectoryImpl* directory, 31 void FileSystemApp::RegisterDirectoryToClient(DirectoryImpl* directory,
32 FileSystemClientPtr client) { 32 FileSystemClientPtr client) {
33 directory->set_connection_error_handler( 33 directory->set_connection_error_handler(
34 base::Bind(&FileSystemApp::OnDirectoryConnectionError, 34 base::Bind(&FileSystemApp::OnDirectoryConnectionError,
35 base::Unretained(this), 35 base::Unretained(this),
36 directory)); 36 directory));
37 client_mapping_.emplace_back(directory, std::move(client)); 37 client_mapping_.emplace_back(directory, std::move(client));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 FileSystemApp::Client::~Client() {} 88 FileSystemApp::Client::~Client() {}
89 89
90 FileSystemApp::Client& FileSystemApp::Client::operator=( 90 FileSystemApp::Client& FileSystemApp::Client::operator=(
91 FileSystemApp::Client&& rhs) { 91 FileSystemApp::Client&& rhs) {
92 directory_ = rhs.directory_; 92 directory_ = rhs.directory_;
93 fs_client_ = std::move(rhs.fs_client_); 93 fs_client_ = std::move(rhs.fs_client_);
94 return *this; 94 return *this;
95 } 95 }
96 96
97 } // namespace filesystem 97 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/devtools_service/devtools_service_delegate.cc ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698