OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/file_system_provider/mount_path_util.h" | 5 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 FileSystemProviderMountPathUtilTest() {} | 63 FileSystemProviderMountPathUtilTest() {} |
64 ~FileSystemProviderMountPathUtilTest() override {} | 64 ~FileSystemProviderMountPathUtilTest() override {} |
65 | 65 |
66 void SetUp() override { | 66 void SetUp() override { |
67 profile_manager_.reset( | 67 profile_manager_.reset( |
68 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 68 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
69 ASSERT_TRUE(profile_manager_->SetUp()); | 69 ASSERT_TRUE(profile_manager_->SetUp()); |
70 profile_ = profile_manager_->CreateTestingProfile("testing-profile"); | 70 profile_ = profile_manager_->CreateTestingProfile("testing-profile"); |
71 user_manager_ = new FakeChromeUserManager(); | 71 user_manager_ = new FakeChromeUserManager(); |
72 user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_)); | 72 user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_)); |
73 user_manager_->AddUser(profile_->GetProfileUserName()); | 73 user_manager_->AddUser( |
| 74 AccountId::FromUserEmail(profile_->GetProfileUserName())); |
74 file_system_provider_service_ = Service::Get(profile_); | 75 file_system_provider_service_ = Service::Get(profile_); |
75 file_system_provider_service_->SetFileSystemFactoryForTesting( | 76 file_system_provider_service_->SetFileSystemFactoryForTesting( |
76 base::Bind(&FakeProvidedFileSystem::Create)); | 77 base::Bind(&FakeProvidedFileSystem::Create)); |
77 } | 78 } |
78 | 79 |
79 content::TestBrowserThreadBundle thread_bundle_; | 80 content::TestBrowserThreadBundle thread_bundle_; |
80 scoped_ptr<TestingProfileManager> profile_manager_; | 81 scoped_ptr<TestingProfileManager> profile_manager_; |
81 TestingProfile* profile_; // Owned by TestingProfileManager. | 82 TestingProfile* profile_; // Owned by TestingProfileManager. |
82 scoped_ptr<ScopedUserManagerEnabler> user_manager_enabler_; | 83 scoped_ptr<ScopedUserManagerEnabler> user_manager_enabler_; |
83 FakeChromeUserManager* user_manager_; | 84 FakeChromeUserManager* user_manager_; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 const base::FilePath kFilePath = | 293 const base::FilePath kFilePath = |
293 base::FilePath(FILE_PATH_LITERAL("provided/hello/world")); | 294 base::FilePath(FILE_PATH_LITERAL("provided/hello/world")); |
294 LocalPathParser parser(profile_, kFilePath); | 295 LocalPathParser parser(profile_, kFilePath); |
295 EXPECT_FALSE(parser.Parse()); | 296 EXPECT_FALSE(parser.Parse()); |
296 } | 297 } |
297 } | 298 } |
298 | 299 |
299 } // namespace util | 300 } // namespace util |
300 } // namespace file_system_provider | 301 } // namespace file_system_provider |
301 } // namespace chromeos | 302 } // namespace chromeos |
OLD | NEW |