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

Side by Side Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 8520024: Updating the UMA metrics for profiles to make them more readable. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" 5 #include "chrome/browser/ui/webui/options/manage_profile_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 ProfileMetrics::LogProfileAvatarSelection(new_icon_index); 133 ProfileMetrics::LogProfileAvatarSelection(new_icon_index);
134 cache.SetAvatarIconOfProfileAtIndex(profile_index, new_icon_index); 134 cache.SetAvatarIconOfProfileAtIndex(profile_index, new_icon_index);
135 135
136 ProfileMetrics::LogProfileUpdate(profile_file_path); 136 ProfileMetrics::LogProfileUpdate(profile_file_path);
137 } 137 }
138 138
139 void ManageProfileHandler::DeleteProfile(const ListValue* args) { 139 void ManageProfileHandler::DeleteProfile(const ListValue* args) {
140 DCHECK(args); 140 DCHECK(args);
141 141
142 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::PROFILE_DELETED); 142 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED);
143 143
144 Value* file_path_value; 144 Value* file_path_value;
145 FilePath profile_file_path; 145 FilePath profile_file_path;
146 if (!args->Get(0, &file_path_value) || 146 if (!args->Get(0, &file_path_value) ||
147 !base::GetValueAsFilePath(*file_path_value, &profile_file_path)) 147 !base::GetValueAsFilePath(*file_path_value, &profile_file_path))
148 return; 148 return;
149 149
150 g_browser_process->profile_manager()->ScheduleProfileForDeletion( 150 g_browser_process->profile_manager()->ScheduleProfileForDeletion(
151 profile_file_path); 151 profile_file_path);
152 } 152 }
(...skipping 23 matching lines...) Expand all
176 profile_value.SetString("name", cache.GetNameOfProfileAtIndex(index)); 176 profile_value.SetString("name", cache.GetNameOfProfileAtIndex(index));
177 profile_value.SetString("iconURL", 177 profile_value.SetString("iconURL",
178 cache.GetDefaultAvatarIconUrl(icon_index)); 178 cache.GetDefaultAvatarIconUrl(icon_index));
179 profile_value.Set("filePath", base::CreateFilePathValue(profile_path)); 179 profile_value.Set("filePath", base::CreateFilePathValue(profile_path));
180 profile_value.SetBoolean("isCurrentProfile", 180 profile_value.SetBoolean("isCurrentProfile",
181 profile_path == current_profile_path); 181 profile_path == current_profile_path);
182 182
183 web_ui_->CallJavascriptFunction("ManageProfileOverlay.setProfileInfo", 183 web_ui_->CallJavascriptFunction("ManageProfileOverlay.setProfileInfo",
184 profile_value); 184 profile_value);
185 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698