Commit 68ea97aa authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Move ManifestUpdateManager and ManifestUpdateTask into web_application:common

ManifestUpdateManager and ManifestUpdateTask are not used outside of
web_applications and are not isolated components, they should live one
level up while maintaining independence from the BMO/Extension backend.

This CL is in preparation to add a dependency from
ManifestUpdateManager to SystemWebAppManager.

Bug: 1035242
Change-Id: I3a5e8e691079619e5b063ac90653dcae6ee3f76f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1973441
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733898}
parent 202e015a
...@@ -16,14 +16,20 @@ group("web_app_test_group") { ...@@ -16,14 +16,20 @@ group("web_app_test_group") {
# Extension codepaths have been removed. # Extension codepaths have been removed.
source_set("common") { source_set("common") {
sources = [ sources = [
"manifest_update_manager.cc",
"manifest_update_manager.h",
"manifest_update_task.cc",
"manifest_update_task.h",
"web_app_tab_helper.cc", "web_app_tab_helper.cc",
"web_app_tab_helper.h", "web_app_tab_helper.h",
] ]
deps = [ deps = [
":web_app_group", ":web_app_group",
"//base/util/values:values_util",
"//chrome/browser/web_applications/components", "//chrome/browser/web_applications/components",
"//chrome/common", "//chrome/common",
"//components/content_settings/core/browser",
"//content/public/browser", "//content/public/browser",
"//skia", "//skia",
] ]
...@@ -216,6 +222,23 @@ source_set("web_applications_browser_tests") { ...@@ -216,6 +222,23 @@ source_set("web_applications_browser_tests") {
] ]
} }
source_set("common_browser_tests") {
testonly = true
sources = [ "manifest_update_manager_browsertest.cc" ]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
deps = [
":common",
":web_applications_test_support",
"//chrome/app:command_ids",
"//chrome/browser/web_applications/components",
"//chrome/test:test_support",
"//chrome/test:test_support_ui",
]
}
# TODO(crbug.com/877898): Erase this and move WebAppProvider into # TODO(crbug.com/877898): Erase this and move WebAppProvider into
# web_applications set. # web_applications set.
source_set("web_applications_on_extensions") { source_set("web_applications_on_extensions") {
...@@ -227,6 +250,7 @@ source_set("web_applications_on_extensions") { ...@@ -227,6 +250,7 @@ source_set("web_applications_on_extensions") {
] ]
deps = [ deps = [
":common",
":web_app_group", ":web_app_group",
":web_applications", ":web_applications",
"//chrome/browser/web_applications/components", "//chrome/browser/web_applications/components",
...@@ -277,6 +301,7 @@ group("browser_tests") { ...@@ -277,6 +301,7 @@ group("browser_tests") {
testonly = true testonly = true
deps = [ deps = [
":common_browser_tests",
":web_app_test_group", ":web_app_test_group",
":web_applications_browser_tests", ":web_applications_browser_tests",
"//chrome/browser/web_applications/components:browser_tests", "//chrome/browser/web_applications/components:browser_tests",
......
...@@ -25,10 +25,6 @@ source_set("components") { ...@@ -25,10 +25,6 @@ source_set("components") {
"install_finalizer.h", "install_finalizer.h",
"install_manager.cc", "install_manager.cc",
"install_manager.h", "install_manager.h",
"manifest_update_manager.cc",
"manifest_update_manager.h",
"manifest_update_task.cc",
"manifest_update_task.h",
"pending_app_manager.cc", "pending_app_manager.cc",
"pending_app_manager.h", "pending_app_manager.h",
"policy/web_app_policy_constants.cc", "policy/web_app_policy_constants.cc",
...@@ -107,7 +103,6 @@ source_set("components") { ...@@ -107,7 +103,6 @@ source_set("components") {
} }
deps = [ deps = [
"//base/util/values:values_util",
"//chrome/app/resources:platform_locale_settings", "//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:chrome_unscaled_resources", "//chrome/app/theme:chrome_unscaled_resources",
...@@ -123,7 +118,6 @@ source_set("components") { ...@@ -123,7 +118,6 @@ source_set("components") {
"//chrome/browser/engagement:mojo_bindings", "//chrome/browser/engagement:mojo_bindings",
"//chrome/browser/web_applications:web_app_group", "//chrome/browser/web_applications:web_app_group",
"//chrome/common", "//chrome/common",
"//components/content_settings/core/browser",
"//components/crx_file", "//components/crx_file",
"//components/keyed_service/content", "//components/keyed_service/content",
"//components/pref_registry", "//components/pref_registry",
...@@ -188,16 +182,12 @@ source_set("unit_tests") { ...@@ -188,16 +182,12 @@ source_set("unit_tests") {
source_set("browser_tests") { source_set("browser_tests") {
testonly = true testonly = true
sources = [ sources = [ "web_app_url_loader_browsertest.cc" ]
"manifest_update_manager_browsertest.cc",
"web_app_url_loader_browsertest.cc",
]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
deps = [ deps = [
":components", ":components",
"//chrome/app:command_ids",
"//chrome/browser/web_applications:web_applications_test_support", "//chrome/browser/web_applications:web_applications_test_support",
"//chrome/test:test_support", "//chrome/test:test_support",
"//chrome/test:test_support_ui", "//chrome/test:test_support_ui",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/web_applications/components/manifest_update_manager.h" #include "chrome/browser/web_applications/manifest_update_manager.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/util/values/values_util.h" #include "base/util/values/values_util.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_MANAGER_H_ #ifndef CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_MANAGER_H_ #define CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_MANAGER_H_
#include <memory> #include <memory>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/web_applications/components/app_registrar.h" #include "chrome/browser/web_applications/components/app_registrar.h"
#include "chrome/browser/web_applications/components/app_registrar_observer.h" #include "chrome/browser/web_applications/components/app_registrar_observer.h"
#include "chrome/browser/web_applications/components/manifest_update_task.h"
#include "chrome/browser/web_applications/components/web_app_helpers.h" #include "chrome/browser/web_applications/components/web_app_helpers.h"
#include "chrome/browser/web_applications/manifest_update_task.h"
class Profile; class Profile;
...@@ -92,4 +92,4 @@ class ManifestUpdateManager final : public AppRegistrarObserver { ...@@ -92,4 +92,4 @@ class ManifestUpdateManager final : public AppRegistrarObserver {
} // namespace web_app } // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_MANAGER_H_ #endif // CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_MANAGER_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/web_applications/components/manifest_update_manager.h" #include "chrome/browser/web_applications/manifest_update_manager.h"
#include <string> #include <string>
#include <vector> #include <vector>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/web_applications/components/manifest_update_task.h" #include "chrome/browser/web_applications/manifest_update_task.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/installable/installable_manager.h" #include "chrome/browser/installable/installable_manager.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_TASK_H_ #ifndef CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_TASK_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_TASK_H_ #define CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_TASK_H_
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
...@@ -97,4 +97,4 @@ class ManifestUpdateTask final ...@@ -97,4 +97,4 @@ class ManifestUpdateTask final
} // namespace web_app } // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_MANIFEST_UPDATE_TASK_H_ #endif // CHROME_BROWSER_WEB_APPLICATIONS_MANIFEST_UPDATE_TASK_H_
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/components/externally_installed_web_app_prefs.h" #include "chrome/browser/web_applications/components/externally_installed_web_app_prefs.h"
#include "chrome/browser/web_applications/components/install_bounce_metric.h" #include "chrome/browser/web_applications/components/install_bounce_metric.h"
#include "chrome/browser/web_applications/components/manifest_update_manager.h"
#include "chrome/browser/web_applications/components/policy/web_app_policy_manager.h" #include "chrome/browser/web_applications/components/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/components/web_app_audio_focus_id_map.h" #include "chrome/browser/web_applications/components/web_app_audio_focus_id_map.h"
#include "chrome/browser/web_applications/components/web_app_prefs_utils.h" #include "chrome/browser/web_applications/components/web_app_prefs_utils.h"
...@@ -25,6 +24,7 @@ ...@@ -25,6 +24,7 @@
#include "chrome/browser/web_applications/extensions/bookmark_app_shortcut_manager.h" #include "chrome/browser/web_applications/extensions/bookmark_app_shortcut_manager.h"
#include "chrome/browser/web_applications/external_web_app_manager.h" #include "chrome/browser/web_applications/external_web_app_manager.h"
#include "chrome/browser/web_applications/file_utils_wrapper.h" #include "chrome/browser/web_applications/file_utils_wrapper.h"
#include "chrome/browser/web_applications/manifest_update_manager.h"
#include "chrome/browser/web_applications/pending_app_manager_impl.h" #include "chrome/browser/web_applications/pending_app_manager_impl.h"
#include "chrome/browser/web_applications/system_web_app_manager.h" #include "chrome/browser/web_applications/system_web_app_manager.h"
#include "chrome/browser/web_applications/web_app_database_factory.h" #include "chrome/browser/web_applications/web_app_database_factory.h"
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/components/manifest_update_manager.h"
#include "chrome/browser/web_applications/components/policy/web_app_policy_manager.h" #include "chrome/browser/web_applications/components/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/components/web_app_audio_focus_id_map.h" #include "chrome/browser/web_applications/components/web_app_audio_focus_id_map.h"
#include "chrome/browser/web_applications/components/web_app_provider_base.h" #include "chrome/browser/web_applications/components/web_app_provider_base.h"
#include "chrome/browser/web_applications/components/web_app_ui_manager.h" #include "chrome/browser/web_applications/components/web_app_ui_manager.h"
#include "chrome/browser/web_applications/manifest_update_manager.h"
#include "content/public/browser/media_session.h" #include "content/public/browser/media_session.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
#include "content/public/browser/site_instance.h" #include "content/public/browser/site_instance.h"
......
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