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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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/protocol_handlers_handler.h" 5 #include "chrome/browser/ui/webui/settings/protocol_handlers_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void ProtocolHandlersHandler::InitializeProtocolHandlerList( 134 void ProtocolHandlersHandler::InitializeProtocolHandlerList(
135 const base::ListValue* args) { 135 const base::ListValue* args) {
136 AllowJavascript(); 136 AllowJavascript();
137 SendHandlersEnabledValue(); 137 SendHandlersEnabledValue();
138 UpdateHandlerList(); 138 UpdateHandlerList();
139 } 139 }
140 140
141 void ProtocolHandlersHandler::SendHandlersEnabledValue() { 141 void ProtocolHandlersHandler::SendHandlersEnabledValue() {
142 CallJavascriptFunction("cr.webUIListenerCallback", 142 CallJavascriptFunction("cr.webUIListenerCallback",
143 base::StringValue("setHandlersEnabled"), 143 base::StringValue("setHandlersEnabled"),
144 base::FundamentalValue( 144 base::Value(
145 GetProtocolHandlerRegistry()->enabled())); 145 GetProtocolHandlerRegistry()->enabled()));
146 } 146 }
147 147
148 void ProtocolHandlersHandler::RemoveHandler(const base::ListValue* args) { 148 void ProtocolHandlersHandler::RemoveHandler(const base::ListValue* args) {
149 const base::ListValue* list; 149 const base::ListValue* list;
150 if (!args->GetList(0, &list)) { 150 if (!args->GetList(0, &list)) {
151 NOTREACHED(); 151 NOTREACHED();
152 return; 152 return;
153 } 153 }
154 154
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 void ProtocolHandlersHandler::Observe( 211 void ProtocolHandlersHandler::Observe(
212 int type, 212 int type,
213 const content::NotificationSource& source, 213 const content::NotificationSource& source,
214 const content::NotificationDetails& details) { 214 const content::NotificationDetails& details) {
215 DCHECK_EQ(chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, type); 215 DCHECK_EQ(chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, type);
216 SendHandlersEnabledValue(); 216 SendHandlersEnabledValue();
217 UpdateHandlerList(); 217 UpdateHandlerList();
218 } 218 }
219 219
220 } // namespace settings 220 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/profile_info_handler.cc ('k') | chrome/browser/ui/webui/settings/safe_browsing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698