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

Unified Diff: chrome/test/base/testing_profile_manager.cc

Issue 442043002: ProfileManager doesn't depend on "--login-profile" switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests fixed. Created 6 years, 4 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/test/base/testing_profile_manager.cc
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 66c54a9570aa437b991c62df97701a55db131fc8..9aeea3c09543265d5e89911b6c961a701804552f 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -10,9 +10,14 @@
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/test/base/testing_browser_process.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#endif
+
const std::string kGuestProfileName = "Guest";
namespace testing {
@@ -59,7 +64,18 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
// Create a path for the profile based on the name.
base::FilePath profile_path(profiles_dir_.path());
+#if defined(OS_CHROMEOS)
+ if (profile_name != chrome::kInitialProfile) {
+ profile_path =
+ profile_path.Append(chromeos::ProfileHelper::Get()->GetUserProfileDir(
+ chromeos::ProfileHelper::Get()->GetUserIdHashByUserIdForTests(
+ profile_name)));
+ } else {
+ profile_path = profile_path.AppendASCII(profile_name);
+ }
+#else
profile_path = profile_path.AppendASCII(profile_name);
+#endif
// Create the profile and register it.
TestingProfile::Builder builder;

Powered by Google App Engine
This is Rietveld 408576698