Add optimization hints component installer which dispatches hints to a dummy optimization guide service
The registration of the component is guarded by a feature flag and data saver being enabled for the current profile.
Bug: 77892
Change-Id: I5f4c5e8bd9e06a19c8776600b24a1f13b974a116
Reviewed-on: https://chromium-review.googlesource.com/745387
Reviewed-by: Cait Phillips <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Joshua Pawlicki <[email protected]>
Reviewed-by: Doug Arnett <[email protected]>
Reviewed-by: Ryan Sturm <[email protected]>
Commit-Queue: Sophie Chang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#513712}
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 96840cd..e707237 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -137,6 +137,8 @@
override;
subresource_filter::ContentRulesetService*
subresource_filter_ruleset_service() override;
+ optimization_guide::OptimizationGuideService* optimization_guide_service()
+ override;
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
void StartAutoupdateTimer() override;
@@ -179,6 +181,7 @@
void CreateSafeBrowsingService();
void CreateSafeBrowsingDetectionService();
void CreateSubresourceFilterRulesetService();
+ void CreateOptimizationGuideService();
void CreateStatusTray();
void CreateBackgroundModeManager();
void CreateGCMDriver();
@@ -268,6 +271,10 @@
std::unique_ptr<subresource_filter::ContentRulesetService>
subresource_filter_ruleset_service_;
+ bool created_optimization_guide_service_;
+ std::unique_ptr<optimization_guide::OptimizationGuideService>
+ optimization_guide_service_;
+
bool shutting_down_;
bool tearing_down_;