Chromium Code Reviews| Index: chrome/browser/android/webapk/webapk_install_service_factory.cc |
| diff --git a/chrome/browser/android/webapk/webapk_install_service_factory.cc b/chrome/browser/android/webapk/webapk_install_service_factory.cc |
| index 504532c479f52af1acd66fd027376f1c262dda14..2d2ac3ed5218a3f58e57443bcadda05d18b53e49 100644 |
| --- a/chrome/browser/android/webapk/webapk_install_service_factory.cc |
| +++ b/chrome/browser/android/webapk/webapk_install_service_factory.cc |
| @@ -30,3 +30,11 @@ KeyedService* WebApkInstallServiceFactory::BuildServiceInstanceFor( |
| content::BrowserContext* context) const { |
| return new WebApkInstallService(context); |
| } |
| + |
| +content::BrowserContext* WebApkInstallServiceFactory::GetBrowserContextToUse( |
| + content::BrowserContext* context) const { |
| + // Returns the original (possibly off-the-record) browser context so that a |
| + // separate instance of the WebApkInstallerService is used in incognito mode. |
| + // The base class's implementation returns nullptr. |
|
pkotwicz
2017/01/12 15:37:42
Are you sure that you want incognito and non-incog
Xi Han
2017/01/12 15:50:36
Makes sense.
pkotwicz
2017/01/12 15:55:40
I think that you should be using GetBrowserContext
Xi Han
2017/01/12 16:25:23
Oops, choose the wrong one.
|
| + return context; |
| +} |