Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1483)

Unified Diff: chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc

Issue 2191343002: 📰 Remove SnippetService's dependency on Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update some doc, show NO_SNIPPETS instead of SIGNIN when during INITIALIZING state Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
diff --git a/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc b/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
index 4ecef453fa5785f557ef8ce856699cfb649d8aba..5e49313b0bad4c48bb13cb62fc16bfbbee114e0c 100644
--- a/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
+++ b/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
@@ -15,9 +15,7 @@
#include "chrome/browser/search/suggestions/suggestions_service_factory.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/channel_info.h"
-#include "components/browser_sync/browser/profile_sync_service.h"
#include "components/image_fetcher/image_decoder.h"
#include "components/image_fetcher/image_fetcher.h"
#include "components/image_fetcher/image_fetcher_impl.h"
@@ -69,7 +67,6 @@ NTPSnippetsServiceFactory::NTPSnippetsServiceFactory()
"NTPSnippetsService",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
- DependsOn(ProfileSyncServiceFactory::GetInstance());
DependsOn(SigninManagerFactory::GetInstance());
DependsOn(SuggestionsServiceFactory::GetInstance());
DependsOn(ContentSuggestionsServiceFactory::GetInstance());
@@ -100,8 +97,6 @@ KeyedService* NTPSnippetsServiceFactory::BuildServiceInstanceFor(
scoped_refptr<net::URLRequestContextGetter> request_context =
content::BrowserContext::GetDefaultStoragePartition(context)->
GetURLRequestContext();
- ProfileSyncService* sync_service =
- ProfileSyncServiceFactory::GetForProfile(profile);
SuggestionsService* suggestions_service =
SuggestionsServiceFactory::GetForProfile(profile);
@@ -133,7 +128,7 @@ KeyedService* NTPSnippetsServiceFactory::BuildServiceInstanceFor(
base::MakeUnique<ntp_snippets::NTPSnippetsDatabase>(database_dir,
task_runner),
base::MakeUnique<ntp_snippets::NTPSnippetsStatusService>(
- signin_manager, sync_service, profile->GetPrefs()));
+ signin_manager, profile->GetPrefs()));
if (content_suggestions_service->state() ==
ContentSuggestionsService::State::ENABLED) {

Powered by Google App Engine
This is Rietveld 408576698