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

Unified Diff: components/arc/user_data/arc_user_data_service.cc

Issue 2118143003: Add a disable-arc-data-wipe flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a disable-arc-data-wipe flag. Created 4 years, 5 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 | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/user_data/arc_user_data_service.cc
diff --git a/components/arc/user_data/arc_user_data_service.cc b/components/arc/user_data/arc_user_data_service.cc
index 27d42d729bc0b27044c87efc9241460aa2916e5c..f946de54faabcce578e70d8b40b98aac0358ddbc 100644
--- a/components/arc/user_data/arc_user_data_service.cc
+++ b/components/arc/user_data/arc_user_data_service.cc
@@ -4,6 +4,8 @@
#include "components/arc/user_data/arc_user_data_service.h"
+#include "base/command_line.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
@@ -49,8 +51,11 @@ void ArcUserDataService::ClearIfDisabled() {
LOG(ERROR) << "ARC instance not stopped, user data can't be cleared";
return;
}
- if (arc_enabled_pref_->GetValue())
+ if (arc_enabled_pref_->GetValue() ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kDisableArcDataWipe)) {
return;
+ }
const cryptohome::Identification cryptohome_id(primary_user_account_id_);
chromeos::SessionManagerClient* session_manager_client =
chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698