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

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

Issue 7314020: Update UMA user actions parsing, primarily to include WebUI metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update regex Created 9 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 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/chromeos/stats_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 10 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
(...skipping 18 matching lines...) Expand all
29 web_ui_->RegisterMessageCallback( 29 web_ui_->RegisterMessageCallback(
30 "metricsReportingCheckboxAction", 30 "metricsReportingCheckboxAction",
31 NewCallback(this, &StatsOptionsHandler::HandleMetricsReportingCheckbox)); 31 NewCallback(this, &StatsOptionsHandler::HandleMetricsReportingCheckbox));
32 } 32 }
33 33
34 void StatsOptionsHandler::HandleMetricsReportingCheckbox( 34 void StatsOptionsHandler::HandleMetricsReportingCheckbox(
35 const ListValue* args) { 35 const ListValue* args) {
36 #if defined(GOOGLE_CHROME_BUILD) 36 #if defined(GOOGLE_CHROME_BUILD)
37 const std::string checked_str = UTF16ToUTF8(ExtractStringValue(args)); 37 const std::string checked_str = UTF16ToUTF8(ExtractStringValue(args));
38 const bool enabled = (checked_str == "true"); 38 const bool enabled = (checked_str == "true");
39 UserMetricsRecordAction( 39 UserMetrics::RecordAction(
40 enabled ? 40 enabled ?
41 UserMetricsAction("Options_MetricsReportingCheckbox_Enable") : 41 UserMetricsAction("Options_MetricsReportingCheckbox_Enable") :
42 UserMetricsAction("Options_MetricsReportingCheckbox_Disable")); 42 UserMetricsAction("Options_MetricsReportingCheckbox_Disable"));
43 #endif 43 #endif
44 } 44 }
45 45
46 } // namespace chromeos 46 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/browser/ui/webui/options/core_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698