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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_ui.h

Issue 2919663002: MD Settings: change how valid origins are checked and tested (Closed)
Patch Set: move md_settings_ui_unittest.cc in chrome/test/BUILD.gn Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/md_settings_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_SETTINGS_MD_SETTINGS_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_
7 7
8 #include <unordered_set> 8 #include <unordered_set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
13 #include "content/public/browser/web_ui_controller.h" 13 #include "content/public/browser/web_ui_controller.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace user_prefs { 17 namespace user_prefs {
18 class PrefRegistrySyncable; 18 class PrefRegistrySyncable;
19 } 19 }
20 20
21 namespace settings { 21 namespace settings {
22 22
23 class SettingsPageUIHandler; 23 class SettingsPageUIHandler;
24 24
25 // Exposed for testing.
26 bool IsValidOrigin(const GURL& url);
27
25 // The WebUI handler for chrome://md-settings. 28 // The WebUI handler for chrome://md-settings.
26 class MdSettingsUI : public content::WebUIController, 29 class MdSettingsUI : public content::WebUIController,
27 public content::WebContentsObserver { 30 public content::WebContentsObserver {
28 public: 31 public:
29 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 32 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
30 33
31 MdSettingsUI(content::WebUI* web_ui, const GURL& url); 34 MdSettingsUI(content::WebUI* web_ui, const GURL& url);
32 ~MdSettingsUI() override; 35 ~MdSettingsUI() override;
33 36
34 // content::WebContentsObserver: 37 // content::WebContentsObserver:
(...skipping 10 matching lines...) Expand all
45 std::unordered_set<SettingsPageUIHandler*> handlers_; 48 std::unordered_set<SettingsPageUIHandler*> handlers_;
46 49
47 base::Time load_start_time_; 50 base::Time load_start_time_;
48 51
49 DISALLOW_COPY_AND_ASSIGN(MdSettingsUI); 52 DISALLOW_COPY_AND_ASSIGN(MdSettingsUI);
50 }; 53 };
51 54
52 } // namespace settings 55 } // namespace settings
53 56
54 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_ 57 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_MD_SETTINGS_UI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/md_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698