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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 namespace font_service { | 55 namespace font_service { |
56 | 56 |
57 FontServiceApp::FontServiceApp() {} | 57 FontServiceApp::FontServiceApp() {} |
58 | 58 |
59 FontServiceApp::~FontServiceApp() {} | 59 FontServiceApp::~FontServiceApp() {} |
60 | 60 |
61 void FontServiceApp::Initialize(mojo::Connector* connector, | 61 void FontServiceApp::Initialize(mojo::Connector* connector, |
62 const std::string& url, | 62 const std::string& url, |
63 uint32_t id, uint32_t user_id) { | 63 const std::string& user_id, uint32_t id) { |
64 tracing_.Initialize(connector, url); | 64 tracing_.Initialize(connector, url); |
65 } | 65 } |
66 | 66 |
67 bool FontServiceApp::AcceptConnection(mojo::Connection* connection) { | 67 bool FontServiceApp::AcceptConnection(mojo::Connection* connection) { |
68 connection->AddInterface(this); | 68 connection->AddInterface(this); |
69 return true; | 69 return true; |
70 } | 70 } |
71 | 71 |
72 void FontServiceApp::Create(mojo::Connection* connection, | 72 void FontServiceApp::Create(mojo::Connection* connection, |
73 mojo::InterfaceRequest<FontService> request) { | 73 mojo::InterfaceRequest<FontService> request) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 int count = paths_.size(); | 118 int count = paths_.size(); |
119 for (int i = 0; i < count; ++i) { | 119 for (int i = 0; i < count; ++i) { |
120 if (path == paths_[i]) | 120 if (path == paths_[i]) |
121 return i; | 121 return i; |
122 } | 122 } |
123 paths_.emplace_back(path); | 123 paths_.emplace_back(path); |
124 return count; | 124 return count; |
125 } | 125 } |
126 | 126 |
127 } // namespace font_service | 127 } // namespace font_service |
OLD | NEW |