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

Side by Side Diff: content/public/test/repeated_notification_observer.h

Issue 2798143004: Fix for URL opening code (Closed)
Patch Set: Simplified PRE_test checking Created 3 years, 6 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 (c) 2017 The Chromium Authors. All rights reserved.
sky 2017/06/08 19:17:49 no (c) (see style guide).
eugenebng 2017/06/09 13:16:22 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_
sky 2017/06/08 19:17:49 guard doesn't match file name.
eugenebng 2017/06/09 13:16:22 Done.
6 #define CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_
7
8 #include "base/run_loop.h"
9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h"
11
12 namespace content {
13
14 // RepeatedNotificationObserver allows code to wait until specified number
15 // of notifications of particular type are posted.
16 class RepeatedNotificationObserver : public NotificationObserver {
17 public:
18 explicit RepeatedNotificationObserver(int type, int count);
sky 2017/06/08 19:17:49 no explicit
eugenebng 2017/06/09 13:16:22 Done.
19
20 void Observe(int type,
sky 2017/06/08 19:17:49 Prefix with where override comes from, e.g. // Not
eugenebng 2017/06/09 13:16:22 Done.
21 const NotificationSource& source,
22 const NotificationDetails& details) override;
23 void Wait();
sky 2017/06/08 19:17:49 Add description.
eugenebng 2017/06/09 13:16:22 Done.
24
25 private:
26 int num_outstanding_;
27 NotificationRegistrar registrar_;
28 bool running_;
29 base::RunLoop run_loop_;
30
31 DISALLOW_COPY_AND_ASSIGN(RepeatedNotificationObserver);
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698