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

Side by Side Diff: components/data_usage/core/data_use_aggregator_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 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 "components/data_usage/core/data_use_aggregator.h" 5 #include "components/data_usage/core/data_use_aggregator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 context_->CreateRequest(url, net::IDLE, &delegate); 282 context_->CreateRequest(url, net::IDLE, &delegate);
283 request->set_first_party_for_cookies(first_party_for_cookies); 283 request->set_first_party_for_cookies(first_party_for_cookies);
284 284
285 ReportingNetworkDelegate::DataUseContextMap data_use_context_map; 285 ReportingNetworkDelegate::DataUseContextMap data_use_context_map;
286 data_use_context_map[request.get()] = 286 data_use_context_map[request.get()] =
287 ReportingNetworkDelegate::DataUseContext(tab_id, connection_type, 287 ReportingNetworkDelegate::DataUseContext(tab_id, connection_type,
288 mcc_mnc); 288 mcc_mnc);
289 reporting_network_delegate_->set_data_use_context_map(data_use_context_map); 289 reporting_network_delegate_->set_data_use_context_map(data_use_context_map);
290 290
291 request->Start(); 291 request->Start();
292 loop_.RunUntilIdle(); 292 base::RunLoop().RunUntilIdle();
293 293
294 return request; 294 return request;
295 } 295 }
296 296
297 ReportingNetworkDelegate* reporting_network_delegate() { 297 ReportingNetworkDelegate* reporting_network_delegate() {
298 return reporting_network_delegate_.get(); 298 return reporting_network_delegate_.get();
299 } 299 }
300 300
301 DataUseAggregator* data_use_aggregator() { 301 DataUseAggregator* data_use_aggregator() {
302 return data_use_aggregator_.get(); 302 return data_use_aggregator_.get();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // Off the record data use should not be reported to observers. 424 // Off the record data use should not be reported to observers.
425 data_use_aggregator()->ReportOffTheRecordDataUse(1000, 1000); 425 data_use_aggregator()->ReportOffTheRecordDataUse(1000, 1000);
426 base::RunLoop().RunUntilIdle(); 426 base::RunLoop().RunUntilIdle();
427 EXPECT_EQ(static_cast<size_t>(0), 427 EXPECT_EQ(static_cast<size_t>(0),
428 test_observer()->observed_data_use().size()); 428 test_observer()->observed_data_use().size());
429 } 429 }
430 430
431 } // namespace 431 } // namespace
432 432
433 } // namespace data_usage 433 } // namespace data_usage
OLDNEW
« no previous file with comments | « components/cronet/ios/cronet_environment.cc ('k') | components/data_use_measurement/content/data_use_measurement_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698