OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ | 5 #ifndef MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ |
6 #define MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ | 6 #define MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "mojo/fetcher/url_resolver.h" | 9 #include "mojo/fetcher/url_resolver.h" |
10 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 10 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const GURL& alias, | 40 const GURL& alias, |
41 const GURL& content_handler_package, | 41 const GURL& content_handler_package, |
42 const std::string& qualifier); | 42 const std::string& qualifier); |
43 | 43 |
44 private: | 44 private: |
45 using ApplicationPackagedAlias = std::map<GURL, std::pair<GURL, std::string>>; | 45 using ApplicationPackagedAlias = std::map<GURL, std::pair<GURL, std::string>>; |
46 using MimeTypeToURLMap = std::map<std::string, GURL>; | 46 using MimeTypeToURLMap = std::map<std::string, GURL>; |
47 | 47 |
48 // Overridden from shell::PackageManager: | 48 // Overridden from shell::PackageManager: |
49 void SetApplicationManager(shell::ApplicationManager* manager) override; | 49 void SetApplicationManager(shell::ApplicationManager* manager) override; |
| 50 GURL ResolveURL(const GURL& url) override; |
50 void FetchRequest( | 51 void FetchRequest( |
51 URLRequestPtr request, | 52 URLRequestPtr request, |
52 const shell::Fetcher::FetchCallback& loader_callback) override; | 53 const shell::Fetcher::FetchCallback& loader_callback) override; |
53 bool HandleWithContentHandler(shell::Fetcher* fetcher, | 54 bool HandleWithContentHandler(shell::Fetcher* fetcher, |
54 const GURL& url, | 55 const GURL& unresolved_url, |
55 base::TaskRunner* task_runner, | 56 base::TaskRunner* task_runner, |
56 URLResponsePtr* new_response, | 57 URLResponsePtr* new_response, |
57 GURL* content_handler_url, | 58 GURL* content_handler_url, |
58 std::string* qualifier) override; | 59 std::string* qualifier) override; |
59 | 60 |
60 GURL ResolveURL(const GURL& url); | |
61 | 61 |
62 shell::ApplicationManager* application_manager_; | 62 shell::ApplicationManager* application_manager_; |
63 scoped_ptr<fetcher::URLResolver> url_resolver_; | 63 scoped_ptr<fetcher::URLResolver> url_resolver_; |
64 const bool disable_cache_; | 64 const bool disable_cache_; |
65 NetworkServicePtr network_service_; | 65 NetworkServicePtr network_service_; |
66 URLLoaderFactoryPtr url_loader_factory_; | 66 URLLoaderFactoryPtr url_loader_factory_; |
67 ApplicationPackagedAlias application_package_alias_; | 67 ApplicationPackagedAlias application_package_alias_; |
68 MimeTypeToURLMap mime_type_to_url_; | 68 MimeTypeToURLMap mime_type_to_url_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(PackageManagerImpl); | 70 DISALLOW_COPY_AND_ASSIGN(PackageManagerImpl); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace package_manager | 73 } // namespace package_manager |
74 } // namespace mojo | 74 } // namespace mojo |
75 | 75 |
76 #endif // MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ | 76 #endif // MOJO_PACKAGE_MANAGER_PACKAGE_MANAGER_IMPL_H_ |
OLD | NEW |