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

Side by Side Diff: remoting/test/app_remoting_report_issue_request_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 "remoting/test/app_remoting_report_issue_request.h" 5 #include "remoting/test/app_remoting_report_issue_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Sets the HTTP status and data returned for a specified URL. 39 // Sets the HTTP status and data returned for a specified URL.
40 void SetFakeResponse(const GURL& url, 40 void SetFakeResponse(const GURL& url,
41 const std::string& data, 41 const std::string& data,
42 net::HttpStatusCode code, 42 net::HttpStatusCode code,
43 net::URLRequestStatus::Status status); 43 net::URLRequestStatus::Status status);
44 44
45 // Used for result verification. 45 // Used for result verification.
46 std::string dev_service_environment_url_; 46 std::string dev_service_environment_url_;
47 47
48 scoped_ptr<base::RunLoop> run_loop_; 48 std::unique_ptr<base::RunLoop> run_loop_;
49 scoped_ptr<base::Timer> timer_; 49 std::unique_ptr<base::Timer> timer_;
50 50
51 AppRemotingReportIssueRequest app_remoting_report_issue_request_; 51 AppRemotingReportIssueRequest app_remoting_report_issue_request_;
52 52
53 private: 53 private:
54 net::FakeURLFetcherFactory url_fetcher_factory_; 54 net::FakeURLFetcherFactory url_fetcher_factory_;
55 scoped_ptr<base::MessageLoopForIO> message_loop_; 55 std::unique_ptr<base::MessageLoopForIO> message_loop_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(AppRemotingReportIssueRequestTest); 57 DISALLOW_COPY_AND_ASSIGN(AppRemotingReportIssueRequestTest);
58 }; 58 };
59 59
60 AppRemotingReportIssueRequestTest::AppRemotingReportIssueRequestTest() 60 AppRemotingReportIssueRequestTest::AppRemotingReportIssueRequestTest()
61 : url_fetcher_factory_(nullptr), message_loop_(new base::MessageLoopForIO) { 61 : url_fetcher_factory_(nullptr), message_loop_(new base::MessageLoopForIO) {
62 } 62 }
63 63
64 AppRemotingReportIssueRequestTest::~AppRemotingReportIssueRequestTest() { 64 AppRemotingReportIssueRequestTest::~AppRemotingReportIssueRequestTest() {
65 } 65 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 run_loop_->Run(); 170 run_loop_->Run();
171 171
172 // Verify we stopped because of the request completing and not the timer. 172 // Verify we stopped because of the request completing and not the timer.
173 EXPECT_TRUE(timer_->IsRunning()); 173 EXPECT_TRUE(timer_->IsRunning());
174 timer_->Stop(); 174 timer_->Stop();
175 } 175 }
176 176
177 } // namespace test 177 } // namespace test
178 } // namespace remoting 178 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/app_remoting_report_issue_request.h ('k') | remoting/test/app_remoting_sample_test_driver_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698