Index: chrome/browser/prefs/incognito_mode_availability_prefs.cc |
diff --git a/chrome/browser/prefs/incognito_mode_availability_prefs.cc b/chrome/browser/prefs/incognito_mode_availability_prefs.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b7bb7d72ce2281c144ecabdb856a0010016d8add |
--- /dev/null |
+++ b/chrome/browser/prefs/incognito_mode_availability_prefs.cc |
@@ -0,0 +1,22 @@ |
+// 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. |
+ |
+#include "chrome/browser/prefs/incognito_mode_availability_prefs.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace IncognitoModeAvailabilityPrefs { |
+ |
+bool IntToIngocnitoModeAvailability(int in_value, |
+ IncognitoModeAvailability* out_value) { |
+ DCHECK(out_value); |
+ if (in_value < 0 || in_value >= AVAILABILITY_NUM_TYPES) { |
+ *out_value = ENABLED; |
+ return false; |
+ } |
+ *out_value = static_cast<IncognitoModeAvailability>(in_value); |
+ return true; |
+} |
+ |
+} // namespace IncognitoModeAvailability |