Commit b4c6a3e2 authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Adding implementation for DataFromChromeSync in Manage Sync settings

Opens the kSyncGoogleDashboardURL url when the user taps on the "Data
from Chrome Sync" item.

Bug: 914059
Change-Id: Id85156f52412a223924a68be3d0b77f06e9917d5
Reviewed-on: https://chromium-review.googlesource.com/c/1477236
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635331}
parent 78e00feb
...@@ -34,6 +34,7 @@ source_set("google_services") { ...@@ -34,6 +34,7 @@ source_set("google_services") {
"resources:google_services_sync_error", "resources:google_services_sync_error",
"//base", "//base",
"//components/browser_sync", "//components/browser_sync",
"//components/google/core/common",
"//components/metrics", "//components/metrics",
"//components/prefs", "//components/prefs",
"//components/strings", "//components/strings",
......
...@@ -6,8 +6,13 @@ ...@@ -6,8 +6,13 @@
#include "base/logging.h" #include "base/logging.h"
#include "components/browser_sync/profile_sync_service.h" #include "components/browser_sync/profile_sync_service.h"
#include "components/google/core/common/google_util.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/chrome_url_constants.h"
#include "ios/chrome/browser/sync/profile_sync_service_factory.h" #include "ios/chrome/browser/sync/profile_sync_service_factory.h"
#include "ios/chrome/browser/sync/sync_setup_service_factory.h" #include "ios/chrome/browser/sync/sync_setup_service_factory.h"
#import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
#import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_command_handler.h" #import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_command_handler.h"
#import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.h" #import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator.h"
#import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.h" #import "ios/chrome/browser/ui/settings/google_services/manage_sync_settings_table_view_controller.h"
...@@ -84,6 +89,11 @@ ...@@ -84,6 +89,11 @@
} }
- (void)openDataFromChromeSyncWebPage { - (void)openDataFromChromeSyncWebPage {
GURL url = google_util::AppendGoogleLocaleParam(
GURL(kSyncGoogleDashboardURL),
GetApplicationContext()->GetApplicationLocale());
OpenNewTabCommand* command = [OpenNewTabCommand commandWithURLFromChrome:url];
[self.dispatcher closeSettingsUIAndOpenURL:command];
} }
@end @end
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