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

Side by Side Diff: chromeos/components/tether/tether_disconnector_unittest.cc

Issue 2949343002: Tether: record each type of host connection result. (Closed)
Patch Set: Reviewer comments. Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/components/tether/tether_disconnector.h" 5 #include "chromeos/components/tether/tether_disconnector.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chromeos/components/tether/connect_tethering_operation.h" 9 #include "chromeos/components/tether/connect_tethering_operation.h"
10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h" 10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 public: 100 public:
101 TestTetherConnector() 101 TestTetherConnector()
102 : TetherConnector(nullptr /* network_state_handler */, 102 : TetherConnector(nullptr /* network_state_handler */,
103 nullptr /* wifi_hotspot_connector */, 103 nullptr /* wifi_hotspot_connector */,
104 nullptr /* active_host */, 104 nullptr /* active_host */,
105 nullptr /* tether_host_fetcher */, 105 nullptr /* tether_host_fetcher */,
106 nullptr /* connection_manager */, 106 nullptr /* connection_manager */,
107 nullptr /* tether_host_response_recorder */, 107 nullptr /* tether_host_response_recorder */,
108 nullptr /* device_id_tether_network_guid_map */, 108 nullptr /* device_id_tether_network_guid_map */,
109 nullptr /* host_scan_cache */, 109 nullptr /* host_scan_cache */,
110 nullptr /* notification_presenter */), 110 nullptr /* notification_presenter */,
111 nullptr /* host_connection_metrics_logger */),
111 should_cancel_successfully_(true) {} 112 should_cancel_successfully_(true) {}
112 ~TestTetherConnector() override {} 113 ~TestTetherConnector() override {}
113 114
114 void set_should_cancel_successfully(bool should_cancel_successfully) { 115 void set_should_cancel_successfully(bool should_cancel_successfully) {
115 should_cancel_successfully_ = should_cancel_successfully; 116 should_cancel_successfully_ = should_cancel_successfully;
116 } 117 }
117 118
118 std::string last_canceled_tether_network_guid() { 119 std::string last_canceled_tether_network_guid() {
119 return last_canceled_tether_network_guid_; 120 return last_canceled_tether_network_guid_;
120 } 121 }
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 EXPECT_EQ(kSuccessResult, GetResultAndReset()); 584 EXPECT_EQ(kSuccessResult, GetResultAndReset());
584 585
585 // Stop the test here, before the operation responds in any way. This test 586 // Stop the test here, before the operation responds in any way. This test
586 // ensures that TetherDisconnector properly removes existing listeners if it 587 // ensures that TetherDisconnector properly removes existing listeners if it
587 // is destroyed while there are still active operations. 588 // is destroyed while there are still active operations.
588 } 589 }
589 590
590 } // namespace tether 591 } // namespace tether
591 592
592 } // namespace chromeos 593 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698