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

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

Issue 2316043002: //content: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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 "storage/browser/fileapi/file_system_context.h" 5 #include "storage/browser/fileapi/file_system_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class FileSystemContextTest : public testing::Test { 52 class FileSystemContextTest : public testing::Test {
53 public: 53 public:
54 FileSystemContextTest() {} 54 FileSystemContextTest() {}
55 55
56 void SetUp() override { 56 void SetUp() override {
57 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 57 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
58 58
59 storage_policy_ = new MockSpecialStoragePolicy(); 59 storage_policy_ = new MockSpecialStoragePolicy();
60 60
61 mock_quota_manager_ = new MockQuotaManager( 61 mock_quota_manager_ = new MockQuotaManager(
62 false /* is_incognito */, data_dir_.path(), 62 false /* is_incognito */, data_dir_.GetPath(),
63 base::ThreadTaskRunnerHandle::Get().get(), 63 base::ThreadTaskRunnerHandle::Get().get(),
64 base::ThreadTaskRunnerHandle::Get().get(), storage_policy_.get()); 64 base::ThreadTaskRunnerHandle::Get().get(), storage_policy_.get());
65 } 65 }
66 66
67 protected: 67 protected:
68 FileSystemContext* CreateFileSystemContextForTest( 68 FileSystemContext* CreateFileSystemContextForTest(
69 storage::ExternalMountPoints* external_mount_points) { 69 storage::ExternalMountPoints* external_mount_points) {
70 return new FileSystemContext( 70 return new FileSystemContext(
71 base::ThreadTaskRunnerHandle::Get().get(), 71 base::ThreadTaskRunnerHandle::Get().get(),
72 base::ThreadTaskRunnerHandle::Get().get(), external_mount_points, 72 base::ThreadTaskRunnerHandle::Get().get(), external_mount_points,
73 storage_policy_.get(), mock_quota_manager_->proxy(), 73 storage_policy_.get(), mock_quota_manager_->proxy(),
74 ScopedVector<FileSystemBackend>(), 74 ScopedVector<FileSystemBackend>(),
75 std::vector<storage::URLRequestAutoMountHandler>(), data_dir_.path(), 75 std::vector<storage::URLRequestAutoMountHandler>(), data_dir_.GetPath(),
76 CreateAllowFileAccessOptions()); 76 CreateAllowFileAccessOptions());
77 } 77 }
78 78
79 // Verifies a *valid* filesystem url has expected values. 79 // Verifies a *valid* filesystem url has expected values.
80 void ExpectFileSystemURLMatches(const FileSystemURL& url, 80 void ExpectFileSystemURLMatches(const FileSystemURL& url,
81 const GURL& expect_origin, 81 const GURL& expect_origin,
82 storage::FileSystemType expect_mount_type, 82 storage::FileSystemType expect_mount_type,
83 storage::FileSystemType expect_type, 83 storage::FileSystemType expect_type,
84 const base::FilePath& expect_path, 84 const base::FilePath& expect_path,
85 const base::FilePath& expect_virtual_path, 85 const base::FilePath& expect_virtual_path,
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 storage::kFileSystemTypeForTransientFile)); 382 storage::kFileSystemTypeForTransientFile));
383 EXPECT_TRUE(file_system_context->GetFileSystemBackend( 383 EXPECT_TRUE(file_system_context->GetFileSystemBackend(
384 storage::kFileSystemTypeNativeLocal)); 384 storage::kFileSystemTypeNativeLocal));
385 EXPECT_TRUE(file_system_context->GetFileSystemBackend( 385 EXPECT_TRUE(file_system_context->GetFileSystemBackend(
386 storage::kFileSystemTypeNativeForPlatformApp)); 386 storage::kFileSystemTypeNativeForPlatformApp));
387 } 387 }
388 388
389 } // namespace 389 } // namespace
390 390
391 } // namespace content 391 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698