| 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_UPDATE_CHECK_ACTION_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_ACTION_H__ | 
| 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_ACTION_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_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 <string> | 12 #include <string> | 
| 13 | 13 | 
| 14 #include <curl/curl.h> | 14 #include <curl/curl.h> | 
| 15 | 15 | 
| 16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" | 
| 17 #include "action.h" | 17 #include "action.h" | 
| 18 #include "http_fetcher.h" | 18 #include "http_fetcher.h" | 
| 19 | 19 | 
| 20 // The Update Check action makes an update check request to Omaha and | 20 // The Update Check action makes an update check request to Omaha and | 
| 21 // can output the response on the output ActionPipe. | 21 // can output the response on the output ActionPipe. | 
| 22 | 22 | 
| 23 using std::string; |  | 
| 24 |  | 
| 25 namespace chromeos_update_engine { | 23 namespace chromeos_update_engine { | 
| 26 | 24 | 
| 27 // Encodes XML entities in a given string with libxml2. input must be | 25 // Encodes XML entities in a given string with libxml2. input must be | 
| 28 // UTF-8 formatted. Output will be UTF-8 formatted. | 26 // UTF-8 formatted. Output will be UTF-8 formatted. | 
| 29 std::string XmlEncode(const std::string& input); | 27 std::string XmlEncode(const std::string& input); | 
| 30 | 28 | 
| 31 // This struct encapsulates the data Omaha gets for the update check. | 29 // This struct encapsulates the data Omaha gets for the update check. | 
| 32 // These strings in this struct should not be XML escaped. | 30 // These strings in this struct should not be XML escaped. | 
| 33 struct UpdateCheckParams { | 31 struct UpdateCheckParams { | 
| 34   UpdateCheckParams() | 32   UpdateCheckParams() | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 133 | 131 | 
| 134   // Stores the response from the omaha server | 132   // Stores the response from the omaha server | 
| 135   std::vector<char> response_buffer_; | 133   std::vector<char> response_buffer_; | 
| 136 | 134 | 
| 137   DISALLOW_COPY_AND_ASSIGN(UpdateCheckAction); | 135   DISALLOW_COPY_AND_ASSIGN(UpdateCheckAction); | 
| 138 }; | 136 }; | 
| 139 | 137 | 
| 140 }  // namespace chromeos_update_engine | 138 }  // namespace chromeos_update_engine | 
| 141 | 139 | 
| 142 #endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_ACTION_H__ | 140 #endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_CHECK_ACTION_H__ | 
| OLD | NEW | 
|---|