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..194a23b3e75f6b9e0a82bd285cce961bd0ca1b4c |
| --- /dev/null |
| +++ b/chrome/browser/android/offline_pages/prerendering_offliner_factory.h |
| @@ -0,0 +1,44 @@ |
| +// 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 "chrome/browser/android/offline_pages/prerendering_offliner.h" |
|
fgorski
2016/05/03 22:48:08
this is forward declared below
Pete Williamson
2016/05/04 00:39:21
Done.
|
| +#include "components/offline_pages/background/offliner.h" |
|
fgorski
2016/05/03 22:48:16
is this needed?
Pete Williamson
2016/05/04 00:39:21
Done.
|
| +#include "components/offline_pages/background/offliner_factory.h" |
| +#include "content/public/browser/browser_context.h" |
|
fgorski
2016/05/03 22:48:16
forward declare
Pete Williamson
2016/05/04 00:39:21
Done.
|
| + |
| +namespace base { |
| +template <typename T> |
| +struct DefaultSingletonTraits; |
|
fgorski
2016/05/03 22:48:08
remove, I don't think you will need a singleton fo
Pete Williamson
2016/05/04 00:39:21
Done.
|
| +} // namespace base |
| + |
| +namespace offline_pages { |
| + |
| +class OfflinerPolicy; |
| +class PrerenderingOffliner; |
| + |
| +// A factory to create one unique OfflinePageModel. |
|
dougarnett
2016/05/03 22:30:44
update comment
Pete Williamson
2016/05/04 00:39:21
Done.
|
| +class PrerenderingOfflinerFactory : public OfflinerFactory { |
| + public: |
| + PrerenderingOffliner* GetOffliner(const OfflinerPolicy* policy) override; |
|
fgorski
2016/05/03 22:48:08
did you consider create/make?
also, ctor and dtor
Pete Williamson
2016/05/04 00:39:21
ctor and dtor moved.
I did consider make, but we
fgorski
2016/05/04 05:20:57
Acknowledged.
|
| + |
| + explicit PrerenderingOfflinerFactory(content::BrowserContext* context); |
| + ~PrerenderingOfflinerFactory() override; |
| + |
| + private: |
| + // TODO: Do I still need a singleton? |
| + // friend struct base::DefaultSingletonTraits<PrerenderingOfflinerFactory>; |
|
fgorski
2016/05/03 22:48:16
remove this part as well.
Pete Williamson
2016/05/04 00:39:20
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(PrerenderingOfflinerFactory); |
|
fgorski
2016/05/03 22:48:08
this goes last
Pete Williamson
2016/05/04 00:39:21
Done.
|
| + |
| + PrerenderingOffliner* offliner_; |
|
fgorski
2016/05/03 22:48:16
document ownership
Pete Williamson
2016/05/04 00:39:21
Done.
|
| + content::BrowserContext* context_; |
|
fgorski
2016/05/03 22:48:08
document ownership
Pete Williamson
2016/05/04 00:39:21
Done.
|
| +}; |
| + |
| +} // namespace offline_pages |
| + |
| +#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_FACTORY_H_ |