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

Side by Side Diff: chrome/browser/chromeos/arc/test/arc_data_removed_waiter.cc

Issue 2561023002: arc: ARC loading progress should not be shown when started from OOBE. (Closed)
Patch Set: rebased + comments updated 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/test/arc_data_removed_waiter.h"
5
6 #include "base/memory/ptr_util.h"
7 #include "base/run_loop.h"
8
9 namespace arc {
10
11 ArcDataRemovedWaiter::ArcDataRemovedWaiter() {
12 DCHECK(ArcSessionManager::Get());
13 ArcSessionManager::Get()->AddObserver(this);
14 }
15
16 ArcDataRemovedWaiter::~ArcDataRemovedWaiter() {
17 ArcSessionManager::Get()->RemoveObserver(this);
18 }
19
20 void ArcDataRemovedWaiter::Wait() {
21 run_loop_ = base::MakeUnique<base::RunLoop>();
22 run_loop_->Run();
23 run_loop_.reset();
24 }
25
26 void ArcDataRemovedWaiter::OnArcDataRemoved() {
27 if (!run_loop_)
28 return;
29 run_loop_->Quit();
30 }
31
32 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698