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

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

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (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 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 19 matching lines...) Expand all
30 const char kReportTwo[] = "two"; 30 const char kReportTwo[] = "two";
31 const char kReportThree[] = "three"; 31 const char kReportThree[] = "three";
32 const char kReportFour[] = "four"; 32 const char kReportFour[] = "four";
33 const char kReportFive[] = "five"; 33 const char kReportFive[] = "five";
34 34
35 const base::TimeDelta kRetryDelayForTest = 35 const base::TimeDelta kRetryDelayForTest =
36 base::TimeDelta::FromMilliseconds(100); 36 base::TimeDelta::FromMilliseconds(100);
37 37
38 std::unique_ptr<KeyedService> CreateFeedbackUploaderService( 38 std::unique_ptr<KeyedService> CreateFeedbackUploaderService(
39 content::BrowserContext* context) { 39 content::BrowserContext* context) {
40 return base::WrapUnique(new feedback::FeedbackUploaderChrome(context)); 40 return base::MakeUnique<feedback::FeedbackUploaderChrome>(context);
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 namespace feedback { 45 namespace feedback {
46 46
47 class FeedbackUploaderTest : public testing::Test { 47 class FeedbackUploaderTest : public testing::Test {
48 protected: 48 protected:
49 FeedbackUploaderTest() 49 FeedbackUploaderTest()
50 : ui_thread_(content::BrowserThread::UI, &message_loop_), 50 : ui_thread_(content::BrowserThread::UI, &message_loop_),
(...skipping 110 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/feedback/feedback_data_unittest.cc ('k') | components/guest_view/browser/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698