OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "update_engine/omaha_request_action.h" | 5 #include "update_engine/omaha_request_action.h" |
6 #include <inttypes.h> | 6 #include <inttypes.h> |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include <libxml/parser.h> | 9 #include <libxml/parser.h> |
10 #include <libxml/xpath.h> | 10 #include <libxml/xpath.h> |
11 #include <libxml/xpathInternals.h> | 11 #include <libxml/xpathInternals.h> |
12 | 12 |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "chromeos/obsolete_logging.h" | 14 #include "chromeos/obsolete_logging.h" |
15 #include "update_engine/action_pipe.h" | 15 #include "update_engine/action_pipe.h" |
16 #include "update_engine/omaha_request_params.h" | 16 #include "update_engine/omaha_request_params.h" |
17 #include "update_engine/utils.h" | 17 #include "update_engine/utils.h" |
18 | 18 |
19 using std::string; | 19 using std::string; |
20 | 20 |
21 namespace chromeos_update_engine { | 21 namespace chromeos_update_engine { |
22 | 22 |
23 const char* const OmahaRequestParams::kAppId( | |
24 "{87efface-864d-49a5-9bb3-4b050a7c227a}"); | |
25 const char* const OmahaRequestParams::kOsPlatform("Chrome OS"); | |
26 const char* const OmahaRequestParams::kOsVersion("Indy"); | |
27 const char* const OmahaRequestParams::kUpdateUrl( | |
28 "https://tools.google.com/service/update2"); | |
29 | |
30 namespace { | 23 namespace { |
31 | 24 |
32 const string kGupdateVersion("ChromeOSUpdateEngine-0.1.0.0"); | 25 const string kGupdateVersion("ChromeOSUpdateEngine-0.1.0.0"); |
33 | 26 |
34 // This is handy for passing strings into libxml2 | 27 // This is handy for passing strings into libxml2 |
35 #define ConstXMLStr(x) (reinterpret_cast<const xmlChar*>(x)) | 28 #define ConstXMLStr(x) (reinterpret_cast<const xmlChar*>(x)) |
36 | 29 |
37 // These are for scoped_ptr_malloc, which is like scoped_ptr, but allows | 30 // These are for scoped_ptr_malloc, which is like scoped_ptr, but allows |
38 // a custom free() function to be specified. | 31 // a custom free() function to be specified. |
39 class ScopedPtrXmlDocFree { | 32 class ScopedPtrXmlDocFree { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 output_object.needs_admin = | 288 output_object.needs_admin = |
296 XmlGetProperty(updatecheck_node, "needsadmin") == "true"; | 289 XmlGetProperty(updatecheck_node, "needsadmin") == "true"; |
297 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true"; | 290 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true"; |
298 output_object.is_delta = | 291 output_object.is_delta = |
299 XmlGetProperty(updatecheck_node, "IsDelta") == "true"; | 292 XmlGetProperty(updatecheck_node, "IsDelta") == "true"; |
300 SetOutputObject(output_object); | 293 SetOutputObject(output_object); |
301 return; | 294 return; |
302 } | 295 } |
303 | 296 |
304 }; // namespace chromeos_update_engine | 297 }; // namespace chromeos_update_engine |
OLD | NEW |