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

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

Issue 8727037: Signed settings refactoring: Proper caching and more tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 9 years, 1 month 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/signed_settings_cache.h
diff --git a/chrome/browser/chromeos/login/signed_settings_cache.h b/chrome/browser/chromeos/login/signed_settings_cache.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f84d6011b1deead305abcb6c45abfe53d43849e
--- /dev/null
+++ b/chrome/browser/chromeos/login/signed_settings_cache.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2011 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_SIGNED_SETTINGS_CACHE_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_CACHE_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/values.h"
+#include "chrome/browser/policy/proto/chrome_device_policy.pb.h"
+#include "chrome/browser/policy/proto/device_management_backend.pb.h"
+
+namespace em = enterprise_management;
+
+class PrefService;
+
+namespace chromeos {
+
+// There is need (proxy settings at OOBE stage) to store settings
+// (that normally would go into SignedSettings storage)
+// before owner has been assigned (hence no key is available).
+// This set of functions serves as a transient storage in that case.
+namespace signed_settings_cache {
+ // Registers required pref section.
+ void RegisterPrefs(PrefService* local_state);
Denis Lagno 2011/12/01 00:38:12 do we indent inside namespace?
pastarmovj 2011/12/01 10:07:17 You are right we don't I just forgot to fix it whe
+
+ bool Store(const em::PolicyData &policy, PrefService* local_state);
+ bool Retrieve(em::PolicyData *policy, PrefService* local_state);
+
+ // Call this after owner has been assigned to persist settings
+ // into SignedSettings storage.
+ void Finalize(PrefService* local_state,
+ const em::PolicyFetchResponse& policy);
+} // namespace signed_settings_cache
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_CACHE_H_

Powered by Google App Engine
This is Rietveld 408576698