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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
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_app.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_app.h" 5 #include "components/filesystem/file_system_app.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 25 matching lines...) Expand all
36 } // namespace filesystem 36 } // namespace filesystem
37 37
38 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} 38 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {}
39 39
40 FileSystemApp::~FileSystemApp() {} 40 FileSystemApp::~FileSystemApp() {}
41 41
42 void FileSystemApp::OnStart(const shell::Identity& identity) { 42 void FileSystemApp::OnStart(const shell::Identity& identity) {
43 tracing_.Initialize(connector(), identity.name()); 43 tracing_.Initialize(connector(), identity.name());
44 } 44 }
45 45
46 bool FileSystemApp::OnConnect(shell::Connection* connection) { 46 bool FileSystemApp::OnConnect(const shell::Identity& remote_identity,
47 connection->AddInterface<mojom::FileSystem>(this); 47 shell::InterfaceRegistry* registry) {
48 registry->AddInterface<mojom::FileSystem>(this);
48 return true; 49 return true;
49 } 50 }
50 51
51 // |InterfaceFactory<Files>| implementation: 52 // |InterfaceFactory<Files>| implementation:
52 void FileSystemApp::Create(const shell::Identity& remote_identity, 53 void FileSystemApp::Create(const shell::Identity& remote_identity,
53 mojo::InterfaceRequest<mojom::FileSystem> request) { 54 mojo::InterfaceRequest<mojom::FileSystem> request) {
54 new FileSystemImpl(remote_identity, std::move(request), GetUserDataDir(), 55 new FileSystemImpl(remote_identity, std::move(request), GetUserDataDir(),
55 lock_table_); 56 lock_table_);
56 } 57 }
57 58
(...skipping 22 matching lines...) Expand all
80 path = path.Append(FILE_PATH_LITERAL("filesystem")); 81 path = path.Append(FILE_PATH_LITERAL("filesystem"));
81 } 82 }
82 83
83 if (!base::PathExists(path)) 84 if (!base::PathExists(path))
84 base::CreateDirectory(path); 85 base::CreateDirectory(path);
85 86
86 return path; 87 return path;
87 } 88 }
88 89
89 } // namespace filesystem 90 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698