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

Side by Side Diff: headless/public/util/generic_url_request_job_test.cc

Issue 2863953003: Headless: Remove obsolete Mojo code and some other obsolete APIs (Closed)
Patch Set: Rebased Created 3 years, 7 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 | « headless/public/util/generic_url_request_job.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "headless/public/util/generic_url_request_job.h" 5 #include "headless/public/util/generic_url_request_job.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 job_delegate_(job_delegate), 130 job_delegate_(job_delegate),
131 dispatcher_(dispatcher) {} 131 dispatcher_(dispatcher) {}
132 132
133 // net::URLRequestJobFactory::ProtocolHandler override. 133 // net::URLRequestJobFactory::ProtocolHandler override.
134 net::URLRequestJob* MaybeCreateJob( 134 net::URLRequestJob* MaybeCreateJob(
135 net::URLRequest* request, 135 net::URLRequest* request,
136 net::NetworkDelegate* network_delegate) const override { 136 net::NetworkDelegate* network_delegate) const override {
137 return new GenericURLRequestJob( 137 return new GenericURLRequestJob(
138 request, network_delegate, dispatcher_, 138 request, network_delegate, dispatcher_,
139 base::MakeUnique<MockFetcher>(fetch_request_, json_fetch_reply_map_), 139 base::MakeUnique<MockFetcher>(fetch_request_, json_fetch_reply_map_),
140 job_delegate_); 140 job_delegate_, nullptr);
141 } 141 }
142 142
143 private: 143 private:
144 base::DictionaryValue* fetch_request_; // NOT OWNED 144 base::DictionaryValue* fetch_request_; // NOT OWNED
145 std::map<std::string, std::string>* json_fetch_reply_map_; // NOT OWNED 145 std::map<std::string, std::string>* json_fetch_reply_map_; // NOT OWNED
146 GenericURLRequestJob::Delegate* job_delegate_; // NOT OWNED 146 GenericURLRequestJob::Delegate* job_delegate_; // NOT OWNED
147 URLRequestDispatcher* dispatcher_; // NOT OWNED 147 URLRequestDispatcher* dispatcher_; // NOT OWNED
148 }; 148 };
149 149
150 } // namespace 150 } // namespace
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 pending_request->AllowRequest(); 655 pending_request->AllowRequest();
656 }, 656 },
657 &post_data)); 657 &post_data));
658 658
659 CreateAndCompletePostJob(GURL("https://example.com"), "payload", reply); 659 CreateAndCompletePostJob(GURL("https://example.com"), "payload", reply);
660 660
661 EXPECT_EQ("payload", post_data); 661 EXPECT_EQ("payload", post_data);
662 } 662 }
663 663
664 } // namespace headless 664 } // namespace headless
OLDNEW
« no previous file with comments | « headless/public/util/generic_url_request_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698