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

Side by Side Diff: content/browser/fileapi/file_writer_delegate_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 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 <stdint.h> 5 #include <stdint.h>
6 #include <limits> 6 #include <limits>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 net::URLRequestJob* MaybeInterceptResponse( 237 net::URLRequestJob* MaybeInterceptResponse(
238 net::URLRequest* request, 238 net::URLRequest* request,
239 net::NetworkDelegate* network_delegate) const override { 239 net::NetworkDelegate* network_delegate) const override {
240 return nullptr; 240 return nullptr;
241 } 241 }
242 242
243 bool IsHandledProtocol(const std::string& scheme) const override { 243 bool IsHandledProtocol(const std::string& scheme) const override {
244 return scheme == "blob"; 244 return scheme == "blob";
245 } 245 }
246 246
247 bool IsHandledURL(const GURL& url) const override {
248 return url.SchemeIs("blob");
249 }
250
251 bool IsSafeRedirectTarget(const GURL& location) const override { 247 bool IsSafeRedirectTarget(const GURL& location) const override {
252 return true; 248 return true;
253 } 249 }
254 250
255 private: 251 private:
256 const char** content_data_; 252 const char** content_data_;
257 253
258 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJobFactory); 254 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJobFactory);
259 }; 255 };
260 256
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 file_writer_delegate_.reset(); 496 file_writer_delegate_.reset();
501 497
502 EXPECT_EQ(pre_write_usage + allowed_growth, usage()); 498 EXPECT_EQ(pre_write_usage + allowed_growth, usage());
503 EXPECT_EQ(GetFileSizeOnDisk("test"), usage()); 499 EXPECT_EQ(GetFileSizeOnDisk("test"), usage());
504 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written()); 500 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written());
505 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status()); 501 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status());
506 } 502 }
507 } 503 }
508 504
509 } // namespace content 505 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698