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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 static void InitializePlatformParentalControls(); | 71 static void InitializePlatformParentalControls(); |
72 #endif | 72 #endif |
73 | 73 |
74 // Returns whether parental controls have been enabled on the platform. This | 74 // Returns whether parental controls have been enabled on the platform. This |
75 // method evaluates and caches if the platform controls have been enabled on | 75 // method evaluates and caches if the platform controls have been enabled on |
76 // the first call, which must be on the UI thread when IO and blocking are | 76 // the first call, which must be on the UI thread when IO and blocking are |
77 // allowed. Subsequent calls may be from any thread. | 77 // allowed. Subsequent calls may be from any thread. |
78 static bool ArePlatformParentalControlsEnabled() WARN_UNUSED_RESULT; | 78 static bool ArePlatformParentalControlsEnabled() WARN_UNUSED_RESULT; |
79 | 79 |
80 private: | 80 private: |
81 // Specifies whether parental controls should be checked. See comment below. | |
82 enum GetAvailabilityMode { | |
gab
2016/10/03 17:08:12
enum class
Alexei Svitkine (slow)
2016/10/03 18:57:39
This requires prefixing all uses of the constants
gab
2016/10/03 19:05:57
IMO that means that GetAvailabilityMode is too gen
Alexei Svitkine (slow)
2016/10/03 19:25:36
At first I really like this suggestion, but then I
| |
83 CHECK_PARENTAL_CONTROLS, | |
84 DONT_CHECK_PARENTAL_CONTROLS, | |
85 }; | |
86 | |
87 // Internal version of GetAvailability() that specifies whether parental | |
88 // controls should be checked (which is expensive and not always necessary | |
89 // to do - such as when checking for FORCED state). | |
90 static Availability GetAvailabilityInternal(const PrefService* pref_service, | |
91 GetAvailabilityMode mode); | |
92 | |
81 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs); | 93 DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs); |
82 }; | 94 }; |
83 | 95 |
84 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ | 96 #endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_ |
OLD | NEW |