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

Side by Side Diff: components/feedback/feedback_uploader_unittest.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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 | « components/drive/service/fake_drive_service.cc ('k') | components/flags_ui/flags_state.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/feedback/feedback_uploader.h" 5 #include "components/feedback/feedback_uploader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void QueueReport(const std::string& data) { 71 void QueueReport(const std::string& data) {
72 uploader_->QueueReport(data); 72 uploader_->QueueReport(data);
73 } 73 }
74 74
75 void ReportFailure(const std::string& data) { 75 void ReportFailure(const std::string& data) {
76 uploader_->RetryReport(data); 76 uploader_->RetryReport(data);
77 } 77 }
78 78
79 void MockDispatchReport(const std::string& report_data) { 79 void MockDispatchReport(const std::string& report_data) {
80 if (ContainsKey(dispatched_reports_, report_data)) { 80 if (base::ContainsKey(dispatched_reports_, report_data)) {
81 dispatched_reports_[report_data]++; 81 dispatched_reports_[report_data]++;
82 } else { 82 } else {
83 dispatched_reports_[report_data] = 1; 83 dispatched_reports_[report_data] = 1;
84 } 84 }
85 dispatched_reports_count_++; 85 dispatched_reports_count_++;
86 86
87 // Dispatch will always update the timer, whether successful or not, 87 // Dispatch will always update the timer, whether successful or not,
88 // simulate the same behavior. 88 // simulate the same behavior.
89 uploader_->UpdateUploadTimer(); 89 uploader_->UpdateUploadTimer();
90 90
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 EXPECT_EQ(dispatched_reports_.size(), 5u); 162 EXPECT_EQ(dispatched_reports_.size(), 5u);
163 EXPECT_EQ(dispatched_reports_[kReportOne], 1u); 163 EXPECT_EQ(dispatched_reports_[kReportOne], 1u);
164 EXPECT_EQ(dispatched_reports_[kReportTwo], 2u); 164 EXPECT_EQ(dispatched_reports_[kReportTwo], 2u);
165 EXPECT_EQ(dispatched_reports_[kReportThree], 2u); 165 EXPECT_EQ(dispatched_reports_[kReportThree], 2u);
166 EXPECT_EQ(dispatched_reports_[kReportFour], 1u); 166 EXPECT_EQ(dispatched_reports_[kReportFour], 1u);
167 EXPECT_EQ(dispatched_reports_[kReportFive], 1u); 167 EXPECT_EQ(dispatched_reports_[kReportFive], 1u);
168 } 168 }
169 169
170 } // namespace feedback 170 } // namespace feedback
OLDNEW
« no previous file with comments | « components/drive/service/fake_drive_service.cc ('k') | components/flags_ui/flags_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698