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

Unified Diff: chrome/browser/android/offline_pages/request_coordinator_factory.h

Issue 2561163002: Fix snapshots from Downloads being deleted by last_n. (Closed)
Patch Set: Disabled RequestCoordinator factory to fix SQL errors Created 4 years 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/android/offline_pages/request_coordinator_factory.h
diff --git a/chrome/browser/android/offline_pages/request_coordinator_factory.h b/chrome/browser/android/offline_pages/request_coordinator_factory.h
index 7e4751dfaba9c1af41c816639b7e5a148c5c9e66..af9fdeea8ef5159e2a88b73937d5fee162ffd735 100644
--- a/chrome/browser/android/offline_pages/request_coordinator_factory.h
+++ b/chrome/browser/android/offline_pages/request_coordinator_factory.h
@@ -27,6 +27,7 @@ class RequestCoordinatorFactory : public BrowserContextKeyedServiceFactory {
private:
friend struct base::DefaultSingletonTraits<RequestCoordinatorFactory>;
+ friend class RecentTabHelperTest;
RequestCoordinatorFactory();
~RequestCoordinatorFactory() override {}
@@ -34,6 +35,11 @@ class RequestCoordinatorFactory : public BrowserContextKeyedServiceFactory {
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
+ // Used to always return nullptr instances while running tests.
+ void ReturnNullptrForTesting(bool enabled) { always_nullptr_ = enabled; }
fgorski 2016/12/13 17:17:38 I don't think changing anything about request coor
carlosk 2016/12/13 20:04:20 Done. Thanks for pointing it out. I did not know a
+
+ bool always_nullptr_ = false;
+
DISALLOW_COPY_AND_ASSIGN(RequestCoordinatorFactory);
};

Powered by Google App Engine
This is Rietveld 408576698