OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_SYSTEM_FAKE_STATISTICS_PROVIDER_H_ | |
6 #define CHROMEOS_SYSTEM_FAKE_STATISTICS_PROVIDER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "chromeos/system/statistics_provider.h" | |
10 | |
11 namespace chromeos { | |
12 namespace system { | |
13 | |
14 // Custom StatisticsProvider that will return each set of region settings. | |
15 class FakeStatisticsProvider : public StatisticsProvider { | |
16 public: | |
17 virtual ~FakeStatisticsProvider() {} | |
Dmitry Polukhin
2014/10/03 07:49:52
Missing OVERRIDE.
Alexander Alekseev
2014/10/03 12:59:17
Done.
| |
18 | |
19 void set_locale(const std::string& locale) { initial_locale_ = locale; } | |
20 | |
21 void set_keyboard_layout(const std::string& keyboard_layout) { | |
22 keyboard_layout_ = keyboard_layout; | |
23 } | |
24 | |
25 private: | |
26 // StatisticsProvider overrides. | |
27 virtual void StartLoadingMachineStatistics( | |
28 const scoped_refptr<base::TaskRunner>& file_task_runner, | |
29 bool load_oem_manifest) OVERRIDE; | |
30 | |
31 // Populates the named machine statistic for initial_locale and | |
32 // keyboard_layout only. | |
33 virtual bool GetMachineStatistic(const std::string& name, | |
34 std::string* result) OVERRIDE; | |
35 | |
36 virtual bool GetMachineFlag(const std::string& name, bool* result) OVERRIDE; | |
37 virtual void Shutdown() OVERRIDE; | |
38 | |
39 std::string initial_locale_; | |
40 std::string keyboard_layout_; | |
41 }; | |
42 | |
43 } // namespace system | |
44 } // namespace chromeos | |
45 | |
46 #endif // CHROMEOS_SYSTEM_FAKE_STATISTICS_PROVIDER_H_ | |
OLD | NEW |