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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 10817007: Remove chromeos::CryptohomeLibrary::IsMounted and convert (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 8 years, 5 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index af82b91d099118b7ebee489a30357e7d602f0dc8..f0ac7b28122a2ec08b5389eafb34fd301f6f3f95 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -58,8 +58,8 @@
#endif
#if defined(OS_CHROMEOS)
-#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "chrome/browser/chromeos/cros/cryptohome_library.h"
+#include "chromeos/dbus/cryptohome_client.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#endif
@@ -163,6 +163,13 @@ void OnOpenWindowForNewProfile(Profile* profile,
}
}
+#if defined(OS_CHROMEOS)
+void CheckCryptohomeIsMounted(chromeos::DBusMethodCallStatus call_status,
+ bool is_mounted) {
+ CHECK(call_status == chromeos::DBUS_METHOD_CALL_SUCCESS && is_mounted);
stevenjb 2012/07/23 17:42:50 This shouldn't be a CHECK - it *could* fail. We sh
hashimoto 2012/07/24 01:02:58 Done. "CHECK(!GetProfileByPath(default_profile_dir
stevenjb 2012/07/24 16:46:36 I don't think that getting the profile relies on e
+}
+#endif
+
} // namespace
#if defined(ENABLE_SESSION_SERVICE)
@@ -526,8 +533,8 @@ void ProfileManager::Observe(
// TODO(davemoore) Once we have better api this check should ensure that
// our profile directory is the one that's mounted, and that it's mounted
// as the current user.
- CHECK(chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()->IsMounted())
- << "The cryptohome was not mounted at login.";
+ chromeos::DBusThreadManager::Get()->GetCryptohomeClient()->IsMounted(
+ base::Bind(&CheckCryptohomeIsMounted));
// Confirm that we hadn't loaded the new profile previously.
FilePath default_profile_dir =

Powered by Google App Engine
This is Rietveld 408576698