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/font_service/font_service_app.h" | 5 #include "components/font_service/font_service_app.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 namespace font_service { | 47 namespace font_service { |
48 | 48 |
49 FontServiceApp::FontServiceApp() {} | 49 FontServiceApp::FontServiceApp() {} |
50 | 50 |
51 FontServiceApp::~FontServiceApp() {} | 51 FontServiceApp::~FontServiceApp() {} |
52 | 52 |
53 void FontServiceApp::OnStart(service_manager::ServiceContext* context) { | 53 void FontServiceApp::OnStart() { |
54 tracing_.Initialize(context->connector(), context->identity().name()); | 54 tracing_.Initialize(context()->connector(), context()->identity().name()); |
55 } | 55 } |
56 | 56 |
57 bool FontServiceApp::OnConnect(const service_manager::ServiceInfo& remote_info, | 57 bool FontServiceApp::OnConnect(const service_manager::ServiceInfo& remote_info, |
58 service_manager::InterfaceRegistry* registry) { | 58 service_manager::InterfaceRegistry* registry) { |
59 registry->AddInterface(this); | 59 registry->AddInterface(this); |
60 return true; | 60 return true; |
61 } | 61 } |
62 | 62 |
63 void FontServiceApp::Create( | 63 void FontServiceApp::Create( |
64 const service_manager::Identity& remote_identity, | 64 const service_manager::Identity& remote_identity, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int count = paths_.size(); | 121 int count = paths_.size(); |
122 for (int i = 0; i < count; ++i) { | 122 for (int i = 0; i < count; ++i) { |
123 if (path == paths_[i]) | 123 if (path == paths_[i]) |
124 return i; | 124 return i; |
125 } | 125 } |
126 paths_.emplace_back(path); | 126 paths_.emplace_back(path); |
127 return count; | 127 return count; |
128 } | 128 } |
129 | 129 |
130 } // namespace font_service | 130 } // namespace font_service |
OLD | NEW |