diff options
author | sdefresne <sdefresne@chromium.org> | 2015-11-16 03:45:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-16 11:46:35 +0000 |
commit | cff08b58d85bd88cfb63c73d6ec628c922009c53 (patch) | |
tree | 60c111dfda7ba50a578c53fce44122599ae53825 /components/autofill | |
parent | 8970c554cd8fb543423bb174b47a6a2a6256b901 (diff) | |
download | chromium_src-cff08b58d85bd88cfb63c73d6ec628c922009c53.zip chromium_src-cff08b58d85bd88cfb63c73d6ec628c922009c53.tar.gz chromium_src-cff08b58d85bd88cfb63c73d6ec628c922009c53.tar.bz2 |
Enable compilation of //components/autofill on iOS with gn.
Fix circular dependency between //components/autofill/{core,ios}/browser
by moving autofill_field_trial_ios.* and keyboard_accessory_metrics_logger.*
to //components/autofill/core/browser target.
Select the correct implementation of LoginDatabase (login_database_ios.cc)
instead of reusing the one from login_database_posix.cc.
Add BUILD.gn to for //components/autofill/ios/browser.
BUG=459705,341429
Review URL: https://codereview.chromium.org/1446473002
Cr-Commit-Position: refs/heads/master@{#359822}
Diffstat (limited to 'components/autofill')
-rw-r--r-- | components/autofill/core/browser/BUILD.gn | 14 | ||||
-rw-r--r-- | components/autofill/core/browser/autofill_field_trial_ios.cc (renamed from components/autofill/ios/browser/autofill_field_trial_ios.cc) | 2 | ||||
-rw-r--r-- | components/autofill/core/browser/autofill_field_trial_ios.h (renamed from components/autofill/ios/browser/autofill_field_trial_ios.h) | 6 | ||||
-rw-r--r-- | components/autofill/core/browser/autofill_manager.cc | 4 | ||||
-rw-r--r-- | components/autofill/core/browser/keyboard_accessory_metrics_logger.h (renamed from components/autofill/ios/browser/keyboard_accessory_metrics_logger.h) | 6 | ||||
-rw-r--r-- | components/autofill/core/browser/keyboard_accessory_metrics_logger.mm (renamed from components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm) | 2 | ||||
-rw-r--r-- | components/autofill/ios/browser/BUILD.gn | 40 |
7 files changed, 62 insertions, 12 deletions
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn index 7ac95fe..d946f1e 100644 --- a/components/autofill/core/browser/BUILD.gn +++ b/components/autofill/core/browser/BUILD.gn @@ -142,6 +142,15 @@ source_set("browser") { "webdata/autofill_webdata_service_observer.h", ] + if (is_ios) { + sources += [ + "autofill_field_trial_ios.cc", + "autofill_field_trial_ios.h", + "keyboard_accessory_metrics_logger.h", + "keyboard_accessory_metrics_logger.mm", + ] + } + configs += [ "//build/config:precompiled_headers" ] deps = [ @@ -208,11 +217,10 @@ source_set("test_support") { ] deps = [ - ":browser", "//base", + "//base/test:test_support", "//base:prefs", "//base:prefs_test_support", - "//base/test:test_support", "//components/autofill/core/browser", "//components/autofill/core/common", "//components/os_crypt", @@ -225,6 +233,8 @@ source_set("test_support") { "//skia", "//testing/gtest", "//ui/gfx/geometry", + "//ui/gfx:test_support", + ":browser", ] } diff --git a/components/autofill/ios/browser/autofill_field_trial_ios.cc b/components/autofill/core/browser/autofill_field_trial_ios.cc index 518f342..95290e0 100644 --- a/components/autofill/ios/browser/autofill_field_trial_ios.cc +++ b/components/autofill/core/browser/autofill_field_trial_ios.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/autofill/ios/browser/autofill_field_trial_ios.h" +#include "components/autofill/core/browser/autofill_field_trial_ios.h" #include "base/command_line.h" #include "base/metrics/field_trial.h" diff --git a/components/autofill/ios/browser/autofill_field_trial_ios.h b/components/autofill/core/browser/autofill_field_trial_ios.h index cb5d3cb..9750b71 100644 --- a/components/autofill/ios/browser/autofill_field_trial_ios.h +++ b/components/autofill/core/browser/autofill_field_trial_ios.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ -#define COMPONENTS_AUTOFILL_IOS_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ +#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ #include "base/macros.h" @@ -25,4 +25,4 @@ class AutofillFieldTrialIOS { } // namespace autofill -#endif // COMPONENTS_AUTOFILL_IOS_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_TRIAL_IOS_H_ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index f21a52d..3dd5d07 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc @@ -59,8 +59,8 @@ #include "url/gurl.h" #if defined(OS_IOS) -#include "components/autofill/ios/browser/autofill_field_trial_ios.h" -#include "components/autofill/ios/browser/keyboard_accessory_metrics_logger.h" +#include "components/autofill/core/browser/autofill_field_trial_ios.h" +#include "components/autofill/core/browser/keyboard_accessory_metrics_logger.h" #endif namespace autofill { diff --git a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.h b/components/autofill/core/browser/keyboard_accessory_metrics_logger.h index a3cd9d6..50f704c 100644 --- a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.h +++ b/components/autofill/core/browser/keyboard_accessory_metrics_logger.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ -#define COMPONENTS_AUTOFILL_IOS_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ +#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ #include "base/basictypes.h" @@ -70,4 +70,4 @@ class KeyboardAccessoryMetricsLogger { } // namespace autofill -#endif // COMPONENTS_AUTOFILL_IOS_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_KEYBOARD_ACCESSORY_METRICS_LOGGER_H_ diff --git a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm b/components/autofill/core/browser/keyboard_accessory_metrics_logger.mm index 9f4bb78..b6e98be 100644 --- a/components/autofill/ios/browser/keyboard_accessory_metrics_logger.mm +++ b/components/autofill/core/browser/keyboard_accessory_metrics_logger.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "components/autofill/ios/browser/keyboard_accessory_metrics_logger.h" +#import "components/autofill/core/browser/keyboard_accessory_metrics_logger.h" #import <UIKit/UIKit.h> diff --git a/components/autofill/ios/browser/BUILD.gn b/components/autofill/ios/browser/BUILD.gn new file mode 100644 index 0000000..63dcd96 --- /dev/null +++ b/components/autofill/ios/browser/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//ios/web/js_compile.gni") + +source_set("browser") { + sources = [ + "autofill_client_ios_bridge.h", + "autofill_driver_ios.h", + "autofill_driver_ios.mm", + "autofill_driver_ios_bridge.h", + "credit_card_util.h", + "credit_card_util.mm", + "form_suggestion.h", + "form_suggestion.mm", + "js_autofill_manager.h", + "js_autofill_manager.mm", + "js_suggestion_manager.h", + "js_suggestion_manager.mm", + "personal_data_manager_observer_bridge.h", + "personal_data_manager_observer_bridge.mm", + ] + + deps = [ + "//components/autofill/core/browser", + "//components/autofill/core/common", + "//ios/public/provider/web", + "//ios/web", + ":injected_js", + ] +} + +js_compile_checked("injected_js") { + visibility = [ ":browser" ] + sources = [ + "resources/autofill_controller.js", + "resources/suggestion_controller.js", + ] +} |