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

Side by Side Diff: services/user/user_shell_client.cc

Issue 1963753002: Disable tracing in user service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « services/user/user_shell_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/user/user_shell_client.h" 5 #include "services/user/user_shell_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/filesystem/lock_table.h" 10 #include "components/filesystem/lock_table.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 leveldb_service_runner_(std::move(leveldb_service_runner)) {} 85 leveldb_service_runner_(std::move(leveldb_service_runner)) {}
86 86
87 UserShellClient::~UserShellClient() { 87 UserShellClient::~UserShellClient() {
88 user_service_runner_->DeleteSoon(FROM_HERE, user_objects_.release()); 88 user_service_runner_->DeleteSoon(FROM_HERE, user_objects_.release());
89 leveldb_service_runner_->DeleteSoon(FROM_HERE, leveldb_objects_.release()); 89 leveldb_service_runner_->DeleteSoon(FROM_HERE, leveldb_objects_.release());
90 } 90 }
91 91
92 void UserShellClient::Initialize(shell::Connector* connector, 92 void UserShellClient::Initialize(shell::Connector* connector,
93 const shell::Identity& identity, 93 const shell::Identity& identity,
94 uint32_t id) { 94 uint32_t id) {
95 tracing_.Initialize(connector, identity.name());
96 user_objects_.reset(new UserShellClient::UserServiceObjects( 95 user_objects_.reset(new UserShellClient::UserServiceObjects(
97 GetUserDirForUserID(identity.user_id()))); 96 GetUserDirForUserID(identity.user_id())));
98 leveldb_objects_.reset( 97 leveldb_objects_.reset(
99 new UserShellClient::LevelDBServiceObjects(leveldb_service_runner_)); 98 new UserShellClient::LevelDBServiceObjects(leveldb_service_runner_));
100 } 99 }
101 100
102 bool UserShellClient::AcceptConnection(shell::Connection* connection) { 101 bool UserShellClient::AcceptConnection(shell::Connection* connection) {
103 connection->AddInterface<leveldb::LevelDBService>(this); 102 connection->AddInterface<leveldb::LevelDBService>(this);
104 connection->AddInterface<mojom::UserService>(this); 103 connection->AddInterface<mojom::UserService>(this);
105 return true; 104 return true;
(...skipping 12 matching lines...) Expand all
118 leveldb::LevelDBServiceRequest request) { 117 leveldb::LevelDBServiceRequest request) {
119 leveldb_service_runner_->PostTask( 118 leveldb_service_runner_->PostTask(
120 FROM_HERE, 119 FROM_HERE,
121 base::Bind( 120 base::Bind(
122 &UserShellClient::LevelDBServiceObjects::OnLevelDBServiceRequest, 121 &UserShellClient::LevelDBServiceObjects::OnLevelDBServiceRequest,
123 leveldb_objects_->AsWeakPtr(), connection, 122 leveldb_objects_->AsWeakPtr(), connection,
124 base::Passed(&request))); 123 base::Passed(&request)));
125 } 124 }
126 125
127 } // namespace user_service 126 } // namespace user_service
OLDNEW
« no previous file with comments | « services/user/user_shell_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698