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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return true; 73 return true;
74 } 74 }
75 75
76 class FileSystemDirURLRequestJobFactory : public net::URLRequestJobFactory { 76 class FileSystemDirURLRequestJobFactory : public net::URLRequestJobFactory {
77 public: 77 public:
78 FileSystemDirURLRequestJobFactory(const std::string& storage_domain, 78 FileSystemDirURLRequestJobFactory(const std::string& storage_domain,
79 FileSystemContext* context) 79 FileSystemContext* context)
80 : storage_domain_(storage_domain), file_system_context_(context) { 80 : storage_domain_(storage_domain), file_system_context_(context) {
81 } 81 }
82 82
83 virtual 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 virtual bool IsHandledProtocol(const std::string& scheme) const override { 91 bool IsHandledProtocol(const std::string& scheme) const override {
92 return true; 92 return true;
93 } 93 }
94 94
95 virtual bool IsHandledURL(const GURL& url) const override { 95 bool IsHandledURL(const GURL& url) const override { return true; }
96 return true;
97 }
98 96
99 virtual bool IsSafeRedirectTarget(const GURL& location) const override { 97 bool IsSafeRedirectTarget(const GURL& location) const override {
100 return false; 98 return false;
101 } 99 }
102 100
103 private: 101 private:
104 std::string storage_domain_; 102 std::string storage_domain_;
105 FileSystemContext* file_system_context_; 103 FileSystemContext* file_system_context_;
106 }; 104 };
107 105
108 106
109 } // namespace 107 } // namespace
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 ASSERT_FALSE(request_->status().is_success()); 432 ASSERT_FALSE(request_->status().is_success());
435 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 433 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
436 434
437 ASSERT_FALSE( 435 ASSERT_FALSE(
438 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 436 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
439 kValidExternalMountPoint)); 437 kValidExternalMountPoint));
440 } 438 }
441 439
442 } // namespace (anonymous) 440 } // namespace (anonymous)
443 } // namespace content 441 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/file_system_browsertest.cc ('k') | content/browser/fileapi/file_system_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698