OLD | NEW |
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 CommandLine; | 10 class CommandLine; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Returns true if the browser should start in incognito mode. | 54 // Returns true if the browser should start in incognito mode. |
55 static bool ShouldLaunchIncognito(const CommandLine& command_line, | 55 static bool ShouldLaunchIncognito(const CommandLine& command_line, |
56 const PrefService* prefs); | 56 const PrefService* prefs); |
57 | 57 |
58 // Returns true if |profile| can open a new Browser. This checks the incognito | 58 // Returns true if |profile| can open a new Browser. This checks the incognito |
59 // availability policies and verifies if the |profile| type is allowed to | 59 // availability policies and verifies if the |profile| type is allowed to |
60 // open new windows. | 60 // open new windows. |
61 static bool CanOpenBrowser(Profile* profile); | 61 static bool CanOpenBrowser(Profile* profile); |
62 | 62 |
63 private: | 63 private: |
| 64 // Returns whether parental controls have been enabled on the platform, which |
| 65 // if enabled will overrule the Availability as configured in prefs. |
| 66 static bool ArePlatformParentalControlsEnabled(); |
| 67 |
64 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs); | 68 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs); |
65 }; | 69 }; |
66 | 70 |
67 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ | 71 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ |
OLD | NEW |