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

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

Issue 2047713002: [NTP Snippets] Cache images in a LevelDB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@protodb_get
Patch Set: add TODOs Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ad2873925e2ca2f58da33280535ffcfe276d3d32..078359549fb03c4e6e2625b744a2c006d946a021 100644
--- a/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
+++ b/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
@@ -10,6 +10,7 @@
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search/suggestions/image_decoder_impl.h"
#include "chrome/browser/search/suggestions/image_fetcher_impl.h"
#include "chrome/browser/search/suggestions/suggestions_service_factory.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
@@ -18,6 +19,7 @@
#include "chrome/common/channel_info.h"
#include "chrome/common/pref_names.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/keyed_service/content/browser_context_dependency_manager.h"
#include "components/ntp_snippets/ntp_snippets_constants.h"
@@ -41,6 +43,7 @@
#endif // OS_ANDROID
using content::BrowserThread;
+using suggestions::ImageDecoderImpl;
using suggestions::ImageFetcherImpl;
using suggestions::SuggestionsService;
using suggestions::SuggestionsServiceFactory;
@@ -115,6 +118,7 @@ KeyedService* NTPSnippetsServiceFactory::BuildServiceInstanceFor(
base::Bind(&safe_json::SafeJsonParser::Parse),
chrome::GetChannel() == version_info::Channel::STABLE)),
base::WrapUnique(new ImageFetcherImpl(request_context.get())),
+ base::WrapUnique(new ImageDecoderImpl()),
base::WrapUnique(
new ntp_snippets::NTPSnippetsDatabase(database_dir, task_runner)));
}
« no previous file with comments | « no previous file | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698