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

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

Issue 508683002: Remove implicit conversions from scoped_refptr to T* in content/browser/fileapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 "webkit/browser/fileapi/file_system_url_request_job.h" 5 #include "webkit/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/file_util.h" 10 #include "base/file_util.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 void TestRequestNoRun(const GURL& url) { 209 void TestRequestNoRun(const GURL& url) {
210 TestRequestHelper(url, NULL, false, file_system_context_.get()); 210 TestRequestHelper(url, NULL, false, file_system_context_.get());
211 } 211 }
212 212
213 void CreateDirectory(const base::StringPiece& dir_name) { 213 void CreateDirectory(const base::StringPiece& dir_name) {
214 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL( 214 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
215 GURL("http://remote"), 215 GURL("http://remote"),
216 storage::kFileSystemTypeTemporary, 216 storage::kFileSystemTypeTemporary,
217 base::FilePath().AppendASCII(dir_name)); 217 base::FilePath().AppendASCII(dir_name));
218 ASSERT_EQ(base::File::FILE_OK, AsyncFileTestHelper::CreateDirectory( 218 ASSERT_EQ(
219 file_system_context_, url)); 219 base::File::FILE_OK,
220 AsyncFileTestHelper::CreateDirectory(file_system_context_.get(), url));
220 } 221 }
221 222
222 void WriteFile(const base::StringPiece& file_name, 223 void WriteFile(const base::StringPiece& file_name,
223 const char* buf, int buf_size) { 224 const char* buf, int buf_size) {
224 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL( 225 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
225 GURL("http://remote"), 226 GURL("http://remote"),
226 storage::kFileSystemTypeTemporary, 227 storage::kFileSystemTypeTemporary,
227 base::FilePath().AppendASCII(file_name)); 228 base::FilePath().AppendASCII(file_name));
228 ASSERT_EQ(base::File::FILE_OK, 229 ASSERT_EQ(base::File::FILE_OK,
229 AsyncFileTestHelper::CreateFileWithData( 230 AsyncFileTestHelper::CreateFileWithData(
230 file_system_context_, url, buf, buf_size)); 231 file_system_context_.get(), url, buf, buf_size));
231 } 232 }
232 233
233 GURL CreateFileSystemURL(const std::string& path) { 234 GURL CreateFileSystemURL(const std::string& path) {
234 return GURL(kFileSystemURLPrefix + path); 235 return GURL(kFileSystemURLPrefix + path);
235 } 236 }
236 237
237 // Put the message loop at the top, so that it's the last thing deleted. 238 // Put the message loop at the top, so that it's the last thing deleted.
238 base::MessageLoopForIO message_loop_; 239 base::MessageLoopForIO message_loop_;
239 240
240 base::ScopedTempDir temp_dir_; 241 base::ScopedTempDir temp_dir_;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 EXPECT_TRUE(delegate_->request_failed()); 459 EXPECT_TRUE(delegate_->request_failed());
459 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 460 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
460 461
461 ASSERT_FALSE( 462 ASSERT_FALSE(
462 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 463 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
463 kValidExternalMountPoint)); 464 kValidExternalMountPoint));
464 } 465 }
465 466
466 } // namespace 467 } // namespace
467 } // namespace content 468 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/file_system_quota_client_unittest.cc ('k') | content/browser/fileapi/file_writer_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698