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

Side by Side Diff: update_check_action.cc

Issue 2827032: AU: Send board (e.g. x86-generic) to update server in query. (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « update_check_action.h ('k') | update_check_action_unittest.cc » ('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 #include "update_engine/update_check_action.h" 5 #include "update_engine/update_check_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>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 "updaterversion=\"" + XmlEncode(kGupdateVersion) + "\" " 67 "updaterversion=\"" + XmlEncode(kGupdateVersion) + "\" "
68 "protocol=\"2.0\" " 68 "protocol=\"2.0\" "
69 "machineid=\"") + XmlEncode(params.machine_id) + "\" ismachine=\"1\" " 69 "machineid=\"") + XmlEncode(params.machine_id) + "\" ismachine=\"1\" "
70 "userid=\"" + XmlEncode(params.user_id) + "\">\n" 70 "userid=\"" + XmlEncode(params.user_id) + "\">\n"
71 " <o:os version=\"" + XmlEncode(params.os_version) + "\" platform=\"" + 71 " <o:os version=\"" + XmlEncode(params.os_version) + "\" platform=\"" +
72 XmlEncode(params.os_platform) + "\" sp=\"" + 72 XmlEncode(params.os_platform) + "\" sp=\"" +
73 XmlEncode(params.os_sp) + "\"></o:os>\n" 73 XmlEncode(params.os_sp) + "\"></o:os>\n"
74 " <o:app appid=\"" + XmlEncode(params.app_id) + "\" version=\"" + 74 " <o:app appid=\"" + XmlEncode(params.app_id) + "\" version=\"" +
75 XmlEncode(params.app_version) + "\" " 75 XmlEncode(params.app_version) + "\" "
76 "lang=\"" + XmlEncode(params.app_lang) + "\" track=\"" + 76 "lang=\"" + XmlEncode(params.app_lang) + "\" track=\"" +
77 XmlEncode(params.app_track) + "\">\n" 77 XmlEncode(params.app_track) + "\" board=\"" +
78 XmlEncode(params.os_board) + "\">\n"
78 " <o:ping active=\"0\"></o:ping>\n" 79 " <o:ping active=\"0\"></o:ping>\n"
79 " <o:updatecheck></o:updatecheck>\n" 80 " <o:updatecheck></o:updatecheck>\n"
80 " </o:app>\n" 81 " </o:app>\n"
81 "</o:gupdate>\n"; 82 "</o:gupdate>\n";
82 } 83 }
83 } // namespace {} 84 } // namespace {}
84 85
85 // Encodes XML entities in a given string with libxml2. input must be 86 // Encodes XML entities in a given string with libxml2. input must be
86 // UTF-8 formatted. Output will be UTF-8 formatted. 87 // UTF-8 formatted. Output will be UTF-8 formatted.
87 string XmlEncode(const string& input) { 88 string XmlEncode(const string& input) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 output_object.hash = XmlGetProperty(updatecheck_node, "hash"); 266 output_object.hash = XmlGetProperty(updatecheck_node, "hash");
266 output_object.size = ParseInt(XmlGetProperty(updatecheck_node, "size")); 267 output_object.size = ParseInt(XmlGetProperty(updatecheck_node, "size"));
267 output_object.needs_admin = 268 output_object.needs_admin =
268 XmlGetProperty(updatecheck_node, "needsadmin") == "true"; 269 XmlGetProperty(updatecheck_node, "needsadmin") == "true";
269 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true"; 270 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true";
270 SetOutputObject(output_object); 271 SetOutputObject(output_object);
271 return; 272 return;
272 } 273 }
273 274
274 }; // namespace chromeos_update_engine 275 }; // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « update_check_action.h ('k') | update_check_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698