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

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

Issue 2720303002: Do nothing on OnSessionStopped if ARC is being restarted. (Closed)
Patch Set: Get rid of ArcSessionObserver Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 11 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
12 12
13 namespace base { 13 namespace base {
14 class RunLoop; 14 class RunLoop;
15 } 15 }
16 16
17 namespace arc { 17 namespace arc {
18 18
19 // Waits for ARC data has been removed. 19 // Waits for ARC data has been removed.
20 class ArcDataRemovedWaiter : public ArcSessionManager::Observer { 20 class ArcDataRemovedWaiter : public ArcSessionManager::Observer {
21 public: 21 public:
22 ArcDataRemovedWaiter(); 22 ArcDataRemovedWaiter();
23 ~ArcDataRemovedWaiter() override; 23 ~ArcDataRemovedWaiter();
24 24
25 // Waits until ARC data is removed. Waiting is end once ArcSessionManager 25 // Waits until ARC data is removed. Waiting is end once ArcSessionManager
26 // sends OnArcDataRemoved notification. 26 // sends OnArcDataRemoved notification.
27 void Wait(); 27 void Wait();
28 28
29 private: 29 private:
30 // ArcSessionManager::Observer: 30 // ArcSessionManager::Observer:
31 void OnArcDataRemoved() override; 31 void OnArcDataRemoved() override;
32 32
33 std::unique_ptr<base::RunLoop> run_loop_; 33 std::unique_ptr<base::RunLoop> run_loop_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(ArcDataRemovedWaiter); 35 DISALLOW_COPY_AND_ASSIGN(ArcDataRemovedWaiter);
36 }; 36 };
37 37
38 } // namespace arc 38 } // namespace arc
39 39
40 #endif // CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_ 40 #endif // CHROME_BROWSER_CHROMEOS_ARC_TEST_ARC_DATA_REMOVED_WAITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698