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

Unified Diff: owner_key.cc

Issue 6469072: [login_manager] Use keygen helper to generate owner key (Closed) Base URL: http://git.chromium.org/git/login_manager.git@master
Patch Set: Add a few constants Created 9 years, 10 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: owner_key.cc
diff --git a/owner_key.cc b/owner_key.cc
index d5d9686f1431d68c105fa82b404653c9ba84d29c..541161e2e0fd2bdb432c97c183167aac770fd7bf 100644
--- a/owner_key.cc
+++ b/owner_key.cc
@@ -10,6 +10,7 @@
#include <base/logging.h>
#include <base/scoped_ptr.h>
+#include "login_manager/child_job.h"
#include "login_manager/nss_util.h"
#include "login_manager/system_utils.h"
@@ -139,4 +140,14 @@ bool OwnerKey::Sign(const char* data,
return true;
}
+
+int OwnerKey::StartGeneration(ChildJobInterface* generator) {
+ int pid = fork();
+ if (pid == 0) {
+ generator->Run();
+ exit(1); // Run() is not supposed to return.
+ }
+ return pid;
+}
+
} // namespace login_manager
« no previous file with comments | « owner_key.h ('k') | session_manager_main.cc » ('j') | session_manager_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698