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

Side by Side Diff: services/shell/service_manager.cc

Issue 2175243004: services/{ui,shell}: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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 | « no previous file | services/ui/display/platform_screen_impl_ozone.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/service_manager.h" 5 #include "services/shell/service_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 pid_ = base::Process::Current().Pid(); 130 pid_ = base::Process::Current().Pid();
131 } 131 }
132 DCHECK_NE(mojom::kInvalidInstanceID, id_); 132 DCHECK_NE(mojom::kInvalidInstanceID, id_);
133 } 133 }
134 134
135 ~Instance() override { 135 ~Instance() override {
136 if (parent_) 136 if (parent_)
137 parent_->RemoveChild(this); 137 parent_->RemoveChild(this);
138 // |children_| will be modified during destruction. 138 // |children_| will be modified during destruction.
139 std::set<Instance*> children = children_; 139 std::set<Instance*> children = children_;
140 for (auto child : children) 140 for (auto* child : children)
141 service_manager_->OnInstanceError(child); 141 service_manager_->OnInstanceError(child);
142 142
143 // Shutdown all bindings before we close the runner. This way the process 143 // Shutdown all bindings before we close the runner. This way the process
144 // should see the pipes closed and exit, as well as waking up any potential 144 // should see the pipes closed and exit, as well as waking up any potential
145 // sync/WaitForIncomingResponse(). 145 // sync/WaitForIncomingResponse().
146 service_.reset(); 146 service_.reset();
147 if (pid_receiver_binding_.is_bound()) 147 if (pid_receiver_binding_.is_bound())
148 pid_receiver_binding_.Close(); 148 pid_receiver_binding_.Close();
149 connectors_.CloseAllBindings(); 149 connectors_.CloseAllBindings();
150 service_manager_bindings_.CloseAllBindings(); 150 service_manager_bindings_.CloseAllBindings();
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // Now that the instance has a Service, we can connect to it. 798 // Now that the instance has a Service, we can connect to it.
799 bool connected = instance->ConnectToService(&params); 799 bool connected = instance->ConnectToService(&params);
800 DCHECK(connected); 800 DCHECK(connected);
801 } 801 }
802 802
803 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { 803 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() {
804 return weak_ptr_factory_.GetWeakPtr(); 804 return weak_ptr_factory_.GetWeakPtr();
805 } 805 }
806 806
807 } // namespace shell 807 } // namespace shell
OLDNEW
« no previous file with comments | « no previous file | services/ui/display/platform_screen_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698