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

Side by Side Diff: components/font_service/font_service_app.cc

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/font_service/font_service_app.h ('k') | components/leveldb/leveldb_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/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 30 matching lines...) Expand all
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 namespace font_service { 45 namespace font_service {
46 46
47 FontServiceApp::FontServiceApp() {} 47 FontServiceApp::FontServiceApp() {}
48 48
49 FontServiceApp::~FontServiceApp() {} 49 FontServiceApp::~FontServiceApp() {}
50 50
51 void FontServiceApp::OnStart(shell::Connector* connector, 51 void FontServiceApp::OnStart(const shell::Identity& identity) {
52 const shell::Identity& identity, 52 tracing_.Initialize(connector(), identity.name());
53 uint32_t id) {
54 tracing_.Initialize(connector, identity.name());
55 } 53 }
56 54
57 bool FontServiceApp::OnConnect(shell::Connection* connection) { 55 bool FontServiceApp::OnConnect(shell::Connection* connection) {
58 connection->AddInterface(this); 56 connection->AddInterface(this);
59 return true; 57 return true;
60 } 58 }
61 59
62 void FontServiceApp::Create( 60 void FontServiceApp::Create(
63 const shell::Identity& remote_identity, 61 const shell::Identity& remote_identity,
64 mojo::InterfaceRequest<mojom::FontService> request) { 62 mojo::InterfaceRequest<mojom::FontService> request) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 int count = paths_.size(); 118 int count = paths_.size();
121 for (int i = 0; i < count; ++i) { 119 for (int i = 0; i < count; ++i) {
122 if (path == paths_[i]) 120 if (path == paths_[i])
123 return i; 121 return i;
124 } 122 }
125 paths_.emplace_back(path); 123 paths_.emplace_back(path);
126 return count; 124 return count;
127 } 125 }
128 126
129 } // namespace font_service 127 } // namespace font_service
OLDNEW
« no previous file with comments | « components/font_service/font_service_app.h ('k') | components/leveldb/leveldb_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698