OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ |
7 | 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
8 #include "base/macros.h" | 11 #include "base/macros.h" |
9 #include "content/public/browser/web_ui_controller.h" | 12 #include "content/public/browser/web_ui_controller.h" |
10 | 13 |
| 14 namespace base { |
| 15 class DictionaryValue; |
| 16 } |
| 17 |
| 18 // Namespace for exposing the method for unit tests. |
| 19 namespace internal { |
| 20 |
| 21 // Removes elements from |prefs| where the key does not match any of the |
| 22 // prefixes in |valid_prefixes|. |
| 23 void FilterPrefs(const std::vector<std::string>& valid_prefixes, |
| 24 base::DictionaryValue* prefs); |
| 25 |
| 26 } // namespace internal |
| 27 |
11 // Controller for chrome://local-state/ page. | 28 // Controller for chrome://local-state/ page. |
12 class LocalStateUI : public content::WebUIController { | 29 class LocalStateUI : public content::WebUIController { |
13 public: | 30 public: |
14 explicit LocalStateUI(content::WebUI* web_ui); | 31 explicit LocalStateUI(content::WebUI* web_ui); |
15 ~LocalStateUI() override; | 32 ~LocalStateUI() override; |
16 | 33 |
17 private: | 34 private: |
18 DISALLOW_COPY_AND_ASSIGN(LocalStateUI); | 35 DISALLOW_COPY_AND_ASSIGN(LocalStateUI); |
19 }; | 36 }; |
20 | 37 |
21 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ | 38 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_STATE_LOCAL_STATE_UI_H_ |
OLD | NEW |