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

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_temp_storage.h

Issue 8727037: Signed settings refactoring: Proper caching and more tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Next round of comments. All bots meanwhile good and manual testing seems fine as well. Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_TEMP_STORAGE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_TEMP_STORAGE_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/values.h"
13
14 class PrefService;
15
16 namespace chromeos {
17
18 // There is need (proxy settings at OOBE stage) to store settings
19 // (that are normally go into SignedSettings storage)
20 // before owner has been assigned (hence no key is available).
21 // This class serves as a transient storage in that case.
22 class SignedSettingsTempStorage {
23 public:
24 // Registers required pref section.
25 static void RegisterPrefs(PrefService* local_state);
26
27 static bool Store(const std::string& name,
28 const base::Value& value,
29 PrefService* local_state);
30 static bool Retrieve(const std::string& name,
31 base::Value** value,
32 PrefService* local_state);
33
34 // Call this after owner has been assigned to persist settings
35 // into SignedSettings storage.
36 static void Finalize(PrefService* local_state);
37
38 private:
39 SignedSettingsTempStorage() {}
40 DISALLOW_COPY_AND_ASSIGN(SignedSettingsTempStorage);
41 };
42
43 } // namespace chromeos
44
45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_TEMP_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698