Skip to content

Commit

Permalink
[iOS] Remove signin_sync screen
Browse files Browse the repository at this point in the history
This CL remove all the code and resources used by the signin_sync FRE
view as they are no longer used.

Bug: 1407658

Change-Id: I6855eb1282cd1318de777865436faa5b4d1d736a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4184224
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Jérôme Lebel <jlebel@chromium.org>
Auto-Submit: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1096751}
  • Loading branch information
Mihai Sardarescu authored and Chromium LUCI CQ committed Jan 25, 2023
1 parent 0f669d3 commit 68f128b
Show file tree
Hide file tree
Showing 31 changed files with 19 additions and 2,154 deletions.
6 changes: 0 additions & 6 deletions ios/chrome/app/strings/ios_strings.grd
Expand Up @@ -1026,9 +1026,6 @@ See your search engine’s instructions for deleting your search history, if app
<message name="IDS_IOS_FIRST_RUN_SIGNIN_SIGN_IN_ACTION" desc="In Title Case: Button on the very first screen of Chrome for users to sign in when there is no Google Account on the device. [iOS only]">
Sign In…
</message>
<message name="IDS_IOS_FIRST_RUN_SYNC_SCREEN_CONTENT_WITH_LINK_TO_SETTINGS" desc="Content string on the sync screen presented to the user on First Run [iOS only]">
You can always choose what to sync in <ph name="BEGIN_LINK">BEGIN_LINK</ph>settings<ph name="END_LINK">END_LINK</ph>. Google may use your history to personalize Search and other Google services.
</message>
<message name="IDS_IOS_FIRST_RUN_SYNC_SCREEN_PRIMARY_ACTION" desc="The primary action string on the sync screen presented to the user on First Run [iOS only]">
Turn on Sync
</message>
Expand Down Expand Up @@ -2429,9 +2426,6 @@ While in Incognito, sites can't use cookies to see your browsing activity across
<message name="IDS_IOS_ENTERPRISE_MANAGED_INFO" desc="Text displayed to inform the user that the browser is managed by one or more Enterprise policies. [iOS only]">
Managed by your organization. Some features may be unavailable. <ph name="BEGIN_LINK">BEGIN_LINK</ph>Learn more<ph name="END_LINK">END_LINK</ph>
</message>
<message name="IDS_IOS_ENTERPRISE_MANAGED_SIGNIN_DETAILS" desc="Text displayed to inform the user that their Sign In/Sync is managed by their administrator. [iOS only]">
Your browser is managed. <ph name="BEGIN_LINK">BEGIN_LINK</ph>Details<ph name="END_LINK">END_LINK</ph>
</message>
<message name="IDS_IOS_ENTERPRISE_MANAGED_SIGNIN_LEARN_MORE" desc="Text displayed to inform the user that their Sign In/Sync is managed by their administrator. [iOS only]">
Your browser is managed. <ph name="BEGIN_LINK">BEGIN_LINK</ph>Learn More<ph name="END_LINK">END_LINK</ph>
</message>
Expand Down

This file was deleted.

This file was deleted.

15 changes: 4 additions & 11 deletions ios/chrome/browser/first_run/first_run_metrics.h
Expand Up @@ -84,14 +84,13 @@ enum FirstRunStage {
// The first run experience has completed.
kComplete = 1,
// Sync screen is shown.
kSyncScreenStart = 2,
// kSyncScreenStart_DEPRECATED = 2,
// Sync screen is closed with sync.
kSyncScreenCompletionWithSync = 3,
// kSyncScreenCompletionWithSync_DEPRECATED = 3,
// Sync screen is closed without sync.
kSyncScreenCompletionWithoutSync = 4,
// kSyncScreenCompletionWithoutSync_DEPRECATED = 4,
// Sync screen is closed when user taps on advance sync settings button.
// Deprecated. This is not used anymore.
kSyncScreenCompletionWithSyncSettings = 5,
// kSyncScreenCompletionWithSyncSettings_DEPRECATED = 5,
// SignIn screen is shown.
kSignInScreenStart = 6,
// SignIn screen is closed with sign in.
Expand Down Expand Up @@ -145,12 +144,6 @@ enum FirstRunScreenType {
// detected, but with no footer shown at the bottom. Displayed when MICe is
// enabled with the welcome screen (3-steps MICe FRE).
kSignInScreenWithoutFooterOrIdentityPicker,
// The screen that asks the user to turn on sync while no account picker is
// present. Displayed when MICe is enabled or when no account is detected.
kSyncScreenWithoutIdentityPicker,
// The screen that asks the user to turn on sync while showing an account
// picker. Displayed when MICe is disabled and an account is detected.
kSyncScreenWithIdentityPicker,
// Welcome screen without UMA checkbox. Displayed when MICe is enabled.
kWelcomeScreenWithoutUMACheckbox,
// Welcome screen with UMA checkbox. Displayed when MICe is disabled.
Expand Down
24 changes: 0 additions & 24 deletions ios/chrome/browser/ui/authentication/enterprise/enterprise_utils.h
Expand Up @@ -9,29 +9,11 @@

#include "ios/chrome/browser/sync/sync_setup_service.h"

class AuthenticationService;
class PrefService;
namespace syncer {
class SyncService;
}

// List of Enterprise restriction options.
typedef NS_OPTIONS(NSUInteger, EnterpriseSignInRestrictions) {
// No enterprise restriction.
kNoEnterpriseRestriction = 0,
// Sign-in is forced.
kEnterpriseForceSignIn = 1 << 0,
// Sign-in is disabled, please consider using
// AuthenticationService::GetServiceStatus() to get all disable reasons.
kEnterpriseSignInDisabled = 1 << 1,
// Account restrictions are set.
kEnterpriseRestrictAccounts = 1 << 2,
// Sync is disabled.
kEnterpriseSyncDisabled = 1 << 3,
// If any data type is managed by policies (i.e. is not syncable).
kEnterpriseSyncTypesListDisabled = 1 << 4,
};

// Returns YES if some account restrictions are set.
bool IsRestrictAccountsToPatternsEnabled();

Expand All @@ -42,12 +24,6 @@ bool IsManagedSyncDataType(PrefService* pref_service,
// Returns true if any data type is managed by policies (i.e. is not syncable).
bool HasManagedSyncDataType(PrefService* pref_service);

// Returns current EnterpriseSignInRestrictions.
EnterpriseSignInRestrictions GetEnterpriseSignInRestrictions(
AuthenticationService* authentication_service,
PrefService* pref_service,
syncer::SyncService* sync_service);

// true if sync is disabled.
bool IsSyncDisabledByPolicy(syncer::SyncService* sync_service);

Expand Down
Expand Up @@ -13,7 +13,6 @@
#import "ios/chrome/browser/application_context/application_context.h"
#import "ios/chrome/browser/policy/policy_util.h"
#import "ios/chrome/browser/prefs/pref_names.h"
#import "ios/chrome/browser/signin/authentication_service.h"
#import "ios/chrome/browser/sync/sync_service_factory.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
Expand Down Expand Up @@ -60,32 +59,6 @@ bool HasManagedSyncDataType(PrefService* pref_service) {
return false;
}

EnterpriseSignInRestrictions GetEnterpriseSignInRestrictions(
AuthenticationService* authentication_service,
PrefService* pref_service,
syncer::SyncService* sync_service) {
EnterpriseSignInRestrictions restrictions = kNoEnterpriseRestriction;
switch (authentication_service->GetServiceStatus()) {
case AuthenticationService::ServiceStatus::SigninForcedByPolicy:
restrictions |= kEnterpriseForceSignIn;
break;
case AuthenticationService::ServiceStatus::SigninDisabledByPolicy:
restrictions |= kEnterpriseSignInDisabled;
break;
case AuthenticationService::ServiceStatus::SigninAllowed:
case AuthenticationService::ServiceStatus::SigninDisabledByUser:
case AuthenticationService::ServiceStatus::SigninDisabledByInternal:
break;
}
if (IsRestrictAccountsToPatternsEnabled())
restrictions |= kEnterpriseRestrictAccounts;
if (IsSyncDisabledByPolicy(sync_service))
restrictions |= kEnterpriseSyncDisabled;
if (HasManagedSyncDataType(pref_service))
restrictions |= kEnterpriseSyncTypesListDisabled;
return restrictions;
}

bool IsSyncDisabledByPolicy(syncer::SyncService* sync_service) {
return sync_service->GetDisableReasons().Has(
syncer::SyncService::DISABLE_REASON_ENTERPRISE_POLICY);
Expand Down
Expand Up @@ -115,7 +115,6 @@ - (InterruptibleChromeCoordinator*)createChildCoordinatorWithScreenType:
browser:self.browser
showFREConsent:NO
delegate:self];
case kSignInAndSync_DEPRECATED:
case kTangibleSync:
case kWelcomeAndConsent_DEPRECATED:
case kDefaultBrowserPromo:
Expand Down
111 changes: 0 additions & 111 deletions ios/chrome/browser/ui/authentication/signin_sync/BUILD.gn

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 68f128b

Please sign in to comment.