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

Side by Side Diff: chromeos/network/prohibited_technologies_handler_unittest.cc

Issue 1556773002: Convert Pass()→std::move() in //chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chromeos/network/policy_util.cc ('k') | chromeos/network/shill_property_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromeos/network/prohibited_technologies_handler.h" 5 #include "chromeos/network/prohibited_technologies_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/json/json_reader.h" 12 #include "base/json/json_reader.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
15 #include "base/run_loop.h" 16 #include "base/run_loop.h"
16 #include "chromeos/dbus/dbus_thread_manager.h" 17 #include "chromeos/dbus/dbus_thread_manager.h"
17 #include "chromeos/dbus/shill_manager_client.h" 18 #include "chromeos/dbus/shill_manager_client.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 network_state_handler_.get()); 71 network_state_handler_.get());
71 72
72 base::RunLoop().RunUntilIdle(); 73 base::RunLoop().RunUntilIdle();
73 74
74 PreparePolicies(); 75 PreparePolicies();
75 } 76 }
76 77
77 void PreparePolicies() { 78 void PreparePolicies() {
78 scoped_ptr<base::ListValue> val(new base::ListValue()); 79 scoped_ptr<base::ListValue> val(new base::ListValue());
79 val->AppendString("WiFi"); 80 val->AppendString("WiFi");
80 global_config_disable_wifi.Set("DisableNetworkTypes", val.Pass()); 81 global_config_disable_wifi.Set("DisableNetworkTypes", std::move(val));
81 val.reset(new base::ListValue()); 82 val.reset(new base::ListValue());
82 val->AppendString("WiFi"); 83 val->AppendString("WiFi");
83 val->AppendString("Cellular"); 84 val->AppendString("Cellular");
84 global_config_disable_wifi_and_cell.Set("DisableNetworkTypes", val.Pass()); 85 global_config_disable_wifi_and_cell.Set("DisableNetworkTypes",
86 std::move(val));
85 } 87 }
86 88
87 void TearDown() override { 89 void TearDown() override {
88 prohibited_technologies_handler_.reset(); 90 prohibited_technologies_handler_.reset();
89 managed_config_handler_.reset(); 91 managed_config_handler_.reset();
90 network_profile_handler_.reset(); 92 network_profile_handler_.reset();
91 network_config_handler_.reset(); 93 network_config_handler_.reset();
92 network_state_handler_.reset(); 94 network_state_handler_.reset();
93 LoginState::Shutdown(); 95 LoginState::Shutdown();
94 DBusThreadManager::Shutdown(); 96 DBusThreadManager::Shutdown();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 network_state_handler_->SetTechnologyEnabled( 184 network_state_handler_->SetTechnologyEnabled(
183 NetworkTypePattern::Cellular(), true, network_handler::ErrorCallback()); 185 NetworkTypePattern::Cellular(), true, network_handler::ErrorCallback());
184 message_loop_.RunUntilIdle(); 186 message_loop_.RunUntilIdle();
185 EXPECT_FALSE( 187 EXPECT_FALSE(
186 network_state_handler_->IsTechnologyEnabled(NetworkTypePattern::WiFi())); 188 network_state_handler_->IsTechnologyEnabled(NetworkTypePattern::WiFi()));
187 EXPECT_TRUE(network_state_handler_->IsTechnologyEnabled( 189 EXPECT_TRUE(network_state_handler_->IsTechnologyEnabled(
188 NetworkTypePattern::Cellular())); 190 NetworkTypePattern::Cellular()));
189 }; 191 };
190 192
191 } // namespace chromeos 193 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/policy_util.cc ('k') | chromeos/network/shill_property_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698