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

Unified Diff: chrome/browser/prefs/incognito_mode_prefs.cc

Issue 202993002: Fix "unreachable code" warnings (MSVC warning 4702) in chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/incognito_mode_prefs.cc
===================================================================
--- chrome/browser/prefs/incognito_mode_prefs.cc (revision 256983)
+++ chrome/browser/prefs/incognito_mode_prefs.cc (working copy)
@@ -77,15 +77,17 @@
switch (GetAvailability(profile->GetPrefs())) {
case IncognitoModePrefs::ENABLED:
return true;
+
case IncognitoModePrefs::DISABLED:
return !profile->IsOffTheRecord();
+
case IncognitoModePrefs::FORCED:
return profile->IsOffTheRecord();
- case IncognitoModePrefs::AVAILABILITY_NUM_TYPES:
+
+ default:
NOTREACHED();
+ return false;
}
- NOTREACHED();
- return false;
}
// static
@@ -96,6 +98,7 @@
return base::win::IsParentalControlActivityLoggingOn();
#elif defined(OS_ANDROID)
return chrome::android::ChromiumApplication::AreParentalControlsEnabled();
+#else
+ return false;
#endif
- return false;
}

Powered by Google App Engine
This is Rietveld 408576698