OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/test/result_catcher.h" | 5 #include "extensions/test/result_catcher.h" |
6 | 6 |
7 #include "content/public/browser/notification_service.h" | 7 #include "content/public/browser/notification_service.h" |
8 #include "content/public/test/test_utils.h" | 8 #include "content/public/test/test_utils.h" |
9 #include "extensions/browser/notification_types.h" | 9 #include "extensions/browser/notification_types.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 ResultCatcher::ResultCatcher() | 13 ResultCatcher::ResultCatcher() |
14 : browser_context_restriction_(NULL), waiting_(false) { | 14 : browser_context_restriction_(nullptr), waiting_(false) { |
15 registrar_.Add(this, | 15 registrar_.Add(this, |
16 extensions::NOTIFICATION_EXTENSION_TEST_PASSED, | 16 extensions::NOTIFICATION_EXTENSION_TEST_PASSED, |
17 content::NotificationService::AllSources()); | 17 content::NotificationService::AllSources()); |
18 registrar_.Add(this, | 18 registrar_.Add(this, |
19 extensions::NOTIFICATION_EXTENSION_TEST_FAILED, | 19 extensions::NOTIFICATION_EXTENSION_TEST_FAILED, |
20 content::NotificationService::AllSources()); | 20 content::NotificationService::AllSources()); |
21 } | 21 } |
22 | 22 |
23 ResultCatcher::~ResultCatcher() { | 23 ResultCatcher::~ResultCatcher() { |
24 } | 24 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 if (waiting_) | 71 if (waiting_) |
72 base::MessageLoopForUI::current()->Quit(); | 72 base::MessageLoopForUI::current()->Quit(); |
73 break; | 73 break; |
74 | 74 |
75 default: | 75 default: |
76 NOTREACHED(); | 76 NOTREACHED(); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 } // namespace extensions | 80 } // namespace extensions |
OLD | NEW |