| OLD | NEW |
| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | |
| 12 #include "content/browser/user_metrics.h" | 11 #include "content/browser/user_metrics.h" |
| 13 | 12 |
| 14 namespace chromeos { | 13 namespace chromeos { |
| 15 | 14 |
| 16 StatsOptionsHandler::StatsOptionsHandler() { | 15 StatsOptionsHandler::StatsOptionsHandler() { |
| 17 } | 16 } |
| 18 | 17 |
| 19 // OptionsPageUIHandler implementation. | 18 // OptionsPageUIHandler implementation. |
| 20 void StatsOptionsHandler::GetLocalizedValues( | 19 void StatsOptionsHandler::GetLocalizedValues( |
| 21 DictionaryValue* localized_strings) { | 20 DictionaryValue* localized_strings) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 37 const std::string checked_str = UTF16ToUTF8(ExtractStringValue(args)); | 36 const std::string checked_str = UTF16ToUTF8(ExtractStringValue(args)); |
| 38 const bool enabled = (checked_str == "true"); | 37 const bool enabled = (checked_str == "true"); |
| 39 UserMetrics::RecordAction( | 38 UserMetrics::RecordAction( |
| 40 enabled ? | 39 enabled ? |
| 41 UserMetricsAction("Options_MetricsReportingCheckbox_Enable") : | 40 UserMetricsAction("Options_MetricsReportingCheckbox_Enable") : |
| 42 UserMetricsAction("Options_MetricsReportingCheckbox_Disable")); | 41 UserMetricsAction("Options_MetricsReportingCheckbox_Disable")); |
| 43 #endif | 42 #endif |
| 44 } | 43 } |
| 45 | 44 |
| 46 } // namespace chromeos | 45 } // namespace chromeos |
| OLD | NEW |