OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 // Tests for Drive file systems in multi-profile setting. | 560 // Tests for Drive file systems in multi-profile setting. |
561 class MultiProfileDriveFileSystemExtensionApiTest : | 561 class MultiProfileDriveFileSystemExtensionApiTest : |
562 public FileSystemExtensionApiTestBase { | 562 public FileSystemExtensionApiTestBase { |
563 public: | 563 public: |
564 MultiProfileDriveFileSystemExtensionApiTest() : second_profile(NULL) {} | 564 MultiProfileDriveFileSystemExtensionApiTest() : second_profile(NULL) {} |
565 | 565 |
566 void SetUpOnMainThread() override { | 566 void SetUpOnMainThread() override { |
567 base::FilePath user_data_directory; | 567 base::FilePath user_data_directory; |
568 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); | 568 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); |
569 user_manager::UserManager::Get()->UserLoggedIn( | 569 user_manager::UserManager::Get()->UserLoggedIn( |
570 AccountId::FromUserEmail(kSecondProfileAccount), kSecondProfileHash, | 570 kSecondProfileAccount, kSecondProfileHash, false); |
571 false); | |
572 // Set up the secondary profile. | 571 // Set up the secondary profile. |
573 base::FilePath profile_dir = | 572 base::FilePath profile_dir = |
574 user_data_directory.Append( | 573 user_data_directory.Append( |
575 chromeos::ProfileHelper::GetUserProfileDir( | 574 chromeos::ProfileHelper::GetUserProfileDir( |
576 kSecondProfileHash).BaseName()); | 575 kSecondProfileHash).BaseName()); |
577 second_profile = | 576 second_profile = |
578 g_browser_process->profile_manager()->GetProfile(profile_dir); | 577 g_browser_process->profile_manager()->GetProfile(profile_dir); |
579 | 578 |
580 FileSystemExtensionApiTestBase::SetUpOnMainThread(); | 579 FileSystemExtensionApiTestBase::SetUpOnMainThread(); |
581 } | 580 } |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 AppFileHandlerMulti) { | 853 AppFileHandlerMulti) { |
855 EXPECT_TRUE( | 854 EXPECT_TRUE( |
856 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", | 855 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", |
857 FILE_PATH_LITERAL("manifest.json"), | 856 FILE_PATH_LITERAL("manifest.json"), |
858 "", | 857 "", |
859 FLAGS_NONE)) | 858 FLAGS_NONE)) |
860 << message_; | 859 << message_; |
861 } | 860 } |
862 } // namespace | 861 } // namespace |
863 } // namespace file_manager | 862 } // namespace file_manager |
OLD | NEW |