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

Unified Diff: chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc

Issue 12623012: Adding a check to not show sync promo for incognito profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
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 93b4677f8b99360b7815e725c75445209bc5f360..bde0c6c5fe3a8afd0fd613b790f72ab3a04b3ad8 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
@@ -129,6 +129,10 @@ bool SyncPromoUI::ShouldShowSyncPromo(Profile* profile) {
if (net::NetworkChangeNotifier::IsOffline())
return false;
+ // Don't show if the profile is an incognito.
+ if (profile->IsOffTheRecord())
+ return false;
+
// Display the signin promo if the user is not signed in.
SigninManager* signin = SigninManagerFactory::GetForProfile(
profile->GetOriginalProfile());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698