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

Unified Diff: omaha_request_params.h

Issue 6225001: AU: Don't allow stateful /etc/lsb-release override in normal boot mode... (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | omaha_request_params.cc » ('j') | omaha_request_params.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_params.h
diff --git a/omaha_request_params.h b/omaha_request_params.h
index 075ed3fa92163828bb32b95ca35168e61a568850..cc6a26a0d835136338a2ba610a41216f6ab71c22 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -89,6 +89,9 @@ class OmahaRequestDeviceParams : public OmahaRequestParams {
// Force build type for testing purposes.
void SetBuildTypeOfficial(bool is_official);
+ // Force boot mode for testing purposes.
+ void SetBootModeNormal(bool is_normal);
+
private:
FRIEND_TEST(OmahaRequestDeviceParamsTest, IsValidTrackTest);
@@ -100,6 +103,10 @@ class OmahaRequestDeviceParams : public OmahaRequestParams {
// Returns true if this is an official build, false otherwise.
bool IsOfficialBuild() const;
+ // Returns true if the current boot mode is normal, false other (e.g. dev or
+ // recovery mode).
+ bool IsNormalBootMode() const;
+
// Returns true if |track| is a valid track, false otherwise. This method
// restricts the track value only if the image is official (see
// IsOfficialBuild).
@@ -128,6 +135,10 @@ class OmahaRequestDeviceParams : public OmahaRequestParams {
bool force_build_type_;
bool forced_official_build_;
+ // Force boot mode for testing purposes.
+ bool force_boot_mode_;
+ bool forced_normal_boot_;
+
DISALLOW_COPY_AND_ASSIGN(OmahaRequestDeviceParams);
};
« no previous file with comments | « no previous file | omaha_request_params.cc » ('j') | omaha_request_params.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698