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

Unified Diff: chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc

Issue 271533004: Turning on MultiProfile by default for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
diff --git a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
index e72e76f4f336b22de48ca8028701a745d1defe7d..097a80799553577f32ccd4b632a571e3de0082a1 100644
--- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -6,18 +6,22 @@
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/path_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chrome/browser/chromeos/drive/test_util.h"
#include "chrome/browser/chromeos/file_manager/drive_test_util.h"
#include "chrome/browser/chromeos/file_manager/volume_manager.h"
+#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/drive/fake_drive_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
@@ -65,6 +69,11 @@ const char kRestrictedMountPointName[] = "restricted";
// Default file content for the test files.
const char kTestFileContent[] = "This is some test content.";
+// User account email and directory hash for secondary account for multi-profile
+// sensitive test cases.
+const char kSecondProfileAccount[] = "profile2@test.com";
+const char kSecondProfileHash[] = "fileBrowserApiTestProfile2";
+
// Sets up the initial file system state for native local and restricted native
// local file systems. The hierarchy is the same as for the drive file system.
// The directory is created at unique_temp_dir/|mount_point_name| path.
@@ -501,11 +510,16 @@ class MultiProfileDriveFileSystemExtensionApiTest :
MultiProfileDriveFileSystemExtensionApiTest() : second_profile(NULL) {}
virtual void SetUpOnMainThread() OVERRIDE {
+ base::FilePath user_data_directory;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_directory);
+ chromeos::UserManager::Get()->UserLoggedIn(kSecondProfileAccount,
+ kSecondProfileHash,
+ false);
// Set up the secondary profile.
- base::FilePath profile_dir;
- base::CreateNewTempDirectory(base::FilePath::StringType(), &profile_dir);
- profile_dir = profile_dir.AppendASCII(
- std::string(chrome::kProfileDirPrefix) + "fileBrowserApiTestProfile2");
+ base::FilePath profile_dir =
+ user_data_directory.Append(
+ chromeos::ProfileHelper::GetUserProfileDir(
+ kSecondProfileHash).BaseName());
second_profile =
g_browser_process->profile_manager()->GetProfile(profile_dir);
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc ('k') | chrome/browser/chromeos/file_manager/path_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698