OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SETTINGS_OWNER_FLAGS_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_FLAGS_STORAGE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_FLAGS_STORAGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_FLAGS_STORAGE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/pref_service_flags_storage.h" | 9 #include "chrome/browser/pref_service_flags_storage.h" |
10 | 10 |
11 namespace ownership { | 11 namespace ownership { |
12 class OwnerSettingsService; | 12 class OwnerSettingsService; |
13 } | 13 } |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 namespace about_flags { | 17 namespace about_flags { |
18 | 18 |
19 // Implements the FlagsStorage interface for the owner flags. It inherits from | 19 // Implements the FlagsStorage interface for the owner flags. It inherits from |
20 // PrefServiceFlagsStorage but extends it with storing the flags in the signed | 20 // PrefServiceFlagsStorage but extends it with storing the flags in the signed |
21 // settings as well which effectively applies them to the login session as well. | 21 // settings as well which effectively applies them to the login session as well. |
22 class OwnerFlagsStorage : public ::about_flags::PrefServiceFlagsStorage { | 22 class OwnerFlagsStorage : public ::about_flags::PrefServiceFlagsStorage { |
23 public: | 23 public: |
24 OwnerFlagsStorage(PrefService* prefs, | 24 OwnerFlagsStorage(PrefService* prefs, |
25 ownership::OwnerSettingsService* owner_settings_service); | 25 ownership::OwnerSettingsService* owner_settings_service); |
26 virtual ~OwnerFlagsStorage(); | 26 ~OwnerFlagsStorage() override; |
27 | 27 |
28 virtual bool SetFlags(const std::set<std::string>& flags) override; | 28 bool SetFlags(const std::set<std::string>& flags) override; |
29 | 29 |
30 private: | 30 private: |
31 ownership::OwnerSettingsService* owner_settings_service_; | 31 ownership::OwnerSettingsService* owner_settings_service_; |
32 }; | 32 }; |
33 | 33 |
34 } // namespace about_flags | 34 } // namespace about_flags |
35 } // namespace chromeos | 35 } // namespace chromeos |
36 | 36 |
37 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_FLAGS_STORAGE_H_ | 37 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_FLAGS_STORAGE_H_ |
OLD | NEW |