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

Side by Side Diff: chrome/browser/extensions/mock_system_info_watcher.h

Issue 10836341: Add the basic code skeleton for system info event router (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add mock implementation for onAdded and onRemoved events Created 8 years, 4 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) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
5 #define CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
6
7 #include "chrome/browser/extensions/system_info_watcher.h"
8
9 #include "base/timer.h"
10
11 namespace extensions {
12
13 class MockSystemInfoWatcher : public SystemInfoWatcher {
14 public:
15 MockSystemInfoWatcher();
16 virtual ~MockSystemInfoWatcher();
17
18 private:
19 // SystemInfoWatcher implementation.
20 virtual bool PlatformStartWatching(const std::string& event_name) OVERRIDE;
21 virtual bool PlatformStopWatching(const std::string& event_name) OVERRIDE;
22
23 // Called when the timer gets expired. It is used to emulate the random
24 // system event.
25 void OnTimeoutEvent();
26
27 base::RepeatingTimer<MockSystemInfoWatcher> timer_;
28 };
29
30 } // namespace extensions
31
32 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_SYSTEM_INFO_WATCHER_H_
33
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698