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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/network_dropdown.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/chromeos/login/network_dropdown.h" 5 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 NetworkMenuWebUI::NetworkMenuWebUI(NetworkMenu::Delegate* delegate, 58 NetworkMenuWebUI::NetworkMenuWebUI(NetworkMenu::Delegate* delegate,
59 content::WebUI* web_ui) 59 content::WebUI* web_ui)
60 : NetworkMenu(delegate), 60 : NetworkMenu(delegate),
61 web_ui_(web_ui) { 61 web_ui_(web_ui) {
62 } 62 }
63 63
64 void NetworkMenuWebUI::UpdateMenu() { 64 void NetworkMenuWebUI::UpdateMenu() {
65 NetworkMenu::UpdateMenu(); 65 NetworkMenu::UpdateMenu();
66 if (web_ui_) { 66 if (web_ui_) {
67 scoped_ptr<base::ListValue> list(ConvertMenuModel(GetMenuModel())); 67 std::unique_ptr<base::ListValue> list(ConvertMenuModel(GetMenuModel()));
68 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworks", *list); 68 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworks", *list);
69 } 69 }
70 } 70 }
71 71
72 void NetworkMenuWebUI::OnItemChosen(int id) { 72 void NetworkMenuWebUI::OnItemChosen(int id) {
73 int index; 73 int index;
74 ui::MenuModel* model = GetMenuModel(); 74 ui::MenuModel* model = GetMenuModel();
75 if (!ui::MenuModel::GetModelAndIndexForCommandId(id, &model, &index)) 75 if (!ui::MenuModel::GetModelAndIndexForCommandId(id, &model, &index))
76 return; 76 return;
77 model->ActivatedAt(index); 77 model->ActivatedAt(index);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", 203 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle",
204 title, icon); 204 title, icon);
205 } 205 }
206 206
207 void NetworkDropdown::RequestNetworkScan() { 207 void NetworkDropdown::RequestNetworkScan() {
208 NetworkHandler::Get()->network_state_handler()->RequestScan(); 208 NetworkHandler::Get()->network_state_handler()->RequestScan();
209 Refresh(); 209 Refresh();
210 } 210 }
211 211
212 } // namespace chromeos 212 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698