Commit d16f44e6 authored by rohitrao's avatar rohitrao Committed by Commit bot

Renames the main components/sessions target to sessions_content.

This makes it clear that this target depends on //content and lays the
groundwork for a future sessions_ios target.

The files in components/sessions/core/ are moved to a variable so that
they can be shared across targets.

TBR=finnur@chromium.org
TBR=sky@chromium.org
BUG=371476
TEST=None

Review URL: https://codereview.chromium.org/673843002

Cr-Commit-Position: refs/heads/master@{#301103}
parent 373e3a9b
...@@ -173,7 +173,7 @@ static_library("browser") { ...@@ -173,7 +173,7 @@ static_library("browser") {
"//components/navigation_interception", "//components/navigation_interception",
"//components/password_manager/content/browser", "//components/password_manager/content/browser",
"//components/precache/content", "//components/precache/content",
"//components/sessions", "//components/sessions:sessions_content",
"//components/storage_monitor", "//components/storage_monitor",
"//components/translate/content/browser", "//components/translate/content/browser",
"//components/url_matcher", "//components/url_matcher",
......
...@@ -2921,7 +2921,7 @@ ...@@ -2921,7 +2921,7 @@
'../components/components.gyp:password_manager_content_browser', '../components/components.gyp:password_manager_content_browser',
'../components/components.gyp:power', '../components/components.gyp:power',
'../components/components.gyp:precache_content', '../components/components.gyp:precache_content',
'../components/components.gyp:sessions', '../components/components.gyp:sessions_content',
'../components/components.gyp:storage_monitor', '../components/components.gyp:storage_monitor',
'../components/components.gyp:translate_content_browser', '../components/components.gyp:translate_content_browser',
'../components/components.gyp:url_matcher', '../components/components.gyp:url_matcher',
......
...@@ -81,7 +81,7 @@ group("all_components") { ...@@ -81,7 +81,7 @@ group("all_components") {
"//components/search", "//components/search",
"//components/search_engines", "//components/search_engines",
"//components/search_provider_logos", "//components/search_provider_logos",
"//components/sessions", "//components/sessions:sessions_content",
"//components/signin/core/browser", "//components/signin/core/browser",
"//components/startup_metric_utils", "//components/startup_metric_utils",
"//components/strings", "//components/strings",
...@@ -172,7 +172,7 @@ group("all_components") { ...@@ -172,7 +172,7 @@ group("all_components") {
"//components/renderer_context_menu", # Blocked on content. "//components/renderer_context_menu", # Blocked on content.
"//components/search_engines", # Should work, needs checking. "//components/search_engines", # Should work, needs checking.
"//components/search_provider_logos", # Should work, needs checking. "//components/search_provider_logos", # Should work, needs checking.
"//components/sessions", # Blocked on content. "//components/sessions:sessions_content", # Blocked on content.
"//components/signin/core/browser", # Should work, needs checking. "//components/signin/core/browser", # Should work, needs checking.
"//components/translate/content/browser", # Blocked on content. "//components/translate/content/browser", # Blocked on content.
"//components/translate/content/common", # Blocked on content. "//components/translate/content/common", # Blocked on content.
......
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
# Dependencies of sessions # Dependencies of sessions
'../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/protobuf/protobuf.gyp:protobuf_lite',
'components.gyp:sessions', 'components.gyp:sessions_content',
'components.gyp:sessions_test_support', 'components.gyp:sessions_test_support',
# Dependencies of storage monitor # Dependencies of storage monitor
......
...@@ -3,10 +3,28 @@ ...@@ -3,10 +3,28 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables': {
# Core sources shared by sessions_content and sessions_ios.
#
# TODO(rohitrao): We are including these sources directly into each
# individual target in order to avoid the complications associated with
# making a separate sessions_core target. The files in sessions/core
# declare a static function that they do not define, which means that a
# sessions_core target would not link as a shared_library. It would also be
# unsuitable as a static_library because it would be linked into multiple
# shared libraries. Revisit this setup if necessary.
'sessions_core_sources': [
'sessions/core/serialized_navigation_driver.h',
'sessions/serialized_navigation_entry.cc',
'sessions/serialized_navigation_entry.h',
'sessions/session_id.cc',
'sessions/session_id.h',
],
},
'targets': [ 'targets': [
{ {
# GN version: //components/sessions # GN version: //components/sessions:sessions_content
'target_name': 'sessions', 'target_name': 'sessions_content',
'type': '<(component)', 'type': '<(component)',
'dependencies': [ 'dependencies': [
'../base/base.gyp:base', '../base/base.gyp:base',
...@@ -25,18 +43,12 @@ ...@@ -25,18 +43,12 @@
], ],
'sources': [ 'sources': [
# Note: sources list duplicated in GN build. # Note: sources list duplicated in GN build.
'<@(sessions_core_sources)',
# TODO(rohitrao): Split this target into three separate core, content,
# and web targets.
'sessions/content/content_serialized_navigation_builder.cc', 'sessions/content/content_serialized_navigation_builder.cc',
'sessions/content/content_serialized_navigation_builder.h', 'sessions/content/content_serialized_navigation_builder.h',
'sessions/content/content_serialized_navigation_driver.cc', 'sessions/content/content_serialized_navigation_driver.cc',
'sessions/content/content_serialized_navigation_driver.h', 'sessions/content/content_serialized_navigation_driver.h',
'sessions/core/serialized_navigation_driver.h',
'sessions/serialized_navigation_entry.cc',
'sessions/serialized_navigation_entry.h',
'sessions/session_id.cc',
'sessions/session_id.h',
], ],
'conditions': [ 'conditions': [
['android_webview_build == 0', { ['android_webview_build == 0', {
......
...@@ -6,14 +6,12 @@ if (is_android) { ...@@ -6,14 +6,12 @@ if (is_android) {
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
} }
component("sessions") { # TODO(rohitrao): sessions_core is defined as a source_set because it declares a
# static function that it does not define. This prevents it from linking as a
# shared_library. It also cannot be a static_library because it will be linked
# into multiple shared libraries. Revisit this setup if necessary.
source_set("sessions_core") {
sources = [ sources = [
# TODO(rohitrao): Split this target into three separate core, content,
# and web targets.
"content/content_serialized_navigation_builder.cc",
"content/content_serialized_navigation_builder.h",
"content/content_serialized_navigation_driver.cc",
"content/content_serialized_navigation_driver.h",
"core/serialized_navigation_driver.h", "core/serialized_navigation_driver.h",
"serialized_navigation_entry.cc", "serialized_navigation_entry.cc",
"serialized_navigation_entry.h", "serialized_navigation_entry.h",
...@@ -25,8 +23,6 @@ component("sessions") { ...@@ -25,8 +23,6 @@ component("sessions") {
deps = [ deps = [
"//base", "//base",
"//base/third_party/dynamic_annotations",
"//content/public/browser",
"//skia", "//skia",
"//ui/base", "//ui/base",
"//url", "//url",
...@@ -37,6 +33,26 @@ component("sessions") { ...@@ -37,6 +33,26 @@ component("sessions") {
} }
} }
component("sessions_content") {
sources = [
"content/content_serialized_navigation_builder.cc",
"content/content_serialized_navigation_builder.h",
"content/content_serialized_navigation_driver.cc",
"content/content_serialized_navigation_driver.h",
]
defines = [ "SESSIONS_IMPLEMENTATION" ]
deps = [
":sessions_core",
"//base",
"//base/third_party/dynamic_annotations",
"//content/public/browser",
"//ui/base",
"//url",
]
}
static_library("test_support") { static_library("test_support") {
testonly = true testonly = true
sources = [ sources = [
......
...@@ -15,7 +15,7 @@ source_set("browser") { ...@@ -15,7 +15,7 @@ source_set("browser") {
"//components/keyed_service/content", "//components/keyed_service/content",
"//components/keyed_service/core", "//components/keyed_service/core",
"//components/pref_registry", "//components/pref_registry",
"//components/sessions", "//components/sessions:sessions_content",
"//components/web_cache/browser", "//components/web_cache/browser",
"//components/web_modal", "//components/web_modal",
"//content/public/browser", "//content/public/browser",
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
'../components/components.gyp:keyed_service_content', '../components/components.gyp:keyed_service_content',
'../components/components.gyp:keyed_service_core', '../components/components.gyp:keyed_service_core',
'../components/components.gyp:pref_registry', '../components/components.gyp:pref_registry',
'../components/components.gyp:sessions', '../components/components.gyp:sessions_content',
'../components/components.gyp:storage_monitor', '../components/components.gyp:storage_monitor',
'../components/components.gyp:web_cache_browser', '../components/components.gyp:web_cache_browser',
'../components/components.gyp:web_modal', '../components/components.gyp:web_modal',
......
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