| 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 SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ | 5 #ifndef SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ |
| 6 #define SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ | 6 #define SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ |
| 7 | 7 |
| 8 #include "shell/application_manager/fetcher.h" | 8 #include "shell/application_manager/fetcher.h" |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 12 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 | 16 |
| 17 class NetworkService; | 17 class NetworkService; |
| 18 | 18 |
| 19 namespace shell { |
| 20 |
| 19 // Implements Fetcher for http[s] files. | 21 // Implements Fetcher for http[s] files. |
| 20 class NetworkFetcher : public Fetcher { | 22 class NetworkFetcher : public Fetcher { |
| 21 public: | 23 public: |
| 22 NetworkFetcher(bool disable_cache, | 24 NetworkFetcher(bool disable_cache, |
| 23 const GURL& url, | 25 const GURL& url, |
| 24 NetworkService* network_service, | 26 NetworkService* network_service, |
| 25 const FetchCallback& loader_callback); | 27 const FetchCallback& loader_callback); |
| 26 | 28 |
| 27 ~NetworkFetcher() override; | 29 ~NetworkFetcher() override; |
| 28 | 30 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bool disable_cache_; | 69 bool disable_cache_; |
| 68 const GURL url_; | 70 const GURL url_; |
| 69 URLLoaderPtr url_loader_; | 71 URLLoaderPtr url_loader_; |
| 70 URLResponsePtr response_; | 72 URLResponsePtr response_; |
| 71 base::FilePath path_; | 73 base::FilePath path_; |
| 72 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_; | 74 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_; |
| 73 | 75 |
| 74 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); | 76 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); |
| 75 }; | 77 }; |
| 76 | 78 |
| 79 } // namespace shell |
| 77 } // namespace mojo | 80 } // namespace mojo |
| 78 | 81 |
| 79 #endif // SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ | 82 #endif // SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ |
| OLD | NEW |