OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ |
7 | 7 |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // HttpFetcherDelegate methods (see http_fetcher.h) | 86 // HttpFetcherDelegate methods (see http_fetcher.h) |
87 virtual void ReceivedBytes(HttpFetcher *fetcher, | 87 virtual void ReceivedBytes(HttpFetcher *fetcher, |
88 const char* bytes, int length); | 88 const char* bytes, int length); |
89 virtual void TransferComplete(HttpFetcher *fetcher, bool successful); | 89 virtual void TransferComplete(HttpFetcher *fetcher, bool successful); |
90 | 90 |
91 DownloadActionDelegate* delegate() const { return delegate_; } | 91 DownloadActionDelegate* delegate() const { return delegate_; } |
92 void set_delegate(DownloadActionDelegate* delegate) { | 92 void set_delegate(DownloadActionDelegate* delegate) { |
93 delegate_ = delegate; | 93 delegate_ = delegate; |
94 } | 94 } |
95 | 95 |
| 96 HttpFetcher* http_fetcher() { return http_fetcher_.get(); } |
| 97 |
96 private: | 98 private: |
97 // The InstallPlan passed in | 99 // The InstallPlan passed in |
98 InstallPlan install_plan_; | 100 InstallPlan install_plan_; |
99 | 101 |
100 // Update Engine preference store. | 102 // Update Engine preference store. |
101 PrefsInterface* prefs_; | 103 PrefsInterface* prefs_; |
102 | 104 |
103 // The FileWriter that downloaded data should be written to. It will | 105 // The FileWriter that downloaded data should be written to. It will |
104 // either point to *decompressing_file_writer_ or *delta_performer_. | 106 // either point to *decompressing_file_writer_ or *delta_performer_. |
105 FileWriter* writer_; | 107 FileWriter* writer_; |
(...skipping 22 matching lines...) Expand all Loading... |
128 DISALLOW_COPY_AND_ASSIGN(DownloadAction); | 130 DISALLOW_COPY_AND_ASSIGN(DownloadAction); |
129 }; | 131 }; |
130 | 132 |
131 // We want to be sure that we're compiled with large file support on linux, | 133 // We want to be sure that we're compiled with large file support on linux, |
132 // just in case we find ourselves downloading large images. | 134 // just in case we find ourselves downloading large images. |
133 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit); | 135 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit); |
134 | 136 |
135 } // namespace chromeos_update_engine | 137 } // namespace chromeos_update_engine |
136 | 138 |
137 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ | 139 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ |
OLD | NEW |