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

Side by Side Diff: chrome/browser/ui/webui/settings/safe_browsing_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 #include "chrome/browser/ui/webui/settings/safe_browsing_handler.h" 5 #include "chrome/browser/ui/webui/settings/safe_browsing_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/values.h" 9 #include "base/values.h"
10 #include "components/prefs/pref_service.h" 10 #include "components/prefs/pref_service.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 CHECK(args->GetBoolean(0, &enabled)); 57 CHECK(args->GetBoolean(0, &enabled));
58 safe_browsing::SetExtendedReportingPrefAndMetric( 58 safe_browsing::SetExtendedReportingPrefAndMetric(
59 prefs_, enabled, safe_browsing::SBER_OPTIN_SITE_CHROME_SETTINGS); 59 prefs_, enabled, safe_browsing::SBER_OPTIN_SITE_CHROME_SETTINGS);
60 } 60 }
61 61
62 void SafeBrowsingHandler::OnPrefChanged(const std::string& pref_name) { 62 void SafeBrowsingHandler::OnPrefChanged(const std::string& pref_name) {
63 DCHECK(pref_name == prefs::kSafeBrowsingExtendedReportingEnabled || 63 DCHECK(pref_name == prefs::kSafeBrowsingExtendedReportingEnabled ||
64 pref_name == prefs::kSafeBrowsingScoutReportingEnabled); 64 pref_name == prefs::kSafeBrowsingScoutReportingEnabled);
65 65
66 base::Value is_enabled(safe_browsing::IsExtendedReportingEnabled(*prefs_)); 66 base::Value is_enabled(safe_browsing::IsExtendedReportingEnabled(*prefs_));
67 CallJavascriptFunction( 67 CallJavascriptFunction("cr.webUIListenerCallback",
68 "cr.webUIListenerCallback", 68 base::Value("safe-browsing-extended-reporting-change"),
69 base::StringValue("safe-browsing-extended-reporting-change"), is_enabled); 69 is_enabled);
70 } 70 }
71 71
72 } // namespace settings 72 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/reset_settings_handler.cc ('k') | chrome/browser/ui/webui/settings/search_engines_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698