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" |
(...skipping 12 matching lines...) Expand all Loading... |
23 const GURL& url, | 23 const GURL& url, |
24 NetworkService* network_service, | 24 NetworkService* network_service, |
25 const FetchCallback& loader_callback); | 25 const FetchCallback& loader_callback); |
26 | 26 |
27 ~NetworkFetcher() override; | 27 ~NetworkFetcher() override; |
28 | 28 |
29 private: | 29 private: |
30 // TODO(hansmuller): Revisit this when a real peek operation is available. | 30 // TODO(hansmuller): Revisit this when a real peek operation is available. |
31 static const MojoDeadline kPeekTimeout = MOJO_DEADLINE_INDEFINITE; | 31 static const MojoDeadline kPeekTimeout = MOJO_DEADLINE_INDEFINITE; |
32 | 32 |
| 33 const GURL& GetURL() const override; |
| 34 GURL GetRedirectURL() const override; |
| 35 |
33 URLResponsePtr AsURLResponse(base::TaskRunner* task_runner, | 36 URLResponsePtr AsURLResponse(base::TaskRunner* task_runner, |
34 uint32_t skip) override; | 37 uint32_t skip) override; |
35 | 38 |
36 static void RecordCacheToURLMapping(const base::FilePath& path, | 39 static void RecordCacheToURLMapping(const base::FilePath& path, |
37 const GURL& url); | 40 const GURL& url); |
38 | 41 |
39 // AppIds should be be both predictable and unique, but any hash would work. | 42 // AppIds should be be both predictable and unique, but any hash would work. |
40 // Currently we use sha256 from crypto/secure_hash.h | 43 // Currently we use sha256 from crypto/secure_hash.h |
41 static bool ComputeAppId(const base::FilePath& path, | 44 static bool ComputeAppId(const base::FilePath& path, |
42 std::string* digest_string); | 45 std::string* digest_string); |
(...skipping 24 matching lines...) Expand all Loading... |
67 URLResponsePtr response_; | 70 URLResponsePtr response_; |
68 base::FilePath path_; | 71 base::FilePath path_; |
69 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_; | 72 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_; |
70 | 73 |
71 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); | 74 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); |
72 }; | 75 }; |
73 | 76 |
74 } // namespace mojo | 77 } // namespace mojo |
75 | 78 |
76 #endif // SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ | 79 #endif // SHELL_APPLICATION_MANAGER_NETWORK_FETCHER_H_ |
OLD | NEW |