Commit e8d8b187 authored by Dan Harrington's avatar Dan Harrington Committed by Commit Bot

feed v2: Add dcheck to ensure feedv1 hosts aren't created

See bug. I was unable to reproduce the error, it's likley due to
some experiment. I suspect it may be related to instant start,
as this line would result in creating the wrong feed if the
coordinator is made too soon:
https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java;l=223

For now, just DCHECK if this happens.

Bug: 1117680
Change-Id: Iecc2690698b34a04151b62b684a6b8b955055fe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363809Reviewed-by: default avatarCarlos Knippschild <carlosk@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799448}
parent 55833e4d
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <utility> #include <utility>
#include "base/bind.h" #include "base/bind.h"
#include "base/feature_list.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/time/default_clock.h" #include "base/time/default_clock.h"
#include "base/time/default_tick_clock.h" #include "base/time/default_tick_clock.h"
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
#include "components/feed/core/feed_logging_metrics.h" #include "components/feed/core/feed_logging_metrics.h"
#include "components/feed/core/feed_networking_host.h" #include "components/feed/core/feed_networking_host.h"
#include "components/feed/core/feed_scheduler_host.h" #include "components/feed/core/feed_scheduler_host.h"
#include "components/feed/feed_feature_list.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/version_info/version_info.h" #include "components/version_info/version_info.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
...@@ -71,6 +73,9 @@ FeedHostServiceFactory::~FeedHostServiceFactory() = default; ...@@ -71,6 +73,9 @@ FeedHostServiceFactory::~FeedHostServiceFactory() = default;
KeyedService* FeedHostServiceFactory::BuildServiceInstanceFor( KeyedService* FeedHostServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const { content::BrowserContext* context) const {
// Code here is not compatible with V2.
DCHECK(!base::FeatureList::IsEnabled(feed::kInterestFeedV2));
Profile* profile = Profile::FromBrowserContext(context); Profile* profile = Profile::FromBrowserContext(context);
content::StoragePartition* storage_partition = content::StoragePartition* storage_partition =
......
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