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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs.h

Issue 336213005: Disable incognito link if parental control is on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky's comments addressed 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
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/prefs/incognito_mode_prefs.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) 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_PREFS_INCOGNITO_MODE_PREFS_H_ 5 #ifndef CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_
6 #define CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ 6 #define CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 class PrefService; 10 class PrefService;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Returns true if the browser should start in incognito mode. 57 // Returns true if the browser should start in incognito mode.
58 static bool ShouldLaunchIncognito(const base::CommandLine& command_line, 58 static bool ShouldLaunchIncognito(const base::CommandLine& command_line,
59 const PrefService* prefs); 59 const PrefService* prefs);
60 60
61 // Returns true if |profile| can open a new Browser. This checks the incognito 61 // Returns true if |profile| can open a new Browser. This checks the incognito
62 // availability policies and verifies if the |profile| type is allowed to 62 // availability policies and verifies if the |profile| type is allowed to
63 // open new windows. 63 // open new windows.
64 static bool CanOpenBrowser(Profile* profile); 64 static bool CanOpenBrowser(Profile* profile);
65 65
66 // Returns whether parental controls have been enabled on the platform. This
67 // method simply returns a cached value and thus the result may be stale. May
68 // be called on any thread.
69 static bool ArePlatformParentalControlsEnabledCached();
70
71 #if defined(OS_WIN)
72 // Initializes the parental control settings. Must be called on UI thread and
73 // before |ArePlatformParentalControlsEnabled|.
74 static void InitializePlatformParentalControls();
75 #endif // OS_WIN
76
66 private: 77 private:
67 // Returns whether parental controls have been enabled on the platform, which 78 // Returns whether parental controls have been enabled on the platform, which
68 // if enabled will overrule the Availability as configured in prefs. 79 // if enabled will overrule the Availability as configured in prefs.
69 static bool ArePlatformParentalControlsEnabled(); 80 static bool ArePlatformParentalControlsEnabled();
70 81
71 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs); 82 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs);
72 }; 83 };
73 84
74 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ 85 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/prefs/incognito_mode_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698