| # Copyright 2017 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("//components/safe_browsing/buildflags.gni") |
| import("//extensions/buildflags/buildflags.gni") |
| |
| source_set("password_protection") { |
| if (safe_browsing_mode == 1 || safe_browsing_mode == 2) { |
| sources = [ |
| "password_protection_navigation_throttle.cc", |
| "password_protection_navigation_throttle.h", |
| "password_protection_request.cc", |
| "password_protection_request.h", |
| "password_protection_service.cc", |
| "password_protection_service.h", |
| "visual_utils.cc", |
| "visual_utils.h", |
| ] |
| |
| public_deps = [ |
| "//google_apis:google_apis", |
| ] |
| |
| deps = [ |
| ":password_protection_metrics_util", |
| "//base:base", |
| "//components/content_settings/core/browser:browser", |
| "//components/history/core/browser:browser", |
| "//components/password_manager/core/browser:browser", |
| "//components/safe_browsing/content/web_ui:web_ui", |
| "//components/safe_browsing/core:csd_proto", |
| "//components/safe_browsing/core:features", |
| "//components/safe_browsing/core/browser:referrer_chain_provider", |
| "//components/safe_browsing/core/common:common", |
| "//components/safe_browsing/core/common:interfaces", |
| "//components/safe_browsing/core/common:safe_browsing_prefs", |
| "//components/safe_browsing/core/db:allowlist_checker_client", |
| "//components/safe_browsing/core/db:database_manager", |
| "//components/safe_browsing/core/db:v4_protocol_manager_util", |
| "//components/sessions", |
| "//components/signin/public/base", |
| "//components/signin/public/identity_manager", |
| "//content/public/browser:browser", |
| "//net:net", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |
| if (safe_browsing_mode == 1) { |
| deps += [ "//components/zoom" ] |
| } |
| } |
| |
| source_set("password_protection_metrics_util") { |
| sources = [ |
| "metrics_util.cc", |
| "metrics_util.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//components/safe_browsing/core:csd_proto", |
| "//net:net", |
| "//ui/gfx/geometry:geometry", |
| ] |
| } |
| |
| source_set("password_protection_unittest") { |
| testonly = true |
| if (safe_browsing_mode == 1) { |
| sources = [ |
| "password_protection_service_unittest.cc", |
| "visual_utils_unittest.cc", |
| ] |
| deps = [ |
| ":mock_password_protection", |
| ":password_protection", |
| ":password_protection_metrics_util", |
| "//base", |
| "//base/test:test_support", |
| "//components/content_settings/core/browser:browser", |
| "//components/history/core/browser:browser", |
| "//components/password_manager/core/browser:browser", |
| "//components/safe_browsing/core:csd_proto", |
| "//components/safe_browsing/core:features", |
| "//components/safe_browsing/core:verdict_cache_manager", |
| "//components/safe_browsing/core/common:interfaces", |
| "//components/safe_browsing/core/db:test_database_manager", |
| "//components/signin/public/base", |
| "//components/signin/public/identity_manager", |
| "//components/sync_preferences:test_support", |
| "//content/test:test_support", |
| "//net:test_support", |
| "//services/network:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |
| } |
| |
| source_set("mock_password_protection") { |
| testonly = true |
| if (safe_browsing_mode == 1) { |
| sources = [ |
| "mock_password_protection_service.cc", |
| "mock_password_protection_service.h", |
| ] |
| deps = [ |
| ":password_protection", |
| "//base", |
| "//components/content_settings/core/browser:browser", |
| "//components/safe_browsing/core/db:database_manager", |
| "//net:test_support", |
| "//services/network/public/cpp:cpp", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| } |