Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 5 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/signin/signin_promo_util.h" | 8 #include "chrome/browser/signin/signin_promo_util.h" |
| 9 | 9 |
| 10 bool SyncPromoUI::ShouldShowSyncPromo(Profile* profile) { | 10 bool SyncPromoUI::ShouldShowSyncPromo(Profile* profile) { |
| 11 // Don't show sync promo if the sign in promo should not be shown. | 11 // Don't show sync promo if the sign in promo should not be shown. |
| 12 if (!signin::ShouldShowPromo(profile)) { | 12 if (!signin::ShouldShowPromo(profile)) { |
| 13 return false; | 13 return false; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // Don't show if sync is not allowed to start. | 16 // Don't show if sync is not allowed to start or is running in local mode. |
| 17 if (!profile->IsSyncAllowed()) | 17 if (!profile->IsSyncAllowed() || profile->IsLocalSyncEnabled()) |
|
Nicolas Zea
2016/12/15 00:37:28
See other comment. Is this the only callsite that
pastarmovj
2016/12/16 17:04:48
Yes this is the only site that needs IsLocalSyncEn
| |
| 18 return false; | 18 return false; |
| 19 | 19 |
| 20 return true; | 20 return true; |
| 21 } | 21 } |
| OLD | NEW |