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

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

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase Created 4 years, 1 month 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 24 matching lines...) Expand all
35 namespace { 35 namespace {
36 36
37 const char kUserDataDir[] = "user-data-dir"; 37 const char kUserDataDir[] = "user-data-dir";
38 38
39 } // namespace filesystem 39 } // namespace filesystem
40 40
41 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} 41 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {}
42 42
43 FileSystemApp::~FileSystemApp() {} 43 FileSystemApp::~FileSystemApp() {}
44 44
45 void FileSystemApp::OnStart(service_manager::ServiceContext* context) { 45 void FileSystemApp::OnStart() {
46 tracing_.Initialize(context->connector(), context->identity().name()); 46 tracing_.Initialize(context()->connector(), context()->identity().name());
47 } 47 }
48 48
49 bool FileSystemApp::OnConnect(const service_manager::ServiceInfo& remote_info, 49 bool FileSystemApp::OnConnect(const service_manager::ServiceInfo& remote_info,
50 service_manager::InterfaceRegistry* registry) { 50 service_manager::InterfaceRegistry* registry) {
51 registry->AddInterface<mojom::FileSystem>(this); 51 registry->AddInterface<mojom::FileSystem>(this);
52 return true; 52 return true;
53 } 53 }
54 54
55 // |InterfaceFactory<Files>| implementation: 55 // |InterfaceFactory<Files>| implementation:
56 void FileSystemApp::Create(const service_manager::Identity& remote_identity, 56 void FileSystemApp::Create(const service_manager::Identity& remote_identity,
(...skipping 28 matching lines...) Expand all
85 path = path.Append(FILE_PATH_LITERAL("filesystem")); 85 path = path.Append(FILE_PATH_LITERAL("filesystem"));
86 } 86 }
87 87
88 if (!base::PathExists(path)) 88 if (!base::PathExists(path))
89 base::CreateDirectory(path); 89 base::CreateDirectory(path);
90 90
91 return path; 91 return path;
92 } 92 }
93 93
94 } // namespace filesystem 94 } // 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