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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager_data_removed_waiter.cc

Issue 2561023002: arc: ARC loading progress should not be shown when started from OOBE. (Closed)
Patch Set: refactored Created 3 years, 10 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 2017 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 #include "chrome/browser/chromeos/arc/arc_session_manager_data_removed_waiter.h"
5
6 #include "base/run_loop.h"
7
8 namespace arc {
9
10 ArcSessionManagerDataRemovedWaiter::ArcSessionManagerDataRemovedWaiter() {
11 DCHECK(ArcSessionManager::Get());
12 ArcSessionManager::Get()->AddObserver(this);
13 }
14
15 ArcSessionManagerDataRemovedWaiter::~ArcSessionManagerDataRemovedWaiter() {
16 ArcSessionManager::Get()->RemoveObserver(this);
17 }
18
19 void ArcSessionManagerDataRemovedWaiter::Wait() {
20 run_loop_.reset(new base::RunLoop);
hidehiko 2017/01/30 10:12:35 run_loop_ = base::MakeUnique<RunLoop>(); cf) Pleas
khmel 2017/01/31 02:47:08 Done.
21 run_loop_->Run();
22 run_loop_.reset();
23 }
24
25 void ArcSessionManagerDataRemovedWaiter::OnArcDataRemoved() {
26 if (!run_loop_)
27 return;
28 run_loop_->Quit();
29 }
30
31 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698