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

Unified Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 10826144: Delete both regular and Metro user data dirs on uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: factored in gab's comments Created 8 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 | « chrome/installer/util/auto_launch_util.cc ('k') | chrome/installer/util/helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/google_chrome_distribution.cc
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index b340873df6e72c9e7b65820d3fa1e539319dc76e..2cb98940aba76c988208b7b620dd0f8b3de20d71 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -764,14 +764,20 @@ void GoogleChromeDistribution::LaunchUserExperiment(
}
}
// Check browser usage inactivity by the age of the last-write time of the
- // chrome user data directory.
- FilePath user_data_dir(product.GetUserDataPath());
+ // most recently-used chrome user data directory.
+ std::vector<FilePath> user_data_dirs;
+ product.GetUserDataPaths(&user_data_dirs);
+ int dir_age_hours = -1;
+ for (size_t i = 0; i < user_data_dirs.size(); ++i) {
+ int this_age = GetDirectoryWriteAgeInHours(
+ user_data_dirs[i].value().c_str());
+ if (this_age >= 0 && (dir_age_hours < 0 || this_age < dir_age_hours))
+ dir_age_hours = this_age;
+ }
const bool experiment_enabled = false;
const int kThirtyDays = 30 * 24;
- int dir_age_hours = GetDirectoryWriteAgeInHours(
- user_data_dir.value().c_str());
if (!experiment_enabled) {
VLOG(1) << "Toast experiment is disabled.";
return;
« no previous file with comments | « chrome/installer/util/auto_launch_util.cc ('k') | chrome/installer/util/helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698