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

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

Issue 218683013: Remove stale code to delete the metro user data dir. It never shipped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gab comments Created 6 years, 9 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
Index: chrome/installer/util/user_experiment.cc
diff --git a/chrome/installer/util/user_experiment.cc b/chrome/installer/util/user_experiment.cc
index 4febe2415022f3c2b59c9b9693d3ab1694248941..73de5a641366fbcc716734f8c1ea972218d90e6a 100644
--- a/chrome/installer/util/user_experiment.cc
+++ b/chrome/installer/util/user_experiment.cc
@@ -427,21 +427,15 @@ void LaunchBrowserUserExperiment(const CommandLine& base_cmd_line,
}
// Check browser usage inactivity by the age of the last-write time of the
// most recently-used chrome user data directory.
- std::vector<base::FilePath> user_data_dirs;
BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
BrowserDistribution::CHROME_BROWSER);
- GetChromeUserDataPaths(dist, &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;
- }
+ base::FilePath user_data_dir(GetChromeUserDataPath(dist));
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;
« chrome/installer/setup/uninstall.cc ('K') | « chrome/installer/util/product_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698