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

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

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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 21 matching lines...) Expand all
32 namespace { 32 namespace {
33 33
34 const char kUserDataDir[] = "user-data-dir"; 34 const char kUserDataDir[] = "user-data-dir";
35 35
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::Initialize(shell::Connector* connector, 42 void FileSystemApp::OnStart(shell::Connector* connector,
43 const shell::Identity& identity, 43 const shell::Identity& identity,
44 uint32_t id) { 44 uint32_t id) {
45 tracing_.Initialize(connector, identity.name()); 45 tracing_.Initialize(connector, identity.name());
46 } 46 }
47 47
48 bool FileSystemApp::AcceptConnection(shell::Connection* connection) { 48 bool FileSystemApp::OnConnect(shell::Connection* connection) {
49 connection->AddInterface<mojom::FileSystem>(this); 49 connection->AddInterface<mojom::FileSystem>(this);
50 return true; 50 return true;
51 } 51 }
52 52
53 // |InterfaceFactory<Files>| implementation: 53 // |InterfaceFactory<Files>| implementation:
54 void FileSystemApp::Create(shell::Connection* connection, 54 void FileSystemApp::Create(shell::Connection* connection,
55 mojo::InterfaceRequest<mojom::FileSystem> request) { 55 mojo::InterfaceRequest<mojom::FileSystem> request) {
56 new FileSystemImpl(connection, std::move(request), GetUserDataDir(), 56 new FileSystemImpl(connection, std::move(request), GetUserDataDir(),
57 lock_table_); 57 lock_table_);
58 } 58 }
(...skipping 23 matching lines...) Expand all
82 path = path.Append(FILE_PATH_LITERAL("filesystem")); 82 path = path.Append(FILE_PATH_LITERAL("filesystem"));
83 } 83 }
84 84
85 if (!base::PathExists(path)) 85 if (!base::PathExists(path))
86 base::CreateDirectory(path); 86 base::CreateDirectory(path);
87 87
88 return path; 88 return path;
89 } 89 }
90 90
91 } // namespace filesystem 91 } // 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