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

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

Issue 2869383002: Unify safe_browsing* components [1]: move safe_browsing_prefs* (Closed)
Patch Set: fix win bots Created 3 years, 7 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"
11 #include "components/safe_browsing_db/safe_browsing_prefs.h" 11 #include "components/safe_browsing/common/safe_browsing_prefs.h"
12 #include "content/public/browser/web_ui.h" 12 #include "content/public/browser/web_ui.h"
13 13
14 namespace settings { 14 namespace settings {
15 15
16 SafeBrowsingHandler::SafeBrowsingHandler(PrefService* prefs) : prefs_(prefs) {} 16 SafeBrowsingHandler::SafeBrowsingHandler(PrefService* prefs) : prefs_(prefs) {}
17 SafeBrowsingHandler::~SafeBrowsingHandler() {} 17 SafeBrowsingHandler::~SafeBrowsingHandler() {}
18 18
19 void SafeBrowsingHandler::RegisterMessages() { 19 void SafeBrowsingHandler::RegisterMessages() {
20 web_ui()->RegisterMessageCallback( 20 web_ui()->RegisterMessageCallback(
21 "getSafeBrowsingExtendedReporting", 21 "getSafeBrowsingExtendedReporting",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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("cr.webUIListenerCallback", 67 CallJavascriptFunction("cr.webUIListenerCallback",
68 base::Value("safe-browsing-extended-reporting-change"), 68 base::Value("safe-browsing-extended-reporting-change"),
69 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/md_settings_localized_strings_provider.cc ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698