summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 23:08:30 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 23:08:30 +0000
commitddf8a4b03ca007cc55ead2000aa6b54d0319cd56 (patch)
treeaa003d9d9267aaf96bdcdddc121d1a768724e56d /chrome/browser/chromeos/cros
parent9a5ed1bb31b06504a4baf190ad7f87cf5d703653 (diff)
downloadchromium_src-ddf8a4b03ca007cc55ead2000aa6b54d0319cd56.zip
chromium_src-ddf8a4b03ca007cc55ead2000aa6b54d0319cd56.tar.gz
chromium_src-ddf8a4b03ca007cc55ead2000aa6b54d0319cd56.tar.bz2
We had a problem where if chrome crashed on cros and was relaunched
it would always run with the Default profile. This meant that two different users could see the same data...a big problem. We patched in the OS by deleting the profile directory each time but this is the right fix. When the session_manager reruns Chrome on a crash it will now pass a new flag (--login-user). Chrome uses this and ensures that the profile dir (specified by --login-profile) is mounted as an encrypted drive. If this flag isn't specified then Chrome uses the Default profile, but in incognito mode so no data is written. BUG=chromiumos:1967 TEST=Login to chromeos as user1, in a terminal kill the browser process, chrome relaunches, log into gmail, sign out (using menu or power button). Login as user2, kill browser process, chrome relaunches, go to gmail. Ensure that user1 isn't logged in. Review URL: http://codereview.chromium.org/1094009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/cros')
-rw-r--r--chrome/browser/chromeos/cros/cryptohome_library.cc4
-rw-r--r--chrome/browser/chromeos/cros/cryptohome_library.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/cros/cryptohome_library.cc b/chrome/browser/chromeos/cros/cryptohome_library.cc
index 4be406c..d74d4e0 100644
--- a/chrome/browser/chromeos/cros/cryptohome_library.cc
+++ b/chrome/browser/chromeos/cros/cryptohome_library.cc
@@ -23,4 +23,8 @@ bool CryptohomeLibrary::Mount(const std::string& user_email,
return chromeos::CryptohomeMount(user_email.c_str(), passhash.c_str());
}
+bool CryptohomeLibrary::IsMounted() {
+ return chromeos::CryptohomeIsMounted();
+}
+
} // namespace chromeos
diff --git a/chrome/browser/chromeos/cros/cryptohome_library.h b/chrome/browser/chromeos/cros/cryptohome_library.h
index 1bec9fa..7fab7e6 100644
--- a/chrome/browser/chromeos/cros/cryptohome_library.h
+++ b/chrome/browser/chromeos/cros/cryptohome_library.h
@@ -31,6 +31,9 @@ class CryptohomeLibrary {
virtual bool CheckKey(const std::string& user_email,
const std::string& passhash);
+ // Asks cryptohomed if a drive is currently mounted.
+ virtual bool IsMounted();
+
private:
friend struct DefaultSingletonTraits<CryptohomeLibrary>;
friend class MockCryptohomeLibrary;