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

Unified Diff: chrome/browser/upgrade_detector_impl.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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/upgrade_detector_impl.cc
===================================================================
--- chrome/browser/upgrade_detector_impl.cc (revision 256983)
+++ chrome/browser/upgrade_detector_impl.cc (working copy)
@@ -173,13 +173,14 @@
return;
}
- // Windows: only enable upgrade notifications for official builds.
- // Mac: only enable them if the updater (Keystone) is present.
- // Linux (and other POSIX): always enable regardless of branding.
base::Closure start_upgrade_check_timer_task =
base::Bind(&UpgradeDetectorImpl::StartTimerForUpgradeCheck,
weak_factory_.GetWeakPtr());
-#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+
+#if defined(OS_WIN)
+ // Only enable upgrade notifications for official builds. Chromium has no
+ // upgrade channel.
+#if defined(GOOGLE_CHROME_BUILD)
// On Windows, there might be a policy preventing updates, so validate
// updatability, and then call StartTimerForUpgradeCheck appropriately.
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
@@ -186,16 +187,17 @@
base::Bind(&DetectUpdatability,
start_upgrade_check_timer_task,
&is_unstable_channel_));
- return;
-#elif defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD)
- return; // Chromium has no upgrade channel.
-#elif defined(OS_MACOSX)
+#endif
+#else
+#if defined(OS_MACOSX)
+ // Only enable upgrade notifications if the updater (Keystone) is present.
if (!keystone_glue::KeystoneEnabled())
- return; // Keystone updater not enabled.
-#elif !defined(OS_POSIX)
+ return;
+#elif defined(OS_POSIX)
+ // Always enable upgrade notifications regardless of branding.
+#else
return;
#endif
-
// Check whether the build is an unstable channel before starting the timer.
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&CheckForUnstableChannel,
@@ -204,6 +206,7 @@
// Start tracking network time updates.
network_time_tracker_.Start();
+#endif
}
UpgradeDetectorImpl::~UpgradeDetectorImpl() {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698