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

Side by Side Diff: chrome/browser/prefs/incognito_mode_availability_prefs.cc

Issue 7520023: Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/prefs/incognito_mode_availability_prefs.h"
6
7 #include "base/logging.h"
8
9 namespace IncognitoModeAvailabilityPrefs {
10
11 bool IntToIngocnitoModeAvailability(int in_value,
12 IncognitoModeAvailability* out_value) {
13 DCHECK(out_value);
14 if (in_value < 0 || in_value >= AVAILABILITY_NUM_TYPES) {
15 *out_value = ENABLED;
16 return false;
17 }
18 *out_value = static_cast<IncognitoModeAvailability>(in_value);
19 return true;
20 }
21
22 } // namespace IncognitoModeAvailability
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698