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

Side by Side Diff: omaha_request_params.h

Issue 4988002: AU: Don't allow deltas if the rootfs track is different than the request track. (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.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 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include <base/basictypes.h> 10 #include <base/basictypes.h>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Returns true if this is an official build, false otherwise. 100 // Returns true if this is an official build, false otherwise.
101 bool IsOfficialBuild() const; 101 bool IsOfficialBuild() const;
102 102
103 // Returns true if |track| is a valid track, false otherwise. This method 103 // Returns true if |track| is a valid track, false otherwise. This method
104 // restricts the track value only if the image is official (see 104 // restricts the track value only if the image is official (see
105 // IsOfficialBuild). 105 // IsOfficialBuild).
106 bool IsValidTrack(const std::string& track) const; 106 bool IsValidTrack(const std::string& track) const;
107 107
108 // Fetches the value for a given key from 108 // Fetches the value for a given key from
109 // /mnt/stateful_partition/etc/lsb-release if possible. Failing that, it looks 109 // /mnt/stateful_partition/etc/lsb-release if possible and |stateful_override|
110 // for the key in /etc/lsb-release. If |validator| is non-NULL, uses it to 110 // is true. Failing that, it looks for the key in /etc/lsb-release. If
111 // validate and ignore invalid valies. 111 // |validator| is non-NULL, uses it to validate and ignore invalid valies.
112 std::string GetLsbValue(const std::string& key, 112 std::string GetLsbValue(const std::string& key,
113 const std::string& default_value, 113 const std::string& default_value,
114 ValueValidator validator) const; 114 ValueValidator validator,
115 bool stateful_override) const;
115 116
116 // Gets the machine type (e.g. "i686"). 117 // Gets the machine type (e.g. "i686").
117 std::string GetMachineType() const; 118 std::string GetMachineType() const;
118 119
119 // Returns the hardware qualification ID of the system, or empty 120 // Returns the hardware qualification ID of the system, or empty
120 // string if the HWID is unavailable. 121 // string if the HWID is unavailable.
121 std::string GetHardwareClass() const; 122 std::string GetHardwareClass() const;
122 123
123 // When reading files, prepend root_ to the paths. Useful for testing. 124 // When reading files, prepend root_ to the paths. Useful for testing.
124 std::string root_; 125 std::string root_;
125 126
126 // Force build type for testing purposes. 127 // Force build type for testing purposes.
127 bool force_build_type_; 128 bool force_build_type_;
128 bool forced_official_build_; 129 bool forced_official_build_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(OmahaRequestDeviceParams); 131 DISALLOW_COPY_AND_ASSIGN(OmahaRequestDeviceParams);
131 }; 132 };
132 133
133 } // namespace chromeos_update_engine 134 } // namespace chromeos_update_engine
134 135
135 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__ 136 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_REQUEST_PARAMS_H__
OLDNEW
« no previous file with comments | « no previous file | omaha_request_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698