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

Side by Side Diff: components/arc/arc_bridge_host_impl.cc

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: Use struct instead of pair to save category data and fix lints Created 4 years, 2 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
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 "components/arc/arc_bridge_host_impl.h" 5 #include "components/arc/arc_bridge_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 mojom::VideoInstancePtr video_ptr) { 193 mojom::VideoInstancePtr video_ptr) {
194 OnInstanceReady(ArcBridgeService::Get()->video(), std::move(video_ptr)); 194 OnInstanceReady(ArcBridgeService::Get()->video(), std::move(video_ptr));
195 } 195 }
196 196
197 void ArcBridgeHostImpl::OnWallpaperInstanceReady( 197 void ArcBridgeHostImpl::OnWallpaperInstanceReady(
198 mojom::WallpaperInstancePtr wallpaper_ptr) { 198 mojom::WallpaperInstancePtr wallpaper_ptr) {
199 OnInstanceReady(ArcBridgeService::Get()->wallpaper(), 199 OnInstanceReady(ArcBridgeService::Get()->wallpaper(),
200 std::move(wallpaper_ptr)); 200 std::move(wallpaper_ptr));
201 } 201 }
202 202
203 void ArcBridgeHostImpl::OnTraceInstanceReady(
Yusuke Sato 2016/10/12 05:58:12 sort
shunhsingou 2016/12/22 04:04:34 Removed
204 mojom::TraceInstancePtr trace_ptr) {
205 OnInstanceReady(ArcBridgeService::Get()->trace(), std::move(trace_ptr));
206 }
207
203 void ArcBridgeHostImpl::OnClosed() { 208 void ArcBridgeHostImpl::OnClosed() {
204 DCHECK(thread_checker_.CalledOnValidThread()); 209 DCHECK(thread_checker_.CalledOnValidThread());
205 VLOG(1) << "Mojo connection lost"; 210 VLOG(1) << "Mojo connection lost";
206 211
207 // Close all mojo channels. 212 // Close all mojo channels.
208 mojo_channels_.clear(); 213 mojo_channels_.clear();
209 instance_.reset(); 214 instance_.reset();
210 if (binding_.is_bound()) 215 if (binding_.is_bound())
211 binding_.Close(); 216 binding_.Close();
212 } 217 }
(...skipping 25 matching lines...) Expand all
238 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) { 243 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) {
239 DCHECK(thread_checker_.CalledOnValidThread()); 244 DCHECK(thread_checker_.CalledOnValidThread());
240 mojo_channels_.erase( 245 mojo_channels_.erase(
241 std::find_if(mojo_channels_.begin(), mojo_channels_.end(), 246 std::find_if(mojo_channels_.begin(), mojo_channels_.end(),
242 [channel](std::unique_ptr<MojoChannel>& ptr) { 247 [channel](std::unique_ptr<MojoChannel>& ptr) {
243 return ptr.get() == channel; 248 return ptr.get() == channel;
244 })); 249 }));
245 } 250 }
246 251
247 } // namespace arc 252 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698