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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_interstitial.h

Issue 335833003: Rename "managed (mode|user)" to "supervised user" (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (+ a few other cleanups) Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MANAGED_MODE_MANAGED_MODE_INTERSTITIAL_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_INTERSTITIAL_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/prefs/pref_change_registrar.h" 12 #include "base/prefs/pref_change_registrar.h"
13 #include "content/public/browser/interstitial_page_delegate.h" 13 #include "content/public/browser/interstitial_page_delegate.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace content { 16 namespace content {
17 class InterstitialPage; 17 class InterstitialPage;
18 class WebContents; 18 class WebContents;
19 } 19 }
20 20
21 // Delegate for an interstitial page when a page is blocked in managed mode 21 // Delegate for an interstitial page when a page is blocked for a supervised
22 // because it is not on any whitelist. It lets an authorized user preview the 22 // user because it is on a blacklist (in "allow everything" mode) or not on any
23 // blocked page, to decide later whether to manually allow it. 23 // whitelist (in "allow only specified sites" mode).
24 class ManagedModeInterstitial : public content::InterstitialPageDelegate { 24 class SupervisedUserInterstitial : public content::InterstitialPageDelegate {
25 public: 25 public:
26 static void Show(content::WebContents* web_contents, 26 static void Show(content::WebContents* web_contents,
27 const GURL& url, 27 const GURL& url,
28 const base::Callback<void(bool)>& callback); 28 const base::Callback<void(bool)>& callback);
29 29
30 private: 30 private:
31 ManagedModeInterstitial(content::WebContents* web_contents, 31 SupervisedUserInterstitial(content::WebContents* web_contents,
32 const GURL& url, 32 const GURL& url,
33 const base::Callback<void(bool)>& callback); 33 const base::Callback<void(bool)>& callback);
34 virtual ~ManagedModeInterstitial(); 34 virtual ~SupervisedUserInterstitial();
35 35
36 bool Init(); 36 bool Init();
37 37
38 // InterstitialPageDelegate implementation. 38 // InterstitialPageDelegate implementation.
39 virtual std::string GetHTMLContents() OVERRIDE; 39 virtual std::string GetHTMLContents() OVERRIDE;
40 virtual void CommandReceived(const std::string& command) OVERRIDE; 40 virtual void CommandReceived(const std::string& command) OVERRIDE;
41 virtual void OnProceed() OVERRIDE; 41 virtual void OnProceed() OVERRIDE;
42 virtual void OnDontProceed() OVERRIDE; 42 virtual void OnDontProceed() OVERRIDE;
43 43
44 // Returns whether the blocked URL is now allowed. Called initially before the 44 // Returns whether the blocked URL is now allowed. Called initially before the
(...skipping 10 matching lines...) Expand all
55 content::InterstitialPage* interstitial_page_; // Owns us. 55 content::InterstitialPage* interstitial_page_; // Owns us.
56 56
57 PrefChangeRegistrar pref_change_registrar_; 57 PrefChangeRegistrar pref_change_registrar_;
58 58
59 // The UI language. Used for formatting the URL for display. 59 // The UI language. Used for formatting the URL for display.
60 std::string languages_; 60 std::string languages_;
61 GURL url_; 61 GURL url_;
62 62
63 base::Callback<void(bool)> callback_; 63 base::Callback<void(bool)> callback_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(ManagedModeInterstitial); 65 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInterstitial);
66 }; 66 };
67 67
68 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_INTERSTITIAL_H_ 68 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698