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

Side by Side Diff: omaha_request_params.cc

Issue 5022001: AU: Allow override of "appid" through the lsb-release file. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | omaha_request_params_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) 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_params.h" 5 #include "update_engine/omaha_request_params.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/utsname.h> 9 #include <sys/utsname.h>
10 10
(...skipping 29 matching lines...) Expand all
40 forced_official_build_(false) {} 40 forced_official_build_(false) {}
41 41
42 bool OmahaRequestDeviceParams::Init(const std::string& in_app_version, 42 bool OmahaRequestDeviceParams::Init(const std::string& in_app_version,
43 const std::string& in_update_url) { 43 const std::string& in_update_url) {
44 os_platform = OmahaRequestParams::kOsPlatform; 44 os_platform = OmahaRequestParams::kOsPlatform;
45 os_version = OmahaRequestParams::kOsVersion; 45 os_version = OmahaRequestParams::kOsVersion;
46 app_version = in_app_version.empty() ? 46 app_version = in_app_version.empty() ?
47 GetLsbValue("CHROMEOS_RELEASE_VERSION", "", NULL) : in_app_version; 47 GetLsbValue("CHROMEOS_RELEASE_VERSION", "", NULL) : in_app_version;
48 os_sp = app_version + "_" + GetMachineType(); 48 os_sp = app_version + "_" + GetMachineType();
49 os_board = GetLsbValue("CHROMEOS_RELEASE_BOARD", "", NULL); 49 os_board = GetLsbValue("CHROMEOS_RELEASE_BOARD", "", NULL);
50 app_id = OmahaRequestParams::kAppId; 50 app_id = GetLsbValue("CHROMEOS_RELEASE_APPID",
51 OmahaRequestParams::kAppId,
52 NULL);
51 app_lang = "en-US"; 53 app_lang = "en-US";
52 app_track = GetLsbValue( 54 app_track = GetLsbValue(
53 kUpdateTrackKey, 55 kUpdateTrackKey,
54 "", 56 "",
55 &chromeos_update_engine::OmahaRequestDeviceParams::IsValidTrack); 57 &chromeos_update_engine::OmahaRequestDeviceParams::IsValidTrack);
56 hardware_class = GetHardwareClass(); 58 hardware_class = GetHardwareClass();
57 struct stat stbuf; 59 struct stat stbuf;
58 60
59 // Deltas are only okay if the /.nodelta file does not exist. 61 // Deltas are only okay if the /.nodelta file does not exist.
60 // If we don't know (i.e. stat() returns some unexpected error), 62 // If we don't know (i.e. stat() returns some unexpected error),
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 164 }
163 return false; 165 return false;
164 } 166 }
165 167
166 void OmahaRequestDeviceParams::SetBuildTypeOfficial(bool is_official) { 168 void OmahaRequestDeviceParams::SetBuildTypeOfficial(bool is_official) {
167 force_build_type_ = true; 169 force_build_type_ = true;
168 forced_official_build_ = is_official; 170 forced_official_build_ = is_official;
169 } 171 }
170 172
171 } // namespace chromeos_update_engine 173 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « no previous file | omaha_request_params_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698