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

Side by Side Diff: webkit/browser/fileapi/transient_file_util_unittest.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 base::FilePath virtual_path = isolated_context->CreateVirtualRootPath( 52 base::FilePath virtual_path = isolated_context->CreateVirtualRootPath(
53 fsid).AppendASCII(name); 53 fsid).AppendASCII(name);
54 *file_url = file_system_context_->CreateCrackedFileSystemURL( 54 *file_url = file_system_context_->CreateCrackedFileSystemURL(
55 GURL("http://foo"), 55 GURL("http://foo"),
56 kFileSystemTypeIsolated, 56 kFileSystemTypeIsolated,
57 virtual_path); 57 virtual_path);
58 } 58 }
59 59
60 scoped_ptr<FileSystemOperationContext> NewOperationContext() { 60 scoped_ptr<FileSystemOperationContext> NewOperationContext() {
61 return make_scoped_ptr( 61 return make_scoped_ptr(
62 new FileSystemOperationContext(file_system_context_)); 62 new FileSystemOperationContext(file_system_context_.get()));
63 } 63 }
64 64
65 FileSystemFileUtil* file_util() { return transient_file_util_.get(); } 65 FileSystemFileUtil* file_util() { return transient_file_util_.get(); }
66 66
67 private: 67 private:
68 base::MessageLoop message_loop_; 68 base::MessageLoop message_loop_;
69 base::ScopedTempDir data_dir_; 69 base::ScopedTempDir data_dir_;
70 scoped_refptr<FileSystemContext> file_system_context_; 70 scoped_refptr<FileSystemContext> file_system_context_;
71 scoped_ptr<TransientFileUtil> transient_file_util_; 71 scoped_ptr<TransientFileUtil> transient_file_util_;
72 72
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 base::MessageLoop::current()->RunUntilIdle(); 113 base::MessageLoop::current()->RunUntilIdle();
114 114
115 // Now the temporary file and the transient filesystem must be gone too. 115 // Now the temporary file and the transient filesystem must be gone too.
116 ASSERT_FALSE(file_util::PathExists(temp_path)); 116 ASSERT_FALSE(file_util::PathExists(temp_path));
117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, 117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND,
118 file_util()->GetFileInfo(NewOperationContext().get(), 118 file_util()->GetFileInfo(NewOperationContext().get(),
119 temp_url, &file_info, &path)); 119 temp_url, &file_info, &path));
120 } 120 }
121 121
122 } // namespace fileapi 122 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698