| Index: chrome/browser/extensions/mock_system_info_watcher.h
|
| diff --git a/chrome/browser/extensions/mock_system_info_watcher.h b/chrome/browser/extensions/mock_system_info_watcher.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..440da5354fdf24a1e21d1443f217dc4269a35be9
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/mock_system_info_watcher.h
|
| @@ -0,0 +1,33 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
|
| +
|
| +#include "chrome/browser/extensions/system_info_watcher.h"
|
| +
|
| +#include "base/timer.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +class MockSystemInfoWatcher : public SystemInfoWatcher {
|
| + public:
|
| + MockSystemInfoWatcher();
|
| + virtual ~MockSystemInfoWatcher();
|
| +
|
| + private:
|
| + // SystemInfoWatcher implementation.
|
| + virtual bool PlatformStartWatching(const std::string& event_name) OVERRIDE;
|
| + virtual bool PlatformStopWatching(const std::string& event_name) OVERRIDE;
|
| +
|
| + // Called when the timer gets expired. It is used to emulate the random
|
| + // system event.
|
| + void OnTimeoutEvent();
|
| +
|
| + base::RepeatingTimer<MockSystemInfoWatcher> timer_;
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
|
| +
|
|
|