OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/platform_util.h" | 5 #include "chrome/browser/platform_util.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 public: | 49 public: |
50 void GetAdditionalFileSystemBackends( | 50 void GetAdditionalFileSystemBackends( |
51 content::BrowserContext* browser_context, | 51 content::BrowserContext* browser_context, |
52 const base::FilePath& storage_partition_path, | 52 const base::FilePath& storage_partition_path, |
53 ScopedVector<storage::FileSystemBackend>* additional_backends) override { | 53 ScopedVector<storage::FileSystemBackend>* additional_backends) override { |
54 storage::ExternalMountPoints* external_mount_points = | 54 storage::ExternalMountPoints* external_mount_points = |
55 content::BrowserContext::GetMountPoints(browser_context); | 55 content::BrowserContext::GetMountPoints(browser_context); |
56 | 56 |
57 // New FileSystemBackend that uses our MockSpecialStoragePolicy. | 57 // New FileSystemBackend that uses our MockSpecialStoragePolicy. |
58 chromeos::FileSystemBackend* backend = new chromeos::FileSystemBackend( | 58 chromeos::FileSystemBackend* backend = new chromeos::FileSystemBackend( |
59 nullptr, nullptr, nullptr, nullptr, external_mount_points, | 59 nullptr, nullptr, nullptr, nullptr, nullptr, external_mount_points, |
60 storage::ExternalMountPoints::GetSystemInstance()); | 60 storage::ExternalMountPoints::GetSystemInstance()); |
61 additional_backends->push_back(backend); | 61 additional_backends->push_back(backend); |
62 } | 62 } |
63 }; | 63 }; |
64 | 64 |
65 // Base test fixture class to be used on Chrome OS. | 65 // Base test fixture class to be used on Chrome OS. |
66 class PlatformUtilTestBase : public BrowserWithTestWindowTest { | 66 class PlatformUtilTestBase : public BrowserWithTestWindowTest { |
67 protected: | 67 protected: |
68 void SetUpPlatformFixture(const base::FilePath& test_directory) { | 68 void SetUpPlatformFixture(const base::FilePath& test_directory) { |
69 content_browser_client_.reset(new PlatformUtilTestContentBrowserClient()); | 69 content_browser_client_.reset(new PlatformUtilTestContentBrowserClient()); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 TEST_F(PlatformUtilPosixTest, OpenFolderWithPosixSymlinks) { | 287 TEST_F(PlatformUtilPosixTest, OpenFolderWithPosixSymlinks) { |
288 EXPECT_EQ(OPEN_SUCCEEDED, CallOpenItem(symlink_to_folder_, OPEN_FOLDER)); | 288 EXPECT_EQ(OPEN_SUCCEEDED, CallOpenItem(symlink_to_folder_, OPEN_FOLDER)); |
289 EXPECT_EQ(OPEN_FAILED_INVALID_TYPE, | 289 EXPECT_EQ(OPEN_FAILED_INVALID_TYPE, |
290 CallOpenItem(symlink_to_file_, OPEN_FOLDER)); | 290 CallOpenItem(symlink_to_file_, OPEN_FOLDER)); |
291 EXPECT_EQ(OPEN_FAILED_PATH_NOT_FOUND, | 291 EXPECT_EQ(OPEN_FAILED_PATH_NOT_FOUND, |
292 CallOpenItem(symlink_to_nowhere_, OPEN_FOLDER)); | 292 CallOpenItem(symlink_to_nowhere_, OPEN_FOLDER)); |
293 } | 293 } |
294 #endif // OS_POSIX && !OS_CHROMEOS | 294 #endif // OS_POSIX && !OS_CHROMEOS |
295 | 295 |
296 } // namespace platform_util | 296 } // namespace platform_util |
OLD | NEW |