OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 9 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
10 #include "components/prefs/pref_change_registrar.h" | 10 #include "components/prefs/pref_change_registrar.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 void OnDisplayAdded(const display::Display& new_display) override; | 39 void OnDisplayAdded(const display::Display& new_display) override; |
40 void OnDisplayRemoved(const display::Display& old_display) override; | 40 void OnDisplayRemoved(const display::Display& old_display) override; |
41 void OnDisplayMetricsChanged(const display::Display& display, | 41 void OnDisplayMetricsChanged(const display::Display& display, |
42 uint32_t changed_metrics) override; | 42 uint32_t changed_metrics) override; |
43 | 43 |
44 private: | 44 private: |
45 ArcSupportHost(); | 45 ArcSupportHost(); |
46 | 46 |
47 bool Initialize(); | 47 bool Initialize(); |
48 void OnMetricsPreferenceChanged(); | 48 void OnMetricsPreferenceChanged(); |
| 49 void OnBackupAndRestorePreferenceChanged(); |
| 50 void OnLocationServicePreferenceChanged(); |
49 void SendMetricsMode(); | 51 void SendMetricsMode(); |
| 52 void SendBackupAndRestoreMode(); |
| 53 void SendLocationServicesMode(); |
| 54 void SendOptionMode(const std::string& action_name, |
| 55 const std::string& pref_name); |
50 void EnableMetrics(bool is_enabled); | 56 void EnableMetrics(bool is_enabled); |
51 void EnableBackupRestore(bool is_enabled); | 57 void EnableBackupRestore(bool is_enabled); |
52 void EnableLocationService(bool is_enabled); | 58 void EnableLocationService(bool is_enabled); |
53 | 59 |
54 // Unowned pointer. | 60 // Unowned pointer. |
55 Client* client_ = nullptr; | 61 Client* client_ = nullptr; |
56 | 62 |
57 // Used to track metrics preference. | 63 // Used to track metrics preference. |
| 64 PrefChangeRegistrar pref_local_change_registrar_; |
| 65 // Used to track backup&restore and location service preference. |
58 PrefChangeRegistrar pref_change_registrar_; | 66 PrefChangeRegistrar pref_change_registrar_; |
59 | 67 |
60 DISALLOW_COPY_AND_ASSIGN(ArcSupportHost); | 68 DISALLOW_COPY_AND_ASSIGN(ArcSupportHost); |
61 }; | 69 }; |
62 | 70 |
63 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SUPPORT_HOST_H_ |
OLD | NEW |