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

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

Issue 2044001: AU: Minor fixes to get it to do full update on real device (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium 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_prep_action.h" 5 #include "update_engine/omaha_request_prep_action.h"
6 #include <sys/utsname.h> 6 #include <sys/utsname.h>
7 #include <errno.h> 7 #include <errno.h>
8 #include <string> 8 #include <string>
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "update_engine/utils.h" 10 #include "update_engine/utils.h"
(...skipping 25 matching lines...) Expand all
36 36
37 UpdateCheckParams out(machine_id, // machine_id 37 UpdateCheckParams out(machine_id, // machine_id
38 machine_id, // user_id (use machine_id) 38 machine_id, // user_id (use machine_id)
39 UpdateCheckParams::kOsPlatform, 39 UpdateCheckParams::kOsPlatform,
40 UpdateCheckParams::kOsVersion, 40 UpdateCheckParams::kOsVersion,
41 sp, // e.g. 0.2.3.3_i686 41 sp, // e.g. 0.2.3.3_i686
42 UpdateCheckParams::kAppId, 42 UpdateCheckParams::kAppId,
43 version, // app version (from lsb-release) 43 version, // app version (from lsb-release)
44 "en-US", // lang 44 "en-US", // lang
45 track, // track 45 track, // track
46 UpdateCheckParams::kUpdateUrl); 46 update_url);
47 47
48 CHECK(HasOutputPipe()); 48 CHECK(HasOutputPipe());
49 SetOutputObject(out); 49 SetOutputObject(out);
50 completer.set_success(true); 50 completer.set_success(true);
51 } 51 }
52 52
53 namespace { 53 namespace {
54 const size_t kGuidDataByteLength = 128 / 8; 54 const size_t kGuidDataByteLength = 128 / 8;
55 const string::size_type kGuidStringLength = 38; 55 const string::size_type kGuidStringLength = 38;
56 // Formats 16 bytes (128 bits) of data as a GUID: 56 // Formats 16 bytes (128 bits) of data as a GUID:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 string OmahaRequestPrepAction::GetMachineType() const { 123 string OmahaRequestPrepAction::GetMachineType() const {
124 struct utsname buf; 124 struct utsname buf;
125 string ret; 125 string ret;
126 if (uname(&buf) == 0) 126 if (uname(&buf) == 0)
127 ret = buf.machine; 127 ret = buf.machine;
128 return ret; 128 return ret;
129 } 129 }
130 130
131 } // namespace chromeos_update_engine 131 } // namespace chromeos_update_engine
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698