Commit acc26cbf authored by Christopher Lam's avatar Christopher Lam Committed by Commit Bot

[Web Applications] Move generic concepts out of web_applications/bookmark_apps/

This CL moves the non-extensions-specific concepts of External Web Apps,
System Web Apps and Policy Web Apps into the generic web_applications/
level, rather than being in web_applications/bookmark_apps/ which was
extensions specific.

The tests remain in bookmark_apps/ because they have some dependencies
on extensions e.g installing and explicitly checking the existence of
an app through the extensions system. Tests without extensions dependencies
will be moved in a follow-up patch.

Bug: None
Change-Id: I9d9bca55e73a46ef5ad2781f6eca29416059d6b6
Reviewed-on: https://chromium-review.googlesource.com/c/1333012Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
Commit-Queue: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608687}
parent b73f5dba
......@@ -67,8 +67,8 @@ source_set("chromeos") {
"//chrome/browser/extensions",
"//chrome/browser/resource_coordinator:tab_metrics_event_proto",
"//chrome/browser/ssl:proto",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_on_extensions",
"//chrome/browser/web_applications/bookmark_apps",
"//chrome/browser/web_applications/components",
"//chrome/common",
"//chrome/common/extensions/api",
......@@ -260,7 +260,7 @@ source_set("chromeos") {
allow_circular_includes_from = [
"//chrome/browser/extensions",
"//chrome/browser/apps/platform_apps/api",
"//chrome/browser/web_applications/bookmark_apps",
"//chrome/browser/web_applications",
]
sources = [
......
......@@ -1263,10 +1263,6 @@ jumbo_split_static_library("ui") {
deps += [
"//chrome/browser/web_applications",
# TODO(calamity): Remove once SystemWebAppManager is moved into
# web_applications/.
"//chrome/browser/web_applications/bookmark_apps",
# TODO(loyso): Erase these. crbug.com/877898.
"//chrome/browser/web_applications:web_applications_on_extensions",
"//chrome/browser/web_applications/components",
......
......@@ -97,7 +97,7 @@
#include "chrome/browser/ui/webui/settings/chromeos/google_assistant_handler.h"
#include "chrome/browser/ui/webui/settings/chromeos/internet_handler.h"
#include "chrome/browser/ui/webui/settings/chromeos/multidevice_handler.h"
#include "chrome/browser/web_applications/bookmark_apps/system_web_app_manager.h"
#include "chrome/browser/web_applications/system_web_app_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/grit/browser_resources.h"
#include "chromeos/account_manager/account_manager.h"
......
......@@ -9,6 +9,14 @@ group("web_app_group") {
source_set("web_applications") {
sources = [
"abstract_web_app_database.h",
"external_web_apps.cc",
"external_web_apps.h",
"policy/web_app_policy_constants.cc",
"policy/web_app_policy_constants.h",
"policy/web_app_policy_manager.cc",
"policy/web_app_policy_manager.h",
"system_web_app_manager.cc",
"system_web_app_manager.h",
"web_app.cc",
"web_app.h",
"web_app_database.cc",
......@@ -27,6 +35,7 @@ source_set("web_applications") {
":web_app_group",
"//chrome/browser/web_applications/components",
"//chrome/common",
"//components/pref_registry",
"//components/sync",
"//content/public/browser",
"//skia",
......@@ -43,6 +52,8 @@ source_set("web_applications_test_support") {
sources = [
"test/test_data_retriever.cc",
"test/test_data_retriever.h",
"test/test_system_web_app_manager.cc",
"test/test_system_web_app_manager.h",
"test/test_web_app_database.cc",
"test/test_web_app_database.h",
"test/test_web_app_database_factory.cc",
......
......@@ -10,14 +10,6 @@ source_set("bookmark_apps") {
sources = [
"bookmark_app_install_manager.cc",
"bookmark_app_install_manager.h",
"external_web_apps.cc",
"external_web_apps.h",
"policy/web_app_policy_constants.cc",
"policy/web_app_policy_constants.h",
"policy/web_app_policy_manager.cc",
"policy/web_app_policy_manager.h",
"system_web_app_manager.cc",
"system_web_app_manager.h",
]
deps = [
......@@ -32,21 +24,6 @@ source_set("bookmark_apps") {
]
}
source_set("test_support") {
testonly = true
sources = [
"test_system_web_app_manager.cc",
"test_system_web_app_manager.h",
]
deps = [
":bookmark_apps",
"//base",
"//url",
]
}
source_set("unit_tests") {
testonly = true
......@@ -58,11 +35,12 @@ source_set("unit_tests") {
deps = [
":bookmark_apps",
":test_support",
"//base",
"//chrome/browser",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_app_group",
"//chrome/browser/web_applications:web_applications_on_extensions",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/browser/web_applications/components",
"//chrome/browser/web_applications/components:test_support",
"//chrome/browser/web_applications/extensions",
......@@ -91,11 +69,12 @@ source_set("browser_tests") {
deps = [
":bookmark_apps",
":test_support",
"//base",
"//base/test:test_support",
"//chrome/app/theme:chrome_unscaled_resources_grit",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_on_extensions",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/browser/web_applications/components",
"//chrome/browser/web_applications/extensions",
"//chrome/common:constants",
......
......@@ -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 "chrome/browser/web_applications/bookmark_apps/external_web_apps.h"
#include "chrome/browser/web_applications/external_web_apps.h"
#include <algorithm>
#include <vector>
......
......@@ -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 "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
#include <memory>
#include <utility>
......@@ -11,11 +11,11 @@
#include "base/run_loop.h"
#include "base/values.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_constants.h"
#include "chrome/browser/web_applications/components/pending_app_manager.h"
#include "chrome/browser/web_applications/components/test_pending_app_manager.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/extensions/web_app_extension_ids_map.h"
#include "chrome/browser/web_applications/policy/web_app_policy_constants.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
......
......@@ -12,9 +12,9 @@
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/ui/extensions/hosted_app_browser_controller.h"
#include "chrome/browser/web_applications/bookmark_apps/test_system_web_app_manager.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h"
#include "chrome/browser/web_applications/test/test_system_web_app_manager.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_provider_factory.h"
#include "chrome/common/chrome_features.h"
......
......@@ -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 "chrome/browser/web_applications/bookmark_apps/system_web_app_manager.h"
#include "chrome/browser/web_applications/system_web_app_manager.h"
#include <memory>
#include <utility>
......@@ -12,11 +12,11 @@
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/web_applications/bookmark_apps/test_system_web_app_manager.h"
#include "chrome/browser/web_applications/components/pending_app_manager.h"
#include "chrome/browser/web_applications/components/test_pending_app_manager.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/extensions/web_app_extension_ids_map.h"
#include "chrome/browser/web_applications/test/test_system_web_app_manager.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
......
......@@ -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 "chrome/browser/web_applications/bookmark_apps/external_web_apps.h"
#include "chrome/browser/web_applications/external_web_apps.h"
#include <map>
#include <memory>
......
......@@ -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 CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_EXTERNAL_WEB_APPS_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_EXTERNAL_WEB_APPS_H_
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_EXTERNAL_WEB_APPS_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_EXTERNAL_WEB_APPS_H_
#include <vector>
......@@ -31,4 +31,4 @@ ScanDirForExternalWebAppsForTesting(base::FilePath dir);
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_EXTERNAL_WEB_APPS_H_
#endif // CHROME_BROWSER_WEB_APPLICATIONS_EXTERNAL_WEB_APPS_H_
......@@ -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 "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_constants.h"
#include "chrome/browser/web_applications/policy/web_app_policy_constants.h"
namespace web_app {
......
......@@ -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 CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
namespace web_app {
......@@ -15,4 +15,4 @@ extern const char kLaunchContainerTabValue[];
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
#endif // CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
......@@ -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 "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
#include <utility>
#include <vector>
......@@ -12,10 +12,8 @@
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_constants.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h"
#include "chrome/browser/web_applications/extensions/web_app_extension_ids_map.h"
#include "chrome/browser/web_applications/policy/web_app_policy_constants.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.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 CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_MANAGER_H_
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_
#include <vector>
......@@ -57,4 +57,4 @@ class WebAppPolicyManager {
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_POLICY_WEB_APP_POLICY_MANAGER_H_
#endif // CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_
......@@ -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 "chrome/browser/web_applications/bookmark_apps/system_web_app_manager.h"
#include "chrome/browser/web_applications/system_web_app_manager.h"
#include <utility>
#include <vector>
......@@ -12,8 +12,6 @@
#include "base/task/post_task.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h"
#include "chrome/browser/web_applications/extensions/web_app_extension_ids_map.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/webui_url_constants.h"
#include "content/public/browser/browser_task_traits.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 CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_SYSTEM_WEB_APP_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_SYSTEM_WEB_APP_MANAGER_H_
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_SYSTEM_WEB_APP_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_SYSTEM_WEB_APP_MANAGER_H_
#include <vector>
......@@ -46,4 +46,4 @@ class SystemWebAppManager {
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_SYSTEM_WEB_APP_MANAGER_H_
#endif // CHROME_BROWSER_WEB_APPLICATIONS_SYSTEM_WEB_APP_MANAGER_H_
......@@ -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 "chrome/browser/web_applications/bookmark_apps/test_system_web_app_manager.h"
#include "chrome/browser/web_applications/test/test_system_web_app_manager.h"
namespace web_app {
......
......@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_TEST_SYSTEM_WEB_APP_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_TEST_SYSTEM_WEB_APP_MANAGER_H_
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_TEST_TEST_SYSTEM_WEB_APP_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_TEST_TEST_SYSTEM_WEB_APP_MANAGER_H_
#include <vector>
#include "base/macros.h"
#include "chrome/browser/web_applications/bookmark_apps/system_web_app_manager.h"
#include "chrome/browser/web_applications/system_web_app_manager.h"
#include "url/gurl.h"
class Profile;
......@@ -33,4 +33,4 @@ class TestSystemWebAppManager : public SystemWebAppManager {
} // namespace web_app
#endif // CHROME_BROWSER_WEB_APPLICATIONS_BOOKMARK_APPS_TEST_SYSTEM_WEB_APP_MANAGER_H_
#endif // CHROME_BROWSER_WEB_APPLICATIONS_TEST_TEST_SYSTEM_WEB_APP_MANAGER_H_
......@@ -12,13 +12,13 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/bookmark_apps/bookmark_app_install_manager.h"
#include "chrome/browser/web_applications/bookmark_apps/external_web_apps.h"
#include "chrome/browser/web_applications/bookmark_apps/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/bookmark_apps/system_web_app_manager.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/web_applications/components/web_app_helpers.h"
#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h"
#include "chrome/browser/web_applications/extensions/web_app_extension_ids_map.h"
#include "chrome/browser/web_applications/external_web_apps.h"
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/system_web_app_manager.h"
#include "chrome/browser/web_applications/web_app_database.h"
#include "chrome/browser/web_applications/web_app_database_factory.h"
#include "chrome/browser/web_applications/web_app_install_manager.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