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

Unified Diff: chrome/browser/extensions/image_loader_factory.cc

Issue 11027044: Add a class to replace ImageLoadingTracker with a nicer API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include order Created 8 years, 1 month 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/extensions/image_loader_factory.cc
diff --git a/chrome/browser/extensions/app_restore_service_factory.cc b/chrome/browser/extensions/image_loader_factory.cc
similarity index 39%
copy from chrome/browser/extensions/app_restore_service_factory.cc
copy to chrome/browser/extensions/image_loader_factory.cc
index 0fd931672ab1cb25d24b19b3baacdf94cbbfd9e5..21ad9ad85df8a5fe946285437bd2ab27dbb5a8ff 100644
--- a/chrome/browser/extensions/app_restore_service_factory.cc
+++ b/chrome/browser/extensions/image_loader_factory.cc
@@ -2,46 +2,48 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/app_restore_service_factory.h"
+#include "chrome/browser/extensions/image_loader_factory.h"
-#include "chrome/browser/extensions/app_restore_service.h"
+#include "chrome/browser/extensions/image_loader.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
namespace extensions {
// static
-AppRestoreService* AppRestoreServiceFactory::GetForProfile(Profile* profile) {
- return static_cast<AppRestoreService*>(
+ImageLoader* ImageLoaderFactory::GetForProfile(Profile* profile) {
+ return static_cast<ImageLoader*>(
GetInstance()->GetServiceForProfile(profile, true));
}
// static
-void AppRestoreServiceFactory::ResetForProfile(Profile* profile) {
- AppRestoreServiceFactory* factory = GetInstance();
+void ImageLoaderFactory::ResetForProfile(Profile* profile) {
+ ImageLoaderFactory* factory = GetInstance();
factory->ProfileShutdown(profile);
factory->ProfileDestroyed(profile);
}
-AppRestoreServiceFactory* AppRestoreServiceFactory::GetInstance() {
- return Singleton<AppRestoreServiceFactory>::get();
+ImageLoaderFactory* ImageLoaderFactory::GetInstance() {
+ return Singleton<ImageLoaderFactory>::get();
}
-AppRestoreServiceFactory::AppRestoreServiceFactory()
- : ProfileKeyedServiceFactory("AppRestoreService",
+ImageLoaderFactory::ImageLoaderFactory()
+ : ProfileKeyedServiceFactory("ImageLoader",
ProfileDependencyManager::GetInstance()) {
}
-AppRestoreServiceFactory::~AppRestoreServiceFactory() {
+ImageLoaderFactory::~ImageLoaderFactory() {
}
-ProfileKeyedService* AppRestoreServiceFactory::BuildServiceInstanceFor(
+ProfileKeyedService* ImageLoaderFactory::BuildServiceInstanceFor(
Profile* profile) const {
- AppRestoreService* service = NULL;
- service = new AppRestoreService(profile);
- return service;
+ return new ImageLoader;
}
-bool AppRestoreServiceFactory::ServiceIsCreatedWithProfile() const {
+bool ImageLoaderFactory::ServiceIsCreatedWithProfile() const {
+ return false;
+}
+
+bool ImageLoaderFactory::ServiceRedirectedInIncognito() const {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698