Chromium Code Reviews| Index: chrome/browser/android/offline_pages/prerendering_offliner_factory.h |
| diff --git a/chrome/browser/android/offline_pages/prerendering_offliner_factory.h b/chrome/browser/android/offline_pages/prerendering_offliner_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..19bf05b2ac8e035bf9be41794108cabbb38d0828 |
| --- /dev/null |
| +++ b/chrome/browser/android/offline_pages/prerendering_offliner_factory.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_FACTORY_H_ |
| +#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_FACTORY_H_ |
| + |
| +#include "base/macros.h" |
| +#include "components/offline_pages/background/offliner_factory.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +} |
|
fgorski
2016/05/04 05:20:57
} // namespace content
Pete Williamson
2016/05/04 21:23:21
Done.
|
| + |
| +namespace offline_pages { |
| + |
| +class OfflinerPolicy; |
| +class Offliner; |
| +class PrerenderingOffliner; |
| + |
| +// A factory to create one unique PrerenderingOffliner |
|
fgorski
2016/05/04 05:20:57
Can you also explain why the prerendering offliner
Pete Williamson
2016/05/04 21:23:21
Comments updated.
|
| +class PrerenderingOfflinerFactory : public OfflinerFactory { |
| + public: |
| + explicit PrerenderingOfflinerFactory(content::BrowserContext* context); |
| + ~PrerenderingOfflinerFactory() override; |
| + |
| + Offliner* GetOffliner(const OfflinerPolicy* policy) override; |
| + |
| + private: |
| + // The offliner is owned by the factory, since it may be resued. |
| + PrerenderingOffliner* offliner_; |
| + |
| + // This is an unowned pointer, expected to stay valid for the lifetime of the |
| + // factory. |
| + content::BrowserContext* context_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PrerenderingOfflinerFactory); |
| +}; |
| + |
| +} // namespace offline_pages |
| + |
| +#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_FACTORY_H_ |