Commit 7f31dc1c authored by Patrick Monette's avatar Patrick Monette Committed by Chromium LUCI CQ

[PM] Consolidate the execution context priority code to components/

This makes it so that all content/ embedders will be able to use
the concept of execution context priority.

This CL also moves OverrideVoteAggregator, MaxVoteAggregator and
BoostingVoteAggregator out of public visibility, as it is no
longer needed.

Bug: 971272
Change-Id: I39096d966cc844f75b739d909b4ac2df605eef88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2564038Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831981}
parent d6edf4bb
......@@ -1093,12 +1093,6 @@ static_library("browser") {
"performance_manager/chrome_browser_main_extra_parts_performance_manager.h",
"performance_manager/chrome_content_browser_client_performance_manager_part.cc",
"performance_manager/chrome_content_browser_client_performance_manager_part.h",
"performance_manager/decorators/execution_context_priority/ad_frame_voter.cc",
"performance_manager/decorators/execution_context_priority/ad_frame_voter.h",
"performance_manager/decorators/execution_context_priority/frame_visibility_voter.cc",
"performance_manager/decorators/execution_context_priority/frame_visibility_voter.h",
"performance_manager/decorators/execution_context_priority/root_vote_observer.cc",
"performance_manager/decorators/execution_context_priority/root_vote_observer.h",
"performance_manager/decorators/frozen_frame_aggregator.cc",
"performance_manager/decorators/frozen_frame_aggregator.h",
"performance_manager/decorators/helpers/page_live_state_decorator_helper.cc",
......
......@@ -3580,9 +3580,6 @@ test("unit_tests") {
"../browser/password_manager/chrome_password_manager_client_unittest.cc",
"../browser/performance_hints/performance_hints_observer_unittest.cc",
"../browser/performance_hints/rewrite_handler_unittest.cc",
"../browser/performance_manager/decorators/execution_context_priority/ad_frame_voter_unittest.cc",
"../browser/performance_manager/decorators/execution_context_priority/frame_visibility_voter_unittest.cc",
"../browser/performance_manager/decorators/execution_context_priority/root_vote_observer_unittest.cc",
"../browser/performance_manager/decorators/frozen_frame_aggregator_unittest.cc",
"../browser/performance_manager/decorators/helpers/page_live_state_decorator_helper_unittest.cc",
"../browser/performance_manager/decorators/page_aggregator_unittest.cc",
......
......@@ -28,10 +28,19 @@ static_library("performance_manager") {
"execution_context/execution_context_impl.h",
"execution_context/execution_context_registry_impl.cc",
"execution_context/execution_context_registry_impl.h",
"execution_context_priority/ad_frame_voter.cc",
"execution_context_priority/ad_frame_voter.h",
"execution_context_priority/boosting_vote_aggregator.cc",
"execution_context_priority/boosting_vote_aggregator.h",
"execution_context_priority/execution_context_priority.cc",
"execution_context_priority/frame_visibility_voter.cc",
"execution_context_priority/frame_visibility_voter.h",
"execution_context_priority/max_vote_aggregator.cc",
"execution_context_priority/max_vote_aggregator.h",
"execution_context_priority/override_vote_aggregator.cc",
"execution_context_priority/override_vote_aggregator.h",
"execution_context_priority/root_vote_observer.cc",
"execution_context_priority/root_vote_observer.h",
"features.cc",
"freezing/freezing_vote_aggregator.cc",
"freezing/freezing_vote_aggregator.h",
......@@ -99,10 +108,7 @@ static_library("performance_manager") {
"public/execution_context/execution_context.h",
"public/execution_context/execution_context_attached_data.h",
"public/execution_context/execution_context_registry.h",
"public/execution_context_priority/boosting_vote_aggregator.h",
"public/execution_context_priority/execution_context_priority.h",
"public/execution_context_priority/max_vote_aggregator.h",
"public/execution_context_priority/override_vote_aggregator.h",
"public/features.h",
"public/freezing/freezing.h",
"public/graph/frame_node.h",
......@@ -221,10 +227,13 @@ source_set("unit_tests") {
"decorators/tab_properties_decorator_unittest.cc",
"execution_context/execution_context_attached_data_unittest.cc",
"execution_context/execution_context_registry_impl_unittest.cc",
"execution_context_priority/ad_frame_voter_unittest.cc",
"execution_context_priority/boosting_vote_aggregator_unittest.cc",
"execution_context_priority/execution_context_priority_unittest.cc",
"execution_context_priority/frame_visibility_voter_unittest.cc",
"execution_context_priority/max_vote_aggregator_unittest.cc",
"execution_context_priority/override_vote_aggregator_unittest.cc",
"execution_context_priority/root_vote_observer_unittest.cc",
"freezing/freezing_vote_aggregator_unittest.cc",
"graph/frame_node_impl_unittest.cc",
"graph/graph_impl_operations_unittest.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 "chrome/browser/performance_manager/decorators/execution_context_priority/ad_frame_voter.h"
#include "components/performance_manager/execution_context_priority/ad_frame_voter.h"
#include <utility>
......
......@@ -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_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_H_
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/public/graph/frame_node.h"
......@@ -38,4 +38,4 @@ class AdFrameVoter : public FrameNode::ObserverDefaultImpl {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_AD_FRAME_VOTER_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/performance_manager/decorators/execution_context_priority/ad_frame_voter.h"
#include "components/performance_manager/execution_context_priority/ad_frame_voter.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
#include "components/performance_manager/public/graph/graph.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 "components/performance_manager/public/execution_context_priority/boosting_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/boosting_vote_aggregator.h"
#include <algorithm>
#include <tuple>
......
......@@ -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_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_H_
#include <map>
#include <set>
......@@ -392,4 +392,4 @@ class BoostingVoteAggregator : public VoteObserver {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_BOOSTING_VOTE_AGGREGATOR_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 "components/performance_manager/public/execution_context_priority/boosting_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/boosting_vote_aggregator.h"
#include "components/performance_manager/test_support/voting.h"
#include "testing/gtest/include/gtest/gtest.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/performance_manager/decorators/execution_context_priority/frame_visibility_voter.h"
#include "components/performance_manager/execution_context_priority/frame_visibility_voter.h"
#include <utility>
......
......@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_H_
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/public/execution_context_priority/max_vote_aggregator.h"
#include "components/performance_manager/public/graph/frame_node.h"
namespace performance_manager {
......@@ -42,4 +41,4 @@ class FrameVisibilityVoter : public FrameNode::ObserverDefaultImpl {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_FRAME_VISIBILITY_VOTER_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/performance_manager/decorators/execution_context_priority/frame_visibility_voter.h"
#include "components/performance_manager/execution_context_priority/frame_visibility_voter.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
#include "components/performance_manager/public/graph/graph.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 "components/performance_manager/public/execution_context_priority/max_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/max_vote_aggregator.h"
#include <algorithm>
#include <tuple>
......
......@@ -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_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_H_
#include <map>
#include <utility>
......@@ -134,4 +134,4 @@ class MaxVoteAggregator : public VoteObserver {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_MAX_VOTE_AGGREGATOR_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 "components/performance_manager/public/execution_context_priority/max_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/max_vote_aggregator.h"
#include "base/rand_util.h"
#include "components/performance_manager/test_support/voting.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 "components/performance_manager/public/execution_context_priority/override_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/override_vote_aggregator.h"
namespace performance_manager {
namespace execution_context_priority {
......
......@@ -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_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_H_
#include <map>
......@@ -103,4 +103,4 @@ class OverrideVoteAggregator : public VoteObserver {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_OVERRIDE_VOTE_AGGREGATOR_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 "components/performance_manager/public/execution_context_priority/override_vote_aggregator.h"
#include "components/performance_manager/execution_context_priority/override_vote_aggregator.h"
#include "components/performance_manager/test_support/voting.h"
#include "testing/gtest/include/gtest/gtest.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/performance_manager/decorators/execution_context_priority/root_vote_observer.h"
#include "components/performance_manager/execution_context_priority/root_vote_observer.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/graph/worker_node_impl.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_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_
#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
......@@ -45,4 +45,4 @@ class RootVoteObserver : public VoteObserver {
} // namespace execution_context_priority
} // namespace performance_manager
#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_DECORATORS_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_H_
#endif // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_ROOT_VOTE_OBSERVER_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/performance_manager/decorators/execution_context_priority/root_vote_observer.h"
#include "components/performance_manager/execution_context_priority/root_vote_observer.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
......
......@@ -11,7 +11,6 @@
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/graph/process_node_impl.h"
#include "components/performance_manager/graph/worker_node_impl.h"
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/public/v8_memory/web_memory.h"
#include "third_party/blink/public/common/features.h"
......
......@@ -10,7 +10,6 @@
#include "base/values.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/public/graph/node_data_describer_registry.h"
#include "components/performance_manager/public/graph/node_data_describer_util.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