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

Side by Side Diff: src/platform/update_engine/update_check_action.cc

Issue 2037005: AU: check after 2 min, also every 30 min. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fix misspelling Created 10 years, 7 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 | « src/platform/update_engine/main.cc ('k') | no next file » | 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 inline void operator()(void* x) const { 57 inline void operator()(void* x) const {
58 xmlXPathFreeContext(reinterpret_cast<xmlXPathContext*>(x)); 58 xmlXPathFreeContext(reinterpret_cast<xmlXPathContext*>(x));
59 } 59 }
60 }; 60 };
61 61
62 // Returns a properly formatted omaha request for an update check 62 // Returns a properly formatted omaha request for an update check
63 string FormatRequest(const UpdateCheckParams& params) { 63 string FormatRequest(const UpdateCheckParams& params) {
64 return string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" 64 return string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
65 "<o:gupdate xmlns:o=\"http://www.google.com/update2/request\" " 65 "<o:gupdate xmlns:o=\"http://www.google.com/update2/request\" "
66 "version=\"" + XmlEncode(kGupdateVersion) + "\" protocol=\"2.0\" " 66 "version=\"" + XmlEncode(kGupdateVersion) + "\" "
67 "updaterversion=\"" + XmlEncode(kGupdateVersion) + "\" "
68 "protocol=\"2.0\" "
67 "machineid=\"") + XmlEncode(params.machine_id) + "\" ismachine=\"1\" " 69 "machineid=\"") + XmlEncode(params.machine_id) + "\" ismachine=\"1\" "
68 "userid=\"" + XmlEncode(params.user_id) + "\">\n" 70 "userid=\"" + XmlEncode(params.user_id) + "\">\n"
69 " <o:os version=\"" + XmlEncode(params.os_version) + "\" platform=\"" + 71 " <o:os version=\"" + XmlEncode(params.os_version) + "\" platform=\"" +
70 XmlEncode(params.os_platform) + "\" sp=\"" + 72 XmlEncode(params.os_platform) + "\" sp=\"" +
71 XmlEncode(params.os_sp) + "\"></o:os>\n" 73 XmlEncode(params.os_sp) + "\"></o:os>\n"
72 " <o:app appid=\"" + XmlEncode(params.app_id) + "\" version=\"" + 74 " <o:app appid=\"" + XmlEncode(params.app_id) + "\" version=\"" +
73 XmlEncode(params.app_version) + "\" " 75 XmlEncode(params.app_version) + "\" "
74 "lang=\"" + XmlEncode(params.app_lang) + "\" track=\"" + 76 "lang=\"" + XmlEncode(params.app_lang) + "\" track=\"" +
75 XmlEncode(params.app_track) + "\">\n" 77 XmlEncode(params.app_track) + "\">\n"
76 " <o:ping active=\"0\"></o:ping>\n" 78 " <o:ping active=\"0\"></o:ping>\n"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 output_object.hash = XmlGetProperty(updatecheck_node, "hash"); 265 output_object.hash = XmlGetProperty(updatecheck_node, "hash");
264 output_object.size = ParseInt(XmlGetProperty(updatecheck_node, "size")); 266 output_object.size = ParseInt(XmlGetProperty(updatecheck_node, "size"));
265 output_object.needs_admin = 267 output_object.needs_admin =
266 XmlGetProperty(updatecheck_node, "needsadmin") == "true"; 268 XmlGetProperty(updatecheck_node, "needsadmin") == "true";
267 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true"; 269 output_object.prompt = XmlGetProperty(updatecheck_node, "Prompt") == "true";
268 SetOutputObject(output_object); 270 SetOutputObject(output_object);
269 return; 271 return;
270 } 272 }
271 273
272 }; // namespace chromeos_update_engine 274 }; // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698