Commit 2e8ac7a3 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Remove build flags guarding autofill and sync

Change-Id: I52458ffd53e414fd191ba1705670102d55fe6908
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134934Reviewed-by: default avatarHiroshi Ichikawa <ichikawa@chromium.org>
Commit-Queue: John Wu <jzw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756150}
parent d086f1bd
......@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/ios/ios_sdk.gni")
import("//build/config/ios/rules.gni")
import("//build/config/locales.gni")
......@@ -15,15 +14,6 @@ import("//ios/web_view/repack.gni")
import("//testing/test.gni")
import("//tools/grit/repack.gni")
buildflag_header("web_view_buildflags") {
header = "cwv_web_view_buildflags.h"
flags = [
"IOS_WEB_VIEW_ENABLE_SYNC=$ios_web_view_enable_sync",
"IOS_WEB_VIEW_ENABLE_AUTOFILL=$ios_web_view_enable_autofill",
]
}
group("all_tests") {
testonly = true
deps = [
......@@ -44,22 +34,40 @@ config("config") {
# These are defined as vars so they can be shared with different targets below.
ios_web_view_public_headers = [
"public/cwv_autofill_controller.h",
"public/cwv_autofill_controller_delegate.h",
"public/cwv_autofill_data_manager.h",
"public/cwv_autofill_data_manager_observer.h",
"public/cwv_autofill_form.h",
"public/cwv_autofill_profile.h",
"public/cwv_autofill_suggestion.h",
"public/cwv_back_forward_list.h",
"public/cwv_back_forward_list_item.h",
"public/cwv_credit_card.h",
"public/cwv_credit_card_expiration_fixer.h",
"public/cwv_credit_card_name_fixer.h",
"public/cwv_credit_card_saver.h",
"public/cwv_credit_card_verifier.h",
"public/cwv_download_task.h",
"public/cwv_export.h",
"public/cwv_favicon.h",
"public/cwv_flags.h",
"public/cwv_html_element.h",
"public/cwv_identity.h",
"public/cwv_navigation_action.h",
"public/cwv_navigation_delegate.h",
"public/cwv_navigation_type.h",
"public/cwv_password.h",
"public/cwv_preferences.h",
"public/cwv_preferences_autofill.h",
"public/cwv_preview_element_info.h",
"public/cwv_script_command.h",
"public/cwv_scroll_view.h",
"public/cwv_scroll_view_delegate.h",
"public/cwv_ssl_status.h",
"public/cwv_sync_controller.h",
"public/cwv_sync_controller_data_source.h",
"public/cwv_sync_controller_delegate.h",
"public/cwv_translation_controller.h",
"public/cwv_translation_controller_delegate.h",
"public/cwv_translation_language.h",
......@@ -68,37 +76,11 @@ ios_web_view_public_headers = [
"public/cwv_user_content_controller.h",
"public/cwv_user_script.h",
"public/cwv_web_view.h",
"public/cwv_web_view_autofill.h",
"public/cwv_web_view_configuration.h",
"public/cwv_web_view_configuration_autofill.h",
"public/cwv_web_view_configuration_sync.h",
]
if (ios_web_view_enable_sync) {
ios_web_view_public_headers += [
"public/cwv_identity.h",
"public/cwv_sync_controller.h",
"public/cwv_sync_controller_data_source.h",
"public/cwv_sync_controller_delegate.h",
"public/cwv_web_view_configuration_sync.h",
]
}
if (ios_web_view_enable_autofill) {
ios_web_view_public_headers += [
"public/cwv_autofill_controller.h",
"public/cwv_autofill_controller_delegate.h",
"public/cwv_autofill_data_manager.h",
"public/cwv_autofill_data_manager_observer.h",
"public/cwv_autofill_form.h",
"public/cwv_autofill_profile.h",
"public/cwv_autofill_suggestion.h",
"public/cwv_credit_card.h",
"public/cwv_credit_card_expiration_fixer.h",
"public/cwv_credit_card_name_fixer.h",
"public/cwv_credit_card_saver.h",
"public/cwv_credit_card_verifier.h",
"public/cwv_password.h",
"public/cwv_preferences_autofill.h",
"public/cwv_web_view_autofill.h",
"public/cwv_web_view_configuration_autofill.h",
]
}
source_set("web_view_sources") {
sources = ios_web_view_public_headers
......@@ -107,6 +89,27 @@ source_set("web_view_sources") {
"internal/app/application_context.mm",
"internal/app/web_view_io_thread.h",
"internal/app/web_view_io_thread.mm",
"internal/autofill/cwv_autofill_client_ios_bridge.h",
"internal/autofill/cwv_autofill_controller.mm",
"internal/autofill/cwv_autofill_controller_internal.h",
"internal/autofill/cwv_autofill_data_manager.mm",
"internal/autofill/cwv_autofill_data_manager_internal.h",
"internal/autofill/cwv_autofill_form.mm",
"internal/autofill/cwv_autofill_form_internal.h",
"internal/autofill/cwv_autofill_profile.mm",
"internal/autofill/cwv_autofill_profile_internal.h",
"internal/autofill/cwv_autofill_suggestion.mm",
"internal/autofill/cwv_autofill_suggestion_internal.h",
"internal/autofill/cwv_credit_card.mm",
"internal/autofill/cwv_credit_card_expiration_fixer.mm",
"internal/autofill/cwv_credit_card_expiration_fixer_internal.h",
"internal/autofill/cwv_credit_card_internal.h",
"internal/autofill/cwv_credit_card_name_fixer.mm",
"internal/autofill/cwv_credit_card_name_fixer_internal.h",
"internal/autofill/cwv_credit_card_saver.mm",
"internal/autofill/cwv_credit_card_saver_internal.h",
"internal/autofill/cwv_credit_card_verifier.mm",
"internal/autofill/cwv_credit_card_verifier_internal.h",
"internal/autofill/web_view_autocomplete_history_manager_factory.h",
"internal/autofill/web_view_autocomplete_history_manager_factory.mm",
"internal/autofill/web_view_autofill_client_ios.h",
......@@ -160,6 +163,10 @@ source_set("web_view_sources") {
"internal/language/web_view_language_model_manager_factory.mm",
"internal/language/web_view_url_language_histogram_factory.h",
"internal/language/web_view_url_language_histogram_factory.mm",
"internal/passwords/cwv_password.mm",
"internal/passwords/cwv_password_controller.h",
"internal/passwords/cwv_password_controller.mm",
"internal/passwords/cwv_password_internal.h",
"internal/passwords/web_view_password_feature_manager.h",
"internal/passwords/web_view_password_feature_manager.mm",
"internal/passwords/web_view_password_manager_client.h",
......@@ -172,6 +179,7 @@ source_set("web_view_sources") {
"internal/passwords/web_view_password_store_factory.mm",
"internal/pref_names.h",
"internal/pref_names.mm",
"internal/signin/cwv_identity.mm",
"internal/signin/ios_web_view_signin_client.h",
"internal/signin/ios_web_view_signin_client.mm",
"internal/signin/web_view_device_accounts_provider_impl.h",
......@@ -182,6 +190,8 @@ source_set("web_view_sources") {
"internal/signin/web_view_signin_client_factory.mm",
"internal/signin/web_view_signin_error_controller_factory.h",
"internal/signin/web_view_signin_error_controller_factory.mm",
"internal/sync/cwv_sync_controller.mm",
"internal/sync/cwv_sync_controller_internal.h",
"internal/sync/web_view_device_info_sync_service_factory.h",
"internal/sync/web_view_device_info_sync_service_factory.mm",
"internal/sync/web_view_gcm_profile_service_factory.h",
......@@ -233,46 +243,9 @@ source_set("web_view_sources") {
"internal/webdata_services/web_view_web_data_service_wrapper_factory.h",
"internal/webdata_services/web_view_web_data_service_wrapper_factory.mm",
]
if (ios_web_view_enable_sync) {
sources += [
"internal/signin/cwv_identity.mm",
"internal/sync/cwv_sync_controller.mm",
"internal/sync/cwv_sync_controller_internal.h",
]
}
if (ios_web_view_enable_autofill) {
sources += [
"internal/autofill/cwv_autofill_client_ios_bridge.h",
"internal/autofill/cwv_autofill_controller.mm",
"internal/autofill/cwv_autofill_controller_internal.h",
"internal/autofill/cwv_autofill_data_manager.mm",
"internal/autofill/cwv_autofill_data_manager_internal.h",
"internal/autofill/cwv_autofill_form.mm",
"internal/autofill/cwv_autofill_form_internal.h",
"internal/autofill/cwv_autofill_profile.mm",
"internal/autofill/cwv_autofill_profile_internal.h",
"internal/autofill/cwv_autofill_suggestion.mm",
"internal/autofill/cwv_autofill_suggestion_internal.h",
"internal/autofill/cwv_credit_card.mm",
"internal/autofill/cwv_credit_card_expiration_fixer.mm",
"internal/autofill/cwv_credit_card_expiration_fixer_internal.h",
"internal/autofill/cwv_credit_card_internal.h",
"internal/autofill/cwv_credit_card_name_fixer.mm",
"internal/autofill/cwv_credit_card_name_fixer_internal.h",
"internal/autofill/cwv_credit_card_saver.mm",
"internal/autofill/cwv_credit_card_saver_internal.h",
"internal/autofill/cwv_credit_card_verifier.mm",
"internal/autofill/cwv_credit_card_verifier_internal.h",
"internal/passwords/cwv_password.mm",
"internal/passwords/cwv_password_controller.h",
"internal/passwords/cwv_password_controller.mm",
"internal/passwords/cwv_password_internal.h",
]
}
public_deps = [
":web_view_all_frames",
":web_view_buildflags",
":web_view_main_frame",
":web_view_resources",
"//base",
......@@ -349,12 +322,7 @@ source_set("web_view_sources") {
]
}
# Generate the umbrella header to exclude headers for disabled features.
# This is preferable to guarding header imports using flags defined in
# :web_view_buildflags because:
# 1. Confusing to see headers for unsupported features in umbrella header.
# 2. A need to include cwv_web_view_buildflags.h as part of public headers and
# any headers it itself includes, despite not being part of the public API.
# Generate the umbrella header.
action("web_view_umbrella_header") {
script = "//build/config/ios/generate_umbrella_header.py"
......@@ -555,10 +523,8 @@ group("web_view_resources") {
deps = [
":repack_locales",
":repack_resources",
":repack_scalable_resources",
]
if (ios_web_view_enable_autofill) {
deps += [ ":repack_scalable_resources" ]
}
}
if (additional_toolchains == [] || current_toolchain == default_toolchain) {
......
......@@ -6,12 +6,6 @@ declare_args() {
# Controls if cronet is included.
ios_web_view_include_cronet = true
# Controls if sync APIs are exposed.
ios_web_view_enable_sync = true
# Controls if autofill APIs are exposed.
ios_web_view_enable_autofill = true
# Controls the output name of the built framework.
ios_web_view_output_name = "ChromeWebView"
}
......@@ -15,11 +15,11 @@
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/variations/net/variations_http_headers.h"
#include "ios/web/public/thread/web_task_traits.h"
#include "ios/web/public/thread/web_thread.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#include "ios/web_view/internal/app/web_view_io_thread.h"
#import "ios/web_view/internal/cwv_flags_internal.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
......@@ -31,10 +31,6 @@
#include "services/network/public/mojom/network_context.mojom.h"
#include "ui/base/l10n/l10n_util_mac.h"
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
#include "components/signin/public/identity_manager/identity_manager.h"
#endif
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
......@@ -102,9 +98,7 @@ PrefService* ApplicationContext::GetLocalState() {
scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple);
flags_ui::PrefServiceFlagsStorage::RegisterPrefs(pref_registry.get());
PrefProxyConfigTrackerImpl::RegisterPrefs(pref_registry.get());
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
signin::IdentityManager::RegisterLocalStatePrefs(pref_registry.get());
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
base::FilePath local_state_path;
base::PathService::Get(base::DIR_APP_DATA, &local_state_path);
......
......@@ -4,16 +4,12 @@
#import "ios/web_view/internal/cwv_preferences_internal.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/language/core/browser/pref_names.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/translate/core/browser/translate_pref_names.h"
#include "components/translate/core/browser/translate_prefs.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -48,7 +44,6 @@
translatePrefs.ResetToDefaults();
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#pragma mark - Autofill
- (void)setProfileAutofillEnabled:(BOOL)enabled {
......@@ -77,6 +72,4 @@
password_manager::prefs::kCredentialsEnableService);
}
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@end
......@@ -37,7 +37,6 @@
#import "ios/web/public/web_state_delegate_bridge.h"
#import "ios/web/public/web_state_observer_bridge.h"
#import "ios/web/public/web_view_only/wk_web_view_configuration_util.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#import "ios/web_view/internal/autofill/cwv_autofill_controller_internal.h"
#import "ios/web_view/internal/cwv_back_forward_list_internal.h"
#import "ios/web_view/internal/cwv_favicon_internal.h"
......@@ -137,9 +136,7 @@ WEB_STATE_USER_DATA_KEY_IMPL(WebViewHolder)
@property(nonatomic, readwrite) NSURL* visibleURL;
@property(nonatomic, readwrite) NSString* visibleLocationString;
@property(nonatomic, readwrite) CWVSSLStatus* visibleSSLStatus;
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@property(nonatomic, readonly) CWVAutofillController* autofillController;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
// Updates the availability of the back/forward navigation properties exposed
// through |canGoBack| and |canGoForward|, and also updates |backForwardList|.
......@@ -148,10 +145,8 @@ WEB_STATE_USER_DATA_KEY_IMPL(WebViewHolder)
- (void)updateCurrentURLs;
// Updates |title| property.
- (void)updateTitle;
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
// Returns a new CWVAutofillController created from |_webState|.
- (CWVAutofillController*)newAutofillController;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
// Returns a new CWVTranslationController created from |_webState|.
- (CWVTranslationController*)newTranslationController;
// Updates |_webState| visiblity.
......@@ -166,9 +161,7 @@ BOOL gChromeLongPressAndForceTouchHandlingEnabled = YES;
@implementation CWVWebView
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@synthesize autofillController = _autofillController;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@synthesize backForwardList = _backForwardList;
@synthesize canGoBack = _canGoBack;
@synthesize canGoForward = _canGoForward;
......@@ -628,7 +621,6 @@ BOOL gChromeLongPressAndForceTouchHandlingEnabled = YES;
initWithTranslateClient:translateClient];
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#pragma mark - Autofill
- (CWVAutofillController*)autofillController {
......@@ -660,8 +652,6 @@ BOOL gChromeLongPressAndForceTouchHandlingEnabled = YES;
passwordController:passwordController];
}
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#pragma mark - Preserving and Restoring State
- (void)encodeRestorableStateWithCoder:(NSCoder*)coder {
......@@ -804,14 +794,12 @@ BOOL gChromeLongPressAndForceTouchHandlingEnabled = YES;
_translationController.delegate = delegate;
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
// Recreate and restore the delegate only if previously lazily loaded.
if (_autofillController) {
id<CWVAutofillControllerDelegate> delegate = _autofillController.delegate;
_autofillController = [self newAutofillController];
_autofillController.delegate = delegate;
}
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
[self addInternalWebViewAsSubview];
......
......@@ -12,7 +12,6 @@
#include "components/keyed_service/core/service_access_type.h"
#include "components/password_manager/core/browser/password_store_default.h"
#include "components/sync/driver/sync_service.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#include "ios/web_view/internal/app/application_context.h"
#import "ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h"
#include "ios/web_view/internal/autofill/web_view_personal_data_manager_factory.h"
......@@ -40,18 +39,14 @@
NSHashTable* _webViews;
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
// This web view configuration's autofill data manager.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable)
CWVAutofillDataManager* autofillDataManager;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
// This web view configuration's sync controller.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable) CWVSyncController* syncController;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
// Initializes configuration with the specified browser state mode.
- (instancetype)initWithBrowserState:
......@@ -61,13 +56,9 @@
@implementation CWVWebViewConfiguration
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@synthesize autofillDataManager = _autofillDataManager;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
@synthesize preferences = _preferences;
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
@synthesize syncController = _syncController;
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
@synthesize userContentController = _userContentController;
namespace {
......@@ -131,8 +122,8 @@ CWVWebViewConfiguration* gIncognitoConfiguration = nil;
return self;
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#pragma mark - Autofill
- (CWVAutofillDataManager*)autofillDataManager {
if (!_autofillDataManager && self.persistent) {
autofill::PersonalDataManager* personalDataManager =
......@@ -147,10 +138,9 @@ CWVWebViewConfiguration* gIncognitoConfiguration = nil;
}
return _autofillDataManager;
}
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
#pragma mark - Sync
- (CWVSyncController*)syncController {
if (!_syncController && self.persistent) {
syncer::SyncService* syncService =
......@@ -183,7 +173,6 @@ CWVWebViewConfiguration* gIncognitoConfiguration = nil;
}
return _syncController;
}
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
#pragma mark - Public Methods
......@@ -205,9 +194,7 @@ CWVWebViewConfiguration* gIncognitoConfiguration = nil;
for (CWVWebView* webView in _webViews) {
[webView shutDown];
}
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
[_syncController shutDown];
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
_browserState.reset();
}
......
......@@ -31,7 +31,6 @@
#include "components/translate/core/browser/translate_prefs.h"
#include "ios/web/public/thread/web_task_traits.h"
#include "ios/web/public/thread/web_thread.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#include "ios/web_view/internal/app/application_context.h"
#import "ios/web_view/internal/autofill/web_view_autofill_log_router_factory.h"
#include "ios/web_view/internal/autofill/web_view_personal_data_manager_factory.h"
......@@ -109,9 +108,7 @@ WebViewBrowserState::WebViewBrowserState(
base::ThreadRestrictions::SetIOAllowed(wasIOAllowed);
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
ActiveStateManager::FromBrowserState(this)->SetActive(true);
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
BrowserStateDependencyManager::GetInstance()->CreateBrowserStateServices(
this);
......@@ -121,9 +118,7 @@ WebViewBrowserState::~WebViewBrowserState() {
BrowserStateDependencyManager::GetInstance()->DestroyBrowserStateServices(
this);
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
ActiveStateManager::FromBrowserState(this)->SetActive(false);
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
base::PostTask(FROM_HERE, {web::WebThread::IO},
base::BindOnce(&WebViewURLRequestContextGetter::ShutDown,
......@@ -170,33 +165,22 @@ void WebViewBrowserState::RegisterPrefs(
true);
language::LanguagePrefs::RegisterProfilePrefs(pref_registry);
translate::TranslatePrefs::RegisterProfilePrefs(pref_registry);
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
autofill::prefs::RegisterProfilePrefs(pref_registry);
password_manager::PasswordManager::RegisterProfilePrefs(pref_registry);
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(pref_registry);
syncer::SyncPrefs::RegisterProfilePrefs(pref_registry);
syncer::DeviceInfoPrefs::RegisterProfilePrefs(pref_registry);
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
// Instantiate all factories to setup dependency graph for pref registration.
WebViewLanguageModelManagerFactory::GetInstance();
WebViewTranslateRankerFactory::GetInstance();
WebViewUrlLanguageHistogramFactory::GetInstance();
WebViewTranslateAcceptLanguagesFactory::GetInstance();
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
autofill::WebViewAutofillLogRouterFactory::GetInstance();
WebViewPersonalDataManagerFactory::GetInstance();
WebViewWebDataServiceWrapperFactory::GetInstance();
WebViewPasswordManagerLogRouterFactory::GetInstance();
WebViewPasswordStoreFactory::GetInstance();
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_AUTOFILL)
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
WebViewCookieSettingsFactory::GetInstance();
WebViewHostContentSettingsMapFactory::GetInstance();
WebViewSigninClientFactory::GetInstance();
......@@ -206,7 +190,6 @@ void WebViewBrowserState::RegisterPrefs(
WebViewProfileInvalidationProviderFactory::GetInstance();
WebViewProfileSyncServiceFactory::GetInstance();
WebViewModelTypeStoreServiceFactory::GetInstance();
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
BrowserStateDependencyManager::GetInstance()
->RegisterBrowserStatePrefsForServices(pref_registry);
......
......@@ -12,7 +12,6 @@
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "ios/web_view/cwv_web_view_buildflags.h"
#include "ios/web_view/internal/app/application_context.h"
#import "ios/web_view/internal/cwv_flags_internal.h"
#import "ios/web_view/internal/cwv_web_view_configuration_internal.h"
......@@ -49,7 +48,6 @@ void WebViewWebMainParts::PreCreateThreads() {
ApplicationContext::GetInstance()->PreCreateThreads();
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
std::string enable_features = base::JoinString(
{autofill::features::kAutofillUpstream.name,
......@@ -61,16 +59,13 @@ void WebViewWebMainParts::PreCreateThreads() {
/*enable_features=*/enable_features,
/*disable_features=*/disabled_features);
base::FeatureList::SetInstance(std::move(feature_list));
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
}
void WebViewWebMainParts::PreMainMessageLoopRun() {
WebViewTranslateService::GetInstance()->Initialize();
#if BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
/*schemes=*/nullptr, 0);
#endif // BUILDFLAG(IOS_WEB_VIEW_ENABLE_SYNC)
}
void WebViewWebMainParts::PostMainMessageLoopRun() {
......
......@@ -186,10 +186,6 @@ def main():
help='Additional gn args to pass through to ninja.')
parser.add_argument('--include_cronet', action='store_true',
help='Combines Cronet and ChromeWebView as 1 framework.')
parser.add_argument('--enable_sync', action='store_true',
help='Enables public API for sync.')
parser.add_argument('--enable_autofill', action='store_true',
help='Enables public API for autofill.')
build_configs = ['Debug', 'Release']
target_devices = ['iphonesimulator', 'iphoneos']
parser.add_argument('--build_configs', nargs='+', default=build_configs,
......@@ -221,14 +217,6 @@ def main():
output_name = 'CronetChromeWebView'
else:
extra_gn_options += 'ios_web_view_include_cronet=false '
if options.enable_sync:
extra_gn_options += 'ios_web_view_enable_sync=true '
else:
extra_gn_options += 'ios_web_view_enable_sync=false '
if options.enable_autofill:
extra_gn_options += 'ios_web_view_enable_autofill=true '
else:
extra_gn_options += 'ios_web_view_enable_autofill=false '
extra_gn_options += 'ios_web_view_output_name="%s" ' % output_name
# This prevents Breakpad from being included in the final binary to avoid
# duplicate symbols with the client app.
......
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