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

Side by Side Diff: chrome/browser/ui/webui/chromeos/network_ui.cc

Issue 2415993002: Remove use of deprecated base::ListValue::Append(Value*) overload in //chrome/browser/ui/webui (Closed)
Patch Set: Add missing includes Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/network_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/network_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return; 53 return;
54 54
55 std::unique_ptr<base::DictionaryValue> device_dictionary( 55 std::unique_ptr<base::DictionaryValue> device_dictionary(
56 device_state->properties().DeepCopy()); 56 device_state->properties().DeepCopy());
57 57
58 if (!device_state->ip_configs().empty()) { 58 if (!device_state->ip_configs().empty()) {
59 // Convert IPConfig dictionary to a ListValue. 59 // Convert IPConfig dictionary to a ListValue.
60 std::unique_ptr<base::ListValue> ip_configs(new base::ListValue); 60 std::unique_ptr<base::ListValue> ip_configs(new base::ListValue);
61 for (base::DictionaryValue::Iterator iter(device_state->ip_configs()); 61 for (base::DictionaryValue::Iterator iter(device_state->ip_configs());
62 !iter.IsAtEnd(); iter.Advance()) { 62 !iter.IsAtEnd(); iter.Advance()) {
63 ip_configs->Append(iter.value().DeepCopy()); 63 ip_configs->Append(iter.value().CreateDeepCopy());
64 } 64 }
65 device_dictionary->SetWithoutPathExpansion(shill::kIPConfigsProperty, 65 device_dictionary->SetWithoutPathExpansion(shill::kIPConfigsProperty,
66 ip_configs.release()); 66 ip_configs.release());
67 } 67 }
68 if (!device_dictionary->empty()) 68 if (!device_dictionary->empty())
69 dictionary->Set(shill::kDeviceProperty, device_dictionary.release()); 69 dictionary->Set(shill::kDeviceProperty, device_dictionary.release());
70 } 70 }
71 71
72 class NetworkConfigMessageHandler : public content::WebUIMessageHandler { 72 class NetworkConfigMessageHandler : public content::WebUIMessageHandler {
73 public: 73 public:
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 html->SetDefaultResource(IDR_NETWORK_UI_HTML); 218 html->SetDefaultResource(IDR_NETWORK_UI_HTML);
219 219
220 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 220 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
221 html); 221 html);
222 } 222 }
223 223
224 NetworkUI::~NetworkUI() { 224 NetworkUI::~NetworkUI() {
225 } 225 }
226 226
227 } // namespace chromeos 227 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698