OLD | NEW |
---|---|
(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 | |
5 #ifndef EXTENSIONS_BROWSER_PRELOAD_CHECK_TEST_UTIL_H_ | |
6 #define EXTENSIONS_BROWSER_PRELOAD_CHECK_TEST_UTIL_H_ | |
7 | |
8 #include "extensions/browser/preload_check.h" | |
9 | |
10 namespace extensions { | |
11 | |
12 // Provides a callback method for a PreloadCheck that stores its results. | |
13 class PreloadCheckObserver { | |
14 public: | |
15 PreloadCheckObserver(); | |
16 virtual ~PreloadCheckObserver(); | |
17 | |
18 virtual void OnCheckComplete(PreloadCheck::Errors errors); | |
Devlin
2017/03/14 01:44:34
Given the common utility of this class, it seems l
michaelpg
2017/03/14 21:58:30
Good idea. Renamed to Runner and added some method
| |
19 | |
20 void Wait(); | |
21 | |
22 const PreloadCheck::Errors& errors() const { return errors_; } | |
23 bool called() const { return called_; } | |
24 | |
25 private: | |
26 PreloadCheck::Errors errors_; | |
27 bool called_; | |
28 | |
29 DISALLOW_COPY_AND_ASSIGN(PreloadCheckObserver); | |
30 }; | |
31 | |
32 } // namespace extensions | |
33 | |
34 #endif // EXTENSIONS_BROWSER_PRELOAD_CHECK_TEST_UTIL_H_ | |
OLD | NEW |