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

Unified Diff: chrome/browser/pref_service.cc

Issue 3187011: linux: add UMA stat for the file system where the prefs are stored (Closed)
Patch Set: coda 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 | « base/file_util_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pref_service.cc
diff --git a/chrome/browser/pref_service.cc b/chrome/browser/pref_service.cc
index aff5f2e66f0a99bf292093b20ad6a1d65a49700c..8ad9bc789f02a67bc74f26c147134c000ca07e82 100644
--- a/chrome/browser/pref_service.cc
+++ b/chrome/browser/pref_service.cc
@@ -10,6 +10,7 @@
#include "app/l10n_util.h"
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/file_util.h"
#include "base/histogram.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -80,6 +81,19 @@ void NotifyReadError(PrefService* pref, int message_id) {
// static
PrefService* PrefService::CreatePrefService(const FilePath& pref_filename,
Profile* profile) {
+#if defined(OS_LINUX)
+ // We'd like to see what fraction of our users have the preferences
+ // stored on a network file system, as we've had no end of troubles
+ // with NFS/AFS.
+ // TODO(evanm): remove this once we've collected state.
+ file_util::FileSystemType fstype;
+ if (file_util::GetFileSystemType(pref_filename.DirName(), &fstype)) {
+ UMA_HISTOGRAM_ENUMERATION("PrefService.FileSystemType",
+ static_cast<int>(fstype),
+ file_util::FILE_SYSTEM_TYPE_COUNT);
+ }
+#endif
+
return new PrefService(
PrefValueStore::CreatePrefValueStore(pref_filename, profile, false));
}
« no previous file with comments | « base/file_util_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698