Chromium Code Reviews| Index: mojo/fetcher/base_application_fetcher.h |
| diff --git a/mojo/fetcher/base_application_fetcher.h b/mojo/fetcher/base_application_fetcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7f49fd1f567960a189cfb06daafa78d095d16f91 |
| --- /dev/null |
| +++ b/mojo/fetcher/base_application_fetcher.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2015 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. |
| + |
| +#include "base/files/file_path.h" |
| +#include "mojo/fetcher/url_resolver.h" |
| +#include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| +#include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" |
| +#include "mojo/shell/application_fetcher.h" |
| + |
| +namespace mojo { |
| +namespace fetcher { |
| + |
| +class BaseApplicationFetcher : public shell::ApplicationFetcher { |
|
sky
2015/09/11 23:05:27
Description (it isn't clear that a base applicatio
|
| + public: |
| + explicit BaseApplicationFetcher(const base::FilePath& shell_file_root); |
| + ~BaseApplicationFetcher() override; |
| + |
| + private: |
| + // Overridden from shell::ApplicationFetcher: |
| + void SetApplicationManager(shell::ApplicationManager* manager) override; |
| + GURL ResolveURL(const GURL& url) override; |
| + void FetchRequest( |
| + URLRequestPtr request, |
| + const shell::Fetcher::FetchCallback& loader_callback) override; |
| + |
| + shell::ApplicationManager* application_manager_; |
|
sky
2015/09/11 23:05:27
initialize to null.
|
| + scoped_ptr<URLResolver> url_resolver_; |
| + bool disable_cache_; |
|
sky
2015/09/11 23:05:27
nit: const
|
| + NetworkServicePtr network_service_; |
| + URLLoaderFactoryPtr url_loader_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(BaseApplicationFetcher); |
| +}; |
| + |
| +} // namespace fetcher |
| +} // namespace mojo |