Commit e887fc7f authored by harrisonsean's avatar harrisonsean Committed by Commit Bot

[iOS][Safety Check] Add UI support for update check

Add UI for the update check, and support for base error and
offline for the update check.  Actual update check logic will be
added later after addition of support for ad-hoc queries to the service.

Bug: 1078782
Change-Id: I78a5a5b1713a8a040dde638cfbcdecbb313bbd5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352907
Commit-Queue: Sean Harrison <harrisonsean@chromium.org>
Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802375}
parent ee1ae00d
......@@ -328,6 +328,36 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_PAGE_HEADER" desc="Informational header at the top of the safety check page">
Chromium can help keep you safe from data breaches, unsafe websites and more.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_CHANNEL_CANARY_DESC" desc="Description text for when the app is on Canary and unable to run the check">
Not supported on Chromium Canary
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_CHANNEL_BETA_DESC" desc="Description text for when the app is on Beta and unable to run the check">
Not supported on Chromium Beta
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UP_TO_DATE_DESC" desc="Description text for when Chromium is up to date">
Chromium is up to date
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OUT_OF_DATE_DESC" desc="Description text for when Chromium is out of date">
Chromium is out of date
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OFFLINE_DESC" desc="Description text for when updates can't be checked because the user is offline">
Offline, Chromium can't check for updates
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OFFLINE_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="The user has no internet connection and can't check for updates.">
Chromium couldn't check for updates. Try checking your internet connection.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_ERROR_DESC" desc="Description text for when updates can't be checked because there was an issue with the check">
Chromium can't check for updates
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_ERROR_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="An error occured while performing the update check.">
Chromium couldn't check for updates. Try again later.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UNABLE_DESC" desc="Description text for when the device is not able to update to the newest version">
Chromium can't update
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UNABLE_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="The device is not able to update to the newest version.">
Chromium is out of date. If no update is available in the <ph name="BEGIN_LINK">BEGIN_LINK</ph>App Store<ph name="END_LINK">END_LINK</ph>, it's possible that your device doesn't support new versions of Chromium anymore.
</message>
<message name="IDS_IOS_PASSWORD_CHECK_ERROR" desc="Description of the password check cell, explaining that Password Check failed. [iOS only]" meaning="Password Check failed due to some error.">
Chromium can't check your passwords
</message>
......
......@@ -328,6 +328,36 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_PAGE_HEADER" desc="Informational header at the top of the safety check page">
Chrome can help keep you safe from data breaches, unsafe websites and more.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_CHANNEL_CANARY_DESC" desc="Description text for when the app is on Canary and unable to run the check">
Not supported on Chrome Canary
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_CHANNEL_BETA_DESC" desc="Description text for when the app is on Beta and unable to run the check">
Not supported on Chrome Beta
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UP_TO_DATE_DESC" desc="Description text for when Chrome is up to date">
Google Chrome is up to date
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OUT_OF_DATE_DESC" desc="Description text for when Chrome is out of date">
Google Chrome is out of date
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OFFLINE_DESC" desc="Description text for when updates can't be checked because the user is offline">
Offline, Chrome can't check for updates
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_OFFLINE_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="The user has no internet connection and can't check for updates.">
Chrome couldn't check for updates. Try checking your internet connection.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_ERROR_DESC" desc="Description text for when updates can't be checked because there was an issue with the check">
Chrome can't check for updates
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_ERROR_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="An error occured while performing the update check.">
Chrome couldn't check for updates. Try again later.
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UNABLE_DESC" desc="Description text for when the device is not able to update to the newest version">
Chrome can't update
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_UNABLE_INFO" desc="Text inside popover which is shown when the user wants to see detailed information about the error. [iOS only]" meaning="The device is not able to update to the newest version.">
Chrome is out of date. If no update is available in the <ph name="BEGIN_LINK">BEGIN_LINK</ph>App Store<ph name="END_LINK">END_LINK</ph>, it's possible that your device doesn't support new versions of Chrome anymore.
</message>
<message name="IDS_IOS_PASSWORD_CHECK_ERROR" desc="Description of the password check cell, explaining that Password Check failed. [iOS only]" meaning="Password Check failed due to some error.">
Chrome can't check your passwords
</message>
......
......@@ -1769,6 +1769,9 @@ While in incognito, sites can't use cookies to see your browsing activity across
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_SAFE_BROWSING_MANAGED_DESC" desc="Detail text for the Safe Browsing check if the user's Safe Browsing setting is managed by their administrator and disabled">
Turned off by your administrator
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_UPDATES_MANAGED_DESC" desc="Description text for when the device has updates managed by an administrator">
Managed by your administrator
</message>
<message name="IDS_IOS_SETTINGS_SAFETY_CHECK_SAFE_BROWSING_DISABLED_INFO" desc="String in the popover for the Safe Browsing check to direct the user to the Sync and Google Services page if Safe Browsing is disabled">
To turn on Safe Browsing, open <ph name="BEGIN_LINK">BEGIN_LINK</ph>Sync and Google Services<ph name="END_LINK">END_LINK</ph> and tap Safe Browsing.
</message>
......
9c8923bfbf2c6be6901c7d6527b11104c227b13f
\ No newline at end of file
......@@ -39,11 +39,13 @@ source_set("safety_check") {
"//components/prefs",
"//components/safe_browsing/core:features",
"//components/safe_browsing/core/common:safe_browsing_prefs",
"//components/version_info",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/content_settings",
"//ios/chrome/browser/main:public",
"//ios/chrome/browser/omaha",
"//ios/chrome/browser/passwords",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/sync",
......@@ -60,9 +62,12 @@ source_set("safety_check") {
"//ios/chrome/browser/ui/table_view",
"//ios/chrome/browser/ui/table_view/cells:cells_constants",
"//ios/chrome/browser/ui/util",
"//ios/chrome/browser/upgrade",
"//ios/chrome/browser/upgrade:public",
"//ios/chrome/common",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/elements:popover_label_view_controller",
"//ios/web/common",
"//ui/base",
]
frameworks = [ "UIKit.framework" ]
......
......@@ -6,6 +6,8 @@
#include "base/mac/foundation_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/main/browser.h"
#include "ios/chrome/browser/passwords/ios_chrome_password_check_manager.h"
......@@ -99,6 +101,7 @@
self.browser->GetBrowserState())
syncService:SyncSetupServiceFactory::GetForBrowserState(
self.browser->GetBrowserState())];
self.mediator.consumer = self.viewController;
self.mediator.handler = self;
self.viewController.serviceDelegate = self.mediator;
......@@ -174,8 +177,8 @@
completion:nil];
}
- (void)showUpdateOnAppStorePage {
// TODO(crbug.com/1078782): Add navigation to App Store Chrome page.
- (void)showUpdateAtLocation:(NSString*)location {
// TODO(crbug.com/1078782): Add navigation to various app update locations.
}
- (void)showSafeBrowsingPreferencePage {
......
......@@ -30,6 +30,8 @@ class SyncSetupService;
// |userPrefService|: Preference service to access safe browsing state.
// |passwordCheckManager|: Password check manager to enable use of the password
// check service.
// |authService|: Authentication service to check users authentication status.
// |syncService|: Sync service to check sync and sync encryption status.
- (instancetype)initWithUserPrefService:(PrefService*)userPrefService
passwordCheckManager:
(scoped_refptr<IOSChromePasswordCheckManager>)
......
......@@ -12,8 +12,8 @@
// Shows password issues page.
- (void)showPasswordIssuesPage;
// Opens Chrome page in App Store for updates.
- (void)showUpdateOnAppStorePage;
// Opens update page at |location|.
- (void)showUpdateAtLocation:(NSString*)location;
// Shows page with Safe Browsing preference toggle.
- (void)showSafeBrowsingPreferencePage;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment