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

Side by Side Diff: src/platform/update_engine/download_action.h

Issue 492008: AU: Try delta updates first, then full updates (Closed)
Patch Set: use mkstemp Created 11 years 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
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>
11 11
12 #include <map>
13 #include <string> 12 #include <string>
14 13
15 #include <curl/curl.h> 14 #include <curl/curl.h>
16 15
17 #include "base/scoped_ptr.h" 16 #include "base/scoped_ptr.h"
18 #include "update_engine/action.h" 17 #include "update_engine/action.h"
19 #include "update_engine/decompressing_file_writer.h" 18 #include "update_engine/decompressing_file_writer.h"
20 #include "update_engine/file_writer.h" 19 #include "update_engine/file_writer.h"
21 #include "update_engine/http_fetcher.h" 20 #include "update_engine/http_fetcher.h"
22 #include "update_engine/install_plan.h" 21 #include "update_engine/install_plan.h"
23 #include "update_engine/omaha_hash_calculator.h" 22 #include "update_engine/omaha_hash_calculator.h"
24 23
25 // The Download Action downloads a requested url to a specified path on disk. 24 // The Download Action downloads a requested url to a specified path on disk.
26 // The url and output path are determined by the InstallPlan passed in. 25 // The url and output path are determined by the InstallPlan passed in.
27 26
28 using std::map;
29 using std::string;
30
31 namespace chromeos_update_engine { 27 namespace chromeos_update_engine {
32 28
33 class DownloadAction; 29 class DownloadAction;
34 class NoneType; 30 class NoneType;
35 31
36 template<> 32 template<>
37 class ActionTraits<DownloadAction> { 33 class ActionTraits<DownloadAction> {
38 public: 34 public:
39 // Takes and returns an InstallPlan 35 // Takes and returns an InstallPlan
40 typedef InstallPlan InputObjectType; 36 typedef InstallPlan InputObjectType;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DISALLOW_COPY_AND_ASSIGN(DownloadAction); 94 DISALLOW_COPY_AND_ASSIGN(DownloadAction);
99 }; 95 };
100 96
101 // We want to be sure that we're compiled with large file support on linux, 97 // We want to be sure that we're compiled with large file support on linux,
102 // just in case we find ourselves downloading large images. 98 // just in case we find ourselves downloading large images.
103 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit); 99 COMPILE_ASSERT(8 == sizeof(off_t), off_t_not_64_bit);
104 100
105 } // namespace chromeos_update_engine 101 } // namespace chromeos_update_engine
106 102
107 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__ 103 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DOWNLOAD_ACTION_H__
OLDNEW
« no previous file with comments | « src/platform/update_engine/delta_diff_generator_unittest.cc ('k') | src/platform/update_engine/download_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698