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

Side by Side Diff: content/browser/fileapi/file_system_dir_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_dir_url_request_job.h" 5 #include "storage/browser/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( 83 net::URLRequestJob* MaybeCreateJobWithProtocolHandler(
84 const std::string& scheme, 84 const std::string& scheme,
85 net::URLRequest* request, 85 net::URLRequest* request,
86 net::NetworkDelegate* network_delegate) const override { 86 net::NetworkDelegate* network_delegate) const override {
87 return new storage::FileSystemDirURLRequestJob( 87 return new storage::FileSystemDirURLRequestJob(
88 request, network_delegate, storage_domain_, file_system_context_); 88 request, network_delegate, storage_domain_, file_system_context_);
89 } 89 }
90 90
91 net::URLRequestJob* MaybeInterceptRedirect(
92 net::URLRequest* request,
93 net::NetworkDelegate* network_delegate,
94 const GURL& location) const override {
95 return nullptr;
96 }
97
98 net::URLRequestJob* MaybeInterceptResponse(
99 net::URLRequest* request,
100 net::NetworkDelegate* network_delegate) const override {
101 return nullptr;
102 }
103
91 bool IsHandledProtocol(const std::string& scheme) const override { 104 bool IsHandledProtocol(const std::string& scheme) const override {
92 return true; 105 return true;
93 } 106 }
94 107
95 bool IsHandledURL(const GURL& url) const override { return true; } 108 bool IsHandledURL(const GURL& url) const override { return true; }
96 109
97 bool IsSafeRedirectTarget(const GURL& location) const override { 110 bool IsSafeRedirectTarget(const GURL& location) const override {
98 return false; 111 return false;
99 } 112 }
100 113
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 ASSERT_FALSE(request_->status().is_success()); 445 ASSERT_FALSE(request_->status().is_success());
433 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 446 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
434 447
435 ASSERT_FALSE( 448 ASSERT_FALSE(
436 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 449 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
437 kValidExternalMountPoint)); 450 kValidExternalMountPoint));
438 } 451 }
439 452
440 } // namespace (anonymous) 453 } // namespace (anonymous)
441 } // namespace content 454 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698