Index: chrome/browser/prefs/incognito_mode_availability_prefs.h |
diff --git a/chrome/browser/prefs/incognito_mode_availability_prefs.h b/chrome/browser/prefs/incognito_mode_availability_prefs.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6b6ddc5e91cda1d55691c06c54c628f646739ae1 |
--- /dev/null |
+++ b/chrome/browser/prefs/incognito_mode_availability_prefs.h |
@@ -0,0 +1,31 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_PREFS_INCOGNITO_MODE_AVAILABILITY_PREFS_H_ |
+#define CHROME_BROWSER_PREFS_INCOGNITO_MODE_AVAILABILITY_PREFS_H_ |
Mattias Nissler (ping if slow)
2011/07/28 11:08:50
#pragma once
rustema
2011/07/29 06:49:23
Done.
|
+ |
+namespace IncognitoModeAvailabilityPrefs { |
Mattias Nissler (ping if slow)
2011/07/28 11:08:50
I suggest you make this a class, rename the enum t
Bernhard Bauer
2011/07/28 11:34:03
What Mattias said. How about naming the class just
rustema
2011/07/29 06:49:23
Done.
rustema
2011/07/29 06:49:23
Done.
|
+ |
+// Possible values for Incognito mode availability pref. Please, do not change |
+// the order of entries since numeric values are exposed to users. |
+enum IncognitoModeAvailability { |
+ // Incognito mode enabled. Users may open pages in both Incognito mode and |
+ // normal mode (the default behaviour). |
+ ENABLED = 0, |
+ // Incognito mode disabled. Users may not open pages in Incognito mode. |
+ // Only normal mode is available for browsing. |
+ DISABLED = 1, |
Bernhard Bauer
2011/07/28 11:34:03
Why do you explicitly list the enum values?
rustema
2011/07/29 06:49:23
To make it clearer and easier to see which policy
|
+ // Incognito mode forced. Users may open pages *ONLY* in Incognito mode. |
+ // Normal mode is not available for browsing. |
+ FORCED = 2, |
+ |
+ AVAILABILITY_NUM_TYPES |
+}; |
+ |
+bool IntToIngocnitoModeAvailability(int in_value, |
+ IncognitoModeAvailability* out_value); |
+ |
+} // namespace IncognitoModeAvailability |
Mattias Nissler (ping if slow)
2011/07/28 11:08:50
incorrect name.
rustema
2011/07/29 06:49:23
Done.
|
+ |
+#endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_AVAILABILITY_PREFS_H_ |