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

Side by Side Diff: chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 121 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
122 ASSERT_TRUE(file_util::CreateDirectory(root_path())); 122 ASSERT_TRUE(file_util::CreateDirectory(root_path()));
123 123
124 scoped_refptr<quota::SpecialStoragePolicy> storage_policy = 124 scoped_refptr<quota::SpecialStoragePolicy> storage_policy =
125 new quota::MockSpecialStoragePolicy(); 125 new quota::MockSpecialStoragePolicy();
126 126
127 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; 127 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers;
128 additional_providers.push_back(new MediaFileSystemMountPointProvider( 128 additional_providers.push_back(new MediaFileSystemMountPointProvider(
129 data_dir_.path())); 129 data_dir_.path()));
130 130
131 file_system_context_ = 131 file_system_context_ = new fileapi::FileSystemContext(
132 new fileapi::FileSystemContext( 132 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(),
133 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(), 133 fileapi::ExternalMountPoints::CreateRefCounted().get(),
134 fileapi::ExternalMountPoints::CreateRefCounted().get(), 134 storage_policy.get(),
135 storage_policy, 135 NULL,
136 NULL, 136 additional_providers.Pass(),
137 additional_providers.Pass(), 137 data_dir_.path(),
138 data_dir_.path(), 138 fileapi::CreateAllowFileAccessOptions());
139 fileapi::CreateAllowFileAccessOptions());
140 139
141 file_util_ = file_system_context_->GetFileUtil( 140 file_util_ = file_system_context_->GetFileUtil(
142 fileapi::kFileSystemTypeNativeMedia); 141 fileapi::kFileSystemTypeNativeMedia);
143 142
144 filesystem_id_ = isolated_context()->RegisterFileSystemForPath( 143 filesystem_id_ = isolated_context()->RegisterFileSystemForPath(
145 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL); 144 fileapi::kFileSystemTypeNativeMedia, root_path(), NULL);
146 145
147 isolated_context()->AddReference(filesystem_id_); 146 isolated_context()->AddReference(filesystem_id_);
148 } 147 }
149 148
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 expected_error = base::PLATFORM_FILE_ERROR_SECURITY; 644 expected_error = base::PLATFORM_FILE_ERROR_SECURITY;
646 error = base::PLATFORM_FILE_ERROR_FAILED; 645 error = base::PLATFORM_FILE_ERROR_FAILED;
647 operation->CreateSnapshotFile(url, 646 operation->CreateSnapshotFile(url,
648 base::Bind(CreateSnapshotCallback, &error)); 647 base::Bind(CreateSnapshotCallback, &error));
649 base::MessageLoop::current()->RunUntilIdle(); 648 base::MessageLoop::current()->RunUntilIdle();
650 ASSERT_EQ(expected_error, error); 649 ASSERT_EQ(expected_error, error);
651 } 650 }
652 } 651 }
653 652
654 } // namespace chrome 653 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698