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

Unified Diff: chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc

Issue 16037002: Workaround for LMU creation on when ChromeOS build runs on desktop. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc
index 357b9efcfccc5999fb158ef45458bbc93168e916..465a17b31cfb4c1c074b1000416f5be75a31f502 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc
+++ b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.h"
#include "base/bind.h"
+#include "base/chromeos/chromeos_version.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/task_runner_util.h"
@@ -27,6 +28,10 @@ namespace {
bool StoreManagedUserFiles(const std::string& token,
const base::FilePath& base_path) {
+ if (!base::chromeos::IsRunningOnChromeOS()) {
+ // If running on desktop, cryptohome stub does not create home directory.
+ file_util::CreateDirectory(base_path);
+ }
base::FilePath token_file = base_path.Append(kManagedUserTokenFilename);
int bytes = file_util::WriteFile(token_file, token.c_str(), token.length());
return bytes >= 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698