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

Side by Side Diff: download_action.h

Issue 3259011: AU: Start an UpdateAttempter unit test suite. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « action_processor_mock.h ('k') | update_attempter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Debugging/logging 81 // Debugging/logging
82 static std::string StaticType() { return "DownloadAction"; } 82 static std::string StaticType() { return "DownloadAction"; }
83 std::string Type() const { return StaticType(); } 83 std::string Type() const { return StaticType(); }
84 84
85 // HttpFetcherDelegate methods (see http_fetcher.h) 85 // HttpFetcherDelegate methods (see http_fetcher.h)
86 virtual void ReceivedBytes(HttpFetcher *fetcher, 86 virtual void ReceivedBytes(HttpFetcher *fetcher,
87 const char* bytes, int length); 87 const char* bytes, int length);
88 virtual void TransferComplete(HttpFetcher *fetcher, bool successful); 88 virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
89 89
90 DownloadActionDelegate* delegate() const { return delegate_; }
90 void set_delegate(DownloadActionDelegate* delegate) { 91 void set_delegate(DownloadActionDelegate* delegate) {
91 delegate_ = delegate; 92 delegate_ = delegate;
92 } 93 }
93 94
94 private: 95 private:
95 // The InstallPlan passed in 96 // The InstallPlan passed in
96 InstallPlan install_plan_; 97 InstallPlan install_plan_;
97 98
98 // The FileWriter that downloaded data should be written to. It will 99 // The FileWriter that downloaded data should be written to. It will
99 // either point to *decompressing_file_writer_ or *delta_performer_. 100 // either point to *decompressing_file_writer_ or *delta_performer_.
(...skipping 21 matching lines...) Expand all
121 DISALLOW_COPY_AND_ASSIGN(DownloadAction); 122 DISALLOW_COPY_AND_ASSIGN(DownloadAction);
122 }; 123 };
123 124
124 // We want to be sure that we're compiled with large file support on linux, 125 // We want to be sure that we're compiled with large file support on linux,
125 // just in case we find ourselves downloading large images. 126 // just in case we find ourselves downloading large images.
126 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit); 127 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit);
127 128
128 } // namespace chromeos_update_engine 129 } // namespace chromeos_update_engine
129 130
130 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ 131 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__
OLDNEW
« no previous file with comments | « action_processor_mock.h ('k') | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698