summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
index e9129aae..b4ef890 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
@@ -35,6 +35,7 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/escape.h"
+#include "net/base/network_change_notifier.h"
#include "ui/base/l10n/l10n_util.h"
using content::WebContents;
@@ -125,6 +126,10 @@ bool SyncPromoUI::ShouldShowSyncPromo(Profile* profile) {
return false;
#endif
+ // Don't bother if we don't have any kind of network connection.
+ if (net::NetworkChangeNotifier::IsOffline())
+ return false;
+
// Honor the sync policies.
if (!profile->GetOriginalProfile()->IsSyncAccessible())
return false;