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

Unified Diff: chrome/browser/chromeos/login/owner_settings_service.h

Issue 270663002: Implemented profile-aware owner key loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 6 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
Index: chrome/browser/chromeos/login/owner_settings_service.h
diff --git a/chrome/browser/chromeos/login/owner_settings_service.h b/chrome/browser/chromeos/login/owner_settings_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee0fe0fdf3c025c23a31ae647a2fb0eb83d45b72
--- /dev/null
+++ b/chrome/browser/chromeos/login/owner_settings_service.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+class Profile;
+
+namespace chromeos {
+
+// This class reloads owner key from profile slots.
Nikita (slow) 2014/05/15 12:48:58 nit: from profile NSS slots?
ygorshenin1 2014/05/16 12:09:37 Done.
+//
+// TODO (ygorshenin@): move write path for device settings here
Nikita (slow) 2014/05/15 12:48:58 nit: If this is planned as a refactoring, I sugges
ygorshenin1 2014/05/16 12:09:37 It's not a refactoring --- it's a main task for cr
+// (crbug.com/230018).
+class OwnerSettingsService : public KeyedService {
+ public:
+ virtual ~OwnerSettingsService();
+
+ private:
+ friend class OwnerSettingsServiceFactory;
+
+ explicit OwnerSettingsService(Profile* profile);
+
+ void ReloadOwnerKey();
+
+ Profile* profile_;
+
+ base::WeakPtrFactory<OwnerSettingsService> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698