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

Unified Diff: ios/chrome/browser/google/google_logo_service_factory.mm

Issue 2434143003: [ios] Adds GoogleLogoService to help with fetching doodles. (Closed)
Patch Set: Created 4 years, 2 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 | « ios/chrome/browser/google/google_logo_service_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/google/google_logo_service_factory.mm
diff --git a/ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.cc b/ios/chrome/browser/google/google_logo_service_factory.mm
similarity index 50%
copy from ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.cc
copy to ios/chrome/browser/google/google_logo_service_factory.mm
index 13b191c4b10ab7d02c893aa33b3cbef085438a26..b25ab6541e1a12c602e640abd7f4519773fd074e 100644
--- a/ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.cc
+++ b/ios/chrome/browser/google/google_logo_service_factory.mm
@@ -2,41 +2,42 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.h"
+#include "ios/chrome/browser/google/google_logo_service_factory.h"
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/ios/browser_state_dependency_manager.h"
#include "ios/chrome/browser/browser_state/browser_state_otr_helper.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#include "ios/chrome/browser/favicon/large_icon_cache.h"
+#include "ios/chrome/browser/google/google_logo_service.h"
// static
-LargeIconCache* IOSChromeLargeIconCacheFactory::GetForBrowserState(
+GoogleLogoService* GoogleLogoServiceFactory::GetForBrowserState(
ios::ChromeBrowserState* browser_state) {
- return static_cast<LargeIconCache*>(
+ return static_cast<GoogleLogoService*>(
GetInstance()->GetServiceForBrowserState(browser_state, true));
}
// static
-IOSChromeLargeIconCacheFactory* IOSChromeLargeIconCacheFactory::GetInstance() {
- return base::Singleton<IOSChromeLargeIconCacheFactory>::get();
+GoogleLogoServiceFactory* GoogleLogoServiceFactory::GetInstance() {
+ return base::Singleton<GoogleLogoServiceFactory>::get();
}
-IOSChromeLargeIconCacheFactory::IOSChromeLargeIconCacheFactory()
+GoogleLogoServiceFactory::GoogleLogoServiceFactory()
: BrowserStateKeyedServiceFactory(
- "LargeIconCache",
+ "GoogleLogoService",
BrowserStateDependencyManager::GetInstance()) {}
-IOSChromeLargeIconCacheFactory::~IOSChromeLargeIconCacheFactory() {}
+GoogleLogoServiceFactory::~GoogleLogoServiceFactory() {}
-std::unique_ptr<KeyedService>
-IOSChromeLargeIconCacheFactory::BuildServiceInstanceFor(
+std::unique_ptr<KeyedService> GoogleLogoServiceFactory::BuildServiceInstanceFor(
web::BrowserState* context) const {
- return base::WrapUnique(new LargeIconCache);
+ ios::ChromeBrowserState* browser_state =
+ ios::ChromeBrowserState::FromBrowserState(context);
+ return base::MakeUnique<GoogleLogoService>(browser_state);
}
-web::BrowserState* IOSChromeLargeIconCacheFactory::GetBrowserStateToUse(
+web::BrowserState* GoogleLogoServiceFactory::GetBrowserStateToUse(
web::BrowserState* context) const {
return GetBrowserStateOwnInstanceInIncognito(context);
}
« no previous file with comments | « ios/chrome/browser/google/google_logo_service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698