Skip to content

Commit 5b00207

Browse files
AndrewTianjie Xu
Andrew
authored and
Tianjie Xu
committed
update_engine: Fix non inclusive vocabulary
Bug: 161896447 Test: build (cherry picked from commit cc6ab9f) Change-Id: Ic321806ab6029c88723c220f243e2c2c7a9e94f0 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2267058 Tested-by: Andrew Lassalle <[email protected]> Auto-Submit: Andrew Lassalle <[email protected]> Reviewed-by: Amin Hassani <[email protected]> Commit-Queue: Amin Hassani <[email protected]>
1 parent b0b9c20 commit 5b00207

9 files changed

+14
-14
lines changed

common/test_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ std::string Readlink(const std::string& path);
7878

7979
void FillWithData(brillo::Blob* buffer);
8080

81-
// Compare the value of native array for download source parameter.
81+
// Compare the value of builtin array for download source parameter.
8282
MATCHER_P(DownloadSourceMatcher, source_array, "") {
8383
return std::equal(source_array, source_array + kNumDownloadSources, arg);
8484
}

hardware_chromeos.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace {
4747
const char kOOBECompletedMarker[] = "/home/chronos/.oobe_completed";
4848

4949
// The stateful directory used by update_engine to store powerwash-safe files.
50-
// The files stored here must be safelisted in the powerwash scripts.
50+
// The files stored here must be added to the powerwash script allowlist.
5151
const char kPowerwashSafeDirectory[] =
5252
"/mnt/stateful_partition/unencrypted/preserve";
5353

omaha_request_params.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class OmahaRequestParams {
328328
bool ToMoreStableChannel() const;
329329

330330
// Returns True if we should store the fw/ec versions based on our hwid_.
331-
// Compares hwid to a set of safelisted prefixes.
331+
// Compares hwid to a set of prefixes in the allowlist.
332332
bool CollectECFWVersions() const;
333333

334334
// Gets the machine type (e.g. "i686").

payload_generator/delta_diff_utils.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -708,15 +708,15 @@ bool ReadExtentsToDiff(const string& old_part,
708708
version.OperationAllowed(InstallOperation::SOURCE_BSDIFF);
709709
if (bsdiff_allowed &&
710710
blocks_to_read * kBlockSize > kMaxBsdiffDestinationSize) {
711-
LOG(INFO) << "bsdiff blacklisted, data too big: "
712-
<< blocks_to_read * kBlockSize << " bytes";
711+
LOG(INFO) << "bsdiff ignored, data too big: " << blocks_to_read * kBlockSize
712+
<< " bytes";
713713
bsdiff_allowed = false;
714714
}
715715

716716
bool puffdiff_allowed = version.OperationAllowed(InstallOperation::PUFFDIFF);
717717
if (puffdiff_allowed &&
718718
blocks_to_read * kBlockSize > kMaxPuffdiffDestinationSize) {
719-
LOG(INFO) << "puffdiff blacklisted, data too big: "
719+
LOG(INFO) << "puffdiff ignored, data too big: "
720720
<< blocks_to_read * kBlockSize << " bytes";
721721
puffdiff_allowed = false;
722722
}

payload_state.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ void PayloadState::LoadRollbackVersion() {
11541154

11551155
void PayloadState::SetRollbackVersion(const string& rollback_version) {
11561156
CHECK(powerwash_safe_prefs_);
1157-
LOG(INFO) << "Blacklisting version " << rollback_version;
1157+
LOG(INFO) << "Excluding version " << rollback_version;
11581158
rollback_version_ = rollback_version;
11591159
powerwash_safe_prefs_->SetString(kPrefsRollbackVersion, rollback_version);
11601160
}

payload_state.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,14 @@ class PayloadState : public PayloadStateInterface {
366366
// check where policy was available. This info is preserved over powerwash.
367367
void LoadRollbackHappened();
368368

369-
// Loads the blocklisted version from our prefs file.
369+
// Loads the excluded version from our prefs file.
370370
void LoadRollbackVersion();
371371

372-
// Blacklists this version from getting AU'd to until we receive a new update
372+
// Excludes this version from getting AU'd to until we receive a new update
373373
// response.
374374
void SetRollbackVersion(const std::string& rollback_version);
375375

376-
// Clears any blocklisted version.
376+
// Clears any excluded version.
377377
void ResetRollbackVersion();
378378

379379
inline uint32_t GetUrlIndex() {
@@ -565,7 +565,7 @@ class PayloadState : public PayloadStateInterface {
565565
// forced updates to avoid update-rollback loops.
566566
bool rollback_happened_;
567567

568-
// This stores a blocklisted version set as part of rollback. When we rollback
568+
// This stores an excluded version set as part of rollback. When we rollback
569569
// we store the version of the os from which we are rolling back from in order
570570
// to guarantee that we do not re-update to it on the next au attempt after
571571
// reboot.

payload_state_unittest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ TEST(PayloadStateTest, RollbackVersion) {
10161016
NiceMock<MockPrefs>* mock_powerwash_safe_prefs =
10171017
fake_system_state.mock_powerwash_safe_prefs();
10181018

1019-
// Mock out the os version and make sure it's blocklisted correctly.
1019+
// Mock out the os version and make sure it's excluded correctly.
10201020
string rollback_version = "2345.0.0";
10211021
OmahaRequestParams params(&fake_system_state);
10221022
params.Init(rollback_version, "", false);

pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Profiled execution.
2525
profile=no
2626

27-
# Add files or directories to the blacklist. They should be base names, not
27+
# Add files or directories to the ignorelist. They should be base names, not
2828
# paths.
2929
ignore=CVS,.svn,.git,update_metadata_pb2.py
3030

update_manager/chromeos_policy.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ EvalStatus ChromeOSPolicy::UpdateCanStart(
466466
// ConnectionManager::IsUpdateAllowedOver(); be sure to deprecate the latter.
467467
//
468468
// TODO(garnold) The current logic generally treats the list of allowed
469-
// connections coming from the device policy as a whitelist, meaning that it
469+
// connections coming from the device policy as an allowlist, meaning that it
470470
// can only be used for enabling connections, but not disable them. Further,
471471
// certain connection types cannot be enabled even by policy.
472472
// In effect, the only thing that device policy can change is to enable

0 commit comments

Comments
 (0)