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

Side by Side Diff: content/browser/fileapi/file_system_url_request_job_unittest.cc

Issue 686343002: Add MaybeInterceptRedirect/Response to URLRequestInterceptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chained factory interfaces Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "storage/browser/fileapi/file_system_url_request_job.h" 5 #include "storage/browser/fileapi/file_system_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( 92 net::URLRequestJob* MaybeCreateJobWithProtocolHandler(
93 const std::string& scheme, 93 const std::string& scheme,
94 net::URLRequest* request, 94 net::URLRequest* request,
95 net::NetworkDelegate* network_delegate) const override { 95 net::NetworkDelegate* network_delegate) const override {
96 return new storage::FileSystemURLRequestJob( 96 return new storage::FileSystemURLRequestJob(
97 request, network_delegate, storage_domain_, file_system_context_); 97 request, network_delegate, storage_domain_, file_system_context_);
98 } 98 }
99 99
100 net::URLRequestJob* MaybeInterceptRedirect(
101 net::URLRequest* request,
102 net::NetworkDelegate* network_delegate,
103 const GURL& location) const override {
104 return nullptr;
105 }
106
107 net::URLRequestJob* MaybeInterceptResponse(
108 net::URLRequest* request,
109 net::NetworkDelegate* network_delegate) const override {
110 return nullptr;
111 }
112
100 bool IsHandledProtocol(const std::string& scheme) const override { 113 bool IsHandledProtocol(const std::string& scheme) const override {
101 return true; 114 return true;
102 } 115 }
103 116
104 bool IsHandledURL(const GURL& url) const override { return true; } 117 bool IsHandledURL(const GURL& url) const override { return true; }
105 118
106 bool IsSafeRedirectTarget(const GURL& location) const override { 119 bool IsSafeRedirectTarget(const GURL& location) const override {
107 return false; 120 return false;
108 } 121 }
109 122
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 EXPECT_TRUE(delegate_->request_failed()); 470 EXPECT_TRUE(delegate_->request_failed());
458 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 471 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
459 472
460 ASSERT_FALSE( 473 ASSERT_FALSE(
461 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 474 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
462 kValidExternalMountPoint)); 475 kValidExternalMountPoint));
463 } 476 }
464 477
465 } // namespace 478 } // namespace
466 } // namespace content 479 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698