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

Side by Side Diff: content/browser/appcache/appcache_request_handler_unittest.cc

Issue 2783343002: Remove URLRequestJobFactory::IsHandledURL. (Closed)
Patch Set: More fixes..... Created 3 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 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 "content/browser/appcache/appcache_request_handler.h" 5 #include "content/browser/appcache/appcache_request_handler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 net::URLRequestJob* MaybeInterceptResponse( 167 net::URLRequestJob* MaybeInterceptResponse(
168 net::URLRequest* request, 168 net::URLRequest* request,
169 net::NetworkDelegate* network_delegate) const override { 169 net::NetworkDelegate* network_delegate) const override {
170 return nullptr; 170 return nullptr;
171 } 171 }
172 172
173 bool IsHandledProtocol(const std::string& scheme) const override { 173 bool IsHandledProtocol(const std::string& scheme) const override {
174 return scheme == "http"; 174 return scheme == "http";
175 }; 175 };
176 176
177 bool IsHandledURL(const GURL& url) const override {
178 return url.SchemeIs("http");
179 }
180
181 bool IsSafeRedirectTarget(const GURL& location) const override { 177 bool IsSafeRedirectTarget(const GURL& location) const override {
182 return false; 178 return false;
183 } 179 }
184 180
185 private: 181 private:
186 mutable std::unique_ptr<net::URLRequestJob> job_; 182 mutable std::unique_ptr<net::URLRequestJob> job_;
187 }; 183 };
188 184
189 static void SetUpTestCase() { 185 static void SetUpTestCase() {
190 io_thread_.reset(new base::Thread("AppCacheRequestHandlerTest Thread")); 186 io_thread_.reset(new base::Thread("AppCacheRequestHandlerTest Thread"));
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 1122
1127 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { 1123 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) {
1128 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); 1124 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest);
1129 } 1125 }
1130 1126
1131 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { 1127 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) {
1132 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); 1128 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked);
1133 } 1129 }
1134 1130
1135 } // namespace content 1131 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698