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

Unified Diff: main.cc

Issue 2868105: Disable automatic update checks if booting from a removable device. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 4 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 | utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
index 9e7a1effe283f23a9cdc666c0eafd17ad9959157..8165c14ed5889f9e320c93c135595905206fa00b 100644
--- a/main.cc
+++ b/main.cc
@@ -49,7 +49,12 @@ gboolean UpdatePeriodically(void* arg) {
void SchedulePeriodicUpdateChecks(UpdateAttempter* update_attempter) {
if (!utils::IsOfficialBuild()) {
- LOG(WARNING) << "No periodic update checks on non-official builds.";
+ LOG(WARNING) << "Non-official build: periodic update checks disabled.";
+ return;
+ }
+
+ if (utils::IsRemovableDevice(utils::RootDevice(utils::BootDevice()))) {
+ LOG(WARNING) << "Removable device boot: periodic update checks disabled.";
return;
}
« no previous file with comments | « no previous file | utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698