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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) 5 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
6 6
7 #include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h" 7 #include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h"
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const base::Value* current) { 89 const base::Value* current) {
90 SendMetricsReportingChange(); 90 SendMetricsReportingChange();
91 } 91 }
92 92
93 void MetricsReportingHandler::OnPrefChanged(const std::string& pref_name) { 93 void MetricsReportingHandler::OnPrefChanged(const std::string& pref_name) {
94 DCHECK_EQ(metrics::prefs::kMetricsReportingEnabled, pref_name); 94 DCHECK_EQ(metrics::prefs::kMetricsReportingEnabled, pref_name);
95 SendMetricsReportingChange(); 95 SendMetricsReportingChange();
96 } 96 }
97 97
98 void MetricsReportingHandler::SendMetricsReportingChange() { 98 void MetricsReportingHandler::SendMetricsReportingChange() {
99 CallJavascriptFunction( 99 CallJavascriptFunction("cr.webUIListenerCallback",
100 "cr.webUIListenerCallback", 100 base::Value("metrics-reporting-change"),
101 base::StringValue("metrics-reporting-change"), 101 *CreateMetricsReportingDict());
102 *CreateMetricsReportingDict());
103 } 102 }
104 103
105 } // namespace settings 104 } // namespace settings
106 105
107 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) 106 #endif // defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/languages_handler.cc ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698