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

Side by Side Diff: chrome/browser/ui/webui/options/handler_options_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/handler_options_handler.h" 5 #include "chrome/browser/ui/webui/options/handler_options_handler.h"
6 6
7 #include <vector> 7 #include <vector>
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 registry->GetRegisteredProtocols(&protocols); 131 registry->GetRegisteredProtocols(&protocols);
132 132
133 base::ListValue handlers; 133 base::ListValue handlers;
134 for (std::vector<std::string>::iterator protocol = protocols.begin(); 134 for (std::vector<std::string>::iterator protocol = protocols.begin();
135 protocol != protocols.end(); protocol++) { 135 protocol != protocols.end(); protocol++) {
136 base::DictionaryValue* handler_value = new base::DictionaryValue(); 136 base::DictionaryValue* handler_value = new base::DictionaryValue();
137 GetHandlersForProtocol(*protocol, handler_value); 137 GetHandlersForProtocol(*protocol, handler_value);
138 handlers.Append(handler_value); 138 handlers.Append(handler_value);
139 } 139 }
140 140
141 scoped_ptr<base::ListValue> ignored_handlers(new base::ListValue()); 141 std::unique_ptr<base::ListValue> ignored_handlers(new base::ListValue());
142 GetIgnoredHandlers(ignored_handlers.get()); 142 GetIgnoredHandlers(ignored_handlers.get());
143 web_ui()->CallJavascriptFunction("HandlerOptions.setHandlers", handlers); 143 web_ui()->CallJavascriptFunction("HandlerOptions.setHandlers", handlers);
144 web_ui()->CallJavascriptFunction("HandlerOptions.setIgnoredHandlers", 144 web_ui()->CallJavascriptFunction("HandlerOptions.setIgnoredHandlers",
145 *ignored_handlers); 145 *ignored_handlers);
146 } 146 }
147 147
148 void HandlerOptionsHandler::RemoveHandler(const base::ListValue* args) { 148 void HandlerOptionsHandler::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();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 int type, 211 int type,
212 const content::NotificationSource& source, 212 const content::NotificationSource& source,
213 const content::NotificationDetails& details) { 213 const content::NotificationDetails& details) {
214 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED) 214 if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED)
215 UpdateHandlerList(); 215 UpdateHandlerList();
216 else 216 else
217 NOTREACHED(); 217 NOTREACHED();
218 } 218 }
219 219
220 } // namespace options 220 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_handler.cc ('k') | chrome/browser/ui/webui/options/home_page_overlay_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698