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

Side by Side Diff: components/arc/standalone/arc_standalone_bridge_runner.cc

Issue 2384173004: arc: Remove components/arc/standalone (Closed)
Patch Set: Rebased to ToT 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/arc/standalone/arc_standalone_bridge_runner.h"
6
7 #include "base/bind.h"
8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h"
10
11 namespace arc {
12
13 ArcStandaloneBridgeRunner::ArcStandaloneBridgeRunner() : exit_code_(0) {
14 }
15
16 ArcStandaloneBridgeRunner::~ArcStandaloneBridgeRunner() {
17 }
18
19 int ArcStandaloneBridgeRunner::Run() {
20 DCHECK(thread_checker_.CalledOnValidThread());
21 run_loop_.reset(new base::RunLoop());
22 run_loop_->Run();
23 run_loop_.reset(nullptr);
24
25 return exit_code_;
26 }
27
28 void ArcStandaloneBridgeRunner::Stop(int exit_code) {
29 DCHECK(thread_checker_.CalledOnValidThread());
30 exit_code_ = exit_code;
31 CHECK(run_loop_);
32 message_loop_.task_runner()->PostTask(FROM_HERE, run_loop_->QuitClosure());
33 }
34
35 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/standalone/arc_standalone_bridge_runner.h ('k') | components/arc/standalone/service_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698