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

Side by Side Diff: chrome/browser/ui/webui/settings/reset_settings_handler.cc

Issue 2417143003: Add UMA reporting of reset request origin. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/settings/reset_settings_handler.h" 5 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if (!default_settings) 247 if (!default_settings)
248 default_settings.reset(new BrandcodedDefaultSettings); 248 default_settings.reset(new BrandcodedDefaultSettings);
249 249
250 GetResetter()->Reset( 250 GetResetter()->Reset(
251 ProfileResetter::ALL, std::move(default_settings), 251 ProfileResetter::ALL, std::move(default_settings),
252 base::Bind(&ResetSettingsHandler::OnResetProfileSettingsDone, 252 base::Bind(&ResetSettingsHandler::OnResetProfileSettingsDone,
253 weak_ptr_factory_.GetWeakPtr(), callback_id, send_settings, 253 weak_ptr_factory_.GetWeakPtr(), callback_id, send_settings,
254 request_origin)); 254 request_origin));
255 content::RecordAction(base::UserMetricsAction("ResetProfile")); 255 content::RecordAction(base::UserMetricsAction("ResetProfile"));
256 UMA_HISTOGRAM_BOOLEAN("ProfileReset.SendFeedback", send_settings); 256 UMA_HISTOGRAM_BOOLEAN("ProfileReset.SendFeedback", send_settings);
257 UMA_HISTOGRAM_ENUMERATION(
258 "ProfileReset.ResetRequestOrigin", request_origin,
259 reset_report::ChromeResetReport::ResetRequestOrigin_MAX + 1);
257 } 260 }
258 261
259 ProfileResetter* ResetSettingsHandler::GetResetter() { 262 ProfileResetter* ResetSettingsHandler::GetResetter() {
260 if (!resetter_) 263 if (!resetter_)
261 resetter_.reset(new ProfileResetter(profile_)); 264 resetter_.reset(new ProfileResetter(profile_));
262 return resetter_.get(); 265 return resetter_.get();
263 } 266 }
264 267
265 void ResetSettingsHandler::HandleGetTriggeredResetToolName( 268 void ResetSettingsHandler::HandleGetTriggeredResetToolName(
266 const base::ListValue* args) { 269 const base::ListValue* args) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void ResetSettingsHandler::OnShowPowerwashDialog( 302 void ResetSettingsHandler::OnShowPowerwashDialog(
300 const base::ListValue* args) { 303 const base::ListValue* args) {
301 UMA_HISTOGRAM_ENUMERATION( 304 UMA_HISTOGRAM_ENUMERATION(
302 "Reset.ChromeOS.PowerwashDialogShown", 305 "Reset.ChromeOS.PowerwashDialogShown",
303 chromeos::reset::DIALOG_FROM_OPTIONS, 306 chromeos::reset::DIALOG_FROM_OPTIONS,
304 chromeos::reset::DIALOG_VIEW_TYPE_SIZE); 307 chromeos::reset::DIALOG_VIEW_TYPE_SIZE);
305 } 308 }
306 #endif // defined(OS_CHROMEOS) 309 #endif // defined(OS_CHROMEOS)
307 310
308 } // namespace settings 311 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/reset_profile_settings_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698