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

Unified Diff: remoting/test/host_list_fetcher.cc

Issue 2542343004: Updating the Chromoting Test Driver to target the test environment (Closed)
Patch Set: Addressing feedback Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/test/host_list_fetcher.h ('k') | remoting/test/host_list_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/host_list_fetcher.cc
diff --git a/remoting/test/host_list_fetcher.cc b/remoting/test/host_list_fetcher.cc
index 5cb46d565f37feef3e499f36a990b528dece06c1..1b5dc2adf0751871ab5239dae57d8fb29b15c47f 100644
--- a/remoting/test/host_list_fetcher.cc
+++ b/remoting/test/host_list_fetcher.cc
@@ -23,10 +23,9 @@ HostListFetcher::HostListFetcher() {
HostListFetcher::~HostListFetcher() {
}
-void HostListFetcher::RetrieveHostlist(
- const std::string& access_token,
- const HostlistCallback& callback) {
-
+void HostListFetcher::RetrieveHostlist(const std::string& access_token,
+ const std::string& target_url,
+ const HostlistCallback& callback) {
VLOG(2) << "HostListFetcher::RetrieveHostlist() called";
DCHECK(!access_token.empty());
@@ -36,11 +35,11 @@ void HostListFetcher::RetrieveHostlist(
hostlist_callback_ = callback;
request_context_getter_ = new remoting::URLRequestContextGetter(
- base::ThreadTaskRunnerHandle::Get(), // network_runner
- base::ThreadTaskRunnerHandle::Get()); // file_runner
+ /*network_runner=*/base::ThreadTaskRunnerHandle::Get(),
+ /*file_runner=*/base::ThreadTaskRunnerHandle::Get());
- request_ = net::URLFetcher::Create(
- GURL(kHostListProdRequestUrl), net::URLFetcher::GET, this);
+ request_ =
+ net::URLFetcher::Create(GURL(target_url), net::URLFetcher::GET, this);
request_->SetRequestContext(request_context_getter_.get());
request_->AddExtraRequestHeader("Authorization: OAuth " + access_token);
request_->Start();
« no previous file with comments | « remoting/test/host_list_fetcher.h ('k') | remoting/test/host_list_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698