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
3 // found in the LICENSE file.
5 #include "remoting/test/fake_app_remoting_report_issue_request.h"
7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h"
9 #include "base/thread_task_runner_handle.h"
10 #include "base/time/time.h"
15 std::string
MakeFormattedStringForReleasedHost(
16 const std::string
& application_id
,
17 const std::string
& host_id
) {
18 return application_id
+ "::" + host_id
;
21 FakeAppRemotingReportIssueRequest::FakeAppRemotingReportIssueRequest()
22 : fail_start_request_(false) {
25 FakeAppRemotingReportIssueRequest::~FakeAppRemotingReportIssueRequest() {
28 bool FakeAppRemotingReportIssueRequest::Start(
29 const std::string
& application_id
,
30 const std::string
& host_id
,
31 const std::string
& access_token
,
32 ServiceEnvironment service_environment
,
34 base::Closure done_callback
) {
35 if (fail_start_request_
) {
41 std::string
host_id_string(application_id
+ "::" + host_id
);
42 host_ids_released_
.push_back(MakeFormattedStringForReleasedHost(
43 application_id
, host_id
));
46 scoped_refptr
<base::SingleThreadTaskRunner
> task_runner
=
47 base::ThreadTaskRunnerHandle::Get();
48 task_runner
->PostTask(FROM_HERE
, done_callback
);
54 } // namespace remoting