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

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 10880061: UMA stats to track drive as default download destination. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix crash in unit test Created 8 years, 3 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/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/preferences_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences.cc
===================================================================
--- chrome/browser/chromeos/preferences.cc (revision 155564)
+++ chrome/browser/chromeos/preferences.cc (working copy)
@@ -293,11 +293,13 @@
mouse_sensitivity_.Init(prefs::kMouseSensitivity, prefs, this);
touchpad_sensitivity_.Init(prefs::kTouchpadSensitivity, prefs, this);
use_24hour_clock_.Init(prefs::kUse24HourClock, prefs, this);
- disable_gdata_.Init(prefs::kDisableGData, prefs, this);
- disable_gdata_over_cellular_.Init(prefs::kDisableGDataOverCellular,
+ disable_drive_.Init(prefs::kDisableGData, prefs, this);
+ disable_drive_over_cellular_.Init(prefs::kDisableGDataOverCellular,
prefs, this);
- disable_gdata_hosted_files_.Init(prefs::kDisableGDataHostedFiles,
+ disable_drive_hosted_files_.Init(prefs::kDisableGDataHostedFiles,
prefs, this);
+ download_default_directory_.Init(prefs::kDownloadDefaultDirectory,
+ prefs, this);
primary_mouse_button_right_.Init(prefs::kPrimaryMouseButtonRight,
prefs, this);
preferred_languages_.Init(prefs::kLanguagePreferredLanguages,
@@ -442,6 +444,16 @@
else
UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonRight.Started", right);
}
+ if (!pref_name || *pref_name == prefs::kDownloadDefaultDirectory) {
+ const bool default_download_to_drive = gdata::util::IsUnderDriveMountPoint(
+ download_default_directory_.GetValue());
+ if (pref_name)
+ UMA_HISTOGRAM_BOOLEAN("FileBrowser.DownloadDestination.IsDrive.Changed",
+ default_download_to_drive);
+ else
+ UMA_HISTOGRAM_BOOLEAN("FileBrowser.DownloadDestination.IsDrive.Started",
+ default_download_to_drive);
+ }
if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) {
// Unlike kLanguagePreloadEngines and some other input method
@@ -581,10 +593,9 @@
// Change the download directory to the default value if a GData directory is
// selected and GData is disabled.
if (!pref_name || *pref_name == prefs::kDisableGData) {
- if (disable_gdata_.GetValue()) {
- const FilePath download_path =
- prefs_->GetFilePath(prefs::kDownloadDefaultDirectory);
- if (gdata::util::IsUnderDriveMountPoint(download_path)) {
+ if (disable_drive_.GetValue()) {
+ if (gdata::util::IsUnderDriveMountPoint(
+ download_default_directory_.GetValue())) {
prefs_->SetFilePath(prefs::kDownloadDefaultDirectory,
download_util::GetDefaultDownloadDirectory());
}
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698