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

Side by Side Diff: content/browser/appcache/appcache_url_request_job_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_url_request_job.h" 5 #include "content/browser/appcache/appcache_url_request_job.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 net::URLRequestJob* MaybeInterceptResponse( 101 net::URLRequestJob* MaybeInterceptResponse(
102 net::URLRequest* request, 102 net::URLRequest* request,
103 net::NetworkDelegate* network_delegate) const override { 103 net::NetworkDelegate* network_delegate) const override {
104 return nullptr; 104 return nullptr;
105 } 105 }
106 106
107 bool IsHandledProtocol(const std::string& scheme) const override { 107 bool IsHandledProtocol(const std::string& scheme) const override {
108 return scheme == "http"; 108 return scheme == "http";
109 }; 109 };
110 110
111 bool IsHandledURL(const GURL& url) const override {
112 return url.SchemeIs("http");
113 }
114
115 bool IsSafeRedirectTarget(const GURL& location) const override { 111 bool IsSafeRedirectTarget(const GURL& location) const override {
116 return false; 112 return false;
117 } 113 }
118 114
119 private: 115 private:
120 // This is mutable because MaybeCreateJobWithProtocolHandler is const. 116 // This is mutable because MaybeCreateJobWithProtocolHandler is const.
121 mutable std::unique_ptr<net::URLRequestJob> job_; 117 mutable std::unique_ptr<net::URLRequestJob> job_;
122 }; 118 };
123 119
124 } // namespace 120 } // namespace
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 895
900 TEST_F(AppCacheURLRequestJobTest, CancelRequest) { 896 TEST_F(AppCacheURLRequestJobTest, CancelRequest) {
901 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest); 897 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest);
902 } 898 }
903 899
904 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) { 900 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) {
905 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending); 901 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending);
906 } 902 }
907 903
908 } // namespace content 904 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698