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

Unified Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc

Issue 546343004: Remove HasBeenShutdown check on iOS for the sign-in confirmation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/sync/profile_signin_confirmation_helper.cc
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index 2ba3184b47e68d0fa916c19115d67f3fd2ac8f5f..d52e989821bec188c360080268fbc8fe06f8fc90 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -38,7 +38,7 @@ const int kHistoryEntriesBeforeNewProfilePrompt = 10;
// Determines whether a profile has any typed URLs in its history.
class HasTypedURLsTask : public history::HistoryDBTask {
public:
- HasTypedURLsTask(const base::Callback<void(bool)>& cb)
+ explicit HasTypedURLsTask(const base::Callback<void(bool)>& cb)
: has_typed_urls_(false), cb_(cb) {
}
@@ -189,10 +189,19 @@ SkColor GetSigninConfirmationPromptBarColor(SkAlpha alpha) {
}
bool HasBeenShutdown(Profile* profile) {
+#if defined(OS_IOS)
+ // This check is not useful on iOS: the browser can be shut down without
+ // explicit user action (for example, in response to memory pressure), and
+ // this should be invisible to the user. The desktop assumption that the
+ // profile going through a restart indicates something about user intention
+ // does not hold. We rely on the other profile dirtiness checks.
+ return false;
+#else
bool has_been_shutdown = !profile->IsNewProfile();
if (has_been_shutdown)
DVLOG(1) << "ProfileSigninConfirmationHelper: profile is not new";
return has_been_shutdown;
+#endif
}
bool HasSyncedExtensions(Profile* profile) {
« 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