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

Unified Diff: chrome/browser/signin/signin_promo.cc

Issue 2138643004: [Autofill] Add support for signin promo on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aaa
Patch Set: nits Created 4 years, 5 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/signin/signin_promo.h ('k') | chrome/browser/signin/signin_promo_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_promo.cc
diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
index 80315d409b21b2fdb491519e6e3c761c47214864..4ab4e2f5e8bf61463a884c49f5515f1b17d71dc8 100644
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/browser/signin/signin_promo_util.h"
#include "chrome/browser/ui/webui/options/core_options_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/pref_names.h"
@@ -36,7 +37,6 @@
#include "content/public/browser/web_ui_data_source.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/escape.h"
-#include "net/base/network_change_notifier.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
@@ -83,29 +83,6 @@ bool HasUserSkippedPromo(Profile* profile) {
namespace signin {
-bool ShouldShowPromo(Profile* profile) {
-#if defined(OS_CHROMEOS)
- // There's no need to show the sign in promo on cros since cros users are
- // already logged in.
- return false;
-#else
-
- // Don't bother if we don't have any kind of network connection.
- if (net::NetworkChangeNotifier::IsOffline())
- return false;
-
- // Don't show for supervised profiles.
- if (profile->IsSupervised())
- return false;
-
- // Display the signin promo if the user is not signed in.
- SigninManager* signin = SigninManagerFactory::GetForProfile(
- profile->GetOriginalProfile());
- return !signin->AuthInProgress() && signin->IsSigninAllowed() &&
- !signin->IsAuthenticated();
-#endif
-}
-
bool ShouldShowPromoAtStartup(Profile* profile, bool is_new_profile) {
DCHECK(profile);
« no previous file with comments | « chrome/browser/signin/signin_promo.h ('k') | chrome/browser/signin/signin_promo_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698