Commit fe656728 authored by tnagel@chromium.org's avatar tnagel@chromium.org

Add Ash.Wallpaper.{DefaultIndex,Type} to histograms.xml.

Move them from internal histograms.xml to chromium.org histograms.xml since they are/were referenced only in chromium.org code.

BUG=none

Review URL: https://codereview.chromium.org/449913002

Cr-Commit-Position: refs/heads/master@{#288370}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288370 0039d316-1c4b-4281-b951-d872f2087c98
parent c068f946
......@@ -531,8 +531,8 @@ void WallpaperManager::EnsureLoggedInUserWallpaperLoaded() {
WallpaperInfo info;
if (GetLoggedInUserWallpaperInfo(&info)) {
// TODO(sschmitz): We need an index for default wallpapers for the new UI.
RecordUma(info.type, -1);
UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Type", info.type,
user_manager::User::WALLPAPER_TYPE_COUNT);
if (info == current_user_wallpaper_info_)
return;
}
......@@ -1007,13 +1007,6 @@ void WallpaperManager::DoSetDefaultWallpaper(
default_wallpaper_image_->image(), layout);
}
// static
void WallpaperManager::RecordUma(user_manager::User::WallpaperType type,
int index) {
UMA_HISTOGRAM_ENUMERATION(
"Ash.Wallpaper.Type", type, user_manager::User::WALLPAPER_TYPE_COUNT);
}
// static
void WallpaperManager::SaveCustomWallpaper(const std::string& user_id_hash,
const base::FilePath& original_path,
......
......@@ -363,9 +363,6 @@ class WallpaperManager: public content::NotificationObserver {
typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap;
// Record data for User Metrics Analysis.
static void RecordUma(user_manager::User::WallpaperType type, int index);
// Saves original custom wallpaper to |path| (absolute path) on filesystem
// and starts resizing operation of the custom wallpaper if necessary.
static void SaveCustomWallpaper(const std::string& user_id_hash,
......
......@@ -60,12 +60,16 @@ class USER_MANAGER_EXPORT User : public UserInfo {
USER_IMAGE_EXTERNAL = -1,
} UserImageType;
// This enum is used to define the buckets for an enumerated UMA histogram.
// Hence,
// (a) existing enumerated constants should never be deleted or reordered,
// (b) new constants should only be appended at the end of the enumeration.
enum WallpaperType {
/* DAILY = 0 */ // Removed. Do not re-use the id!
/* DAILY = 0 */ // Removed.
CUSTOMIZED = 1, // Selected by user.
DEFAULT = 2, // Default.
/* UNKNOWN = 3 */ // Removed. Do not re-use the id!
ONLINE = 4, // WallpaperInfo.file denotes an URL.
/* UNKNOWN = 3 */ // Removed.
ONLINE = 4, // WallpaperInfo.location denotes an URL.
POLICY = 5, // Controlled by policy, can't be changed by the user.
WALLPAPER_TYPE_COUNT = 6
};
......
......@@ -723,6 +723,22 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="Ash.Wallpaper.DefaultIndex">
<obsolete>
Deprecated as of 11/2012. Use of indices has been removed.
</obsolete>
<owner>kuscher@google.com</owner>
<summary>
The wallpaper index if one of the default wallpapers has been selected.
Recorded at user login. Currently only for the old wallpaper picker UI.
</summary>
</histogram>
<histogram name="Ash.Wallpaper.Type" enum="WallpaperType">
<owner>kuscher@google.com</owner>
<summary>The wallpaper type. Recorded at user login.</summary>
</histogram>
<histogram name="Ash.WindowCycleController.CycleTime" units="milliseconds">
<owner>flackr@chromium.org</owner>
<owner>kuscher@google.com</owner>
......@@ -2250,7 +2266,7 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<owner>jam@chromium.org</owner>
<summary>
Count of child processes killed because they sent an IPC that couldn't be
deserialized..
deserialized.
</summary>
</histogram>
......@@ -49627,6 +49643,15 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="11" label="Require phone number"/>
</enum>
<enum name="WallpaperType" type="int">
<int value="0" label="Daily (unused)"/>
<int value="1" label="Customized"/>
<int value="2" label="Default"/>
<int value="3" label="Unknown (unused)"/>
<int value="4" label="Online"/>
<int value="5" label="Policy"/>
</enum>
<enum name="WebFontCacheHit" type="int">
<int value="0" label="Miss"/>
<int value="1" label="Hit"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment