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

Side by Side Diff: mojo/fetcher/base_application_fetcher.h

Issue 1338283003: Revert of Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « mojo/fetcher/about_fetcher_unittest.cc ('k') | mojo/fetcher/base_application_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/files/file_path.h"
6 #include "mojo/fetcher/url_resolver.h"
7 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
8 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
9 #include "mojo/shell/application_fetcher.h"
10
11 namespace mojo {
12 namespace fetcher {
13
14 // This is the default implementation of shell::ApplicationFetcher. It loads
15 // http/s urls off the network as well as providing special handling for mojo:
16 // and about: urls.
17 class BaseApplicationFetcher : public shell::ApplicationFetcher {
18 public:
19 // mojo: urls are only supported if |shell_file_root| is non-empty.
20 BaseApplicationFetcher(const base::FilePath& shell_file_root);
21 ~BaseApplicationFetcher() override;
22
23 private:
24 // Overridden from shell::ApplicationFetcher:
25 void SetApplicationManager(shell::ApplicationManager* manager) override;
26 GURL ResolveURL(const GURL& url) override;
27 void FetchRequest(
28 URLRequestPtr request,
29 const shell::Fetcher::FetchCallback& loader_callback) override;
30
31 shell::ApplicationManager* application_manager_;
32 scoped_ptr<URLResolver> url_resolver_;
33 const bool disable_cache_;
34 NetworkServicePtr network_service_;
35 URLLoaderFactoryPtr url_loader_factory_;
36
37 DISALLOW_COPY_AND_ASSIGN(BaseApplicationFetcher);
38 };
39
40 } // namespace fetcher
41 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/fetcher/about_fetcher_unittest.cc ('k') | mojo/fetcher/base_application_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698